@gientech/modual 2.2.3-fix.11 → 2.2.3-fix.12
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-r5ZTSZk2.js → GientechStreamReader-HkZu015m.js} +2 -2
- package/assets/index-BDSKWteb.js +2231 -0
- package/assets/{index-YHUI3QVz.js → index-vmRMPTny.js} +1 -1
- package/assets/{style-DOnFAgN9.js → style-DLzOHEYR.js} +1 -1
- package/chat.js +1 -1
- package/chatCompare.js +1 -1
- package/databaseId.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/streamFilesReader.js +1 -1
- package/assets/index-BDc2zBbG.js +0 -2208
package/assets/index-BDc2zBbG.js
DELETED
|
@@ -1,2208 +0,0 @@
|
|
|
1
|
-
import*as N from"react";import We,{useState as St,useCallback as Tt,useImperativeHandle as Eg,useContext as wa,useRef as Kt,useEffect as Qt,useMemo as mt,forwardRef as Jo,createElement as Ki,createContext as Ca,useLayoutEffect as Sg,useReducer as Ag,Component as Bg,memo as Fg}from"react";import t0,{unstable_batchedUpdates as Ng,createPortal as Tg}from"react-dom";import{R as Jh,b as Kn}from"./index-DPA1HCWQ.js";import{b3 as Xa,b0 as Og,ay as e1,a6 as Sn,U as Ve,O as pa,az as t1,B as Xt,bb as r1,L as Gr,j as bt,V as ze,v as n1,X as $g,K as Fn,Q as Ot,b8 as no,_ as Rt,aD as Pg,l as Wi,I as nn,a as V0,m as Vi,aO as Cn,bU as Mg,aY as Rg,i as zg,aX as a1,s as vt,av as Ig,C as ei,ap as U0,a1 as o1,n as Ui,u as jg,ag as Lg,a$ as _g,W as va,an as ba,b5 as Uc,b7 as i1,bV as G0,bv as Y0,b9 as qg,bW as Gc,bX as Z0,bY as Yc,bZ as Zc,N as Gi,b_ as s1,au as X0,aj as Yi,b$ as Hg,aS as Kg,aT as Wg,aU as Vg,aV as Zt,aW as Ug,c0 as Gg,a_ as Yg,r as Q0,q as Zg,a8 as Xg,aq as Qg,o as Xc,b2 as Jg,b1 as e4,af as l1,c1 as t4,c2 as r4,J as Qc,A as u1,bp as Jc,T as r0,c3 as n4,aG as a4,D as o4,aK as i4,z as s4,G as l4,aH as u4,g as ds}from"./index-DHK_n74G.js";import{S as c1,P as d1}from"./index-B4k3tK0f.js";import{D as f1,M as c4,O as d4}from"./index-BIEKgWu0.js";import{a as n0,R as a0}from"./LeftOutlined-DZMeGbKk.js";function o0(e){return e!=null&&e===e.window}const f4=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return o0(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!o0(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 h4(e,t,r,n){const a=r-t;return e/=n/2,e<1?a/2*e*e*e+t:a/2*((e-=2)*e*e+2)+t}function p4(e,t={}){const{getContainer:r=()=>window,callback:n,duration:a=450}=t,i=r(),c=f4(i),u=Date.now(),f=()=>{const m=Date.now()-u,g=h4(m>a?a:m,c,e,a);o0(i)?i.scrollTo(window.pageXOffset,g):i instanceof Document||i.constructor.name==="HTMLDocument"?i.documentElement.scrollTop=g:i.scrollTop=g,m<a?Xa(f):typeof n=="function"&&n()};Xa(f)}const m4=e=>{const[t,r]=St(null);return[Tt((a,i,c)=>{const u=t??a,f=Math.min(u||0,a),d=Math.max(u||0,a),m=i.slice(f,d+1).map(e),g=m.some(w=>!c.has(w)),v=[];return m.forEach(w=>{g?(c.has(w)||v.push(w),c.add(w)):(c.delete(w),v.push(w))}),r(g?d:null),v},[t]),r]};function g4(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 v4=(e,t)=>Eg(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(a,i){return r[i]?r[i]:Reflect.get(a,i)}}):g4(n,r)}),b4=e=>{const t=N.useRef(e),[,r]=Og();return[()=>t.current,n=>{t.current=n,r()}]};var h1=function(t){if(e1()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(a){return a in n.style})}return!1},y4=function(t,r){if(!h1(t))return!1;var n=document.createElement("div"),a=n.style[t];return n.style[t]=r,n.style[t]!==a};function x4(e,t){return!Array.isArray(e)&&t!==void 0?y4(e,t):h1(e)}function un(e,t){return e[t]}var w4=["children"];function p1(e,t){return"".concat(e,"-").concat(t)}function C4(e){return e&&e.type&&e.type.isTreeNode}function ti(e,t){return e??t}function ao(e){var t=e||{},r=t.title,n=t._title,a=t.key,i=t.children,c=r||"title";return{title:c,_title:n||[c],key:a||"key",children:i||"children"}}function m1(e){function t(r){var n=r1(r);return n.map(function(a){if(!C4(a))return pa(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var i=a.key,c=a.props,u=c.children,f=Gr(c,w4),d=Ve({key:i},f),m=t(u);return m.length&&(d.children=m),d}).filter(function(a){return a})}return t(e)}function sl(e,t,r){var n=ao(r),a=n._title,i=n.key,c=n.children,u=new Set(t===!0?[]:t),f=[];function d(m){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return m.map(function(v,w){for(var x=p1(g?g.pos:"0",w),C=ti(v[i],x),p,A=0;A<a.length;A+=1){var B=a[A];if(v[B]!==void 0){p=v[B];break}}var E=Object.assign(t1(v,[].concat(Xt(a),[i,c])),{title:p,key:C,parent:g,pos:x,children:null,data:v,isStart:[].concat(Xt(g?g.isStart:[]),[w===0]),isEnd:[].concat(Xt(g?g.isEnd:[]),[w===m.length-1])});return f.push(E),t===!0||u.has(C)?E.children=d(v[c]||[],E):E.children=[],E})}return d(e),f}function D4(e,t,r){var n={};Sn(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var a=n,i=a.childrenPropName,c=a.externalGetKey,u=a.fieldNames,f=ao(u),d=f.key,m=f.children,g=i||m,v;c?typeof c=="string"?v=function(C){return C[c]}:typeof c=="function"&&(v=function(C){return c(C)}):v=function(C,p){return ti(C[d],p)};function w(x,C,p,A){var B=x?x[g]:e,E=x?p1(p.pos,C):"0",T=x?[].concat(Xt(A),[x]):[];if(x){var F=v(x,E),P={node:x,index:C,pos:E,key:F,parentPos:p.node?p.pos:null,level:p.level+1,nodes:T};t(P)}B&&B.forEach(function(S,L){w(S,L,{node:x,pos:E,level:p?p.level+1:-1},T)})}w(null)}function J0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,a=t.onProcessFinished,i=t.externalGetKey,c=t.childrenPropName,u=t.fieldNames,f=arguments.length>2?arguments[2]:void 0,d=i||f,m={},g={},v={posEntities:m,keyEntities:g};return r&&(v=r(v)||v),D4(e,function(w){var x=w.node,C=w.index,p=w.pos,A=w.key,B=w.parentPos,E=w.level,T=w.nodes,F={node:x,nodes:T,index:C,key:A,pos:p,level:E},P=ti(A,p);m[p]=F,g[P]=F,F.parent=m[B],F.parent&&(F.parent.children=F.parent.children||[],F.parent.children.push(F)),n&&n(F,v)},{externalGetKey:d,childrenPropName:c,fieldNames:u}),a&&a(v),v}function Oo(e,t){var r=t.expandedKeys,n=t.selectedKeys,a=t.loadedKeys,i=t.loadingKeys,c=t.checkedKeys,u=t.halfCheckedKeys,f=t.dragOverNodeKey,d=t.dropPosition,m=t.keyEntities,g=un(m,e),v={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:a.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:c.indexOf(e)!==-1,halfChecked:u.indexOf(e)!==-1,pos:String(g?g.pos:""),dragOver:f===e&&d===0,dragOverGapTop:f===e&&d===-1,dragOverGapBottom:f===e&&d===1};return v}function Mr(e){var t=e.data,r=e.expanded,n=e.selected,a=e.checked,i=e.loaded,c=e.loading,u=e.halfChecked,f=e.dragOver,d=e.dragOverGapTop,m=e.dragOverGapBottom,g=e.pos,v=e.active,w=e.eventKey,x=Ve(Ve({},t),{},{expanded:r,selected:n,checked:a,loaded:i,loading:c,halfChecked:u,dragOver:f,dragOverGapTop:d,dragOverGapBottom:m,pos:g,active:v,key:w});return"props"in x||Object.defineProperty(x,"props",{get:function(){return pa(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),x}function g1(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function k4(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,a=t.checkable;return!!(r||n)||a===!1}function E4(e,t,r,n){for(var a=new Set(e),i=new Set,c=0;c<=r;c+=1){var u=t.get(c)||new Set;u.forEach(function(g){var v=g.key,w=g.node,x=g.children,C=x===void 0?[]:x;a.has(v)&&!n(w)&&C.filter(function(p){return!n(p.node)}).forEach(function(p){a.add(p.key)})})}for(var f=new Set,d=r;d>=0;d-=1){var m=t.get(d)||new Set;m.forEach(function(g){var v=g.parent,w=g.node;if(!(n(w)||!g.parent||f.has(g.parent.key))){if(n(g.parent.node)){f.add(v.key);return}var x=!0,C=!1;(v.children||[]).filter(function(p){return!n(p.node)}).forEach(function(p){var A=p.key,B=a.has(A);x&&!B&&(x=!1),!C&&(B||i.has(A))&&(C=!0)}),x&&a.add(v.key),C&&i.add(v.key),f.add(v.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(g1(i,a))}}function S4(e,t,r,n,a){for(var i=new Set(e),c=new Set(t),u=0;u<=n;u+=1){var f=r.get(u)||new Set;f.forEach(function(v){var w=v.key,x=v.node,C=v.children,p=C===void 0?[]:C;!i.has(w)&&!c.has(w)&&!a(x)&&p.filter(function(A){return!a(A.node)}).forEach(function(A){i.delete(A.key)})})}c=new Set;for(var d=new Set,m=n;m>=0;m-=1){var g=r.get(m)||new Set;g.forEach(function(v){var w=v.parent,x=v.node;if(!(a(x)||!v.parent||d.has(v.parent.key))){if(a(v.parent.node)){d.add(w.key);return}var C=!0,p=!1;(w.children||[]).filter(function(A){return!a(A.node)}).forEach(function(A){var B=A.key,E=i.has(B);C&&!E&&(C=!1),!p&&(E||c.has(B))&&(p=!0)}),C||i.delete(w.key),p&&c.add(w.key),d.add(w.key)}})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(g1(c,i))}}function Qa(e,t,r,n){var a=[],i;n?i=n:i=k4;var c=new Set(e.filter(function(m){var g=!!un(r,m);return g||a.push(m),g})),u=new Map,f=0;Object.keys(r).forEach(function(m){var g=r[m],v=g.level,w=u.get(v);w||(w=new Set,u.set(v,w)),w.add(g),f=Math.max(f,v)}),pa(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(m){return"'".concat(m,"'")}).join(", ")));var d;return t===!0?d=E4(c,u,f,i):d=S4(c,t.halfCheckedKeys,u,f,i),d}function v1(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function A4(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 ma(e,t,r,n){var a=t0.unstable_batchedUpdates?function(c){t0.unstable_batchedUpdates(r,c)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,a,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,a,n)}}}var ri=N.createContext(null),B4=function(t){var r=t.visible,n=t.maskTransitionName,a=t.getContainer,i=t.prefixCls,c=t.rootClassName,u=t.icons,f=t.countRender,d=t.showSwitch,m=t.showProgress,g=t.current,v=t.transform,w=t.count,x=t.scale,C=t.minScale,p=t.maxScale,A=t.closeIcon,B=t.onActive,E=t.onClose,T=t.onZoomIn,F=t.onZoomOut,P=t.onRotateRight,S=t.onRotateLeft,L=t.onFlipX,O=t.onFlipY,W=t.onReset,j=t.toolbarRender,Y=t.zIndex,Z=t.image,_=wa(ri),H=u.rotateLeft,V=u.rotateRight,G=u.zoomIn,te=u.zoomOut,K=u.close,X=u.left,ye=u.right,xe=u.flipX,ke=u.flipY,Be="".concat(i,"-operations-operation");N.useEffect(function(){var be=function(Le){Le.keyCode===Fn.ESC&&E()};return r&&window.addEventListener("keydown",be),function(){window.removeEventListener("keydown",be)}},[r]);var _e=function(Ae,Le){Ae.preventDefault(),Ae.stopPropagation(),B(Le)},Q=N.useCallback(function(be){var Ae=be.type,Le=be.disabled,ut=be.onClick,ot=be.icon;return N.createElement("div",{key:Ae,className:bt(Be,"".concat(i,"-operations-operation-").concat(Ae),ze({},"".concat(i,"-operations-operation-disabled"),!!Le)),onClick:ut},ot)},[Be,i]),oe=d?Q({icon:X,onClick:function(Ae){return _e(Ae,-1)},type:"prev",disabled:g===0}):void 0,ue=d?Q({icon:ye,onClick:function(Ae){return _e(Ae,1)},type:"next",disabled:g===w-1}):void 0,le=Q({icon:ke,onClick:O,type:"flipY"}),Se=Q({icon:xe,onClick:L,type:"flipX"}),Fe=Q({icon:H,onClick:S,type:"rotateLeft"}),me=Q({icon:V,onClick:P,type:"rotateRight"}),we=Q({icon:te,onClick:F,type:"zoomOut",disabled:x<=C}),De=Q({icon:G,onClick:T,type:"zoomIn",disabled:x===p}),Te=N.createElement("div",{className:"".concat(i,"-operations")},le,Se,Fe,me,we,De);return N.createElement(n1,{visible:r,motionName:n},function(be){var Ae=be.className,Le=be.style;return N.createElement($g,{open:!0,getContainer:a??document.body},N.createElement("div",{className:bt("".concat(i,"-operations-wrapper"),Ae,c),style:Ve(Ve({},Le),{},{zIndex:Y})},A===null?null:N.createElement("button",{className:"".concat(i,"-close"),onClick:E},A||K),d&&N.createElement(N.Fragment,null,N.createElement("div",{className:bt("".concat(i,"-switch-left"),ze({},"".concat(i,"-switch-left-disabled"),g===0)),onClick:function(ot){return _e(ot,-1)}},X),N.createElement("div",{className:bt("".concat(i,"-switch-right"),ze({},"".concat(i,"-switch-right-disabled"),g===w-1)),onClick:function(ot){return _e(ot,1)}},ye)),N.createElement("div",{className:"".concat(i,"-footer")},m&&N.createElement("div",{className:"".concat(i,"-progress")},f?f(g+1,w):N.createElement("bdi",null,"".concat(g+1," / ").concat(w))),j?j(Te,Ve(Ve({icons:{prevIcon:oe,nextIcon:ue,flipYIcon:le,flipXIcon:Se,rotateLeftIcon:Fe,rotateRightIcon:me,zoomOutIcon:we,zoomInIcon:De},actions:{onActive:B,onFlipY:O,onFlipX:L,onRotateLeft:S,onRotateRight:P,onZoomOut:F,onZoomIn:T,onReset:W,onClose:E},transform:v},_?{current:g,total:w}:{}),{},{image:Z})):Te)))})},bi={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function F4(e,t,r,n){var a=Kt(null),i=Kt([]),c=St(bi),u=Ot(c,2),f=u[0],d=u[1],m=function(x){d(bi),no(bi,f)||n==null||n({transform:bi,action:x})},g=function(x,C){a.current===null&&(i.current=[],a.current=Xa(function(){d(function(p){var A=p;return i.current.forEach(function(B){A=Ve(Ve({},A),B)}),a.current=null,n==null||n({transform:A,action:C}),A})})),i.current.push(Ve(Ve({},f),x))},v=function(x,C,p,A,B){var E=e.current,T=E.width,F=E.height,P=E.offsetWidth,S=E.offsetHeight,L=E.offsetLeft,O=E.offsetTop,W=x,j=f.scale*x;j>r?(j=r,W=r/f.scale):j<t&&(j=B?j:t,W=j/f.scale);var Y=p??innerWidth/2,Z=A??innerHeight/2,_=W-1,H=_*T*.5,V=_*F*.5,G=_*(Y-f.x-L),te=_*(Z-f.y-O),K=f.x-(G-H),X=f.y-(te-V);if(x<1&&j===1){var ye=P*j,xe=S*j,ke=v1(),Be=ke.width,_e=ke.height;ye<=Be&&xe<=_e&&(K=0,X=0)}g({x:K,y:X,scale:j},C)};return{transform:f,resetTransform:m,updateTransform:g,dispatchZoomChange:v}}function ed(e,t,r,n){var a=t+r,i=(r-n)/2;if(r>n){if(t>0)return ze({},e,i);if(t<0&&a<n)return ze({},e,-i)}else if(t<0||a>n)return ze({},e,t<0?i:-i);return{}}function b1(e,t,r,n){var a=v1(),i=a.width,c=a.height,u=null;return e<=i&&t<=c?u={x:0,y:0}:(e>i||t>c)&&(u=Ve(Ve({},ed("x",r,e,i)),ed("y",n,t,c))),u}var Va=1,N4=1;function T4(e,t,r,n,a,i,c){var u=a.rotate,f=a.scale,d=a.x,m=a.y,g=St(!1),v=Ot(g,2),w=v[0],x=v[1],C=Kt({diffX:0,diffY:0,transformX:0,transformY:0}),p=function(F){!t||F.button!==0||(F.preventDefault(),F.stopPropagation(),C.current={diffX:F.pageX-d,diffY:F.pageY-m,transformX:d,transformY:m},x(!0))},A=function(F){r&&w&&i({x:F.pageX-C.current.diffX,y:F.pageY-C.current.diffY},"move")},B=function(){if(r&&w){x(!1);var F=C.current,P=F.transformX,S=F.transformY,L=d!==P&&m!==S;if(!L)return;var O=e.current.offsetWidth*f,W=e.current.offsetHeight*f,j=e.current.getBoundingClientRect(),Y=j.left,Z=j.top,_=u%180!==0,H=b1(_?W:O,_?O:W,Y,Z);H&&i(Ve({},H),"dragRebound")}},E=function(F){if(!(!r||F.deltaY==0)){var P=Math.abs(F.deltaY/100),S=Math.min(P,N4),L=Va+S*n;F.deltaY>0&&(L=Va/L),c(L,"wheel",F.clientX,F.clientY)}};return Qt(function(){var T,F,P,S;if(t){P=ma(window,"mouseup",B,!1),S=ma(window,"mousemove",A,!1);try{window.top!==window.self&&(T=ma(window.top,"mouseup",B,!1),F=ma(window.top,"mousemove",A,!1))}catch{}}return function(){var L,O,W,j;(L=P)===null||L===void 0||L.remove(),(O=S)===null||O===void 0||O.remove(),(W=T)===null||W===void 0||W.remove(),(j=F)===null||j===void 0||j.remove()}},[r,w,d,m,u,t]),{isMoving:w,onMouseDown:p,onMouseMove:A,onMouseUp:B,onWheel:E}}function O4(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 y1(e){var t=e.src,r=e.isCustomPlaceholder,n=e.fallback,a=St(r?"loading":"normal"),i=Ot(a,2),c=i[0],u=i[1],f=Kt(!1),d=c==="error";Qt(function(){var w=!0;return O4(t).then(function(x){!x&&w&&u("error")}),function(){w=!1}},[t]),Qt(function(){r&&!f.current?u("loading"):d&&u("normal")},[t]);var m=function(){u("normal")},g=function(x){f.current=!1,c==="loading"&&x!==null&&x!==void 0&&x.complete&&(x.naturalWidth||x.naturalHeight)&&(f.current=!0,m())},v=d&&n?{src:n}:{onLoad:m,src:t};return[g,v,c]}function Zi(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.hypot(r,n)}function $4(e,t,r,n){var a=Zi(e,r),i=Zi(t,n);if(a===0&&i===0)return[e.x,e.y];var c=a/(a+i),u=e.x+c*(t.x-e.x),f=e.y+c*(t.y-e.y);return[u,f]}function P4(e,t,r,n,a,i,c){var u=a.rotate,f=a.scale,d=a.x,m=a.y,g=St(!1),v=Ot(g,2),w=v[0],x=v[1],C=Kt({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),p=function(F){C.current=Ve(Ve({},C.current),F)},A=function(F){if(t){F.stopPropagation(),x(!0);var P=F.touches,S=P===void 0?[]:P;S.length>1?p({point1:{x:S[0].clientX,y:S[0].clientY},point2:{x:S[1].clientX,y:S[1].clientY},eventType:"touchZoom"}):p({point1:{x:S[0].clientX-d,y:S[0].clientY-m},eventType:"move"})}},B=function(F){var P=F.touches,S=P===void 0?[]:P,L=C.current,O=L.point1,W=L.point2,j=L.eventType;if(S.length>1&&j==="touchZoom"){var Y={x:S[0].clientX,y:S[0].clientY},Z={x:S[1].clientX,y:S[1].clientY},_=$4(O,W,Y,Z),H=Ot(_,2),V=H[0],G=H[1],te=Zi(Y,Z)/Zi(O,W);c(te,"touchZoom",V,G,!0),p({point1:Y,point2:Z,eventType:"touchZoom"})}else j==="move"&&(i({x:S[0].clientX-O.x,y:S[0].clientY-O.y},"move"),p({eventType:"move"}))},E=function(){if(r){if(w&&x(!1),p({eventType:"none"}),n>f)return i({x:0,y:0,scale:n},"touchZoom");var F=e.current.offsetWidth*f,P=e.current.offsetHeight*f,S=e.current.getBoundingClientRect(),L=S.left,O=S.top,W=u%180!==0,j=b1(W?P:F,W?F:P,L,O);j&&i(Ve({},j),"dragRebound")}};return Qt(function(){var T;return r&&t&&(T=ma(window,"touchmove",function(F){return F.preventDefault()},{passive:!1})),function(){var F;(F=T)===null||F===void 0||F.remove()}},[r,t]),{isTouching:w,onTouchStart:A,onTouchMove:B,onTouchEnd:E}}var M4=["fallback","src","imgRef"],R4=["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"],z4=function(t){var r=t.fallback,n=t.src,a=t.imgRef,i=Gr(t,M4),c=y1({src:n,fallback:r}),u=Ot(c,2),f=u[0],d=u[1];return We.createElement("img",Rt({ref:function(g){a.current=g,f(g)}},i,d))},x1=function(t){var r=t.prefixCls,n=t.src,a=t.alt,i=t.imageInfo,c=t.fallback,u=t.movable,f=u===void 0?!0:u,d=t.onClose,m=t.visible,g=t.icons,v=g===void 0?{}:g,w=t.rootClassName,x=t.closeIcon,C=t.getContainer,p=t.current,A=p===void 0?0:p,B=t.count,E=B===void 0?1:B,T=t.countRender,F=t.scaleStep,P=F===void 0?.5:F,S=t.minScale,L=S===void 0?1:S,O=t.maxScale,W=O===void 0?50:O,j=t.transitionName,Y=j===void 0?"zoom":j,Z=t.maskTransitionName,_=Z===void 0?"fade":Z,H=t.imageRender,V=t.imgCommonProps,G=t.toolbarRender,te=t.onTransform,K=t.onChange,X=Gr(t,R4),ye=Kt(),xe=wa(ri),ke=xe&&E>1,Be=xe&&E>=1,_e=St(!0),Q=Ot(_e,2),oe=Q[0],ue=Q[1],le=F4(ye,L,W,te),Se=le.transform,Fe=le.resetTransform,me=le.updateTransform,we=le.dispatchZoomChange,De=T4(ye,f,m,P,Se,me,we),Te=De.isMoving,be=De.onMouseDown,Ae=De.onWheel,Le=P4(ye,f,m,L,Se,me,we),ut=Le.isTouching,ot=Le.onTouchStart,Oe=Le.onTouchMove,Ie=Le.onTouchEnd,Ge=Se.rotate,dt=Se.scale,Je=bt(ze({},"".concat(r,"-moving"),Te));Qt(function(){oe||ue(!0)},[oe]);var at=function(){Fe("close")},Lt=function(){we(Va+P,"zoomIn")},Ct=function(){we(Va/(Va+P),"zoomOut")},At=function(){me({rotate:Ge+90},"rotateRight")},$t=function(){me({rotate:Ge-90},"rotateLeft")},je=function(){me({flipX:!Se.flipX},"flipX")},fe=function(){me({flipY:!Se.flipY},"flipY")},lt=function(){Fe("reset")},_t=function(or){var mr=A+or;!Number.isInteger(mr)||mr<0||mr>E-1||(ue(!1),Fe(or<0?"prev":"next"),K==null||K(mr,A))},Wt=function(or){!m||!ke||(or.keyCode===Fn.LEFT?_t(-1):or.keyCode===Fn.RIGHT&&_t(1))},Pt=function(or){m&&(dt!==1?me({x:0,y:0,scale:1},"doubleClick"):we(Va+P,"doubleClick",or.clientX,or.clientY))};Qt(function(){var It=ma(window,"keydown",Wt,!1);return function(){It.remove()}},[m,ke,A]);var Bt=We.createElement(z4,Rt({},V,{width:t.width,height:t.height,imgRef:ye,className:"".concat(r,"-img"),alt:a,style:{transform:"translate3d(".concat(Se.x,"px, ").concat(Se.y,"px, 0) scale3d(").concat(Se.flipX?"-":"").concat(dt,", ").concat(Se.flipY?"-":"").concat(dt,", 1) rotate(").concat(Ge,"deg)"),transitionDuration:(!oe||ut)&&"0s"},fallback:c,src:n,onWheel:Ae,onMouseDown:be,onDoubleClick:Pt,onTouchStart:ot,onTouchMove:Oe,onTouchEnd:Ie,onTouchCancel:Ie})),yt=Ve({url:n,alt:a},i);return We.createElement(We.Fragment,null,We.createElement(Pg,Rt({transitionName:Y,maskTransitionName:_,closable:!1,keyboard:!0,prefixCls:r,onClose:d,visible:m,classNames:{wrapper:Je},rootClassName:w,getContainer:C},X,{afterClose:at}),We.createElement("div",{className:"".concat(r,"-img-wrapper")},H?H(Bt,Ve({transform:Se,image:yt},xe?{current:A}:{})):Bt)),We.createElement(B4,{visible:m,transform:Se,maskTransitionName:_,closeIcon:x,getContainer:C,prefixCls:r,rootClassName:w,icons:v,countRender:T,showSwitch:ke,showProgress:Be,current:A,count:E,scale:dt,minScale:L,maxScale:W,toolbarRender:G,onActive:_t,onZoomIn:Lt,onZoomOut:Ct,onRotateRight:At,onRotateLeft:$t,onFlipX:je,onFlipY:fe,onClose:d,onReset:lt,zIndex:X.zIndex!==void 0?X.zIndex+1:void 0,image:yt}))},i0=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function I4(e){var t=N.useState({}),r=Ot(t,2),n=r[0],a=r[1],i=N.useCallback(function(u,f){return a(function(d){return Ve(Ve({},d),{},ze({},u,f))}),function(){a(function(d){var m=Ve({},d);return delete m[u],m})}},[]),c=N.useMemo(function(){return e?e.map(function(u){if(typeof u=="string")return{data:{src:u}};var f={};return Object.keys(u).forEach(function(d){["src"].concat(Xt(i0)).includes(d)&&(f[d]=u[d])}),{data:f}}):Object.keys(n).reduce(function(u,f){var d=n[f],m=d.canPreview,g=d.data;return m&&u.push({data:g,id:f}),u},[])},[e,n]);return[c,i,!!e]}var j4=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],L4=["src"],_4=function(t){var r,n=t.previewPrefixCls,a=n===void 0?"rc-image-preview":n,i=t.children,c=t.icons,u=c===void 0?{}:c,f=t.items,d=t.preview,m=t.fallback,g=Sn(d)==="object"?d:{},v=g.visible,w=g.onVisibleChange,x=g.getContainer,C=g.current,p=g.movable,A=g.minScale,B=g.maxScale,E=g.countRender,T=g.closeIcon,F=g.onChange,P=g.onTransform,S=g.toolbarRender,L=g.imageRender,O=Gr(g,j4),W=I4(f),j=Ot(W,3),Y=j[0],Z=j[1],_=j[2],H=Wi(0,{value:C}),V=Ot(H,2),G=V[0],te=V[1],K=St(!1),X=Ot(K,2),ye=X[0],xe=X[1],ke=((r=Y[G])===null||r===void 0?void 0:r.data)||{},Be=ke.src,_e=Gr(ke,L4),Q=Wi(!!v,{value:v,onChange:function(ut,ot){w==null||w(ut,ot,G)}}),oe=Ot(Q,2),ue=oe[0],le=oe[1],Se=St(null),Fe=Ot(Se,2),me=Fe[0],we=Fe[1],De=N.useCallback(function(Le,ut,ot,Oe){var Ie=_?Y.findIndex(function(Ge){return Ge.data.src===ut}):Y.findIndex(function(Ge){return Ge.id===Le});te(Ie<0?0:Ie),le(!0),we({x:ot,y:Oe}),xe(!0)},[Y,_]);N.useEffect(function(){ue?ye||te(0):xe(!1)},[ue]);var Te=function(ut,ot){te(ut),F==null||F(ut,ot)},be=function(){le(!1),we(null)},Ae=N.useMemo(function(){return{register:Z,onPreview:De}},[Z,De]);return N.createElement(ri.Provider,{value:Ae},i,N.createElement(x1,Rt({"aria-hidden":!ue,movable:p,visible:ue,prefixCls:a,closeIcon:T,onClose:be,mousePosition:me,imgCommonProps:_e,src:Be,fallback:m,icons:u,minScale:A,maxScale:B,getContainer:x,current:G,count:Y.length,countRender:E,onTransform:P,toolbarRender:S,imageRender:L,onChange:Te},O)))},td=0;function q4(e,t){var r=N.useState(function(){return td+=1,String(td)}),n=Ot(r,1),a=n[0],i=N.useContext(ri),c={data:t,canPreview:e};return N.useEffect(function(){if(i)return i.register(a,c)},[]),N.useEffect(function(){i&&i.register(a,c)},[e,t]),a}var H4=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],K4=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],eu=function(t){var r=t.src,n=t.alt,a=t.onPreviewClose,i=t.prefixCls,c=i===void 0?"rc-image":i,u=t.previewPrefixCls,f=u===void 0?"".concat(c,"-preview"):u,d=t.placeholder,m=t.fallback,g=t.width,v=t.height,w=t.style,x=t.preview,C=x===void 0?!0:x,p=t.className,A=t.onClick,B=t.onError,E=t.wrapperClassName,T=t.wrapperStyle,F=t.rootClassName,P=Gr(t,H4),S=d&&d!==!0,L=Sn(C)==="object"?C:{},O=L.src,W=L.visible,j=W===void 0?void 0:W,Y=L.onVisibleChange,Z=Y===void 0?a:Y,_=L.getContainer,H=_===void 0?void 0:_,V=L.mask,G=L.maskClassName,te=L.movable,K=L.icons,X=L.scaleStep,ye=L.minScale,xe=L.maxScale,ke=L.imageRender,Be=L.toolbarRender,_e=Gr(L,K4),Q=O??r,oe=Wi(!!j,{value:j,onChange:Z}),ue=Ot(oe,2),le=ue[0],Se=ue[1],Fe=y1({src:r,isCustomPlaceholder:S,fallback:m}),me=Ot(Fe,3),we=me[0],De=me[1],Te=me[2],be=St(null),Ae=Ot(be,2),Le=Ae[0],ut=Ae[1],ot=wa(ri),Oe=!!C,Ie=function(){Se(!1),ut(null)},Ge=bt(c,E,F,ze({},"".concat(c,"-error"),Te==="error")),dt=mt(function(){var Ct={};return i0.forEach(function(At){t[At]!==void 0&&(Ct[At]=t[At])}),Ct},i0.map(function(Ct){return t[Ct]})),Je=mt(function(){return Ve(Ve({},dt),{},{src:Q})},[Q,dt]),at=q4(Oe,Je),Lt=function(At){var $t=A4(At.target),je=$t.left,fe=$t.top;ot?ot.onPreview(at,Q,je,fe):(ut({x:je,y:fe}),Se(!0)),A==null||A(At)};return N.createElement(N.Fragment,null,N.createElement("div",Rt({},P,{className:Ge,onClick:Oe?Lt:A,style:Ve({width:g,height:v},T)}),N.createElement("img",Rt({},dt,{className:bt("".concat(c,"-img"),ze({},"".concat(c,"-img-placeholder"),d===!0),p),style:Ve({height:v},w),ref:we},De,{width:g,height:v,onError:B})),Te==="loading"&&N.createElement("div",{"aria-hidden":"true",className:"".concat(c,"-placeholder")},d),V&&Oe&&N.createElement("div",{className:bt("".concat(c,"-mask"),G),style:{display:(w==null?void 0:w.display)==="none"?"none":void 0}},V)),!ot&&Oe&&N.createElement(x1,Rt({"aria-hidden":!le,visible:le,prefixCls:f,onClose:Ie,mousePosition:Le,src:Q,alt:n,imageInfo:{width:g,height:v},fallback:m,getContainer:H,icons:K,movable:te,scaleStep:X,minScale:ye,maxScale:xe,rootClassName:F,imageRender:ke,imgCommonProps:dt,toolbarRender:Be},_e)))};eu.PreviewGroup=_4;var W4={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"},V4=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:W4}))},U4=N.forwardRef(V4),G4={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"},Y4=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:G4}))},Z4=N.forwardRef(Y4),X4={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"},Q4=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:X4}))},rd=N.forwardRef(Q4),J4={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"},e2=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:J4}))},t2=N.forwardRef(e2),r2={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"},n2=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:r2}))},a2=N.forwardRef(n2);const s0=e=>({position:e||"absolute",inset:0}),o2=e=>{const{iconCls:t,motionDurationSlow:r,paddingXXS:n,marginXXS:a,prefixCls:i,colorTextLightSolid:c}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:c,background:new Cn("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${i}-mask-info`]:Object.assign(Object.assign({},a1),{padding:`0 ${vt(n)}`,[t]:{marginInlineEnd:a,svg:{verticalAlign:"baseline"}}})}},i2=e=>{const{previewCls:t,modalMaskBg:r,paddingSM:n,marginXL:a,margin:i,paddingLG:c,previewOperationColorDisabled:u,previewOperationHoverColor:f,motionDurationSlow:d,iconCls:m,colorTextLightSolid:g}=e,v=new Cn(r).setA(.1),w=v.clone().setA(.2);return{[`${t}-footer`]:{position:"fixed",bottom:a,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)"},[`${t}-progress`]:{marginBottom:i},[`${t}-close`]:{position:"fixed",top:a,right:{_skip_check_:!0,value:a},display:"flex",color:g,backgroundColor:v.toRgbString(),borderRadius:"50%",padding:n,outline:0,border:0,cursor:"pointer",transition:`all ${d}`,"&:hover":{backgroundColor:w.toRgbString()},[`& > ${m}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${vt(c)}`,backgroundColor:v.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:u,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${m}`]:{fontSize:e.previewOperationSize}}}}},s2=e=>{const{modalMaskBg:t,iconCls:r,previewOperationColorDisabled:n,previewCls:a,zIndexPopup:i,motionDurationSlow:c}=e,u=new Cn(t).setA(.1),f=u.clone().setA(.2);return{[`${a}-switch-left, ${a}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:e.calc(i).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:u.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}},[`${a}-switch-left`]:{insetInlineStart:e.marginSM},[`${a}-switch-right`]:{insetInlineEnd:e.marginSM}}},l2=e=>{const{motionEaseOut:t,previewCls:r,motionDurationSlow:n,componentCls:a}=e;return[{[`${a}-preview-root`]:{[r]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${r}-body`]:Object.assign(Object.assign({},s0()),{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({},s0()),{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"}}}}},{[`${a}-preview-root`]:{[`${r}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${a}-preview-operations-wrapper`]:{position:"fixed",zIndex:e.calc(e.zIndexPopup).add(1).equal()},"&":[i2(e),s2(e)]}]},u2=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({},o2(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},s0())}}},c2=e=>{const{previewCls:t}=e;return{[`${t}-root`]:zg(e,"zoom"),"&":Rg(e,!0)}},d2=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new Cn(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new Cn(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new Cn(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),w1=V0("Image",e=>{const t=`${e.componentCls}-preview`,r=Vi(e,{previewCls:t,modalMaskBg:new Cn("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[u2(r),l2(r),Mg(Vi(r,{componentCls:t})),c2(r)]},d2);var f2=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const C1={rotateLeft:N.createElement(U4,null),rotateRight:N.createElement(Z4,null),zoomIn:N.createElement(t2,null),zoomOut:N.createElement(a2,null),close:N.createElement(Ig,null),left:N.createElement(a0,null),right:N.createElement(n0,null),flipX:N.createElement(rd,null),flipY:N.createElement(rd,{rotate:90})},h2=e=>{var{previewPrefixCls:t,preview:r}=e,n=f2(e,["previewPrefixCls","preview"]);const{getPrefixCls:a,direction:i}=N.useContext(ei),c=a("image",t),u=`${c}-preview`,f=a(),d=U0(c),[m,g,v]=w1(c,d),[w]=o1("ImagePreview",typeof r=="object"?r.zIndex:void 0),x=N.useMemo(()=>Object.assign(Object.assign({},C1),{left:i==="rtl"?N.createElement(n0,null):N.createElement(a0,null),right:i==="rtl"?N.createElement(a0,null):N.createElement(n0,null)}),[i]),C=N.useMemo(()=>{var p;if(r===!1)return r;const A=typeof r=="object"?r:{},B=bt(g,v,d,(p=A.rootClassName)!==null&&p!==void 0?p:"");return Object.assign(Object.assign({},A),{transitionName:Ui(f,"zoom",A.transitionName),maskTransitionName:Ui(f,"fade",A.maskTransitionName),rootClassName:B,zIndex:w})},[r,f,w,g,v,d]);return m(N.createElement(eu.PreviewGroup,Object.assign({preview:C,previewPrefixCls:u,icons:x},n)))};var nd=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const D1=e=>{const{prefixCls:t,preview:r,className:n,rootClassName:a,style:i,fallback:c}=e,u=nd(e,["prefixCls","preview","className","rootClassName","style","fallback"]),{getPrefixCls:f,getPopupContainer:d,className:m,style:g,preview:v,fallback:w}=jg("image"),[x]=Lg("Image"),C=f("image",t),p=f(),A=U0(C),[B,E,T]=w1(C,A),F=bt(a,E,T,A),P=bt(n,E,m),[S]=o1("ImagePreview",typeof r=="object"?r.zIndex:void 0),L=N.useMemo(()=>{if(r===!1)return r;const j=typeof r=="object"?r:{},{getContainer:Y,closeIcon:Z,rootClassName:_,destroyOnClose:H,destroyOnHidden:V}=j,G=nd(j,["getContainer","closeIcon","rootClassName","destroyOnClose","destroyOnHidden"]);return Object.assign(Object.assign({mask:N.createElement("div",{className:`${C}-mask-info`},N.createElement(_g,null),x==null?void 0:x.preview),icons:C1},G),{destroyOnClose:V??H,rootClassName:bt(F,_),getContainer:Y??d,transitionName:Ui(p,"zoom",j.transitionName),maskTransitionName:Ui(p,"fade",j.maskTransitionName),zIndex:S,closeIcon:Z??(v==null?void 0:v.closeIcon)})},[r,x,v==null?void 0:v.closeIcon]),O=Object.assign(Object.assign({},g),i),W=c??w;return B(N.createElement(eu,Object.assign({prefixCls:C,preview:L,rootClassName:F,className:P,style:O,fallback:W},u)))};D1.PreviewGroup=h2;var da={},ni="rc-table-internal-hook";function tu(e){var t=N.createContext(void 0),r=function(a){var i=a.value,c=a.children,u=N.useRef(i);u.current=i;var f=N.useState(function(){return{getValue:function(){return u.current},listeners:new Set}}),d=Ot(f,1),m=d[0];return va(function(){Ng(function(){m.listeners.forEach(function(g){g(i)})})},[i]),N.createElement(t.Provider,{value:m},c)};return{Context:t,Provider:r,defaultValue:e}}function Vr(e,t){var r=ba(typeof t=="function"?t:function(g){if(t===void 0)return g;if(!Array.isArray(t))return g[t];var v={};return t.forEach(function(w){v[w]=g[w]}),v}),n=N.useContext(e==null?void 0:e.Context),a=n||{},i=a.listeners,c=a.getValue,u=N.useRef();u.current=r(n?c():e==null?void 0:e.defaultValue);var f=N.useState({}),d=Ot(f,2),m=d[1];return va(function(){if(!n)return;function g(v){var w=r(v);no(u.current,w,!0)||m({})}return i.add(g),function(){i.delete(g)}},[n]),u.current}function p2(){var e=N.createContext(null);function t(){return N.useContext(e)}function r(a,i){var c=Uc(a),u=function(d,m){var g=c?{ref:m}:{},v=N.useRef(0),w=N.useRef(d),x=t();return x!==null?N.createElement(a,Rt({},d,g)):((!i||i(w.current,d))&&(v.current+=1),w.current=d,N.createElement(e.Provider,{value:v.current},N.createElement(a,Rt({},d,g))))};return c?N.forwardRef(u):u}function n(a,i){var c=Uc(a),u=function(d,m){var g=c?{ref:m}:{};return t(),N.createElement(a,Rt({},d,g))};return c?N.memo(N.forwardRef(u),i):N.memo(u,i)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var ru=p2(),k1=ru.makeImmutable,ho=ru.responseImmutable,m2=ru.useImmutableMark,Zr=tu(),E1=N.createContext({renderWithProps:!1}),g2="RC_TABLE_KEY";function v2(e){return e==null?[]:Array.isArray(e)?e:[e]}function fs(e){var t=[],r={};return e.forEach(function(n){for(var a=n||{},i=a.key,c=a.dataIndex,u=i||v2(c).join("-")||g2;r[u];)u="".concat(u,"_next");r[u]=!0,t.push(u)}),t}function l0(e){return e!=null}function b2(e){return typeof e=="number"&&!Number.isNaN(e)}function y2(e){return e&&Sn(e)==="object"&&!Array.isArray(e)&&!N.isValidElement(e)}function x2(e,t,r,n,a,i){var c=N.useContext(E1),u=m2(),f=i1(function(){if(l0(n))return[n];var d=t==null||t===""?[]:Array.isArray(t)?t:[t],m=G0(e,d),g=m,v=void 0;if(a){var w=a(m,e,r);y2(w)?(g=w.children,v=w.props,c.renderWithProps=!0):g=w}return[g,v]},[u,e,n,t,a,r],function(d,m){if(i){var g=Ot(d,2),v=g[1],w=Ot(m,2),x=w[1];return i(x,v)}return c.renderWithProps?!0:!no(d,m,!0)});return f}function w2(e,t,r,n){var a=e+t-1;return e<=n&&a>=r}function C2(e,t){return Vr(Zr,function(r){var n=w2(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var D2=function(t){var r=t.ellipsis,n=t.rowType,a=t.children,i,c=r===!0?{showTitle:!0}:r;return c&&(c.showTitle||n==="header")&&(typeof a=="string"||typeof a=="number"?i=a.toString():N.isValidElement(a)&&typeof a.props.children=="string"&&(i=a.props.children)),i};function k2(e){var t,r,n,a,i,c,u,f,d=e.component,m=e.children,g=e.ellipsis,v=e.scope,w=e.prefixCls,x=e.className,C=e.align,p=e.record,A=e.render,B=e.dataIndex,E=e.renderIndex,T=e.shouldCellUpdate,F=e.index,P=e.rowType,S=e.colSpan,L=e.rowSpan,O=e.fixLeft,W=e.fixRight,j=e.firstFixLeft,Y=e.lastFixLeft,Z=e.firstFixRight,_=e.lastFixRight,H=e.appendNode,V=e.additionalProps,G=V===void 0?{}:V,te=e.isSticky,K="".concat(w,"-cell"),X=Vr(Zr,["supportSticky","allColumnsFixedLeft","rowHoverable"]),ye=X.supportSticky,xe=X.allColumnsFixedLeft,ke=X.rowHoverable,Be=x2(p,B,E,m,A,T),_e=Ot(Be,2),Q=_e[0],oe=_e[1],ue={},le=typeof O=="number"&&ye,Se=typeof W=="number"&&ye;le&&(ue.position="sticky",ue.left=O),Se&&(ue.position="sticky",ue.right=W);var Fe=(t=(r=(n=oe==null?void 0:oe.colSpan)!==null&&n!==void 0?n:G.colSpan)!==null&&r!==void 0?r:S)!==null&&t!==void 0?t:1,me=(a=(i=(c=oe==null?void 0:oe.rowSpan)!==null&&c!==void 0?c:G.rowSpan)!==null&&i!==void 0?i:L)!==null&&a!==void 0?a:1,we=C2(F,me),De=Ot(we,2),Te=De[0],be=De[1],Ae=ba(function(dt){var Je;p&&be(F,F+me-1),G==null||(Je=G.onMouseEnter)===null||Je===void 0||Je.call(G,dt)}),Le=ba(function(dt){var Je;p&&be(-1,-1),G==null||(Je=G.onMouseLeave)===null||Je===void 0||Je.call(G,dt)});if(Fe===0||me===0)return null;var ut=(u=G.title)!==null&&u!==void 0?u:D2({rowType:P,ellipsis:g,children:Q}),ot=bt(K,x,(f={},ze(ze(ze(ze(ze(ze(ze(ze(ze(ze(f,"".concat(K,"-fix-left"),le&&ye),"".concat(K,"-fix-left-first"),j&&ye),"".concat(K,"-fix-left-last"),Y&&ye),"".concat(K,"-fix-left-all"),Y&&xe&&ye),"".concat(K,"-fix-right"),Se&&ye),"".concat(K,"-fix-right-first"),Z&&ye),"".concat(K,"-fix-right-last"),_&&ye),"".concat(K,"-ellipsis"),g),"".concat(K,"-with-append"),H),"".concat(K,"-fix-sticky"),(le||Se)&&te&&ye),ze(f,"".concat(K,"-row-hover"),!oe&&Te)),G.className,oe==null?void 0:oe.className),Oe={};C&&(Oe.textAlign=C);var Ie=Ve(Ve(Ve(Ve({},oe==null?void 0:oe.style),ue),Oe),G.style),Ge=Q;return Sn(Ge)==="object"&&!Array.isArray(Ge)&&!N.isValidElement(Ge)&&(Ge=null),g&&(Y||Z)&&(Ge=N.createElement("span",{className:"".concat(K,"-content")},Ge)),N.createElement(d,Rt({},oe,G,{className:ot,style:Ie,title:ut,scope:v,onMouseEnter:ke?Ae:void 0,onMouseLeave:ke?Le:void 0,colSpan:Fe!==1?Fe:null,rowSpan:me!==1?me:null}),H,Ge)}const po=N.memo(k2);function nu(e,t,r,n,a){var i=r[e]||{},c=r[t]||{},u,f;i.fixed==="left"?u=n.left[a==="rtl"?t:e]:c.fixed==="right"&&(f=n.right[a==="rtl"?e:t]);var d=!1,m=!1,g=!1,v=!1,w=r[t+1],x=r[e-1],C=w&&!w.fixed||x&&!x.fixed||r.every(function(T){return T.fixed==="left"});if(a==="rtl"){if(u!==void 0){var p=x&&x.fixed==="left";v=!p&&C}else if(f!==void 0){var A=w&&w.fixed==="right";g=!A&&C}}else if(u!==void 0){var B=w&&w.fixed==="left";d=!B&&C}else if(f!==void 0){var E=x&&x.fixed==="right";m=!E&&C}return{fixLeft:u,fixRight:f,lastFixLeft:d,firstFixRight:m,lastFixRight:g,firstFixLeft:v,isSticky:n.isSticky}}var S1=N.createContext({});function E2(e){var t=e.className,r=e.index,n=e.children,a=e.colSpan,i=a===void 0?1:a,c=e.rowSpan,u=e.align,f=Vr(Zr,["prefixCls","direction"]),d=f.prefixCls,m=f.direction,g=N.useContext(S1),v=g.scrollColumnIndex,w=g.stickyOffsets,x=g.flattenColumns,C=r+i-1,p=C+1===v?i+1:i,A=nu(r,r+p-1,x,w,m);return N.createElement(po,Rt({className:t,index:r,component:"td",prefixCls:d,record:null,dataIndex:null,align:u,colSpan:p,rowSpan:c,render:function(){return n}},A))}var S2=["children"];function A2(e){var t=e.children,r=Gr(e,S2);return N.createElement("tr",r,t)}function hs(e){var t=e.children;return t}hs.Row=A2;hs.Cell=E2;function B2(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,a=Vr(Zr,"prefixCls"),i=n.length-1,c=n[i],u=N.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:c!=null&&c.scrollbar?i:null}},[c,n,i,r]);return N.createElement(S1.Provider,{value:u},N.createElement("tfoot",{className:"".concat(a,"-summary")},t))}const yi=ho(B2);var A1=hs;function F2(e){return null}function N2(e){return null}function B1(e,t,r,n,a,i,c){var u=i(t,c);e.push({record:t,indent:r,index:c,rowKey:u});var f=a==null?void 0:a.has(u);if(t&&Array.isArray(t[n])&&f)for(var d=0;d<t[n].length;d+=1)B1(e,t[n][d],r+1,n,a,i,d)}function F1(e,t,r,n){var a=N.useMemo(function(){if(r!=null&&r.size){for(var i=[],c=0;c<(e==null?void 0:e.length);c+=1){var u=e[c];B1(i,u,0,t,r,n,c)}return i}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 a}function N1(e,t,r,n){var a=Vr(Zr,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),i=a.flattenColumns,c=a.expandableType,u=a.expandedKeys,f=a.childrenColumnName,d=a.onTriggerExpand,m=a.rowExpandable,g=a.onRow,v=a.expandRowByClick,w=a.rowClassName,x=c==="nest",C=c==="row"&&(!m||m(e)),p=C||x,A=u&&u.has(t),B=f&&e&&e[f],E=ba(d),T=g==null?void 0:g(e,r),F=T==null?void 0:T.onClick,P=function(W){v&&p&&d(e,W);for(var j=arguments.length,Y=new Array(j>1?j-1:0),Z=1;Z<j;Z++)Y[Z-1]=arguments[Z];F==null||F.apply(void 0,[W].concat(Y))},S;typeof w=="string"?S=w:typeof w=="function"&&(S=w(e,r,n));var L=fs(i);return Ve(Ve({},a),{},{columnsKey:L,nestExpandable:x,expanded:A,hasNestChildren:B,record:e,onTriggerExpand:E,rowSupportExpand:C,expandable:p,rowProps:Ve(Ve({},T),{},{className:bt(S,T==null?void 0:T.className),onClick:P})})}function T1(e){var t=e.prefixCls,r=e.children,n=e.component,a=e.cellComponent,i=e.className,c=e.expanded,u=e.colSpan,f=e.isEmpty,d=e.stickyOffset,m=d===void 0?0:d,g=Vr(Zr,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),v=g.scrollbarSize,w=g.fixHeader,x=g.fixColumn,C=g.componentWidth,p=g.horizonScroll,A=r;return(f?p&&C:x)&&(A=N.createElement("div",{style:{width:C-m-(w&&!f?v:0),position:"sticky",left:m,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},A)),N.createElement(n,{className:i,style:{display:c?null:"none"}},N.createElement(po,{component:a,prefixCls:t,colSpan:u},A))}function T2(e){var t=e.prefixCls,r=e.record,n=e.onExpand,a=e.expanded,i=e.expandable,c="".concat(t,"-row-expand-icon");if(!i)return N.createElement("span",{className:bt(c,"".concat(t,"-row-spaced"))});var u=function(d){n(r,d),d.stopPropagation()};return N.createElement("span",{className:bt(c,ze(ze({},"".concat(t,"-row-expanded"),a),"".concat(t,"-row-collapsed"),!a)),onClick:u})}function O2(e,t,r){var n=[];function a(i){(i||[]).forEach(function(c,u){n.push(t(c,u)),a(c[r])})}return a(e),n}function O1(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function $1(e,t,r,n,a){var i,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,f=e.record,d=e.prefixCls,m=e.columnsKey,g=e.fixedInfoList,v=e.expandIconColumnIndex,w=e.nestExpandable,x=e.indentSize,C=e.expandIcon,p=e.expanded,A=e.hasNestChildren,B=e.onTriggerExpand,E=e.expandable,T=e.expandedKeys,F=m[r],P=g[r],S;r===(v||0)&&w&&(S=N.createElement(N.Fragment,null,N.createElement("span",{style:{paddingLeft:"".concat(x*n,"px")},className:"".concat(d,"-row-indent indent-level-").concat(n)}),C({prefixCls:d,expanded:p,expandable:A,record:f,onExpand:B})));var L=((i=t.onCell)===null||i===void 0?void 0:i.call(t,f,a))||{};if(u){var O=L.rowSpan,W=O===void 0?1:O;if(E&&W&&r<u){for(var j=W,Y=a;Y<a+W;Y+=1){var Z=c[Y];T.has(Z)&&(j+=1)}L.rowSpan=j}}return{key:F,fixedInfo:P,appendCellNode:S,additionalCellProps:L}}function $2(e){var t=e.className,r=e.style,n=e.record,a=e.index,i=e.renderIndex,c=e.rowKey,u=e.rowKeys,f=e.indent,d=f===void 0?0:f,m=e.rowComponent,g=e.cellComponent,v=e.scopeCellComponent,w=e.expandedRowInfo,x=N1(n,c,a,d),C=x.prefixCls,p=x.flattenColumns,A=x.expandedRowClassName,B=x.expandedRowRender,E=x.rowProps,T=x.expanded,F=x.rowSupportExpand,P=N.useRef(!1);P.current||(P.current=T);var S=O1(A,n,a,d),L=N.createElement(m,Rt({},E,{"data-row-key":c,className:bt(t,"".concat(C,"-row"),"".concat(C,"-row-level-").concat(d),E==null?void 0:E.className,ze({},S,d>=1)),style:Ve(Ve({},r),E==null?void 0:E.style)}),p.map(function(j,Y){var Z=j.render,_=j.dataIndex,H=j.className,V=$1(x,j,Y,d,a,u,w==null?void 0:w.offset),G=V.key,te=V.fixedInfo,K=V.appendCellNode,X=V.additionalCellProps;return N.createElement(po,Rt({className:H,ellipsis:j.ellipsis,align:j.align,scope:j.rowScope,component:j.rowScope?v:g,prefixCls:C,key:G,record:n,index:a,renderIndex:i,dataIndex:_,render:Z,shouldCellUpdate:j.shouldCellUpdate},te,{appendNode:K,additionalProps:X}))})),O;if(F&&(P.current||T)){var W=B(n,a,d+1,T);O=N.createElement(T1,{expanded:T,className:bt("".concat(C,"-expanded-row"),"".concat(C,"-expanded-row-level-").concat(d+1),S),prefixCls:C,component:m,cellComponent:g,colSpan:w?w.colSpan:p.length,stickyOffset:w==null?void 0:w.sticky,isEmpty:!1},W)}return N.createElement(N.Fragment,null,L,O)}const P2=ho($2);function M2(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,a=e.title,i=N.useRef();return va(function(){i.current&&r(t,i.current.offsetWidth)},[]),N.createElement(Y0,{data:t},N.createElement("th",{ref:i,className:"".concat(n,"-measure-cell")},N.createElement("div",{className:"".concat(n,"-measure-cell-content")},a||"\xA0")))}function R2(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,a=e.columns,i=N.useRef(null),c=Vr(Zr,["measureRowRender"]),u=c.measureRowRender,f=N.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:i,tabIndex:-1},N.createElement(Y0.Collection,{onBatchResize:function(m){qg(i.current)&&m.forEach(function(g){var v=g.data,w=g.size;n(v,w.offsetWidth)})}},r.map(function(d){var m=a.find(function(w){return w.key===d}),g=m==null?void 0:m.title,v=N.isValidElement(g)?N.cloneElement(g,{ref:null}):g;return N.createElement(M2,{prefixCls:t,key:d,columnKey:d,onColumnResize:n,title:v})})));return u?u(f):f}function z2(e){var t=e.data,r=e.measureColumnWidth,n=Vr(Zr,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),a=n.prefixCls,i=n.getComponent,c=n.onColumnResize,u=n.flattenColumns,f=n.getRowKey,d=n.expandedKeys,m=n.childrenColumnName,g=n.emptyNode,v=n.expandedRowOffset,w=v===void 0?0:v,x=n.colWidths,C=F1(t,m,d,f),p=N.useMemo(function(){return C.map(function(O){return O.rowKey})},[C]),A=N.useRef({renderWithProps:!1}),B=N.useMemo(function(){for(var O=u.length-w,W=0,j=0;j<w;j+=1)W+=x[j]||0;return{offset:w,colSpan:O,sticky:W}},[u.length,w,x]),E=i(["body","wrapper"],"tbody"),T=i(["body","row"],"tr"),F=i(["body","cell"],"td"),P=i(["body","cell"],"th"),S;t.length?S=C.map(function(O,W){var j=O.record,Y=O.indent,Z=O.index,_=O.rowKey;return N.createElement(P2,{key:_,rowKey:_,rowKeys:p,record:j,index:W,renderIndex:Z,rowComponent:T,cellComponent:F,scopeCellComponent:P,indent:Y,expandedRowInfo:B})}):S=N.createElement(T1,{expanded:!0,className:"".concat(a,"-placeholder"),prefixCls:a,component:T,cellComponent:F,colSpan:u.length,isEmpty:!0},g);var L=fs(u);return N.createElement(E1.Provider,{value:A.current},N.createElement(E,{className:"".concat(a,"-tbody")},r&&N.createElement(R2,{prefixCls:a,columnsKey:L,onColumnResize:c,columns:u}),S))}const I2=ho(z2);var j2=["expandable"],$o="RC_TABLE_INTERNAL_COL_DEFINE";function L2(e){var t=e.expandable,r=Gr(e,j2),n;return"expandable"in e?n=Ve(Ve({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var _2=["columnType"];function P1(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,a=Vr(Zr,["tableLayout"]),i=a.tableLayout,c=[],u=n||r.length,f=!1,d=u-1;d>=0;d-=1){var m=t[d],g=r&&r[d],v=void 0,w=void 0;if(g&&(v=g[$o],i==="auto"&&(w=g.minWidth)),m||w||v||f){var x=v||{};x.columnType;var C=Gr(x,_2);c.unshift(N.createElement("col",Rt({key:d,style:{width:m,minWidth:w}},C))),f=!0}}return c.length>0?N.createElement("colgroup",null,c):null}var q2=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function H2(e,t){return mt(function(){for(var r=[],n=0;n<t;n+=1){var a=e[n];if(a!==void 0)r[n]=a;else return null}return r},[e.join("_"),t])}var K2=N.forwardRef(function(e,t){var r=e.className,n=e.noData,a=e.columns,i=e.flattenColumns,c=e.colWidths,u=e.colGroup,f=e.columCount,d=e.stickyOffsets,m=e.direction,g=e.fixHeader,v=e.stickyTopOffset,w=e.stickyBottomOffset,x=e.stickyClassName,C=e.scrollX,p=e.tableLayout,A=p===void 0?"fixed":p,B=e.onScroll,E=e.children,T=Gr(e,q2),F=Vr(Zr,["prefixCls","scrollbarSize","isSticky","getComponent"]),P=F.prefixCls,S=F.scrollbarSize,L=F.isSticky,O=F.getComponent,W=O(["header","table"],"table"),j=L&&!g?0:S,Y=N.useRef(null),Z=N.useCallback(function(ye){Gc(t,ye),Gc(Y,ye)},[]);N.useEffect(function(){function ye(ke){var Be=ke,_e=Be.currentTarget,Q=Be.deltaX;Q&&(B({currentTarget:_e,scrollLeft:_e.scrollLeft+Q}),ke.preventDefault())}var xe=Y.current;return xe==null||xe.addEventListener("wheel",ye,{passive:!1}),function(){xe==null||xe.removeEventListener("wheel",ye)}},[]);var _=i[i.length-1],H={fixed:_?_.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(P,"-cell-scrollbar")}}},V=mt(function(){return j?[].concat(Xt(a),[H]):a},[j,a]),G=mt(function(){return j?[].concat(Xt(i),[H]):i},[j,i]),te=mt(function(){var ye=d.right,xe=d.left;return Ve(Ve({},d),{},{left:m==="rtl"?[].concat(Xt(xe.map(function(ke){return ke+j})),[0]):xe,right:m==="rtl"?ye:[].concat(Xt(ye.map(function(ke){return ke+j})),[0]),isSticky:L})},[j,d,L]),K=H2(c,f),X=mt(function(){var ye=!K||!K.length||K.every(function(xe){return!xe});return n||ye},[n,K]);return N.createElement("div",{style:Ve({overflow:"hidden"},L?{top:v,bottom:w}:{}),ref:Z,className:bt(r,ze({},x,!!x))},N.createElement(W,{style:{tableLayout:A,minWidth:"100%",width:C}},X?u:N.createElement(P1,{colWidths:[].concat(Xt(K),[j]),columCount:f+1,columns:G}),E(Ve(Ve({},T),{},{stickyOffsets:te,columns:V,flattenColumns:G}))))});const ad=N.memo(K2);var W2=function(t){var r=t.cells,n=t.stickyOffsets,a=t.flattenColumns,i=t.rowComponent,c=t.cellComponent,u=t.onHeaderRow,f=t.index,d=Vr(Zr,["prefixCls","direction"]),m=d.prefixCls,g=d.direction,v;u&&(v=u(r.map(function(x){return x.column}),f));var w=fs(r.map(function(x){return x.column}));return N.createElement(i,v,r.map(function(x,C){var p=x.column,A=nu(x.colStart,x.colEnd,a,n,g),B;return p&&p.onHeaderCell&&(B=x.column.onHeaderCell(p)),N.createElement(po,Rt({},x,{scope:p.title?x.colSpan>1?"colgroup":"col":null,ellipsis:p.ellipsis,align:p.align,component:c,prefixCls:m,key:w[C]},A,{additionalProps:B,rowType:"header"}))}))};function V2(e){var t=[];function r(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[f]=t[f]||[];var d=u,m=c.filter(Boolean).map(function(g){var v={key:g.key,className:g.className||"",children:g.title,column:g,colStart:d},w=1,x=g.children;return x&&x.length>0&&(w=r(x,d,f+1).reduce(function(C,p){return C+p},0),v.hasSubColumns=!0),"colSpan"in g&&(w=g.colSpan),"rowSpan"in g&&(v.rowSpan=g.rowSpan),v.colSpan=w,v.colEnd=v.colStart+w-1,t[f].push(v),d+=w,w});return m}r(e,0);for(var n=t.length,a=function(u){t[u].forEach(function(f){!("rowSpan"in f)&&!f.hasSubColumns&&(f.rowSpan=n-u)})},i=0;i<n;i+=1)a(i);return t}var U2=function(t){var r=t.stickyOffsets,n=t.columns,a=t.flattenColumns,i=t.onHeaderRow,c=Vr(Zr,["prefixCls","getComponent"]),u=c.prefixCls,f=c.getComponent,d=N.useMemo(function(){return V2(n)},[n]),m=f(["header","wrapper"],"thead"),g=f(["header","row"],"tr"),v=f(["header","cell"],"th");return N.createElement(m,{className:"".concat(u,"-thead")},d.map(function(w,x){var C=N.createElement(W2,{key:x,flattenColumns:a,cells:w,stickyOffsets:r,rowComponent:g,cellComponent:v,onHeaderRow:i,index:x});return C}))};const od=ho(U2);function id(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 G2(e,t,r){return N.useMemo(function(){if(t&&t>0){var n=0,a=0;e.forEach(function(v){var w=id(t,v.width);w?n+=w:a+=1});var i=Math.max(t,r),c=Math.max(i-n,a),u=a,f=c/a,d=0,m=e.map(function(v){var w=Ve({},v),x=id(t,w.width);if(x)w.width=x;else{var C=Math.floor(f);w.width=u===1?c:C,c-=C,u-=1}return d+=w.width,w});if(d<i){var g=i/d;c=i,m.forEach(function(v,w){var x=Math.floor(v.width*g);v.width=w===m.length-1?c:x,c-=x})}return[m,Math.max(d,i)]}return[e,t]},[e,t,r])}var Y2=["children"],Z2=["fixed"];function au(e){return r1(e).filter(function(t){return N.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,a=n.children,i=Gr(n,Y2),c=Ve({key:r},i);return a&&(c.children=au(a)),c})}function M1(e){return e.filter(function(t){return t&&Sn(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?Ve(Ve({},t),{},{children:M1(r)}):t})}function u0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&Sn(r)==="object"}).reduce(function(r,n,a){var i=n.fixed,c=i===!0?"left":i,u="".concat(t,"-").concat(a),f=n.children;return f&&f.length>0?[].concat(Xt(r),Xt(u0(f,u).map(function(d){var m;return Ve(Ve({},d),{},{fixed:(m=d.fixed)!==null&&m!==void 0?m:c})}))):[].concat(Xt(r),[Ve(Ve({key:u},n),{},{fixed:c})])},[])}function X2(e){return e.map(function(t){var r=t.fixed,n=Gr(t,Z2),a=r;return r==="left"?a="right":r==="right"&&(a="left"),Ve({fixed:a},n)})}function Q2(e,t){var r=e.prefixCls,n=e.columns,a=e.children,i=e.expandable,c=e.expandedKeys,u=e.columnTitle,f=e.getRowKey,d=e.onTriggerExpand,m=e.expandIcon,g=e.rowExpandable,v=e.expandIconColumnIndex,w=e.expandedRowOffset,x=w===void 0?0:w,C=e.direction,p=e.expandRowByClick,A=e.columnWidth,B=e.fixed,E=e.scrollWidth,T=e.clientWidth,F=N.useMemo(function(){var _=n||au(a)||[];return M1(_.slice())},[n,a]),P=N.useMemo(function(){if(i){var _=F.slice();if(!_.includes(da)){var H=v||0,V=H===0&&B==="right"?F.length:H;V>=0&&_.splice(V,0,da)}var G=_.indexOf(da);_=_.filter(function(ye,xe){return ye!==da||xe===G});var te=F[G],K;B?K=B:K=te?te.fixed:null;var X=ze(ze(ze(ze(ze(ze({},$o,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",u),"fixed",K),"className","".concat(r,"-row-expand-icon-cell")),"width",A),"render",function(xe,ke,Be){var _e=f(ke,Be),Q=c.has(_e),oe=g?g(ke):!0,ue=m({prefixCls:r,expanded:Q,expandable:oe,record:ke,onExpand:d});return p?N.createElement("span",{onClick:function(Se){return Se.stopPropagation()}},ue):ue});return _.map(function(ye,xe){var ke=ye===da?X:ye;return xe<x?Ve(Ve({},ke),{},{fixed:ke.fixed||"left"}):ke})}return F.filter(function(ye){return ye!==da})},[i,F,f,c,m,C,x]),S=N.useMemo(function(){var _=P;return t&&(_=t(_)),_.length||(_=[{render:function(){return null}}]),_},[t,P,C]),L=N.useMemo(function(){return C==="rtl"?X2(u0(S)):u0(S)},[S,C,E]),O=N.useMemo(function(){for(var _=-1,H=L.length-1;H>=0;H-=1){var V=L[H].fixed;if(V==="left"||V===!0){_=H;break}}if(_>=0)for(var G=0;G<=_;G+=1){var te=L[G].fixed;if(te!=="left"&&te!==!0)return!0}var K=L.findIndex(function(xe){var ke=xe.fixed;return ke==="right"});if(K>=0)for(var X=K;X<L.length;X+=1){var ye=L[X].fixed;if(ye!=="right")return!0}return!1},[L]),W=G2(L,E,T),j=Ot(W,2),Y=j[0],Z=j[1];return[S,Y,Z,O]}function J2(e,t,r){var n=L2(e),a=n.expandIcon,i=n.expandedRowKeys,c=n.defaultExpandedRowKeys,u=n.defaultExpandAllRows,f=n.expandedRowRender,d=n.onExpand,m=n.onExpandedRowsChange,g=n.childrenColumnName,v=a||T2,w=g||"children",x=N.useMemo(function(){return f?"row":e.expandable&&e.internalHooks===ni&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(F){return F&&Sn(F)==="object"&&F[w]})?"nest":!1},[!!f,t]),C=N.useState(function(){return c||(u?O2(t,r,w):[])}),p=Ot(C,2),A=p[0],B=p[1],E=N.useMemo(function(){return new Set(i||A||[])},[i,A]),T=N.useCallback(function(F){var P=r(F,t.indexOf(F)),S,L=E.has(P);L?(E.delete(P),S=Xt(E)):S=[].concat(Xt(E),[P]),B(S),d&&d(!L,F),m&&m(S)},[r,E,t,d,m]);return[n,x,E,v,w,T]}function e3(e,t,r){var n=e.map(function(a,i){return nu(i,i,e,t,r)});return i1(function(){return n},[n],function(a,i){return!no(a,i)})}function t3(e){var t=Kt(e),r=St({}),n=Ot(r,2),a=n[1],i=Kt(null),c=Kt([]);function u(f){c.current.push(f);var d=Promise.resolve();i.current=d,d.then(function(){if(i.current===d){var m=c.current,g=t.current;c.current=[],m.forEach(function(v){t.current=v(t.current)}),i.current=null,g!==t.current&&a({})}})}return Qt(function(){return function(){i.current=null}},[]),[t.current,u]}function r3(e){var t=Kt(null),r=Kt();function n(){window.clearTimeout(r.current)}function a(c){t.current=c,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function i(){return t.current}return Qt(function(){return n},[]),[a,i]}function n3(){var e=N.useState(-1),t=Ot(e,2),r=t[0],n=t[1],a=N.useState(-1),i=Ot(a,2),c=i[0],u=i[1],f=N.useCallback(function(d,m){n(d),u(m)},[]);return[r,c,f]}var sd=e1()?window:null;function a3(e,t){var r=Sn(e)==="object"?e:{},n=r.offsetHeader,a=n===void 0?0:n,i=r.offsetSummary,c=i===void 0?0:i,u=r.offsetScroll,f=u===void 0?0:u,d=r.getContainer,m=d===void 0?function(){return sd}:d,g=m()||sd,v=!!e;return N.useMemo(function(){return{isSticky:v,stickyClassName:v?"".concat(t,"-sticky-holder"):"",offsetHeader:a,offsetSummary:c,offsetScroll:f,container:g}},[v,f,a,c,t,g])}function o3(e,t,r){var n=mt(function(){var a=t.length,i=function(d,m,g){for(var v=[],w=0,x=d;x!==m;x+=g)v.push(w),t[x].fixed&&(w+=e[x]||0);return v},c=i(0,a,1),u=i(a-1,-1,-1).reverse();return r==="rtl"?{left:u,right:c}:{left:c,right:u}},[e,t,r]);return n}function ld(e){var t=e.className,r=e.children;return N.createElement("div",{className:t},r)}function ud(e){var t=Z0(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 i3=function(t,r){var n,a,i=t.scrollBodyRef,c=t.onScroll,u=t.offsetScroll,f=t.container,d=t.direction,m=Vr(Zr,"prefixCls"),g=((n=i.current)===null||n===void 0?void 0:n.scrollWidth)||0,v=((a=i.current)===null||a===void 0?void 0:a.clientWidth)||0,w=g&&v*(v/g),x=N.useRef(),C=t3({scrollLeft:0,isHiddenScrollBar:!0}),p=Ot(C,2),A=p[0],B=p[1],E=N.useRef({delta:0,x:0}),T=N.useState(!1),F=Ot(T,2),P=F[0],S=F[1],L=N.useRef(null);N.useEffect(function(){return function(){Xa.cancel(L.current)}},[]);var O=function(){S(!1)},W=function(H){H.persist(),E.current.delta=H.pageX-A.scrollLeft,E.current.x=0,S(!0),H.preventDefault()},j=function(H){var V,G=H||((V=window)===null||V===void 0?void 0:V.event),te=G.buttons;if(!P||te===0){P&&S(!1);return}var K=E.current.x+H.pageX-E.current.x-E.current.delta,X=d==="rtl";K=Math.max(X?w-v:0,Math.min(X?0:v-w,K));var ye=!X||Math.abs(K)+Math.abs(w)<v;ye&&(c({scrollLeft:K/v*(g+2)}),E.current.x=H.pageX)},Y=function(){Xa.cancel(L.current),L.current=Xa(function(){if(i.current){var H=ud(i.current).top,V=H+i.current.offsetHeight,G=f===window?document.documentElement.scrollTop+window.innerHeight:ud(f).top+f.clientHeight;B(function(te){return Ve(Ve({},te),{},{isHiddenScrollBar:V-Yc()<=G||H>=G-u})})}})},Z=function(H){B(function(V){return Ve(Ve({},V),{},{scrollLeft:g?H/g*v:0})})};return N.useImperativeHandle(r,function(){return{setScrollLeft:Z,checkScrollBarVisible:Y}}),N.useEffect(function(){var _=ma(document.body,"mouseup",O,!1),H=ma(document.body,"mousemove",j,!1);return Y(),function(){_.remove(),H.remove()}},[w,P]),N.useEffect(function(){if(i.current){for(var _=[],H=Z0(i.current);H;)_.push(H),H=H.parentElement;return _.forEach(function(V){return V.addEventListener("scroll",Y,!1)}),window.addEventListener("resize",Y,!1),window.addEventListener("scroll",Y,!1),f.addEventListener("scroll",Y,!1),function(){_.forEach(function(V){return V.removeEventListener("scroll",Y)}),window.removeEventListener("resize",Y),window.removeEventListener("scroll",Y),f.removeEventListener("scroll",Y)}}},[f]),N.useEffect(function(){A.isHiddenScrollBar||B(function(_){var H=i.current;return H?Ve(Ve({},_),{},{scrollLeft:H.scrollLeft/H.scrollWidth*H.clientWidth}):_})},[A.isHiddenScrollBar]),g<=v||!w||A.isHiddenScrollBar?null:N.createElement("div",{style:{height:Yc(),width:v,bottom:u},className:"".concat(m,"-sticky-scroll")},N.createElement("div",{onMouseDown:W,ref:x,className:bt("".concat(m,"-sticky-scroll-bar"),ze({},"".concat(m,"-sticky-scroll-bar-active"),P)),style:{width:"".concat(w,"px"),transform:"translate3d(".concat(A.scrollLeft,"px, 0, 0)")}}))};const s3=N.forwardRef(i3);var R1="rc-table",l3=[],u3={};function c3(){return"No Data"}function d3(e,t){var r=Ve({rowKey:"key",prefixCls:R1,emptyText:c3},e),n=r.prefixCls,a=r.className,i=r.rowClassName,c=r.style,u=r.data,f=r.rowKey,d=r.scroll,m=r.tableLayout,g=r.direction,v=r.title,w=r.footer,x=r.summary,C=r.caption,p=r.id,A=r.showHeader,B=r.components,E=r.emptyText,T=r.onRow,F=r.onHeaderRow,P=r.measureRowRender,S=r.onScroll,L=r.internalHooks,O=r.transformColumns,W=r.internalRefs,j=r.tailor,Y=r.getContainerWidth,Z=r.sticky,_=r.rowHoverable,H=_===void 0?!0:_,V=u||l3,G=!!V.length,te=L===ni,K=N.useCallback(function(Nt,Ut){return G0(B,Nt)||Ut},[B]),X=N.useMemo(function(){return typeof f=="function"?f:function(Nt){var Ut=Nt&&Nt[f];return Ut}},[f]),ye=K(["body"]),xe=n3(),ke=Ot(xe,3),Be=ke[0],_e=ke[1],Q=ke[2],oe=J2(r,V,X),ue=Ot(oe,6),le=ue[0],Se=ue[1],Fe=ue[2],me=ue[3],we=ue[4],De=ue[5],Te=d==null?void 0:d.x,be=N.useState(0),Ae=Ot(be,2),Le=Ae[0],ut=Ae[1],ot=Q2(Ve(Ve(Ve({},r),le),{},{expandable:!!le.expandedRowRender,columnTitle:le.columnTitle,expandedKeys:Fe,getRowKey:X,onTriggerExpand:De,expandIcon:me,expandIconColumnIndex:le.expandIconColumnIndex,direction:g,scrollWidth:te&&j&&typeof Te=="number"?Te:null,clientWidth:Le}),te?O:null),Oe=Ot(ot,4),Ie=Oe[0],Ge=Oe[1],dt=Oe[2],Je=Oe[3],at=dt??Te,Lt=N.useMemo(function(){return{columns:Ie,flattenColumns:Ge}},[Ie,Ge]),Ct=N.useRef(),At=N.useRef(),$t=N.useRef(),je=N.useRef();N.useImperativeHandle(t,function(){return{nativeElement:Ct.current,scrollTo:function(Ut){var Ir;if($t.current instanceof HTMLElement){var Xr=Ut.index,Tr=Ut.top,An=Ut.key;if(b2(Tr)){var et;(et=$t.current)===null||et===void 0||et.scrollTo({top:Tr})}else{var Qr,Pn=An??X(V[Xr]);(Qr=$t.current.querySelector('[data-row-key="'.concat(Pn,'"]')))===null||Qr===void 0||Qr.scrollIntoView()}}else(Ir=$t.current)!==null&&Ir!==void 0&&Ir.scrollTo&&$t.current.scrollTo(Ut)}}});var fe=N.useRef(),lt=N.useState(!1),_t=Ot(lt,2),Wt=_t[0],Pt=_t[1],Bt=N.useState(!1),yt=Ot(Bt,2),It=yt[0],or=yt[1],mr=N.useState(new Map),Ft=Ot(mr,2),zr=Ft[0],Fr=Ft[1],mn=fs(Ge),$r=mn.map(function(Nt){return zr.get(Nt)}),Lr=N.useMemo(function(){return $r},[$r.join("_")]),_r=o3(Lr,Ge,g),Nr=d&&l0(d.y),lr=d&&l0(at)||!!le.fixed,xt=lr&&Ge.some(function(Nt){var Ut=Nt.fixed;return Ut}),y=N.useRef(),D=a3(Z,n),Pe=D.isSticky,M=D.offsetHeader,ee=D.offsetSummary,ur=D.offsetScroll,it=D.stickyClassName,gt=D.container,Et=N.useMemo(function(){return x==null?void 0:x(V)},[x,V]),rt=(Nr||Pe)&&N.isValidElement(Et)&&Et.type===hs&&Et.props.fixed,zt,er,Dr;Nr&&(er={overflowY:G?"scroll":"auto",maxHeight:d.y}),lr&&(zt={overflowX:"auto"},Nr||(er={overflowY:"hidden"}),Dr={width:at===!0?"auto":at,minWidth:"100%"});var J=N.useCallback(function(Nt,Ut){Fr(function(Ir){if(Ir.get(Nt)!==Ut){var Xr=new Map(Ir);return Xr.set(Nt,Ut),Xr}return Ir})},[]),gr=r3(),se=Ot(gr,2),gn=se[0],Dt=se[1];function vn(Nt,Ut){Ut&&(typeof Ut=="function"?Ut(Nt):Ut.scrollLeft!==Nt&&(Ut.scrollLeft=Nt,Ut.scrollLeft!==Nt&&setTimeout(function(){Ut.scrollLeft=Nt},0)))}var br=ba(function(Nt){var Ut=Nt.currentTarget,Ir=Nt.scrollLeft,Xr=g==="rtl",Tr=typeof Ir=="number"?Ir:Ut.scrollLeft,An=Ut||u3;if(!Dt()||Dt()===An){var et;gn(An),vn(Tr,At.current),vn(Tr,$t.current),vn(Tr,fe.current),vn(Tr,(et=y.current)===null||et===void 0?void 0:et.setScrollLeft)}var Qr=Ut||At.current;if(Qr){var Pn=te&&j&&typeof at=="number"?at:Qr.scrollWidth,yr=Qr.clientWidth;if(Pn===yr){Pt(!1),or(!1);return}Xr?(Pt(-Tr<Pn-yr),or(-Tr>0)):(Pt(Tr>0),or(Tr<Pn-yr))}}),wt=ba(function(Nt){br(Nt),S==null||S(Nt)}),na=function(){if(lr&&$t.current){var Ut;br({currentTarget:Z0($t.current),scrollLeft:(Ut=$t.current)===null||Ut===void 0?void 0:Ut.scrollLeft})}else Pt(!1),or(!1)},aa=function(Ut){var Ir,Xr=Ut.width;(Ir=y.current)===null||Ir===void 0||Ir.checkScrollBarVisible();var Tr=Ct.current?Ct.current.offsetWidth:Xr;te&&Y&&Ct.current&&(Tr=Y(Ct.current,Tr)||Tr),Tr!==Le&&(na(),ut(Tr))},ka=N.useRef(!1);N.useEffect(function(){ka.current&&na()},[lr,u,Ie.length]),N.useEffect(function(){ka.current=!0},[]);var yo=N.useState(0),$n=Ot(yo,2),re=$n[0],Ce=$n[1],tt=N.useState(!0),Ue=Ot(tt,2),ae=Ue[0],He=Ue[1];va(function(){(!j||!te)&&($t.current instanceof Element?Ce(Zc($t.current).width):Ce(Zc(je.current).width)),He(x4("position","sticky"))},[]),N.useEffect(function(){te&&W&&(W.body.current=$t.current)});var Me=N.useCallback(function(Nt){return N.createElement(N.Fragment,null,N.createElement(od,Nt),rt==="top"&&N.createElement(yi,Nt,Et))},[rt,Et]),st=N.useCallback(function(Nt){return N.createElement(yi,Nt,Et)},[Et]),he=K(["table"],"table"),de=N.useMemo(function(){return m||(xt?at==="max-content"?"auto":"fixed":Nr||Pe||Ge.some(function(Nt){var Ut=Nt.ellipsis;return Ut})?"fixed":"auto")},[Nr,xt,Ge,m,Pe]),ce,Xe={colWidths:Lr,columCount:Ge.length,stickyOffsets:_r,onHeaderRow:F,fixHeader:Nr,scroll:d},ct=N.useMemo(function(){return G?null:typeof E=="function"?E():E},[G,E]),Mt=N.createElement(I2,{data:V,measureColumnWidth:Nr||lr||Pe}),ft=N.createElement(P1,{colWidths:Ge.map(function(Nt){var Ut=Nt.width;return Ut}),columns:Ge}),Re=C!=null?N.createElement("caption",{className:"".concat(n,"-caption")},C):void 0,kt=Gi(r,{data:!0}),ir=Gi(r,{aria:!0});if(Nr||Pe){var qr;typeof ye=="function"?(qr=ye(V,{scrollbarSize:re,ref:$t,onScroll:br}),Xe.colWidths=Ge.map(function(Nt,Ut){var Ir=Nt.width,Xr=Ut===Ge.length-1?Ir-re:Ir;return typeof Xr=="number"&&!Number.isNaN(Xr)?Xr:0})):qr=N.createElement("div",{style:Ve(Ve({},zt),er),onScroll:wt,ref:$t,className:bt("".concat(n,"-body"))},N.createElement(he,Rt({style:Ve(Ve({},Dr),{},{tableLayout:de})},ir),Re,ft,Mt,!rt&&Et&&N.createElement(yi,{stickyOffsets:_r,flattenColumns:Ge},Et)));var bn=Ve(Ve(Ve({noData:!V.length},Xe),Lt),{},{direction:g,stickyClassName:it,scrollX:at,tableLayout:de,onScroll:br});ce=N.createElement(N.Fragment,null,A!==!1&&N.createElement(ad,Rt({},bn,{stickyTopOffset:M,className:"".concat(n,"-header"),ref:At,colGroup:ft}),Me),qr,rt&&rt!=="top"&&N.createElement(ad,Rt({},bn,{stickyBottomOffset:ee,className:"".concat(n,"-summary"),ref:fe,colGroup:ft}),st),Pe&&$t.current&&$t.current instanceof Element&&N.createElement(s3,{ref:y,offsetScroll:ur,scrollBodyRef:$t,onScroll:br,container:gt,direction:g}))}else ce=N.createElement("div",{style:Ve(Ve({},zt),er),className:bt("".concat(n,"-content")),onScroll:br,ref:$t},N.createElement(he,Rt({style:Ve(Ve({},Dr),{},{tableLayout:de})},ir),Re,ft,A!==!1&&N.createElement(od,Rt({},Xe,Lt)),Mt,Et&&N.createElement(yi,{stickyOffsets:_r,flattenColumns:Ge},Et)));var ve=N.createElement("div",Rt({className:bt(n,a,ze(ze(ze(ze(ze(ze(ze(ze(ze(ze({},"".concat(n,"-rtl"),g==="rtl"),"".concat(n,"-ping-left"),Wt),"".concat(n,"-ping-right"),It),"".concat(n,"-layout-fixed"),m==="fixed"),"".concat(n,"-fixed-header"),Nr),"".concat(n,"-fixed-column"),xt),"".concat(n,"-fixed-column-gapped"),xt&&Je),"".concat(n,"-scroll-horizontal"),lr),"".concat(n,"-has-fix-left"),Ge[0]&&Ge[0].fixed),"".concat(n,"-has-fix-right"),Ge[Ge.length-1]&&Ge[Ge.length-1].fixed==="right")),style:c,id:p,ref:Ct},kt),v&&N.createElement(ld,{className:"".concat(n,"-title")},v(V)),N.createElement("div",{ref:je,className:"".concat(n,"-container")},ce),w&&N.createElement(ld,{className:"".concat(n,"-footer")},w(V)));lr&&(ve=N.createElement(Y0,{onResize:aa},ve));var fr=e3(Ge,_r,g),Wn=N.useMemo(function(){return{scrollX:at,prefixCls:n,getComponent:K,scrollbarSize:re,direction:g,fixedInfoList:fr,isSticky:Pe,supportSticky:ae,componentWidth:Le,fixHeader:Nr,fixColumn:xt,horizonScroll:lr,tableLayout:de,rowClassName:i,expandedRowClassName:le.expandedRowClassName,expandIcon:me,expandableType:Se,expandRowByClick:le.expandRowByClick,expandedRowRender:le.expandedRowRender,expandedRowOffset:le.expandedRowOffset,onTriggerExpand:De,expandIconColumnIndex:le.expandIconColumnIndex,indentSize:le.indentSize,allColumnsFixedLeft:Ge.every(function(Nt){return Nt.fixed==="left"}),emptyNode:ct,columns:Ie,flattenColumns:Ge,onColumnResize:J,colWidths:Lr,hoverStartRow:Be,hoverEndRow:_e,onHover:Q,rowExpandable:le.rowExpandable,onRow:T,getRowKey:X,expandedKeys:Fe,childrenColumnName:we,rowHoverable:H,measureRowRender:P}},[at,n,K,re,g,fr,Pe,ae,Le,Nr,xt,lr,de,i,le.expandedRowClassName,me,Se,le.expandRowByClick,le.expandedRowRender,le.expandedRowOffset,De,le.expandIconColumnIndex,le.indentSize,ct,Ie,Ge,J,Lr,Be,_e,Q,le.rowExpandable,T,X,Fe,we,H,P]);return N.createElement(Zr.Provider,{value:Wn},ve)}var f3=N.forwardRef(d3);function z1(e){return k1(f3,e)}var mo=z1();mo.EXPAND_COLUMN=da;mo.INTERNAL_HOOKS=ni;mo.Column=F2;mo.ColumnGroup=N2;mo.Summary=A1;var ou=tu(null),I1=tu(null);function h3(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function p3(e){var t=e.rowInfo,r=e.column,n=e.colIndex,a=e.indent,i=e.index,c=e.component,u=e.renderIndex,f=e.record,d=e.style,m=e.className,g=e.inverse,v=e.getHeight,w=r.render,x=r.dataIndex,C=r.className,p=r.width,A=Vr(I1,["columnsOffset"]),B=A.columnsOffset,E=$1(t,r,n,a,i),T=E.key,F=E.fixedInfo,P=E.appendCellNode,S=E.additionalCellProps,L=S.style,O=S.colSpan,W=O===void 0?1:O,j=S.rowSpan,Y=j===void 0?1:j,Z=n-1,_=h3(Z,W,B),H=W>1?p-_:0,V=Ve(Ve(Ve({},L),d),{},{flex:"0 0 ".concat(_,"px"),width:"".concat(_,"px"),marginRight:H,pointerEvents:"auto"}),G=N.useMemo(function(){return g?Y<=1:W===0||Y===0||Y>1},[Y,W,g]);G?V.visibility="hidden":g&&(V.height=v==null?void 0:v(Y));var te=G?function(){return null}:w,K={};return(Y===0||W===0)&&(K.rowSpan=1,K.colSpan=1),N.createElement(po,Rt({className:bt(C,m),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:c,prefixCls:t.prefixCls,key:T,record:f,index:i,renderIndex:u,dataIndex:x,render:te,shouldCellUpdate:r.shouldCellUpdate},F,{appendNode:P,additionalProps:Ve(Ve({},S),{},{style:V},K)}))}var m3=["data","index","className","rowKey","style","extra","getHeight"],g3=N.forwardRef(function(e,t){var r=e.data,n=e.index,a=e.className,i=e.rowKey,c=e.style,u=e.extra,f=e.getHeight,d=Gr(e,m3),m=r.record,g=r.indent,v=r.index,w=Vr(Zr,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),x=w.scrollX,C=w.flattenColumns,p=w.prefixCls,A=w.fixColumn,B=w.componentWidth,E=Vr(ou,["getComponent"]),T=E.getComponent,F=N1(m,i,n,g),P=T(["body","row"],"div"),S=T(["body","cell"],"div"),L=F.rowSupportExpand,O=F.expanded,W=F.rowProps,j=F.expandedRowRender,Y=F.expandedRowClassName,Z;if(L&&O){var _=j(m,n,g+1,O),H=O1(Y,m,n,g),V={};A&&(V={style:ze({},"--virtual-width","".concat(B,"px"))});var G="".concat(p,"-expanded-row-cell");Z=N.createElement(P,{className:bt("".concat(p,"-expanded-row"),"".concat(p,"-expanded-row-level-").concat(g+1),H)},N.createElement(po,{component:S,prefixCls:p,className:bt(G,ze({},"".concat(G,"-fixed"),A)),additionalProps:V},_))}var te=Ve(Ve({},c),{},{width:x});u&&(te.position="absolute",te.pointerEvents="none");var K=N.createElement(P,Rt({},W,d,{"data-row-key":i,ref:L?null:t,className:bt(a,"".concat(p,"-row"),W==null?void 0:W.className,ze({},"".concat(p,"-row-extra"),u)),style:Ve(Ve({},te),W==null?void 0:W.style)}),C.map(function(X,ye){return N.createElement(p3,{key:ye,component:S,rowInfo:F,column:X,colIndex:ye,indent:g,index:n,renderIndex:v,record:m,inverse:u,getHeight:f})}));return L?N.createElement("div",{ref:t},K,Z):K}),cd=ho(g3),v3=N.forwardRef(function(e,t){var r=e.data,n=e.onScroll,a=Vr(Zr,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),i=a.flattenColumns,c=a.onColumnResize,u=a.getRowKey,f=a.expandedKeys,d=a.prefixCls,m=a.childrenColumnName,g=a.scrollX,v=a.direction,w=Vr(ou),x=w.sticky,C=w.scrollY,p=w.listItemHeight,A=w.getComponent,B=w.onScroll,E=N.useRef(),T=F1(r,m,f,u),F=N.useMemo(function(){var Z=0;return i.map(function(_){var H=_.width,V=_.minWidth,G=_.key,te=Math.max(H||0,V||0);return Z+=te,[G,te,Z]})},[i]),P=N.useMemo(function(){return F.map(function(Z){return Z[2]})},[F]);N.useEffect(function(){F.forEach(function(Z){var _=Ot(Z,2),H=_[0],V=_[1];c(H,V)})},[F]),N.useImperativeHandle(t,function(){var Z,_={scrollTo:function(V){var G;(G=E.current)===null||G===void 0||G.scrollTo(V)},nativeElement:(Z=E.current)===null||Z===void 0?void 0:Z.nativeElement};return Object.defineProperty(_,"scrollLeft",{get:function(){var V;return((V=E.current)===null||V===void 0?void 0:V.getScrollInfo().x)||0},set:function(V){var G;(G=E.current)===null||G===void 0||G.scrollTo({left:V})}}),Object.defineProperty(_,"scrollTop",{get:function(){var V;return((V=E.current)===null||V===void 0?void 0:V.getScrollInfo().y)||0},set:function(V){var G;(G=E.current)===null||G===void 0||G.scrollTo({top:V})}}),_});var S=function(_,H){var V,G=(V=T[H])===null||V===void 0?void 0:V.record,te=_.onCell;if(te){var K,X=te(G,H);return(K=X==null?void 0:X.rowSpan)!==null&&K!==void 0?K:1}return 1},L=function(_){var H=_.start,V=_.end,G=_.getSize,te=_.offsetY;if(V<0)return null;for(var K=i.filter(function(Fe){return S(Fe,H)===0}),X=H,ye=function(me){if(K=K.filter(function(we){return S(we,me)===0}),!K.length)return X=me,1},xe=H;xe>=0&&!ye(xe);xe-=1);for(var ke=i.filter(function(Fe){return S(Fe,V)!==1}),Be=V,_e=function(me){if(ke=ke.filter(function(we){return S(we,me)!==1}),!ke.length)return Be=Math.max(me-1,V),1},Q=V;Q<T.length&&!_e(Q);Q+=1);for(var oe=[],ue=function(me){var we=T[me];if(!we)return 1;i.some(function(De){return S(De,me)>1})&&oe.push(me)},le=X;le<=Be;le+=1)ue(le);var Se=oe.map(function(Fe){var me=T[Fe],we=u(me.record,Fe),De=function(Ae){var Le=Fe+Ae-1,ut=u(T[Le].record,Le),ot=G(we,ut);return ot.bottom-ot.top},Te=G(we);return N.createElement(cd,{key:Fe,data:me,rowKey:we,index:Fe,style:{top:-te+Te.top},extra:!0,getHeight:De})});return Se},O=N.useMemo(function(){return{columnsOffset:P}},[P]),W="".concat(d,"-tbody"),j=A(["body","wrapper"]),Y={};return x&&(Y.position="sticky",Y.bottom=0,Sn(x)==="object"&&x.offsetScroll&&(Y.bottom=x.offsetScroll)),N.createElement(I1.Provider,{value:O},N.createElement(s1,{fullHeight:!1,ref:E,prefixCls:"".concat(W,"-virtual"),styles:{horizontalScrollBar:Y},className:W,height:C,itemHeight:p||24,data:T,itemKey:function(_){return u(_.record)},component:j,scrollWidth:g,direction:v,onVirtualScroll:function(_){var H,V=_.x;n({currentTarget:(H=E.current)===null||H===void 0?void 0:H.nativeElement,scrollLeft:V})},onScroll:B,extraRender:L},function(Z,_,H){var V=u(Z.record,_);return N.createElement(cd,{data:Z,rowKey:V,index:_,style:H.style})}))}),b3=ho(v3),y3=function(t,r){var n=r.ref,a=r.onScroll;return N.createElement(b3,{ref:n,data:t,onScroll:a})};function x3(e,t){var r=e.data,n=e.columns,a=e.scroll,i=e.sticky,c=e.prefixCls,u=c===void 0?R1:c,f=e.className,d=e.listItemHeight,m=e.components,g=e.onScroll,v=a||{},w=v.x,x=v.y;typeof w!="number"&&(w=1),typeof x!="number"&&(x=500);var C=ba(function(B,E){return G0(m,B)||E}),p=ba(g),A=N.useMemo(function(){return{sticky:i,scrollY:x,listItemHeight:d,getComponent:C,onScroll:p}},[i,x,d,C,p]);return N.createElement(ou.Provider,{value:A},N.createElement(mo,Rt({},e,{className:bt(f,"".concat(u,"-virtual")),scroll:Ve(Ve({},a),{},{x:w}),components:Ve(Ve({},m),{},{body:r!=null&&r.length?y3:void 0}),columns:n,internalHooks:ni,tailor:!0,ref:t})))}var w3=N.forwardRef(x3);function j1(e){return k1(w3,e)}j1();const C3=e=>null,D3=e=>null;var iu=N.createContext(null),k3=N.createContext({}),E3=function(t){for(var r=t.prefixCls,n=t.level,a=t.isStart,i=t.isEnd,c="".concat(r,"-indent-unit"),u=[],f=0;f<n;f+=1)u.push(N.createElement("span",{key:f,className:bt(c,ze(ze({},"".concat(c,"-start"),a[f]),"".concat(c,"-end"),i[f]))}));return N.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},u)};const S3=N.memo(E3);var A3=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],dd="open",fd="close",B3="---",Lo=function(t){var r,n,a,i=t.eventKey,c=t.className,u=t.style,f=t.dragOver,d=t.dragOverGapTop,m=t.dragOverGapBottom,g=t.isLeaf,v=t.isStart,w=t.isEnd,x=t.expanded,C=t.selected,p=t.checked,A=t.halfChecked,B=t.loading,E=t.domRef,T=t.active,F=t.data,P=t.onMouseMove,S=t.selectable,L=Gr(t,A3),O=We.useContext(iu),W=We.useContext(k3),j=We.useRef(null),Y=We.useState(!1),Z=Ot(Y,2),_=Z[0],H=Z[1],V=!!(O.disabled||t.disabled||(r=W.nodeDisabled)!==null&&r!==void 0&&r.call(W,F)),G=We.useMemo(function(){return!O.checkable||t.checkable===!1?!1:O.checkable},[O.checkable,t.checkable]),te=function(fe){V||O.onNodeSelect(fe,Mr(t))},K=function(fe){V||!G||t.disableCheckbox||O.onNodeCheck(fe,Mr(t),!p)},X=We.useMemo(function(){return typeof S=="boolean"?S:O.selectable},[S,O.selectable]),ye=function(fe){O.onNodeClick(fe,Mr(t)),X?te(fe):K(fe)},xe=function(fe){O.onNodeDoubleClick(fe,Mr(t))},ke=function(fe){O.onNodeMouseEnter(fe,Mr(t))},Be=function(fe){O.onNodeMouseLeave(fe,Mr(t))},_e=function(fe){O.onNodeContextMenu(fe,Mr(t))},Q=We.useMemo(function(){return!!(O.draggable&&(!O.draggable.nodeDraggable||O.draggable.nodeDraggable(F)))},[O.draggable,F]),oe=function(fe){fe.stopPropagation(),H(!0),O.onNodeDragStart(fe,t);try{fe.dataTransfer.setData("text/plain","")}catch{}},ue=function(fe){fe.preventDefault(),fe.stopPropagation(),O.onNodeDragEnter(fe,t)},le=function(fe){fe.preventDefault(),fe.stopPropagation(),O.onNodeDragOver(fe,t)},Se=function(fe){fe.stopPropagation(),O.onNodeDragLeave(fe,t)},Fe=function(fe){fe.stopPropagation(),H(!1),O.onNodeDragEnd(fe,t)},me=function(fe){fe.preventDefault(),fe.stopPropagation(),H(!1),O.onNodeDrop(fe,t)},we=function(fe){B||O.onNodeExpand(fe,Mr(t))},De=We.useMemo(function(){var je=un(O.keyEntities,i)||{},fe=je.children;return!!(fe||[]).length},[O.keyEntities,i]),Te=We.useMemo(function(){return g===!1?!1:g||!O.loadData&&!De||O.loadData&&t.loaded&&!De},[g,O.loadData,De,t.loaded]);We.useEffect(function(){B||typeof O.loadData=="function"&&x&&!Te&&!t.loaded&&O.onNodeLoad(Mr(t))},[B,O.loadData,O.onNodeLoad,x,Te,t]);var be=We.useMemo(function(){var je;return(je=O.draggable)!==null&&je!==void 0&&je.icon?We.createElement("span",{className:"".concat(O.prefixCls,"-draggable-icon")},O.draggable.icon):null},[O.draggable]),Ae=function(fe){var lt=t.switcherIcon||O.switcherIcon;return typeof lt=="function"?lt(Ve(Ve({},t),{},{isLeaf:fe})):lt},Le=function(){if(Te){var fe=Ae(!0);return fe!==!1?We.createElement("span",{className:bt("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher-noop"))},fe):null}var lt=Ae(!1);return lt!==!1?We.createElement("span",{onClick:we,className:bt("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher_").concat(x?dd:fd))},lt):null},ut=We.useMemo(function(){if(!G)return null;var je=typeof G!="boolean"?G:null;return We.createElement("span",{className:bt("".concat(O.prefixCls,"-checkbox"),ze(ze(ze({},"".concat(O.prefixCls,"-checkbox-checked"),p),"".concat(O.prefixCls,"-checkbox-indeterminate"),!p&&A),"".concat(O.prefixCls,"-checkbox-disabled"),V||t.disableCheckbox)),onClick:K,role:"checkbox","aria-checked":A?"mixed":p,"aria-disabled":V||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},je)},[G,p,A,V,t.disableCheckbox,t.title]),ot=We.useMemo(function(){return Te?null:x?dd:fd},[Te,x]),Oe=We.useMemo(function(){return We.createElement("span",{className:bt("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__").concat(ot||"docu"),ze({},"".concat(O.prefixCls,"-icon_loading"),B))})},[O.prefixCls,ot,B]),Ie=We.useMemo(function(){var je=!!O.draggable,fe=!t.disabled&&je&&O.dragOverNodeKey===i;return fe?O.dropIndicatorRender({dropPosition:O.dropPosition,dropLevelOffset:O.dropLevelOffset,indent:O.indent,prefixCls:O.prefixCls,direction:O.direction}):null},[O.dropPosition,O.dropLevelOffset,O.indent,O.prefixCls,O.direction,O.draggable,O.dragOverNodeKey,O.dropIndicatorRender]),Ge=We.useMemo(function(){var je=t.title,fe=je===void 0?B3:je,lt="".concat(O.prefixCls,"-node-content-wrapper"),_t;if(O.showIcon){var Wt=t.icon||O.icon;_t=Wt?We.createElement("span",{className:bt("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__customize"))},typeof Wt=="function"?Wt(t):Wt):Oe}else O.loadData&&B&&(_t=Oe);var Pt;return typeof fe=="function"?Pt=fe(F):O.titleRender?Pt=O.titleRender(F):Pt=fe,We.createElement("span",{ref:j,title:typeof fe=="string"?fe:"",className:bt(lt,"".concat(lt,"-").concat(ot||"normal"),ze({},"".concat(O.prefixCls,"-node-selected"),!V&&(C||_))),onMouseEnter:ke,onMouseLeave:Be,onContextMenu:_e,onClick:ye,onDoubleClick:xe},_t,We.createElement("span",{className:"".concat(O.prefixCls,"-title")},Pt),Ie)},[O.prefixCls,O.showIcon,t,O.icon,Oe,O.titleRender,F,ot,ke,Be,_e,ye,xe]),dt=Gi(L,{aria:!0,data:!0}),Je=un(O.keyEntities,i)||{},at=Je.level,Lt=w[w.length-1],Ct=!V&&Q,At=O.draggingNodeKey===i,$t=S!==void 0?{"aria-selected":!!S}:void 0;return We.createElement("div",Rt({ref:E,role:"treeitem","aria-expanded":g?void 0:x,className:bt(c,"".concat(O.prefixCls,"-treenode"),(a={},ze(ze(ze(ze(ze(ze(ze(ze(ze(ze(a,"".concat(O.prefixCls,"-treenode-disabled"),V),"".concat(O.prefixCls,"-treenode-switcher-").concat(x?"open":"close"),!g),"".concat(O.prefixCls,"-treenode-checkbox-checked"),p),"".concat(O.prefixCls,"-treenode-checkbox-indeterminate"),A),"".concat(O.prefixCls,"-treenode-selected"),C),"".concat(O.prefixCls,"-treenode-loading"),B),"".concat(O.prefixCls,"-treenode-active"),T),"".concat(O.prefixCls,"-treenode-leaf-last"),Lt),"".concat(O.prefixCls,"-treenode-draggable"),Q),"dragging",At),ze(ze(ze(ze(ze(ze(ze(a,"drop-target",O.dropTargetKey===i),"drop-container",O.dropContainerKey===i),"drag-over",!V&&f),"drag-over-gap-top",!V&&d),"drag-over-gap-bottom",!V&&m),"filter-node",(n=O.filterTreeNode)===null||n===void 0?void 0:n.call(O,Mr(t))),"".concat(O.prefixCls,"-treenode-leaf"),Te))),style:u,draggable:Ct,onDragStart:Ct?oe:void 0,onDragEnter:Q?ue:void 0,onDragOver:Q?le:void 0,onDragLeave:Q?Se:void 0,onDrop:Q?me:void 0,onDragEnd:Q?Fe:void 0,onMouseMove:P},$t,dt),We.createElement(S3,{prefixCls:O.prefixCls,level:at,isStart:v,isEnd:w}),be,Le(),ut,Ge)};Lo.isTreeNode=1;function Ln(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function Zn(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function su(e){return e.split("-")}function F3(e,t){var r=[],n=un(t,e);function a(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.forEach(function(c){var u=c.key,f=c.children;r.push(u),a(f)})}return a(n.children),r}function N3(e){if(e.parent){var t=su(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function T3(e){var t=su(e.pos);return Number(t[t.length-1])===0}function hd(e,t,r,n,a,i,c,u,f,d){var m,g=e.clientX,v=e.clientY,w=e.target.getBoundingClientRect(),x=w.top,C=w.height,p=(d==="rtl"?-1:1)*(((a==null?void 0:a.x)||0)-g),A=(p-12)/n,B=f.filter(function(V){var G;return(G=u[V])===null||G===void 0||(G=G.children)===null||G===void 0?void 0:G.length}),E=un(u,r.eventKey);if(v<x+C/2){var T=c.findIndex(function(V){return V.key===E.key}),F=T<=0?0:T-1,P=c[F].key;E=un(u,P)}var S=E.key,L=E,O=E.key,W=0,j=0;if(!B.includes(S))for(var Y=0;Y<A&&N3(E);Y+=1)E=E.parent,j+=1;var Z=t.data,_=E.node,H=!0;return T3(E)&&E.level===0&&v<x+C/2&&i({dragNode:Z,dropNode:_,dropPosition:-1})&&E.key===r.eventKey?W=-1:(L.children||[]).length&&B.includes(O)?i({dragNode:Z,dropNode:_,dropPosition:0})?W=0:H=!1:j===0?A>-1.5?i({dragNode:Z,dropNode:_,dropPosition:1})?W=1:H=!1:i({dragNode:Z,dropNode:_,dropPosition:0})?W=0:i({dragNode:Z,dropNode:_,dropPosition:1})?W=1:H=!1:i({dragNode:Z,dropNode:_,dropPosition:1})?W=1:H=!1,{dropPosition:W,dropLevelOffset:j,dropTargetKey:E.key,dropTargetPos:E.pos,dragOverNodeKey:O,dropContainerKey:W===0?null:((m=E.parent)===null||m===void 0?void 0:m.key)||null,dropAllowed:H}}function pd(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function ll(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(Sn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return pa(!1,"`checkedKeys` is not an array or an object"),null;return t}function c0(e,t){var r=new Set;function n(a){if(!r.has(a)){var i=un(t,a);if(i){r.add(a);var c=i.parent,u=i.node;u.disabled||c&&n(c.key)}}}return(e||[]).forEach(function(a){n(a)}),Xt(r)}const ua={},d0="SELECT_ALL",f0="SELECT_INVERT",h0="SELECT_NONE",md=[],L1=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&L1(e,n[e],r)}),r),O3=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:a,getCheckboxProps:i,getTitleCheckboxProps:c,onChange:u,onSelect:f,onSelectAll:d,onSelectInvert:m,onSelectNone:g,onSelectMultiple:v,columnWidth:w,type:x,selections:C,fixed:p,renderCell:A,hideSelectAll:B,checkStrictly:E=!0}=t||{},{prefixCls:T,data:F,pageData:P,getRecordByKey:S,getRowKey:L,expandType:O,childrenColumnName:W,locale:j,getPopupContainer:Y}=e,Z=X0(),[_,H]=m4(me=>me),[V,G]=Wi(n||a||md,{value:n}),te=N.useRef(new Map),K=Tt(me=>{if(r){const we=new Map;me.forEach(De=>{let Te=S(De);!Te&&te.current.has(De)&&(Te=te.current.get(De)),we.set(De,Te)}),te.current=we}},[S,r]);N.useEffect(()=>{K(V)},[V]);const X=mt(()=>L1(W,P),[W,P]),{keyEntities:ye}=mt(()=>{if(E)return{keyEntities:null};let me=F;if(r){const we=new Set(X.map((Te,be)=>L(Te,be))),De=Array.from(te.current).reduce((Te,[be,Ae])=>we.has(be)?Te:Te.concat(Ae),[]);me=[].concat(Xt(me),Xt(De))}return J0(me,{externalGetKey:L,childrenPropName:W})},[F,L,E,W,r,X]),xe=mt(()=>{const me=new Map;return X.forEach((we,De)=>{const Te=L(we,De),be=(i?i(we):null)||{};me.set(Te,be)}),me},[X,L,i]),ke=Tt(me=>{const we=L(me);let De;return xe.has(we)?De=xe.get(L(me)):De=i?i(me):void 0,!!(De!=null&&De.disabled)},[xe,L]),[Be,_e]=mt(()=>{if(E)return[V||[],[]];const{checkedKeys:me,halfCheckedKeys:we}=Qa(V,!0,ye,ke);return[me||[],we]},[V,E,ye,ke]),Q=mt(()=>{const me=x==="radio"?Be.slice(0,1):Be;return new Set(me)},[Be,x]),oe=mt(()=>x==="radio"?new Set:new Set(_e),[_e,x]);N.useEffect(()=>{t||G(md)},[!!t]);const ue=Tt((me,we)=>{let De,Te;K(me),r?(De=me,Te=me.map(be=>te.current.get(be))):(De=[],Te=[],me.forEach(be=>{const Ae=S(be);Ae!==void 0&&(De.push(be),Te.push(Ae))})),G(De),u==null||u(De,Te,{type:we})},[G,S,u,r]),le=Tt((me,we,De,Te)=>{if(f){const be=De.map(Ae=>S(Ae));f(S(me),we,be,Te)}ue(De,"single")},[f,S,ue]),Se=mt(()=>!C||B?null:(C===!0?[d0,f0,h0]:C).map(we=>we===d0?{key:"all",text:j.selectionAll,onSelect(){ue(F.map((De,Te)=>L(De,Te)).filter(De=>{const Te=xe.get(De);return!(Te!=null&&Te.disabled)||Q.has(De)}),"all")}}:we===f0?{key:"invert",text:j.selectInvert,onSelect(){const De=new Set(Q);P.forEach((be,Ae)=>{const Le=L(be,Ae),ut=xe.get(Le);ut!=null&&ut.disabled||(De.has(Le)?De.delete(Le):De.add(Le))});const Te=Array.from(De);m&&(Z.deprecated(!1,"onSelectInvert","onChange"),m(Te)),ue(Te,"invert")}}:we===h0?{key:"none",text:j.selectNone,onSelect(){g==null||g(),ue(Array.from(Q).filter(De=>{const Te=xe.get(De);return Te==null?void 0:Te.disabled}),"none")}}:we).map(we=>Object.assign(Object.assign({},we),{onSelect:(...De)=>{var Te,be;(be=we.onSelect)===null||be===void 0||(Te=be).call.apply(Te,[we].concat(De)),H(null)}})),[C,Q,P,L,m,ue]);return[Tt(me=>{var we;if(!t)return me.filter(je=>je!==ua);let De=Xt(me);const Te=new Set(Q),be=X.map(L).filter(je=>!xe.get(je).disabled),Ae=be.every(je=>Te.has(je)),Le=be.some(je=>Te.has(je)),ut=()=>{const je=[];Ae?be.forEach(lt=>{Te.delete(lt),je.push(lt)}):be.forEach(lt=>{Te.has(lt)||(Te.add(lt),je.push(lt))});const fe=Array.from(Te);d==null||d(!Ae,fe.map(lt=>S(lt)),je.map(lt=>S(lt))),ue(fe,"all"),H(null)};let ot,Oe;if(x!=="radio"){let je;if(Se){const It={getPopupContainer:Y,items:Se.map((or,mr)=>{const{key:Ft,text:zr,onSelect:Fr}=or;return{key:Ft??mr,onClick:()=>{Fr==null||Fr(be)},label:zr}})};je=N.createElement("div",{className:`${T}-selection-extra`},N.createElement(f1,{menu:It,getPopupContainer:Y},N.createElement("span",null,N.createElement(Hg,null))))}const fe=X.map((It,or)=>{const mr=L(It,or),Ft=xe.get(mr)||{};return Object.assign({checked:Te.has(mr)},Ft)}).filter(({disabled:It})=>It),lt=!!fe.length&&fe.length===X.length,_t=lt&&fe.every(({checked:It})=>It),Wt=lt&&fe.some(({checked:It})=>It),Pt=(c==null?void 0:c())||{},{onChange:Bt,disabled:yt}=Pt;Oe=N.createElement(Yi,Object.assign({"aria-label":je?"Custom selection":"Select all"},Pt,{checked:lt?_t:!!X.length&&Ae,indeterminate:lt?!_t&&Wt:!Ae&&Le,onChange:It=>{ut(),Bt==null||Bt(It)},disabled:yt??(X.length===0||lt),skipGroup:!0})),ot=!B&&N.createElement("div",{className:`${T}-selection`},Oe,je)}let Ie;x==="radio"?Ie=(je,fe,lt)=>{const _t=L(fe,lt),Wt=Te.has(_t),Pt=xe.get(_t);return{node:N.createElement(Jh,Object.assign({},Pt,{checked:Wt,onClick:Bt=>{var yt;Bt.stopPropagation(),(yt=Pt==null?void 0:Pt.onClick)===null||yt===void 0||yt.call(Pt,Bt)},onChange:Bt=>{var yt;Te.has(_t)||le(_t,!0,[_t],Bt.nativeEvent),(yt=Pt==null?void 0:Pt.onChange)===null||yt===void 0||yt.call(Pt,Bt)}})),checked:Wt}}:Ie=(je,fe,lt)=>{var _t;const Wt=L(fe,lt),Pt=Te.has(Wt),Bt=oe.has(Wt),yt=xe.get(Wt);let It;return O==="nest"?It=Bt:It=(_t=yt==null?void 0:yt.indeterminate)!==null&&_t!==void 0?_t:Bt,{node:N.createElement(Yi,Object.assign({},yt,{indeterminate:It,checked:Pt,skipGroup:!0,onClick:or=>{var mr;or.stopPropagation(),(mr=yt==null?void 0:yt.onClick)===null||mr===void 0||mr.call(yt,or)},onChange:or=>{var mr;const{nativeEvent:Ft}=or,{shiftKey:zr}=Ft,Fr=be.indexOf(Wt),mn=Be.some($r=>be.includes($r));if(zr&&E&&mn){const $r=_(Fr,be,Te),Lr=Array.from(Te);v==null||v(!Pt,Lr.map(_r=>S(_r)),$r.map(_r=>S(_r))),ue(Lr,"multiple")}else{const $r=Be;if(E){const Lr=Pt?Ln($r,Wt):Zn($r,Wt);le(Wt,!Pt,Lr,Ft)}else{const Lr=Qa([].concat(Xt($r),[Wt]),!0,ye,ke),{checkedKeys:_r,halfCheckedKeys:Nr}=Lr;let lr=_r;if(Pt){const xt=new Set(_r);xt.delete(Wt),lr=Qa(Array.from(xt),{halfCheckedKeys:Nr},ye,ke).checkedKeys}le(Wt,!Pt,lr,Ft)}}H(Pt?null:Fr),(mr=yt==null?void 0:yt.onChange)===null||mr===void 0||mr.call(yt,or)}})),checked:Pt}};const Ge=(je,fe,lt)=>{const{node:_t,checked:Wt}=Ie(je,fe,lt);return A?A(Wt,fe,lt,_t):_t};if(!De.includes(ua))if(De.findIndex(je=>{var fe;return((fe=je[$o])===null||fe===void 0?void 0:fe.columnType)==="EXPAND_COLUMN"})===0){const[je,...fe]=De;De=[je,ua].concat(Xt(fe))}else De=[ua].concat(Xt(De));const dt=De.indexOf(ua);De=De.filter((je,fe)=>je!==ua||fe===dt);const Je=De[dt-1],at=De[dt+1];let Lt=p;Lt===void 0&&((at==null?void 0:at.fixed)!==void 0?Lt=at.fixed:(Je==null?void 0:Je.fixed)!==void 0&&(Lt=Je.fixed)),Lt&&Je&&((we=Je[$o])===null||we===void 0?void 0:we.columnType)==="EXPAND_COLUMN"&&Je.fixed===void 0&&(Je.fixed=Lt);const Ct=bt(`${T}-selection-col`,{[`${T}-selection-col-with-dropdown`]:C&&x==="checkbox"}),At=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(Oe):t.columnTitle:ot,$t={fixed:Lt,width:w,className:`${T}-selection-column`,title:At(),render:Ge,onCell:t.onCell,align:t.align,[$o]:{className:Ct}};return De.map(je=>je===ua?$t:je)},[L,X,t,Be,Q,oe,w,Se,O,xe,v,le,ke]),Q]};function $3(e){return t=>{const{prefixCls:r,onExpand:n,record:a,expanded:i,expandable:c}=t,u=`${r}-row-expand-icon`;return N.createElement("button",{type:"button",onClick:f=>{n(a,f),f.stopPropagation()},className:bt(u,{[`${u}-spaced`]:!c,[`${u}-expanded`]:c&&i,[`${u}-collapsed`]:c&&!i}),"aria-label":i?e.collapse:e.expand,"aria-expanded":i})}}function P3(e){return(r,n)=>{const a=r.querySelector(`.${e}-container`);let i=n;if(a){const c=getComputedStyle(a),u=Number.parseInt(c.borderLeftWidth,10),f=Number.parseInt(c.borderRightWidth,10);i=n-u-f}return i}}const ya=(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 go(e,t){return t?`${t}-${e}`:`${e}`}const ps=(e,t)=>typeof e=="function"?e(t):e,M3=(e,t)=>{const r=ps(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var R3={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"},z3=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:R3}))},I3=N.forwardRef(z3),j3=function(t){var r=t.dropPosition,n=t.dropLevelOffset,a=t.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(r){case-1:i.top=0,i.left=-n*a;break;case 1:i.bottom=0,i.left=-n*a;break;case 0:i.bottom=0,i.left=a;break}return We.createElement("div",{style:i})};function _1(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function L3(e,t){var r=N.useState(!1),n=Ot(r,2),a=n[0],i=n[1];va(function(){if(a)return e(),function(){t()}},[a]),va(function(){return i(!0),function(){i(!1)}},[])}var _3=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],q3=N.forwardRef(function(e,t){var r=e.className,n=e.style,a=e.motion,i=e.motionNodes,c=e.motionType,u=e.onMotionStart,f=e.onMotionEnd,d=e.active,m=e.treeNodeRequiredProps,g=Gr(e,_3),v=N.useState(!0),w=Ot(v,2),x=w[0],C=w[1],p=N.useContext(iu),A=p.prefixCls,B=i&&c!=="hide";va(function(){i&&B!==x&&C(B)},[i]);var E=function(){i&&u()},T=N.useRef(!1),F=function(){i&&!T.current&&(T.current=!0,f())};L3(E,F);var P=function(L){B===L&&F()};return i?N.createElement(n1,Rt({ref:t,visible:x},a,{motionAppear:c==="show",onVisibleChanged:P}),function(S,L){var O=S.className,W=S.style;return N.createElement("div",{ref:L,className:bt("".concat(A,"-treenode-motion"),O),style:W},i.map(function(j){var Y=Object.assign({},(_1(j.data),j.data)),Z=j.title,_=j.key,H=j.isStart,V=j.isEnd;delete Y.children;var G=Oo(_,m);return N.createElement(Lo,Rt({},Y,G,{title:Z,active:d,data:j.data,key:_,isStart:H,isEnd:V}))}))}):N.createElement(Lo,Rt({domRef:t,className:r,style:n},g,{active:d}))});function H3(){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 a(i,c){var u=new Map;i.forEach(function(d){u.set(d,!0)});var f=c.filter(function(d){return!u.has(d)});return f.length===1?f[0]:null}return r<n?{add:!0,key:a(e,t)}:{add:!1,key:a(t,e)}}function gd(e,t,r){var n=e.findIndex(function(u){return u.key===r}),a=e[n+1],i=t.findIndex(function(u){return u.key===r});if(a){var c=t.findIndex(function(u){return u.key===a.key});return t.slice(i+1,c)}return t.slice(i+1)}var K3=["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"],vd={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},W3=function(){},Pa="RC_TREE_MOTION_".concat(Math.random()),p0={key:Pa},q1={key:Pa,level:0,index:0,pos:"0",node:p0,nodes:[p0]},bd={parent:null,children:[],pos:q1.pos,data:p0,title:null,key:Pa,isStart:[],isEnd:[]};function yd(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function xd(e){var t=e.key,r=e.pos;return ti(t,r)}function V3(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 U3=N.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var a=e.expandedKeys,i=e.selectedKeys,c=e.checkedKeys,u=e.loadedKeys,f=e.loadingKeys,d=e.halfCheckedKeys,m=e.keyEntities,g=e.disabled,v=e.dragging,w=e.dragOverNodeKey,x=e.dropPosition,C=e.motion,p=e.height,A=e.itemHeight,B=e.virtual,E=e.scrollWidth,T=e.focusable,F=e.activeItem,P=e.focused,S=e.tabIndex,L=e.onKeyDown,O=e.onFocus,W=e.onBlur,j=e.onActiveChange,Y=e.onListChangeStart,Z=e.onListChangeEnd,_=Gr(e,K3),H=N.useRef(null),V=N.useRef(null);N.useImperativeHandle(t,function(){return{scrollTo:function(Ie){H.current.scrollTo(Ie)},getIndentWidth:function(){return V.current.offsetWidth}}});var G=N.useState(a),te=Ot(G,2),K=te[0],X=te[1],ye=N.useState(n),xe=Ot(ye,2),ke=xe[0],Be=xe[1],_e=N.useState(n),Q=Ot(_e,2),oe=Q[0],ue=Q[1],le=N.useState([]),Se=Ot(le,2),Fe=Se[0],me=Se[1],we=N.useState(null),De=Ot(we,2),Te=De[0],be=De[1],Ae=N.useRef(n);Ae.current=n;function Le(){var Oe=Ae.current;Be(Oe),ue(Oe),me([]),be(null),Z()}va(function(){X(a);var Oe=H3(K,a);if(Oe.key!==null)if(Oe.add){var Ie=ke.findIndex(function(Ct){var At=Ct.key;return At===Oe.key}),Ge=yd(gd(ke,n,Oe.key),B,p,A),dt=ke.slice();dt.splice(Ie+1,0,bd),ue(dt),me(Ge),be("show")}else{var Je=n.findIndex(function(Ct){var At=Ct.key;return At===Oe.key}),at=yd(gd(n,ke,Oe.key),B,p,A),Lt=n.slice();Lt.splice(Je+1,0,bd),ue(Lt),me(at),be("hide")}else ke!==n&&(Be(n),ue(n))},[a,n]),N.useEffect(function(){v||Le()},[v]);var ut=C?oe:n,ot={expandedKeys:a,selectedKeys:i,loadedKeys:u,loadingKeys:f,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:w,dropPosition:x,keyEntities:m};return N.createElement(N.Fragment,null,P&&F&&N.createElement("span",{style:vd,"aria-live":"assertive"},V3(F)),N.createElement("div",null,N.createElement("input",{style:vd,disabled:T===!1||g,tabIndex:T!==!1?S:null,onKeyDown:L,onFocus:O,onBlur:W,value:"",onChange:W3,"aria-label":"for screen reader"})),N.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},N.createElement("div",{className:"".concat(r,"-indent")},N.createElement("div",{ref:V,className:"".concat(r,"-indent-unit")}))),N.createElement(s1,Rt({},_,{data:ut,itemKey:xd,height:p,fullHeight:!1,virtual:B,itemHeight:A,scrollWidth:E,prefixCls:"".concat(r,"-list"),ref:H,role:"tree",onVisibleChange:function(Ie){Ie.every(function(Ge){return xd(Ge)!==Pa})&&Le()}}),function(Oe){var Ie=Oe.pos,Ge=Object.assign({},(_1(Oe.data),Oe.data)),dt=Oe.title,Je=Oe.key,at=Oe.isStart,Lt=Oe.isEnd,Ct=ti(Je,Ie);delete Ge.key,delete Ge.children;var At=Oo(Ct,ot);return N.createElement(q3,Rt({},Ge,At,{title:dt,active:!!F&&Je===F.key,pos:Ie,data:Oe.data,isStart:at,isEnd:Lt,motion:C,motionNodes:Je===Pa?Fe:null,motionType:Te,onMotionStart:Y,onMotionEnd:Le,treeNodeRequiredProps:ot,onMouseMove:function(){j(null)}}))}))}),G3=10,lu=(function(e){Kg(r,e);var t=Wg(r);function r(){var n;Vg(this,r);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return n=t.call.apply(t,[this].concat(i)),ze(Zt(n),"destroyed",!1),ze(Zt(n),"delayedDragEnterLogic",void 0),ze(Zt(n),"loadingRetryTimes",{}),ze(Zt(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:ao()}),ze(Zt(n),"dragStartMousePosition",null),ze(Zt(n),"dragNodeProps",null),ze(Zt(n),"currentMouseOverDroppableNodeKey",null),ze(Zt(n),"listRef",N.createRef()),ze(Zt(n),"onNodeDragStart",function(u,f){var d=n.state,m=d.expandedKeys,g=d.keyEntities,v=n.props.onDragStart,w=f.eventKey;n.dragNodeProps=f,n.dragStartMousePosition={x:u.clientX,y:u.clientY};var x=Ln(m,w);n.setState({draggingNodeKey:w,dragChildrenKeys:F3(w,g),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(x),window.addEventListener("dragend",n.onWindowDragEnd),v==null||v({event:u,node:Mr(f)})}),ze(Zt(n),"onNodeDragEnter",function(u,f){var d=n.state,m=d.expandedKeys,g=d.keyEntities,v=d.dragChildrenKeys,w=d.flattenNodes,x=d.indent,C=n.props,p=C.onDragEnter,A=C.onExpand,B=C.allowDrop,E=C.direction,T=f.pos,F=f.eventKey;if(n.currentMouseOverDroppableNodeKey!==F&&(n.currentMouseOverDroppableNodeKey=F),!n.dragNodeProps){n.resetDragState();return}var P=hd(u,n.dragNodeProps,f,x,n.dragStartMousePosition,B,w,g,m,E),S=P.dropPosition,L=P.dropLevelOffset,O=P.dropTargetKey,W=P.dropContainerKey,j=P.dropTargetPos,Y=P.dropAllowed,Z=P.dragOverNodeKey;if(v.includes(O)||!Y){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(_){clearTimeout(n.delayedDragEnterLogic[_])}),n.dragNodeProps.eventKey!==f.eventKey&&(u.persist(),n.delayedDragEnterLogic[T]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var _=Xt(m),H=un(g,f.eventKey);H&&(H.children||[]).length&&(_=Zn(m,f.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(_),A==null||A(_,{node:Mr(f),expanded:!0,nativeEvent:u.nativeEvent})}},800)),n.dragNodeProps.eventKey===O&&L===0){n.resetDragState();return}n.setState({dragOverNodeKey:Z,dropPosition:S,dropLevelOffset:L,dropTargetKey:O,dropContainerKey:W,dropTargetPos:j,dropAllowed:Y}),p==null||p({event:u,node:Mr(f),expandedKeys:m})}),ze(Zt(n),"onNodeDragOver",function(u,f){var d=n.state,m=d.dragChildrenKeys,g=d.flattenNodes,v=d.keyEntities,w=d.expandedKeys,x=d.indent,C=n.props,p=C.onDragOver,A=C.allowDrop,B=C.direction;if(n.dragNodeProps){var E=hd(u,n.dragNodeProps,f,x,n.dragStartMousePosition,A,g,v,w,B),T=E.dropPosition,F=E.dropLevelOffset,P=E.dropTargetKey,S=E.dropContainerKey,L=E.dropTargetPos,O=E.dropAllowed,W=E.dragOverNodeKey;m.includes(P)||!O||(n.dragNodeProps.eventKey===P&&F===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():T===n.state.dropPosition&&F===n.state.dropLevelOffset&&P===n.state.dropTargetKey&&S===n.state.dropContainerKey&&L===n.state.dropTargetPos&&O===n.state.dropAllowed&&W===n.state.dragOverNodeKey||n.setState({dropPosition:T,dropLevelOffset:F,dropTargetKey:P,dropContainerKey:S,dropTargetPos:L,dropAllowed:O,dragOverNodeKey:W}),p==null||p({event:u,node:Mr(f)}))}}),ze(Zt(n),"onNodeDragLeave",function(u,f){n.currentMouseOverDroppableNodeKey===f.eventKey&&!u.currentTarget.contains(u.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var d=n.props.onDragLeave;d==null||d({event:u,node:Mr(f)})}),ze(Zt(n),"onWindowDragEnd",function(u){n.onNodeDragEnd(u,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),ze(Zt(n),"onNodeDragEnd",function(u,f){var d=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),d==null||d({event:u,node:Mr(f)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),ze(Zt(n),"onNodeDrop",function(u,f){var d,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,g=n.state,v=g.dragChildrenKeys,w=g.dropPosition,x=g.dropTargetKey,C=g.dropTargetPos,p=g.dropAllowed;if(p){var A=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),x!==null){var B=Ve(Ve({},Oo(x,n.getTreeNodeRequiredProps())),{},{active:((d=n.getActiveItem())===null||d===void 0?void 0:d.key)===x,data:un(n.state.keyEntities,x).node}),E=v.includes(x);pa(!E,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var T=su(C),F={event:u,node:Mr(B),dragNode:n.dragNodeProps?Mr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(v),dropToGap:w!==0,dropPosition:w+Number(T[T.length-1])};m||A==null||A(F),n.dragNodeProps=null}}}),ze(Zt(n),"cleanDragState",function(){var u=n.state.draggingNodeKey;u!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),ze(Zt(n),"triggerExpandActionExpand",function(u,f){var d=n.state,m=d.expandedKeys,g=d.flattenNodes,v=f.expanded,w=f.key,x=f.isLeaf;if(!(x||u.shiftKey||u.metaKey||u.ctrlKey)){var C=g.filter(function(A){return A.key===w})[0],p=Mr(Ve(Ve({},Oo(w,n.getTreeNodeRequiredProps())),{},{data:C.data}));n.setExpandedKeys(v?Ln(m,w):Zn(m,w)),n.onNodeExpand(u,p)}}),ze(Zt(n),"onNodeClick",function(u,f){var d=n.props,m=d.onClick,g=d.expandAction;g==="click"&&n.triggerExpandActionExpand(u,f),m==null||m(u,f)}),ze(Zt(n),"onNodeDoubleClick",function(u,f){var d=n.props,m=d.onDoubleClick,g=d.expandAction;g==="doubleClick"&&n.triggerExpandActionExpand(u,f),m==null||m(u,f)}),ze(Zt(n),"onNodeSelect",function(u,f){var d=n.state.selectedKeys,m=n.state,g=m.keyEntities,v=m.fieldNames,w=n.props,x=w.onSelect,C=w.multiple,p=f.selected,A=f[v.key],B=!p;B?C?d=Zn(d,A):d=[A]:d=Ln(d,A);var E=d.map(function(T){var F=un(g,T);return F?F.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:d}),x==null||x(d,{event:"select",selected:B,node:f,selectedNodes:E,nativeEvent:u.nativeEvent})}),ze(Zt(n),"onNodeCheck",function(u,f,d){var m=n.state,g=m.keyEntities,v=m.checkedKeys,w=m.halfCheckedKeys,x=n.props,C=x.checkStrictly,p=x.onCheck,A=f.key,B,E={event:"check",node:f,checked:d,nativeEvent:u.nativeEvent};if(C){var T=d?Zn(v,A):Ln(v,A),F=Ln(w,A);B={checked:T,halfChecked:F},E.checkedNodes=T.map(function(j){return un(g,j)}).filter(Boolean).map(function(j){return j.node}),n.setUncontrolledState({checkedKeys:T})}else{var P=Qa([].concat(Xt(v),[A]),!0,g),S=P.checkedKeys,L=P.halfCheckedKeys;if(!d){var O=new Set(S);O.delete(A);var W=Qa(Array.from(O),{halfCheckedKeys:L},g);S=W.checkedKeys,L=W.halfCheckedKeys}B=S,E.checkedNodes=[],E.checkedNodesPositions=[],E.halfCheckedKeys=L,S.forEach(function(j){var Y=un(g,j);if(Y){var Z=Y.node,_=Y.pos;E.checkedNodes.push(Z),E.checkedNodesPositions.push({node:Z,pos:_})}}),n.setUncontrolledState({checkedKeys:S},!1,{halfCheckedKeys:L})}p==null||p(B,E)}),ze(Zt(n),"onNodeLoad",function(u){var f,d=u.key,m=n.state.keyEntities,g=un(m,d);if(!(g!=null&&(f=g.children)!==null&&f!==void 0&&f.length)){var v=new Promise(function(w,x){n.setState(function(C){var p=C.loadedKeys,A=p===void 0?[]:p,B=C.loadingKeys,E=B===void 0?[]:B,T=n.props,F=T.loadData,P=T.onLoad;if(!F||A.includes(d)||E.includes(d))return null;var S=F(u);return S.then(function(){var L=n.state.loadedKeys,O=Zn(L,d);P==null||P(O,{event:"load",node:u}),n.setUncontrolledState({loadedKeys:O}),n.setState(function(W){return{loadingKeys:Ln(W.loadingKeys,d)}}),w()}).catch(function(L){if(n.setState(function(W){return{loadingKeys:Ln(W.loadingKeys,d)}}),n.loadingRetryTimes[d]=(n.loadingRetryTimes[d]||0)+1,n.loadingRetryTimes[d]>=G3){var O=n.state.loadedKeys;pa(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:Zn(O,d)}),w()}x(L)}),{loadingKeys:Zn(E,d)}})});return v.catch(function(){}),v}}),ze(Zt(n),"onNodeMouseEnter",function(u,f){var d=n.props.onMouseEnter;d==null||d({event:u,node:f})}),ze(Zt(n),"onNodeMouseLeave",function(u,f){var d=n.props.onMouseLeave;d==null||d({event:u,node:f})}),ze(Zt(n),"onNodeContextMenu",function(u,f){var d=n.props.onRightClick;d&&(u.preventDefault(),d({event:u,node:f}))}),ze(Zt(n),"onFocus",function(){var u=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];u==null||u.apply(void 0,d)}),ze(Zt(n),"onBlur",function(){var u=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];u==null||u.apply(void 0,d)}),ze(Zt(n),"getTreeNodeRequiredProps",function(){var u=n.state,f=u.expandedKeys,d=u.selectedKeys,m=u.loadedKeys,g=u.loadingKeys,v=u.checkedKeys,w=u.halfCheckedKeys,x=u.dragOverNodeKey,C=u.dropPosition,p=u.keyEntities;return{expandedKeys:f||[],selectedKeys:d||[],loadedKeys:m||[],loadingKeys:g||[],checkedKeys:v||[],halfCheckedKeys:w||[],dragOverNodeKey:x,dropPosition:C,keyEntities:p}}),ze(Zt(n),"setExpandedKeys",function(u){var f=n.state,d=f.treeData,m=f.fieldNames,g=sl(d,u,m);n.setUncontrolledState({expandedKeys:u,flattenNodes:g},!0)}),ze(Zt(n),"onNodeExpand",function(u,f){var d=n.state.expandedKeys,m=n.state,g=m.listChanging,v=m.fieldNames,w=n.props,x=w.onExpand,C=w.loadData,p=f.expanded,A=f[v.key];if(!g){var B=d.includes(A),E=!p;if(pa(p&&B||!p&&!B,"Expand state not sync with index check"),d=E?Zn(d,A):Ln(d,A),n.setExpandedKeys(d),x==null||x(d,{node:f,expanded:E,nativeEvent:u.nativeEvent}),E&&C){var T=n.onNodeLoad(f);T&&T.then(function(){var F=sl(n.state.treeData,d,v);n.setUncontrolledState({flattenNodes:F})}).catch(function(){var F=n.state.expandedKeys,P=Ln(F,A);n.setExpandedKeys(P)})}}}),ze(Zt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),ze(Zt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),ze(Zt(n),"onActiveChange",function(u){var f=n.state.activeKey,d=n.props,m=d.onActiveChange,g=d.itemScrollOffset,v=g===void 0?0:g;f!==u&&(n.setState({activeKey:u}),u!==null&&n.scrollTo({key:u,offset:v}),m==null||m(u))}),ze(Zt(n),"getActiveItem",function(){var u=n.state,f=u.activeKey,d=u.flattenNodes;return f===null?null:d.find(function(m){var g=m.key;return g===f})||null}),ze(Zt(n),"offsetActiveKey",function(u){var f=n.state,d=f.flattenNodes,m=f.activeKey,g=d.findIndex(function(x){var C=x.key;return C===m});g===-1&&u<0&&(g=d.length),g=(g+u+d.length)%d.length;var v=d[g];if(v){var w=v.key;n.onActiveChange(w)}else n.onActiveChange(null)}),ze(Zt(n),"onKeyDown",function(u){var f=n.state,d=f.activeKey,m=f.expandedKeys,g=f.checkedKeys,v=f.fieldNames,w=n.props,x=w.onKeyDown,C=w.checkable,p=w.selectable;switch(u.which){case Fn.UP:{n.offsetActiveKey(-1),u.preventDefault();break}case Fn.DOWN:{n.offsetActiveKey(1),u.preventDefault();break}}var A=n.getActiveItem();if(A&&A.data){var B=n.getTreeNodeRequiredProps(),E=A.data.isLeaf===!1||!!(A.data[v.children]||[]).length,T=Mr(Ve(Ve({},Oo(d,B)),{},{data:A.data,active:!0}));switch(u.which){case Fn.LEFT:{E&&m.includes(d)?n.onNodeExpand({},T):A.parent&&n.onActiveChange(A.parent.key),u.preventDefault();break}case Fn.RIGHT:{E&&!m.includes(d)?n.onNodeExpand({},T):A.children&&A.children.length&&n.onActiveChange(A.children[0].key),u.preventDefault();break}case Fn.ENTER:case Fn.SPACE:{C&&!T.disabled&&T.checkable!==!1&&!T.disableCheckbox?n.onNodeCheck({},T,!g.includes(d)):!C&&p&&!T.disabled&&T.selectable!==!1&&n.onNodeSelect({},T);break}}}x==null||x(u)}),ze(Zt(n),"setUncontrolledState",function(u){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,g=!0,v={};Object.keys(u).forEach(function(w){if(n.props.hasOwnProperty(w)){g=!1;return}m=!0,v[w]=u[w]}),m&&(!f||g)&&n.setState(Ve(Ve({},v),d))}}),ze(Zt(n),"scrollTo",function(u){n.listRef.current.scrollTo(u)}),n}return Ug(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var a=this.props,i=a.activeKey,c=a.itemScrollOffset,u=c===void 0?0:c;i!==void 0&&i!==this.state.activeKey&&(this.setState({activeKey:i}),i!==null&&this.scrollTo({key:i,offset:u}))}},{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 a=this.state,i=a.focused,c=a.flattenNodes,u=a.keyEntities,f=a.draggingNodeKey,d=a.activeKey,m=a.dropLevelOffset,g=a.dropContainerKey,v=a.dropTargetKey,w=a.dropPosition,x=a.dragOverNodeKey,C=a.indent,p=this.props,A=p.prefixCls,B=p.className,E=p.style,T=p.showLine,F=p.focusable,P=p.tabIndex,S=P===void 0?0:P,L=p.selectable,O=p.showIcon,W=p.icon,j=p.switcherIcon,Y=p.draggable,Z=p.checkable,_=p.checkStrictly,H=p.disabled,V=p.motion,G=p.loadData,te=p.filterTreeNode,K=p.height,X=p.itemHeight,ye=p.scrollWidth,xe=p.virtual,ke=p.titleRender,Be=p.dropIndicatorRender,_e=p.onContextMenu,Q=p.onScroll,oe=p.direction,ue=p.rootClassName,le=p.rootStyle,Se=Gi(this.props,{aria:!0,data:!0}),Fe;Y&&(Sn(Y)==="object"?Fe=Y:typeof Y=="function"?Fe={nodeDraggable:Y}:Fe={});var me={prefixCls:A,selectable:L,showIcon:O,icon:W,switcherIcon:j,draggable:Fe,draggingNodeKey:f,checkable:Z,checkStrictly:_,disabled:H,keyEntities:u,dropLevelOffset:m,dropContainerKey:g,dropTargetKey:v,dropPosition:w,dragOverNodeKey:x,indent:C,direction:oe,dropIndicatorRender:Be,loadData:G,filterTreeNode:te,titleRender:ke,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 N.createElement(iu.Provider,{value:me},N.createElement("div",{className:bt(A,B,ue,ze(ze(ze({},"".concat(A,"-show-line"),T),"".concat(A,"-focused"),i),"".concat(A,"-active-focused"),d!==null)),style:le},N.createElement(U3,Rt({ref:this.listRef,prefixCls:A,style:E,data:c,disabled:H,selectable:L,checkable:!!Z,motion:V,dragging:f!==null,height:K,itemHeight:X,virtual:xe,focusable:F,focused:i,tabIndex:S,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:_e,onScroll:Q,scrollWidth:ye},this.getTreeNodeRequiredProps(),Se))))}}],[{key:"getDerivedStateFromProps",value:function(a,i){var c=i.prevProps,u={prevProps:a};function f(S){return!c&&a.hasOwnProperty(S)||c&&c[S]!==a[S]}var d,m=i.fieldNames;if(f("fieldNames")&&(m=ao(a.fieldNames),u.fieldNames=m),f("treeData")?d=a.treeData:f("children")&&(pa(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),d=m1(a.children)),d){u.treeData=d;var g=J0(d,{fieldNames:m});u.keyEntities=Ve(ze({},Pa,q1),g.keyEntities)}var v=u.keyEntities||i.keyEntities;if(f("expandedKeys")||c&&f("autoExpandParent"))u.expandedKeys=a.autoExpandParent||!c&&a.defaultExpandParent?c0(a.expandedKeys,v):a.expandedKeys;else if(!c&&a.defaultExpandAll){var w=Ve({},v);delete w[Pa];var x=[];Object.keys(w).forEach(function(S){var L=w[S];L.children&&L.children.length&&x.push(L.key)}),u.expandedKeys=x}else!c&&a.defaultExpandedKeys&&(u.expandedKeys=a.autoExpandParent||a.defaultExpandParent?c0(a.defaultExpandedKeys,v):a.defaultExpandedKeys);if(u.expandedKeys||delete u.expandedKeys,d||u.expandedKeys){var C=sl(d||i.treeData,u.expandedKeys||i.expandedKeys,m);u.flattenNodes=C}if(a.selectable&&(f("selectedKeys")?u.selectedKeys=pd(a.selectedKeys,a):!c&&a.defaultSelectedKeys&&(u.selectedKeys=pd(a.defaultSelectedKeys,a))),a.checkable){var p;if(f("checkedKeys")?p=ll(a.checkedKeys)||{}:!c&&a.defaultCheckedKeys?p=ll(a.defaultCheckedKeys)||{}:d&&(p=ll(a.checkedKeys)||{checkedKeys:i.checkedKeys,halfCheckedKeys:i.halfCheckedKeys}),p){var A=p,B=A.checkedKeys,E=B===void 0?[]:B,T=A.halfCheckedKeys,F=T===void 0?[]:T;if(!a.checkStrictly){var P=Qa(E,!0,v);E=P.checkedKeys,F=P.halfCheckedKeys}u.checkedKeys=E,u.halfCheckedKeys=F}}return f("loadedKeys")&&(u.loadedKeys=a.loadedKeys),u}}]),r})(N.Component);ze(lu,"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:j3,allowDrop:function(){return!0},expandAction:!1});ze(lu,"TreeNode",Lo);var Y3={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"},Z3=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:Y3}))},H1=N.forwardRef(Z3),X3={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"},Q3=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:X3}))},J3=N.forwardRef(Q3),e5={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"},t5=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:e5}))},r5=N.forwardRef(t5),n5={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"},a5=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:n5}))},o5=N.forwardRef(a5);const i5=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:a,borderRadius:i,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 ${a}`,content:'""',borderRadius:i},"&:hover:before":{background:c}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:i,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&, &:hover":{color:n},"&:before, &:hover:before":{background:r}}}}}),s5=new Zg("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),l5=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),u5=(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:`${vt(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),c5=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:a,titleHeight:i,indentSize:c,nodeSelectedBg:u,nodeHoverBg:f,colorTextQuaternary:d,controlItemBgActiveDisabled:m}=t;return{[r]:Object.assign(Object.assign({},Q0(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)`]:Xg(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:s5,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:a,lineHeight:vt(i),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:a},[`&-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:i,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(i).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},l5(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:i,height:i,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(i).div(2).equal(),bottom:t.calc(a).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(i).div(2).equal()).mul(.8).equal(),height:t.calc(i).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:i,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},u5(e,t)),{"&:hover":{backgroundColor:f},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:u},[`${r}-iconEle`]:{display:"inline-block",width:i,height:i,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(i).div(2).equal(),bottom:t.calc(a).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:`${vt(t.calc(i).div(2).equal())} !important`}})}},d5=(e,t,r=!0)=>{const n=`.${e}`,a=`${n}-treenode`,i=t.calc(t.paddingXS).div(2).equal(),c=Vi(t,{treeCls:n,treeNodeCls:a,treeNodePadding:i});return[c5(e,c),r&&i5(c)].filter(Boolean)},f5=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,a=t;return{titleHeight:a,indentSize:a,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},h5=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},f5(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},p5=V0("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:Gg(`${t}-checkbox`,e)},d5(t,e),Yg(e)],h5),wd=4;function m5(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:a,direction:i="ltr"}=e,c=i==="ltr"?"left":"right",u=i==="ltr"?"right":"left",f={[c]:-r*a+wd,[u]:0};switch(t){case-1:f.top=-3;break;case 1:f.bottom=-3;break;default:f.bottom=-3,f[c]=a+wd;break}return We.createElement("div",{style:f,className:`${n}-drop-indicator`})}var g5={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"},v5=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:g5}))},b5=N.forwardRef(v5),y5={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"},x5=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:y5}))},w5=N.forwardRef(x5),C5={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"},D5=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:C5}))},k5=N.forwardRef(D5);const E5=e=>{var t,r;const{prefixCls:n,switcherIcon:a,treeNodeProps:i,showLine:c,switcherLoadingIcon:u}=e,{isLeaf:f,expanded:d,loading:m}=i;if(m)return N.isValidElement(u)?u:N.createElement(Qg,{className:`${n}-switcher-loading-icon`});let g;if(c&&typeof c=="object"&&(g=c.showLeafIcon),f){if(!c)return null;if(typeof g!="boolean"&&g){const x=typeof g=="function"?g(i):g,C=`${n}-switcher-line-custom-icon`;return N.isValidElement(x)?Xc(x,{className:bt((t=x.props)===null||t===void 0?void 0:t.className,C)}):x}return g?N.createElement(H1,{className:`${n}-switcher-line-icon`}):N.createElement("span",{className:`${n}-switcher-leaf-line`})}const v=`${n}-switcher-icon`,w=typeof a=="function"?a(i):a;return N.isValidElement(w)?Xc(w,{className:bt((r=w.props)===null||r===void 0?void 0:r.className,v)}):w!==void 0?w:c?d?N.createElement(w5,{className:`${n}-switcher-line-icon`}):N.createElement(k5,{className:`${n}-switcher-line-icon`}):N.createElement(b5,{className:v})},K1=We.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:a,virtual:i,tree:c}=We.useContext(ei),{prefixCls:u,className:f,showIcon:d=!1,showLine:m,switcherIcon:g,switcherLoadingIcon:v,blockNode:w=!1,children:x,checkable:C=!1,selectable:p=!0,draggable:A,disabled:B,motion:E,style:T}=e,F=n("tree",u),P=n(),S=We.useContext(Jg),L=B??S,O=E??Object.assign(Object.assign({},e4(P)),{motionAppear:!1}),W=Object.assign(Object.assign({},e),{checkable:C,selectable:p,showIcon:d,motion:O,blockNode:w,disabled:L,showLine:!!m,dropIndicatorRender:m5}),[j,Y,Z]=p5(F),[,_]=l1(),H=_.paddingXS/2+(((r=_.Tree)===null||r===void 0?void 0:r.titleHeight)||_.controlHeightSM),V=We.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||We.createElement(o5,null)),te},[A]),G=te=>We.createElement(E5,{prefixCls:F,switcherIcon:g,switcherLoadingIcon:v,treeNodeProps:te,showLine:m});return j(We.createElement(lu,Object.assign({itemHeight:H,ref:t,virtual:i},W,{style:Object.assign(Object.assign({},c==null?void 0:c.style),T),prefixCls:F,className:bt({[`${F}-icon-hide`]:!d,[`${F}-block-node`]:w,[`${F}-unselectable`]:!p,[`${F}-rtl`]:a==="rtl",[`${F}-disabled`]:L},c==null?void 0:c.className,f,Y,Z),direction:a,checkable:C&&We.createElement("span",{className:`${F}-checkbox-inner`}),selectable:p,switcherIcon:G,draggable:V}),x))}),Cd=0,ul=1,Dd=2;function uu(e,t,r){const{key:n,children:a}=r;function i(c){const u=c[n],f=c[a];t(u,c)!==!1&&uu(f||[],t,r)}e.forEach(i)}function S5({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:a}){const i=[];let c=Cd;if(r&&r===n)return[r];if(!r||!n)return[];function u(f){return f===r||f===n}return uu(e,f=>{if(c===Dd)return!1;if(u(f)){if(i.push(f),c===Cd)c=ul;else if(c===ul)return c=Dd,!1}else c===ul&&i.push(f);return t.includes(f)},ao(a)),i}function cl(e,t,r){const n=Xt(t),a=[];return uu(e,(i,c)=>{const u=n.indexOf(i);return u!==-1&&(a.push(c),n.splice(u,1)),!!n.length},ao(r)),a}var kd=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function A5(e){const{isLeaf:t,expanded:r}=e;return t?N.createElement(H1,null):r?N.createElement(J3,null):N.createElement(r5,null)}function Ed({treeData:e,children:t}){return e||m1(t)}const B5=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:a}=e,i=kd(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const c=N.useRef(null),u=N.useRef(null),f=()=>{const{keyEntities:L}=J0(Ed(i),{fieldNames:i.fieldNames});let O;return r?O=Object.keys(L):n?O=c0(i.expandedKeys||a||[],L):O=i.expandedKeys||a||[],O},[d,m]=N.useState(i.selectedKeys||i.defaultSelectedKeys||[]),[g,v]=N.useState(()=>f());N.useEffect(()=>{"selectedKeys"in i&&m(i.selectedKeys)},[i.selectedKeys]),N.useEffect(()=>{"expandedKeys"in i&&v(i.expandedKeys)},[i.expandedKeys]);const w=(L,O)=>{var W;return"expandedKeys"in i||v(L),(W=i.onExpand)===null||W===void 0?void 0:W.call(i,L,O)},x=(L,O)=>{var W;const{multiple:j,fieldNames:Y}=i,{node:Z,nativeEvent:_}=O,{key:H=""}=Z,V=Ed(i),G=Object.assign(Object.assign({},O),{selected:!0}),te=(_==null?void 0:_.ctrlKey)||(_==null?void 0:_.metaKey),K=_==null?void 0:_.shiftKey;let X;j&&te?(X=L,c.current=H,u.current=X,G.selectedNodes=cl(V,X,Y)):j&&K?(X=Array.from(new Set([].concat(Xt(u.current||[]),Xt(S5({treeData:V,expandedKeys:g,startKey:H,endKey:c.current,fieldNames:Y}))))),G.selectedNodes=cl(V,X,Y)):(X=[H],c.current=H,u.current=X,G.selectedNodes=cl(V,X,Y)),(W=i.onSelect)===null||W===void 0||W.call(i,X,G),"selectedKeys"in i||m(X)},{getPrefixCls:C,direction:p}=N.useContext(ei),{prefixCls:A,className:B,showIcon:E=!0,expandAction:T="click"}=i,F=kd(i,["prefixCls","className","showIcon","expandAction"]),P=C("tree",A),S=bt(`${P}-directory`,{[`${P}-directory-rtl`]:p==="rtl"},B);return N.createElement(K1,Object.assign({icon:A5,ref:t,blockNode:!0},F,{showIcon:E,expandAction:T,prefixCls:P,className:S,expandedKeys:g,selectedKeys:d,onSelect:x,onExpand:w}))},F5=N.forwardRef(B5),cu=K1;cu.DirectoryTree=F5;cu.TreeNode=Lo;const Sd=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:a,onChange:i}=e;return r?N.createElement("div",{className:`${n}-filter-dropdown-search`},N.createElement(t4,{prefix:N.createElement(r4,null),placeholder:a.filterSearchPlaceholder,onChange:i,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},N5=e=>{const{keyCode:t}=e;t===Fn.ENTER&&e.stopPropagation()},T5=N.forwardRef((e,t)=>N.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:N5,ref:t},e.children));function Ja(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(Xt(t),Xt(Ja(n))))}),t}function O5(e){return e.some(({children:t})=>t)}function W1(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function V1({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:a,filterSearch:i}){return e.map((c,u)=>{const f=String(c.value);if(c.children)return{key:f||u,label:c.text,popupClassName:`${t}-dropdown-submenu`,children:V1({filters:c.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:a,filterSearch:i})};const d=n?Yi:Jh,m={key:c.value!==void 0?f:u,label:N.createElement(N.Fragment,null,N.createElement(d,{checked:r.includes(f)}),N.createElement("span",null,c.text))};return a.trim()?typeof i=="function"?i(a,c)?m:null:W1(a,c.text)?m:null:m})}function dl(e){return e||[]}const $5=e=>{var t,r,n,a;const{tablePrefixCls:i,prefixCls:c,column:u,dropdownPrefixCls:f,columnKey:d,filterOnClose:m,filterMultiple:g,filterMode:v="menu",filterSearch:w=!1,filterState:x,triggerFilter:C,locale:p,children:A,getPopupContainer:B,rootClassName:E}=e,{filterResetToDefaultFilteredValue:T,defaultFilteredValue:F,filterDropdownProps:P={},filterDropdownOpen:S,filterDropdownVisible:L,onFilterDropdownVisibleChange:O,onFilterDropdownOpenChange:W}=u,[j,Y]=N.useState(!1),Z=!!(x&&(!((t=x.filteredKeys)===null||t===void 0)&&t.length||x.forceFiltered)),_=Oe=>{var Ie;Y(Oe),(Ie=P.onOpenChange)===null||Ie===void 0||Ie.call(P,Oe),W==null||W(Oe),O==null||O(Oe)},H=(a=(n=(r=P.open)!==null&&r!==void 0?r:S)!==null&&n!==void 0?n:L)!==null&&a!==void 0?a:j,V=x==null?void 0:x.filteredKeys,[G,te]=b4(dl(V)),K=({selectedKeys:Oe})=>{te(Oe)},X=(Oe,{node:Ie,checked:Ge})=>{K(g?{selectedKeys:Oe}:{selectedKeys:Ge&&Ie.key?[Ie.key]:[]})};N.useEffect(()=>{j&&K({selectedKeys:dl(V)})},[V]);const[ye,xe]=N.useState([]),ke=Oe=>{xe(Oe)},[Be,_e]=N.useState(""),Q=Oe=>{const{value:Ie}=Oe.target;_e(Ie)};N.useEffect(()=>{j||_e("")},[j]);const oe=Oe=>{const Ie=Oe!=null&&Oe.length?Oe:null;if(Ie===null&&(!x||!x.filteredKeys)||no(Ie,x==null?void 0:x.filteredKeys,!0))return null;C({column:u,key:d,filteredKeys:Ie})},ue=()=>{_(!1),oe(G())},le=({confirm:Oe,closeDropdown:Ie}={confirm:!1,closeDropdown:!1})=>{Oe&&oe([]),Ie&&_(!1),_e(""),te(T?(F||[]).map(Ge=>String(Ge)):[])},Se=({closeDropdown:Oe}={closeDropdown:!0})=>{Oe&&_(!1),oe(G())},Fe=(Oe,Ie)=>{Ie.source==="trigger"&&(Oe&&V!==void 0&&te(dl(V)),_(Oe),!Oe&&!u.filterDropdown&&m&&ue())},me=bt({[`${f}-menu-without-submenu`]:!O5(u.filters||[])}),we=Oe=>{if(Oe.target.checked){const Ie=Ja(u==null?void 0:u.filters).map(Ge=>String(Ge));te(Ie)}else te([])},De=({filters:Oe})=>(Oe||[]).map((Ie,Ge)=>{const dt=String(Ie.value),Je={title:Ie.text,key:Ie.value!==void 0?dt:String(Ge)};return Ie.children&&(Je.children=De({filters:Ie.children})),Je}),Te=Oe=>{var Ie;return Object.assign(Object.assign({},Oe),{text:Oe.title,value:Oe.key,children:((Ie=Oe.children)===null||Ie===void 0?void 0:Ie.map(Ge=>Te(Ge)))||[]})};let be;const{direction:Ae,renderEmpty:Le}=N.useContext(ei);if(typeof u.filterDropdown=="function")be=u.filterDropdown({prefixCls:`${f}-custom`,setSelectedKeys:Oe=>K({selectedKeys:Oe}),selectedKeys:G(),confirm:Se,clearFilters:le,filters:u.filters,visible:H,close:()=>{_(!1)}});else if(u.filterDropdown)be=u.filterDropdown;else{const Oe=G()||[],Ie=()=>{var dt,Je;const at=(dt=Le==null?void 0:Le("Table.filter"))!==null&&dt!==void 0?dt:N.createElement(Jc,{image:Jc.PRESENTED_IMAGE_SIMPLE,description:p.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((u.filters||[]).length===0)return at;if(v==="tree")return N.createElement(N.Fragment,null,N.createElement(Sd,{filterSearch:w,value:Be,onChange:Q,tablePrefixCls:i,locale:p}),N.createElement("div",{className:`${i}-filter-dropdown-tree`},g?N.createElement(Yi,{checked:Oe.length===Ja(u.filters).length,indeterminate:Oe.length>0&&Oe.length<Ja(u.filters).length,className:`${i}-filter-dropdown-checkall`,onChange:we},(Je=p==null?void 0:p.filterCheckall)!==null&&Je!==void 0?Je:p==null?void 0:p.filterCheckAll):null,N.createElement(cu,{checkable:!0,selectable:!1,blockNode:!0,multiple:g,checkStrictly:!g,className:`${f}-menu`,onCheck:X,checkedKeys:Oe,selectedKeys:Oe,showIcon:!1,treeData:De({filters:u.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Be.trim()?At=>typeof w=="function"?w(Be,Te(At)):W1(Be,At.title):void 0})));const Lt=V1({filters:u.filters||[],filterSearch:w,prefixCls:c,filteredKeys:G(),filterMultiple:g,searchValue:Be}),Ct=Lt.every(At=>At===null);return N.createElement(N.Fragment,null,N.createElement(Sd,{filterSearch:w,value:Be,onChange:Q,tablePrefixCls:i,locale:p}),Ct?at:N.createElement(c4,{selectable:!0,multiple:g,prefixCls:`${f}-menu`,className:me,onSelect:K,onDeselect:K,selectedKeys:Oe,getPopupContainer:B,openKeys:ye,onOpenChange:ke,items:Lt}))},Ge=()=>T?no((F||[]).map(dt=>String(dt)),Oe,!0):Oe.length===0;be=N.createElement(N.Fragment,null,Ie(),N.createElement("div",{className:`${c}-dropdown-btns`},N.createElement(Qc,{type:"link",size:"small",disabled:Ge(),onClick:()=>le()},p.filterReset),N.createElement(Qc,{type:"primary",size:"small",onClick:ue},p.filterConfirm)))}u.filterDropdown&&(be=N.createElement(d4,{selectable:void 0},be)),be=N.createElement(T5,{className:`${c}-dropdown`},be);const ot=u1({trigger:["click"],placement:Ae==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let Oe;return typeof u.filterIcon=="function"?Oe=u.filterIcon(Z):u.filterIcon?Oe=u.filterIcon:Oe=N.createElement(I3,null),N.createElement("span",{role:"button",tabIndex:-1,className:bt(`${c}-trigger`,{active:Z}),onClick:Ie=>{Ie.stopPropagation()}},Oe)})(),getPopupContainer:B},Object.assign(Object.assign({},P),{rootClassName:bt(E,P.rootClassName),open:H,onOpenChange:Fe,popupRender:()=>typeof(P==null?void 0:P.dropdownRender)=="function"?P.dropdownRender(be):be}));return N.createElement("div",{className:`${c}-column`},N.createElement("span",{className:`${i}-column-title`},A),N.createElement(f1,Object.assign({},ot)))},m0=(e,t,r)=>{let n=[];return(e||[]).forEach((a,i)=>{var c;const u=go(i,r),f=a.filterDropdown!==void 0;if(a.filters||f||"onFilter"in a)if("filteredValue"in a){let d=a.filteredValue;f||(d=(c=d==null?void 0:d.map(String))!==null&&c!==void 0?c:d),n.push({column:a,key:ya(a,u),filteredKeys:d,forceFiltered:a.filtered})}else n.push({column:a,key:ya(a,u),filteredKeys:t&&a.defaultFilteredValue?a.defaultFilteredValue:void 0,forceFiltered:a.filtered});"children"in a&&(n=[].concat(Xt(n),Xt(m0(a.children,t,u))))}),n};function U1(e,t,r,n,a,i,c,u,f){return r.map((d,m)=>{const g=go(m,u),{filterOnClose:v=!0,filterMultiple:w=!0,filterMode:x,filterSearch:C}=d;let p=d;if(p.filters||p.filterDropdown){const A=ya(p,g),B=n.find(({key:E})=>A===E);p=Object.assign(Object.assign({},p),{title:E=>N.createElement($5,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:p,columnKey:A,filterState:B,filterOnClose:v,filterMultiple:w,filterMode:x,filterSearch:C,triggerFilter:i,locale:a,getPopupContainer:c,rootClassName:f},ps(d.title,E))})}return"children"in p&&(p=Object.assign(Object.assign({},p),{children:U1(e,t,p.children,n,a,i,c,g,f)})),p})}const Ad=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:a})=>{const i=r,{filters:c,filterDropdown:u}=a;if(u)t[i]=n||null;else if(Array.isArray(n)){const f=Ja(c);t[i]=f.filter(d=>n.includes(String(d)))}else t[i]=null}),t},g0=(e,t,r)=>t.reduce((a,i)=>{const{column:{onFilter:c,filters:u},filteredKeys:f}=i;return c&&f&&f.length?a.map(d=>Object.assign({},d)).filter(d=>f.some(m=>{const g=Ja(u),v=g.findIndex(x=>String(x)===String(m)),w=v!==-1?g[v]:m;return d[r]&&(d[r]=g0(d[r],t,r)),c(w,d)})):a},e),G1=e=>e.flatMap(t=>"children"in t?[t].concat(Xt(G1(t.children||[]))):[t]),P5=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:a,getPopupContainer:i,locale:c,rootClassName:u}=e;X0();const f=N.useMemo(()=>G1(n||[]),[n]),[d,m]=N.useState(()=>m0(f,!0)),g=N.useMemo(()=>{const C=m0(f,!1);if(C.length===0)return C;let p=!0;if(C.forEach(({filteredKeys:A})=>{A!==void 0&&(p=!1)}),p){const A=(f||[]).map((B,E)=>ya(B,go(E)));return d.filter(({key:B})=>A.includes(B)).map(B=>{const E=f[A.indexOf(B.key)];return Object.assign(Object.assign({},B),{column:Object.assign(Object.assign({},B.column),E),forceFiltered:E.filtered})})}return C},[f,d]),v=N.useMemo(()=>Ad(g),[g]),w=C=>{const p=g.filter(({key:A})=>A!==C.key);p.push(C),m(p),a(Ad(p),p)};return[C=>U1(t,r,C,g,c,w,i,void 0,u),g,v]},M5=(e,t,r)=>{const n=N.useRef({});function a(i){var c;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let f=function(d){d.forEach((m,g)=>{const v=r(m,g);u.set(v,m),m&&typeof m=="object"&&t in m&&f(m[t]||[])})};const u=new Map;f(e),n.current={data:e,childrenColumnName:t,kvMap:u,getRowKey:r}}return(c=n.current.kvMap)===null||c===void 0?void 0:c.get(i)}return[a]};var R5=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const Y1=10;function z5(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(a=>{const i=e[a];typeof i!="function"&&(r[a]=i)}),r}function I5(e,t,r){const n=r&&typeof r=="object"?r:{},{total:a=0}=n,i=R5(n,["total"]),[c,u]=St(()=>({current:"defaultCurrent"in i?i.defaultCurrent:1,pageSize:"defaultPageSize"in i?i.defaultPageSize:Y1})),f=u1(c,i,{total:a>0?a:e}),d=Math.ceil((a||e)/f.pageSize);f.current>d&&(f.current=d||1);const m=(v,w)=>{u({current:v??1,pageSize:w||f.pageSize})},g=(v,w)=>{var x;r&&((x=r.onChange)===null||x===void 0||x.call(r,v,w)),m(v,w),t(v,w||(f==null?void 0:f.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},f),{onChange:g}),m]}var j5={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"},L5=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:j5}))},_5=N.forwardRef(L5),q5={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"},H5=function(t,r){return N.createElement(nn,Rt({},t,{ref:r,icon:q5}))},K5=N.forwardRef(H5);const Oi="ascend",fl="descend",Xi=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,Bd=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,W5=(e,t)=>t?e[e.indexOf(t)+1]:e[0],v0=(e,t,r)=>{let n=[];const a=(i,c)=>{n.push({column:i,key:ya(i,c),multiplePriority:Xi(i),sortOrder:i.sortOrder})};return(e||[]).forEach((i,c)=>{const u=go(c,r);i.children?("sortOrder"in i&&a(i,u),n=[].concat(Xt(n),Xt(v0(i.children,t,u)))):i.sorter&&("sortOrder"in i?a(i,u):t&&i.defaultSortOrder&&n.push({column:i,key:ya(i,u),multiplePriority:Xi(i),sortOrder:i.defaultSortOrder}))}),n},Z1=(e,t,r,n,a,i,c,u)=>(t||[]).map((d,m)=>{const g=go(m,u);let v=d;if(v.sorter){const w=v.sortDirections||a,x=v.showSorterTooltip===void 0?c:v.showSorterTooltip,C=ya(v,g),p=r.find(({key:O})=>O===C),A=p?p.sortOrder:null,B=W5(w,A);let E;if(d.sortIcon)E=d.sortIcon({sortOrder:A});else{const O=w.includes(Oi)&&N.createElement(K5,{className:bt(`${e}-column-sorter-up`,{active:A===Oi})}),W=w.includes(fl)&&N.createElement(_5,{className:bt(`${e}-column-sorter-down`,{active:A===fl})});E=N.createElement("span",{className:bt(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(O&&W)})},N.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},O,W))}const{cancelSort:T,triggerAsc:F,triggerDesc:P}=i||{};let S=T;B===fl?S=P:B===Oi&&(S=F);const L=typeof x=="object"?Object.assign({title:S},x):{title:S};v=Object.assign(Object.assign({},v),{className:bt(v.className,{[`${e}-column-sort`]:A}),title:O=>{const W=`${e}-column-sorters`,j=N.createElement("span",{className:`${e}-column-title`},ps(d.title,O)),Y=N.createElement("div",{className:W},j,E);return x?typeof x!="boolean"&&(x==null?void 0:x.target)==="sorter-icon"?N.createElement("div",{className:`${W} ${e}-column-sorters-tooltip-target-sorter`},j,N.createElement(r0,Object.assign({},L),E)):N.createElement(r0,Object.assign({},L),Y):Y},onHeaderCell:O=>{var W;const j=((W=d.onHeaderCell)===null||W===void 0?void 0:W.call(d,O))||{},Y=j.onClick,Z=j.onKeyDown;j.onClick=V=>{n({column:d,key:C,sortOrder:B,multiplePriority:Xi(d)}),Y==null||Y(V)},j.onKeyDown=V=>{V.keyCode===Fn.ENTER&&(n({column:d,key:C,sortOrder:B,multiplePriority:Xi(d)}),Z==null||Z(V))};const _=M3(d.title,{}),H=_==null?void 0:_.toString();return A&&(j["aria-sort"]=A==="ascend"?"ascending":"descending"),j["aria-label"]=H||"",j.className=bt(j.className,`${e}-column-has-sorters`),j.tabIndex=0,d.ellipsis&&(j.title=(_??"").toString()),j}})}return"children"in v&&(v=Object.assign(Object.assign({},v),{children:Z1(e,v.children,r,n,a,i,c,g)})),v}),Fd=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},Nd=e=>{const t=e.filter(({sortOrder:r})=>r).map(Fd);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},Fd(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},b0=(e,t,r)=>{const n=t.slice().sort((c,u)=>u.multiplePriority-c.multiplePriority),a=e.slice(),i=n.filter(({column:{sorter:c},sortOrder:u})=>Bd(c)&&u);return i.length?a.sort((c,u)=>{for(let f=0;f<i.length;f+=1){const d=i[f],{column:{sorter:m},sortOrder:g}=d,v=Bd(m);if(v&&g){const w=v(c,u,g);if(w!==0)return g===Oi?w:-w}}return 0}).map(c=>{const u=c[r];return u?Object.assign(Object.assign({},c),{[r]:b0(u,t,r)}):c}):a},V5=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:a,showSorterTooltip:i,onSorterChange:c}=e,[u,f]=N.useState(()=>v0(r,!0)),d=(C,p)=>{const A=[];return C.forEach((B,E)=>{const T=go(E,p);if(A.push(ya(B,T)),Array.isArray(B.children)){const F=d(B.children,T);A.push.apply(A,Xt(F))}}),A},m=N.useMemo(()=>{let C=!0;const p=v0(r,!1);if(!p.length){const T=d(r);return u.filter(({key:F})=>T.includes(F))}const A=[];function B(T){C?A.push(T):A.push(Object.assign(Object.assign({},T),{sortOrder:null}))}let E=null;return p.forEach(T=>{E===null?(B(T),T.sortOrder&&(T.multiplePriority===!1?C=!1:E=!0)):(E&&T.multiplePriority!==!1||(C=!1),B(T))}),A},[r,u]),g=N.useMemo(()=>{var C,p;const A=m.map(({column:B,sortOrder:E})=>({column:B,order:E}));return{sortColumns:A,sortColumn:(C=A[0])===null||C===void 0?void 0:C.column,sortOrder:(p=A[0])===null||p===void 0?void 0:p.order}},[m]),v=C=>{let p;C.multiplePriority===!1||!m.length||m[0].multiplePriority===!1?p=[C]:p=[].concat(Xt(m.filter(({key:A})=>A!==C.key)),[C]),f(p),c(Nd(p),p)};return[C=>Z1(t,C,m,v,n,a,i),m,g,()=>Nd(m)]},X1=(e,t)=>e.map(n=>{const a=Object.assign({},n);return a.title=ps(n.title,t),"children"in a&&(a.children=X1(a.children,t)),a}),U5=e=>[N.useCallback(r=>X1(r,e),[e])],G5=z1((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),Y5=j1((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),Z5=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:a,tableHeaderBg:i,tablePaddingVertical:c,tablePaddingHorizontal:u,calc:f}=e,d=`${vt(r)} ${n} ${a}`,m=(g,v,w)=>({[`&${t}-${g}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${vt(f(v).mul(-1).equal())}
|
|
2
|
-
${vt(f(f(w).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,[`
|
|
3
|
-
> ${t}-content,
|
|
4
|
-
> ${t}-header,
|
|
5
|
-
> ${t}-body,
|
|
6
|
-
> ${t}-summary
|
|
7
|
-
`]:{"> 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:`${vt(f(c).mul(-1).equal())} ${vt(f(f(u).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":{[`
|
|
8
|
-
> tr${t}-expanded-row,
|
|
9
|
-
> tr${t}-placeholder
|
|
10
|
-
`]:{"> 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 ${vt(r)} 0 ${vt(r)} ${i}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:d}}}},X5=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},a1),{wordBreak:"keep-all",[`
|
|
11
|
-
&${t}-cell-fix-left-last,
|
|
12
|
-
&${t}-cell-fix-right-first
|
|
13
|
-
`]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Q5=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}}}}},J5=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:a,paddingXS:i,lineType:c,tableBorderColor:u,tableExpandIconBg:f,tableExpandColumnWidth:d,borderRadius:m,tablePaddingVertical:g,tablePaddingHorizontal:v,tableExpandedRowBg:w,paddingXXS:x,expandIconMarginTop:C,expandIconSize:p,expandIconHalfInner:A,expandIconScale:B,calc:E}=e,T=`${vt(a)} ${c} ${u}`,F=E(x).sub(a).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({},n4(e)),{position:"relative",float:"left",width:p,height:p,color:"inherit",lineHeight:vt(p),background:f,border:T,borderRadius:m,transform:`scale(${B})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:A,insetInlineEnd:F,insetInlineStart:F,height:a},"&::after":{top:F,bottom:F,insetInlineStart:A,width:a,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:C,marginInlineEnd:i},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:w}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${vt(E(g).mul(-1).equal())} ${vt(E(v).mul(-1).equal())}`,padding:`${vt(g)} ${vt(v)}`}}}},e6=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:a,tableFilterDropdownSearchWidth:i,paddingXXS:c,paddingXS:u,colorText:f,lineWidth:d,lineType:m,tableBorderColor:g,headerIconColor:v,fontSizeSM:w,tablePaddingHorizontal:x,borderRadius:C,motionDurationSlow:p,colorIcon:A,colorPrimary:B,tableHeaderFilterActiveBg:E,colorTextDisabled:T,tableFilterDropdownBg:F,tableFilterDropdownHeight:P,controlItemBgHover:S,controlItemBgActive:L,boxShadowSecondary:O,filterDropdownMenuBg:W,calc:j}=e,Y=`${r}-dropdown`,Z=`${t}-filter-dropdown`,_=`${r}-tree`,H=`${vt(d)} ${m} ${g}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:j(c).mul(-1).equal(),marginInline:`${vt(c)} ${vt(j(x).div(2).mul(-1).equal())}`,padding:`0 ${vt(c)}`,color:v,fontSize:w,borderRadius:C,cursor:"pointer",transition:`all ${p}`,"&:hover":{color:A,background:E},"&.active":{color:B}}}},{[`${r}-dropdown`]:{[Z]:Object.assign(Object.assign({},Q0(e)),{minWidth:a,backgroundColor:F,borderRadius:C,boxShadow:O,overflow:"hidden",[`${Y}-menu`]:{maxHeight:P,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:W,"&:empty::after":{display:"block",padding:`${vt(u)} 0`,color:T,fontSize:w,textAlign:"center",content:'"Not Found"'}},[`${Z}-tree`]:{paddingBlock:`${vt(u)} 0`,paddingInline:u,[_]:{padding:0},[`${_}-treenode ${_}-node-content-wrapper:hover`]:{backgroundColor:S},[`${_}-treenode-checkbox-checked ${_}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:L}}},[`${Z}-search`]:{padding:u,borderBottom:H,"&-input":{input:{minWidth:i},[n]:{color:T}}},[`${Z}-checkall`]:{width:"100%",marginBottom:c,marginInlineStart:c},[`${Z}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${vt(j(u).sub(d).equal())} ${vt(u)}`,overflow:"hidden",borderTop:H}})}},{[`${r}-dropdown ${Z}, ${Z}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:u,color:f},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},t6=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:a,zIndexTableFixed:i,tableBg:c,zIndexTableSticky:u,calc:f}=e,d=n;return{[`${t}-wrapper`]:{[`
|
|
14
|
-
${t}-cell-fix-left,
|
|
15
|
-
${t}-cell-fix-right
|
|
16
|
-
`]:{position:"sticky !important",zIndex:i,background:c},[`
|
|
17
|
-
${t}-cell-fix-left-first::after,
|
|
18
|
-
${t}-cell-fix-left-last::after
|
|
19
|
-
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:f(r).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${a}`,content:'""',pointerEvents:"none",willChange:"transform"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
20
|
-
${t}-cell-fix-right-first::after,
|
|
21
|
-
${t}-cell-fix-right-last::after
|
|
22
|
-
`]:{position:"absolute",top:0,bottom:f(r).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${a}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:f(u).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${a}`,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}`},[`
|
|
23
|
-
${t}-cell-fix-left-first::after,
|
|
24
|
-
${t}-cell-fix-left-last::after
|
|
25
|
-
`]:{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}`},[`
|
|
26
|
-
${t}-cell-fix-right-first::after,
|
|
27
|
-
${t}-cell-fix-right-last::after
|
|
28
|
-
`]:{boxShadow:`inset -10px 0 8px -8px ${d}`}},[`${t}-fixed-column-gapped`]:{[`
|
|
29
|
-
${t}-cell-fix-left-first::after,
|
|
30
|
-
${t}-cell-fix-left-last::after,
|
|
31
|
-
${t}-cell-fix-right-first::after,
|
|
32
|
-
${t}-cell-fix-right-last::after
|
|
33
|
-
`]:{boxShadow:"none"}}}}},r6=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${vt(n)} 0`}}},n6=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${vt(r)} ${vt(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 ${vt(r)} ${vt(r)}`}}}}},a6=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"}}}}},o6=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:a,padding:i,paddingXS:c,headerIconColor:u,headerIconHoverColor:f,tableSelectionColumnWidth:d,tableSelectedRowBg:m,tableSelectedRowHoverBg:g,tableRowHoverBg:v,tablePaddingHorizontal:w,calc:x}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:d,[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(a).add(x(i).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:x(d).add(x(c).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(a).add(x(i).div(4)).add(x(c).mul(2)).equal()}},[`
|
|
34
|
-
table tr th${t}-selection-column,
|
|
35
|
-
table tr td${t}-selection-column,
|
|
36
|
-
${t}-selection-column
|
|
37
|
-
`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:x(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:vt(x(w).div(4).equal()),[n]:{color:u,fontSize:a,verticalAlign:"baseline","&:hover":{color:f}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:m,"&-row-hover":{background:g}}},[`> ${t}-cell-row-hover`]:{background:v}}}}}},i6=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,a=(i,c,u,f)=>({[`${t}${t}-${i}`]:{fontSize:f,[`
|
|
38
|
-
${t}-title,
|
|
39
|
-
${t}-footer,
|
|
40
|
-
${t}-cell,
|
|
41
|
-
${t}-thead > tr > th,
|
|
42
|
-
${t}-tbody > tr > th,
|
|
43
|
-
${t}-tbody > tr > td,
|
|
44
|
-
tfoot > tr > th,
|
|
45
|
-
tfoot > tr > td
|
|
46
|
-
`]:{padding:`${vt(c)} ${vt(u)}`},[`${t}-filter-trigger`]:{marginInlineEnd:vt(n(u).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${vt(n(c).mul(-1).equal())} ${vt(n(u).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:vt(n(c).mul(-1).equal()),marginInline:`${vt(n(r).sub(u).equal())} ${vt(n(u).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:vt(n(u).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},a("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),a("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},s6=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:a,headerIconHoverColor:i}=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},[`
|
|
47
|
-
&${t}-cell-fix-left:hover,
|
|
48
|
-
&${t}-cell-fix-right:hover
|
|
49
|
-
`]:{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:a,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:i}}}},l6=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:a,tableScrollThumbSize:i,tableScrollBg:c,zIndexTableSticky:u,stickyScrollBarBorderRadius:f,lineWidth:d,lineType:m,tableBorderColor:g}=e,v=`${vt(d)} ${m} ${g}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:u,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${vt(i)} !important`,zIndex:u,display:"flex",alignItems:"center",background:c,borderTop:v,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:n,borderRadius:f,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:a}}}}}}},Td=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:a}=e,i=`${vt(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:i}}},[`div${t}-summary`]:{boxShadow:`0 ${vt(a(r).mul(-1).equal())} 0 ${n}`}}}},u6=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:a,tableBorderColor:i,calc:c}=e,u=`${vt(n)} ${a} ${i}`,f=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`
|
|
50
|
-
& > ${t}-row,
|
|
51
|
-
& > div:not(${t}-row) > ${t}-row
|
|
52
|
-
`]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:u,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${f}${f}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${vt(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:u,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:u,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:c(n).mul(-1).equal(),borderInlineStart:u}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:u,borderBottom:u}}}}}},c6=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:a,tableExpandColumnWidth:i,lineWidth:c,lineType:u,tableBorderColor:f,tableFontSize:d,tableBg:m,tableRadius:g,tableHeaderTextColor:v,motionDurationMid:w,tableHeaderBg:x,tableHeaderCellSplitColor:C,tableFooterTextColor:p,tableFooterBg:A,calc:B}=e,E=`${vt(c)} ${u} ${f}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},a4()),{[t]:Object.assign(Object.assign({},Q0(e)),{fontSize:d,background:m,borderRadius:`${vt(g)} ${vt(g)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${vt(g)} ${vt(g)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
53
|
-
${t}-cell,
|
|
54
|
-
${t}-thead > tr > th,
|
|
55
|
-
${t}-tbody > tr > th,
|
|
56
|
-
${t}-tbody > tr > td,
|
|
57
|
-
tfoot > tr > th,
|
|
58
|
-
tfoot > tr > td
|
|
59
|
-
`]:{position:"relative",padding:`${vt(n)} ${vt(a)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${vt(n)} ${vt(a)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:v,fontWeight:r,textAlign:"start",background:x,borderBottom:E,transition:`background ${w} 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:C,transform:"translateY(-50%)",transition:`background-color ${w}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${w}, border-color ${w}`,borderBottom:E,[`
|
|
60
|
-
> ${t}-wrapper:only-child,
|
|
61
|
-
> ${t}-expanded-row-fixed > ${t}-wrapper:only-child
|
|
62
|
-
`]:{[t]:{marginBlock:vt(B(n).mul(-1).equal()),marginInline:`${vt(B(i).sub(a).equal())}
|
|
63
|
-
${vt(B(a).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:v,fontWeight:r,textAlign:"start",background:x,borderBottom:E,transition:`background ${w} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${vt(n)} ${vt(a)}`,color:p,background:A}})}},d6=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:a,colorFillContent:i,controlItemBgActive:c,controlItemBgActiveHover:u,padding:f,paddingSM:d,paddingXS:m,colorBorderSecondary:g,borderRadiusLG:v,controlHeight:w,colorTextPlaceholder:x,fontSize:C,fontSizeSM:p,lineHeight:A,lineWidth:B,colorIcon:E,colorIconHover:T,opacityLoading:F,controlInteractiveSize:P}=e,S=new Cn(a).onBackground(r).toHexString(),L=new Cn(i).onBackground(r).toHexString(),O=new Cn(t).onBackground(r).toHexString(),W=new Cn(E),j=new Cn(T),Y=P/2-B,Z=Y*2+B*3;return{headerBg:O,headerColor:n,headerSortActiveBg:S,headerSortHoverBg:L,bodySortBg:O,rowHoverBg:O,rowSelectedBg:c,rowSelectedHoverBg:u,rowExpandedBg:t,cellPaddingBlock:f,cellPaddingInline:f,cellPaddingBlockMD:d,cellPaddingInlineMD:m,cellPaddingBlockSM:m,cellPaddingInlineSM:m,borderColor:g,headerBorderRadius:v,footerBg:O,footerColor:n,cellFontSize:C,cellFontSizeMD:C,cellFontSizeSM:C,headerSplitColor:g,fixedHeaderSortActiveBg:S,headerFilterHoverBg:i,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:w,stickyScrollBarBg:x,stickyScrollBarBorderRadius:100,expandIconMarginTop:(C*A-B*3)/2-Math.ceil((p*1.4-B*3)/2),headerIconColor:W.clone().setA(W.a*F).toRgbString(),headerIconHoverColor:j.clone().setA(j.a*F).toRgbString(),expandIconHalfInner:Y,expandIconSize:Z,expandIconScale:P/Z}},Od=2,f6=V0("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:a,headerBg:i,headerColor:c,headerSortActiveBg:u,headerSortHoverBg:f,bodySortBg:d,rowHoverBg:m,rowSelectedBg:g,rowSelectedHoverBg:v,rowExpandedBg:w,cellPaddingBlock:x,cellPaddingInline:C,cellPaddingBlockMD:p,cellPaddingInlineMD:A,cellPaddingBlockSM:B,cellPaddingInlineSM:E,borderColor:T,footerBg:F,footerColor:P,headerBorderRadius:S,cellFontSize:L,cellFontSizeMD:O,cellFontSizeSM:W,headerSplitColor:j,fixedHeaderSortActiveBg:Y,headerFilterHoverBg:Z,filterDropdownBg:_,expandIconBg:H,selectionColumnWidth:V,stickyScrollBarBg:G,calc:te}=e,K=Vi(e,{tableFontSize:L,tableBg:n,tableRadius:S,tablePaddingVertical:x,tablePaddingHorizontal:C,tablePaddingVerticalMiddle:p,tablePaddingHorizontalMiddle:A,tablePaddingVerticalSmall:B,tablePaddingHorizontalSmall:E,tableBorderColor:T,tableHeaderTextColor:c,tableHeaderBg:i,tableFooterTextColor:P,tableFooterBg:F,tableHeaderCellSplitColor:j,tableHeaderSortBg:u,tableHeaderSortHoverBg:f,tableBodySortBg:d,tableFixedHeaderSortActiveBg:Y,tableHeaderFilterActiveBg:Z,tableFilterDropdownBg:_,tableRowHoverBg:m,tableSelectedRowBg:g,tableSelectedRowHoverBg:v,zIndexTableFixed:Od,zIndexTableSticky:te(Od).add(1).equal({unit:!1}),tableFontSizeMiddle:O,tableFontSizeSmall:W,tableSelectionColumnWidth:V,tableExpandIconBg:H,tableExpandColumnWidth:te(a).add(te(e.padding).mul(2)).equal(),tableExpandedRowBg:w,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:G,tableScrollThumbBgHover:t,tableScrollBg:r});return[c6(K),r6(K),Td(K),s6(K),e6(K),Z5(K),n6(K),J5(K),Td(K),Q5(K),o6(K),t6(K),l6(K),X5(K),i6(K),a6(K),u6(K)]},d6,{unitless:{expandIconScale:!0}}),$d=[],h6=(e,t)=>{var r,n;const{prefixCls:a,className:i,rootClassName:c,style:u,size:f,bordered:d,dropdownPrefixCls:m,dataSource:g,pagination:v,rowSelection:w,rowKey:x="key",rowClassName:C,columns:p,children:A,childrenColumnName:B,onChange:E,getPopupContainer:T,loading:F,expandIcon:P,expandable:S,expandedRowRender:L,expandIconColumnIndex:O,indentSize:W,scroll:j,sortDirections:Y,locale:Z,showSorterTooltip:_={target:"full-header"},virtual:H}=e;X0();const V=N.useMemo(()=>p||au(A),[p,A]),G=N.useMemo(()=>V.some(gt=>gt.responsive),[V]),te=o4(G),K=N.useMemo(()=>{const gt=new Set(Object.keys(te).filter(Et=>te[Et]));return V.filter(Et=>!Et.responsive||Et.responsive.some(rt=>gt.has(rt)))},[V,te]),X=t1(e,["className","style","columns"]),{locale:ye=i4,direction:xe,table:ke,renderEmpty:Be,getPrefixCls:_e,getPopupContainer:Q}=N.useContext(ei),oe=s4(f),ue=Object.assign(Object.assign({},ye.Table),Z),le=g||$d,Se=_e("table",a),Fe=_e("dropdown",m),[,me]=l1(),we=U0(Se),[De,Te,be]=f6(Se,we),Ae=Object.assign(Object.assign({childrenColumnName:B,expandIconColumnIndex:O},S),{expandIcon:(r=S==null?void 0:S.expandIcon)!==null&&r!==void 0?r:(n=ke==null?void 0:ke.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:Le="children"}=Ae,ut=N.useMemo(()=>le.some(gt=>gt==null?void 0:gt[Le])?"nest":L||S!=null&&S.expandedRowRender?"row":null,[le]),ot={body:N.useRef(null)},Oe=P3(Se),Ie=N.useRef(null),Ge=N.useRef(null);v4(t,()=>Object.assign(Object.assign({},Ge.current),{nativeElement:Ie.current}));const dt=N.useMemo(()=>typeof x=="function"?x:gt=>gt==null?void 0:gt[x],[x]),[Je]=M5(le,Le,dt),at={},Lt=(gt,Et,rt=!1)=>{var zt,er,Dr,J;const gr=Object.assign(Object.assign({},at),gt);rt&&((zt=at.resetPagination)===null||zt===void 0||zt.call(at),!((er=gr.pagination)===null||er===void 0)&&er.current&&(gr.pagination.current=1),v&&((Dr=v.onChange)===null||Dr===void 0||Dr.call(v,1,(J=gr.pagination)===null||J===void 0?void 0:J.pageSize))),j&&j.scrollToFirstRowOnChange!==!1&&ot.body.current&&p4(0,{getContainer:()=>ot.body.current}),E==null||E(gr.pagination,gr.filters,gr.sorter,{currentDataSource:g0(b0(le,gr.sorterStates,Le),gr.filterStates,Le),action:Et})},Ct=(gt,Et)=>{Lt({sorter:gt,sorterStates:Et},"sort",!1)},[At,$t,je,fe]=V5({prefixCls:Se,mergedColumns:K,onSorterChange:Ct,sortDirections:Y||["ascend","descend"],tableLocale:ue,showSorterTooltip:_}),lt=N.useMemo(()=>b0(le,$t,Le),[le,$t]);at.sorter=fe(),at.sorterStates=$t;const _t=(gt,Et)=>{Lt({filters:gt,filterStates:Et},"filter",!0)},[Wt,Pt,Bt]=P5({prefixCls:Se,locale:ue,dropdownPrefixCls:Fe,mergedColumns:K,onFilterChange:_t,getPopupContainer:T||Q,rootClassName:bt(c,we)}),yt=g0(lt,Pt,Le);at.filters=Bt,at.filterStates=Pt;const It=N.useMemo(()=>{const gt={};return Object.keys(Bt).forEach(Et=>{Bt[Et]!==null&&(gt[Et]=Bt[Et])}),Object.assign(Object.assign({},je),{filters:gt})},[je,Bt]),[or]=U5(It),mr=(gt,Et)=>{Lt({pagination:Object.assign(Object.assign({},at.pagination),{current:gt,pageSize:Et})},"paginate")},[Ft,zr]=I5(yt.length,mr,v);at.pagination=v===!1?{}:z5(Ft,v),at.resetPagination=zr;const Fr=N.useMemo(()=>{if(v===!1||!Ft.pageSize)return yt;const{current:gt=1,total:Et,pageSize:rt=Y1}=Ft;return yt.length<Et?yt.length>rt?yt.slice((gt-1)*rt,gt*rt):yt:yt.slice((gt-1)*rt,gt*rt)},[!!v,yt,Ft==null?void 0:Ft.current,Ft==null?void 0:Ft.pageSize,Ft==null?void 0:Ft.total]),[mn,$r]=O3({prefixCls:Se,data:yt,pageData:Fr,getRowKey:dt,getRecordByKey:Je,expandType:ut,childrenColumnName:Le,locale:ue,getPopupContainer:T||Q},w),Lr=(gt,Et,rt)=>{let zt;return typeof C=="function"?zt=bt(C(gt,Et,rt)):zt=bt(C),bt({[`${Se}-row-selected`]:$r.has(dt(gt,Et))},zt)};Ae.__PARENT_RENDER_ICON__=Ae.expandIcon,Ae.expandIcon=Ae.expandIcon||P||$3(ue),ut==="nest"&&Ae.expandIconColumnIndex===void 0?Ae.expandIconColumnIndex=w?1:0:Ae.expandIconColumnIndex>0&&w&&(Ae.expandIconColumnIndex-=1),typeof Ae.indentSize!="number"&&(Ae.indentSize=typeof W=="number"?W:15);const _r=N.useCallback(gt=>or(mn(Wt(At(gt)))),[At,Wt,mn]),Nr=()=>{if(v===!1||!(Ft!=null&&Ft.total))return{};const gt=()=>Ft.size||(oe==="small"||oe==="middle"?"small":void 0),Et=br=>{const wt=br==="left"?"start":br==="right"?"end":br;return N.createElement(d1,Object.assign({},Ft,{align:Ft.align||wt,className:bt(`${Se}-pagination`,Ft.className),size:gt()}))},rt=xe==="rtl"?"left":"right",zt=Ft.position;if(zt===null||!Array.isArray(zt))return{bottom:Et(rt)};const er=zt.find(br=>typeof br=="string"&&br.toLowerCase().includes("top")),Dr=zt.find(br=>typeof br=="string"&&br.toLowerCase().includes("bottom")),J=zt.every(br=>`${br}`=="none"),gr=er?er.toLowerCase().replace("top",""):"",se=Dr?Dr.toLowerCase().replace("bottom",""):"",gn=!er&&!Dr&&!J,Dt=()=>gr?Et(gr):void 0,vn=()=>{if(se)return Et(se);if(gn)return Et(rt)};return{top:Dt(),bottom:vn()}},lr=N.useMemo(()=>typeof F=="boolean"?{spinning:F}:typeof F=="object"&&F!==null?Object.assign({spinning:!0},F):void 0,[F]),xt=bt(be,we,`${Se}-wrapper`,ke==null?void 0:ke.className,{[`${Se}-wrapper-rtl`]:xe==="rtl"},i,c,Te),y=Object.assign(Object.assign({},ke==null?void 0:ke.style),u),D=N.useMemo(()=>lr!=null&&lr.spinning&&le===$d?null:typeof(Z==null?void 0:Z.emptyText)<"u"?Z.emptyText:(Be==null?void 0:Be("Table"))||N.createElement(l4,{componentName:"Table"}),[lr==null?void 0:lr.spinning,le,Z==null?void 0:Z.emptyText,Be]),Pe=H?Y5:G5,M={},ee=N.useMemo(()=>{const{fontSize:gt,lineHeight:Et,lineWidth:rt,padding:zt,paddingXS:er,paddingSM:Dr}=me,J=Math.floor(gt*Et);switch(oe){case"middle":return Dr*2+J+rt;case"small":return er*2+J+rt;default:return zt*2+J+rt}},[me,oe]);H&&(M.listItemHeight=ee);const{top:ur,bottom:it}=Nr();return De(N.createElement("div",{ref:Ie,className:xt,style:y},N.createElement(c1,Object.assign({spinning:!1},lr),ur,N.createElement(Pe,Object.assign({},M,X,{ref:Ge,columns:K,direction:xe,expandable:Ae,prefixCls:Se,className:bt({[`${Se}-middle`]:oe==="middle",[`${Se}-small`]:oe==="small",[`${Se}-bordered`]:d,[`${Se}-empty`]:le.length===0},be,we,Te),data:Fr,rowKey:dt,rowClassName:Lr,emptyText:D,internalHooks:ni,internalRefs:ot,transformColumns:_r,getContainerWidth:Oe,measureRowRender:gt=>N.createElement(u4,{getPopupContainer:Et=>Et},gt)})),it)))},p6=N.forwardRef(h6),m6=(e,t)=>{const r=N.useRef(0);return r.current+=1,N.createElement(p6,Object.assign({},e,{ref:t,_renderTimes:r.current}))},ra=N.forwardRef(m6);ra.SELECTION_COLUMN=ua;ra.EXPAND_COLUMN=da;ra.SELECTION_ALL=d0;ra.SELECTION_INVERT=f0;ra.SELECTION_NONE=h0;ra.Column=C3;ra.ColumnGroup=D3;ra.Summary=A1;var hn={},g6=Object.defineProperty,v6=(e,t,r)=>t in e?g6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vr=(e,t,r)=>v6(e,typeof t!="symbol"?t+"":t,r),Ua=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pd={exports:{}},ko={};/**
|
|
64
|
-
* @license React
|
|
65
|
-
* react-jsx-runtime.production.min.js
|
|
66
|
-
*
|
|
67
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the MIT license found in the
|
|
70
|
-
* LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/var Md;function b6(){if(Md)return ko;Md=1;var e=We,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(u,f,d){var m,g={},v=null,w=null;d!==void 0&&(v=""+d),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(w=f.ref);for(m in f)n.call(f,m)&&!i.hasOwnProperty(m)&&(g[m]=f[m]);if(u&&u.defaultProps)for(m in f=u.defaultProps,f)g[m]===void 0&&(g[m]=f[m]);return{$$typeof:t,type:u,key:v,ref:w,props:g,_owner:a.current}}return ko.Fragment=r,ko.jsx=c,ko.jsxs=c,ko}var Rd;function y6(){return Rd||(Rd=1,Pd.exports=b6()),Pd.exports}var q=y6();/*!
|
|
72
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
73
|
-
*
|
|
74
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
75
|
-
* Released under the MIT License.
|
|
76
|
-
*/function zd(e){return Object.prototype.toString.call(e)==="[object Object]"}function Yr(e){var t,r;return zd(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(zd(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Q1=Symbol.for("immer-nothing"),Id=Symbol.for("immer-draftable"),pn=Symbol.for("immer-state");function Nn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _o=Object.getPrototypeOf;function Ma(e){return!!e&&!!e[pn]}function Ra(e){var t;return e?J1(e)||Array.isArray(e)||!!e[Id]||!!((t=e.constructor)!=null&&t[Id])||oi(e)||gs(e):!1}var x6=Object.prototype.constructor.toString(),jd=new WeakMap;function J1(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=jd.get(r);return n===void 0&&(n=Function.toString.call(r),jd.set(r,n)),n===x6}function Qi(e,t,r=!0){ms(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,a)=>t(a,n,e))}function ms(e){const t=e[pn];return t?t.type_:Array.isArray(e)?1:oi(e)?2:gs(e)?3:0}function y0(e,t){return ms(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ep(e,t,r){const n=ms(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function w6(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function oi(e){return e instanceof Map}function gs(e){return e instanceof Set}function Ea(e){return e.copy_||e.base_}function x0(e,t){if(oi(e))return new Map(e);if(gs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=J1(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[pn];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){const c=a[i],u=n[c];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[c]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[c]})}return Object.create(_o(e),n)}else{const n=_o(e);if(n!==null&&r)return{...e};const a=Object.create(n);return Object.assign(a,e)}}function du(e,t=!1){return vs(e)||Ma(e)||!Ra(e)||(ms(e)>1&&Object.defineProperties(e,{set:xi,add:xi,clear:xi,delete:xi}),Object.freeze(e),t&&Object.values(e).forEach(r=>du(r,!0))),e}function C6(){Nn(2)}var xi={value:C6};function vs(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var D6={};function za(e){const t=D6[e];return t||Nn(0,e),t}var qo;function tp(){return qo}function k6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ld(e,t){t&&(za("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function w0(e){C0(e),e.drafts_.forEach(E6),e.drafts_=null}function C0(e){e===qo&&(qo=e.parent_)}function _d(e){return qo=k6(qo,e)}function E6(e){const t=e[pn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function qd(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[pn].modified_&&(w0(t),Nn(4)),Ra(e)&&(e=Ji(t,e),t.parent_||es(t,e)),t.patches_&&za("Patches").generateReplacementPatches_(r[pn].base_,e,t.patches_,t.inversePatches_)):e=Ji(t,r,[]),w0(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Q1?e:void 0}function Ji(e,t,r){if(vs(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[pn];if(!a)return Qi(t,(i,c)=>Hd(e,a,t,i,c,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return es(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const i=a.copy_;let c=i,u=!1;a.type_===3&&(c=new Set(i),i.clear(),u=!0),Qi(c,(f,d)=>Hd(e,a,i,f,d,r,u),n),es(e,i,!1),r&&e.patches_&&za("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function Hd(e,t,r,n,a,i,c){if(a==null||typeof a!="object"&&!c)return;const u=vs(a);if(!(u&&!c)){if(Ma(a)){const f=i&&t&&t.type_!==3&&!y0(t.assigned_,n)?i.concat(n):void 0,d=Ji(e,a,f);if(ep(r,n,d),Ma(d))e.canAutoFreeze_=!1;else return}else c&&r.add(a);if(Ra(a)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&u)return;Ji(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(oi(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&es(e,a)}}}function es(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&du(t,r)}function S6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:tp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,i=fu;r&&(a=[n],i=Ho);const{revoke:c,proxy:u}=Proxy.revocable(a,i);return n.draft_=u,n.revoke_=c,u}var fu={get(e,t){if(t===pn)return e;const r=Ea(e);if(!y0(r,t))return A6(e,r,t);const n=r[t];return e.finalized_||!Ra(n)?n:n===hl(e.base_,t)?(pl(e),e.copy_[t]=k0(n,e)):n},has(e,t){return t in Ea(e)},ownKeys(e){return Reflect.ownKeys(Ea(e))},set(e,t,r){const n=rp(Ea(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=hl(Ea(e),t),i=a==null?void 0:a[pn];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(w6(r,a)&&(r!==void 0||y0(e.base_,t)))return!0;pl(e),D0(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 hl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,pl(e),D0(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ea(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Nn(11)},getPrototypeOf(e){return _o(e.base_)},setPrototypeOf(){Nn(12)}},Ho={};Qi(fu,(e,t)=>{Ho[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ho.deleteProperty=function(e,t){return Ho.set.call(this,e,t,void 0)};Ho.set=function(e,t,r){return fu.set.call(this,e[0],t,r,e[0])};function hl(e,t){const r=e[pn];return(r?Ea(r):e)[t]}function A6(e,t,r){var a;const n=rp(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function rp(e,t){if(!(t in e))return;let r=_o(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=_o(r)}}function D0(e){e.modified_||(e.modified_=!0,e.parent_&&D0(e.parent_))}function pl(e){e.copy_||(e.copy_=x0(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var B6=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 i=r;r=t;const c=this;return function(u=i,...f){return c.produce(u,d=>r.call(this,d,...f))}}typeof r!="function"&&Nn(6),n!==void 0&&typeof n!="function"&&Nn(7);let a;if(Ra(t)){const i=_d(this),c=k0(t,void 0);let u=!0;try{a=r(c),u=!1}finally{u?w0(i):C0(i)}return Ld(i,n),qd(a,i)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===Q1&&(a=void 0),this.autoFreeze_&&du(a,!0),n){const i=[],c=[];za("Patches").generateReplacementPatches_(t,a,i,c),n(i,c)}return a}else Nn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let n,a;return[this.produce(t,r,(i,c)=>{n=i,a=c}),n,a]},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){Ra(e)||Nn(8),Ma(e)&&(e=F6(e));const t=_d(this),r=k0(e,void 0);return r[pn].isManual_=!0,C0(t),r}finishDraft(e,t){const r=e&&e[pn];(!r||!r.isManual_)&&Nn(9);const{scope_:n}=r;return Ld(n,t),qd(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 a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=za("Patches").applyPatches_;return Ma(e)?n(e,t):this.produce(e,a=>n(a,t))}};function k0(e,t){const r=oi(e)?za("MapSet").proxyMap_(e,t):gs(e)?za("MapSet").proxySet_(e,t):S6(e,t);return(t?t.scope_:tp()).drafts_.push(r),r}function F6(e){return Ma(e)||Nn(10,e),np(e)}function np(e){if(!Ra(e)||vs(e))return e;const t=e[pn];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=x0(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=x0(e,!0);return Qi(r,(a,i)=>{ep(r,a,np(i))},n),t&&(t.finalized_=!1),r}var Ko=new B6,hu=Ko.produce,Kd=Ko.createDraft.bind(Ko),Wd=Ko.finishDraft.bind(Ko),N6={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var a=ie.transform(r,t,{affinity:n});e.current=a,a==null&&e.unref()}}},T6={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var a=Gt.transform(r,t,{affinity:n});e.current=a,a==null&&e.unref()}}},O6={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var a=Ne.transform(r,t,{affinity:n});e.current=a,a==null&&e.unref()}}},ts=new WeakMap,rs=new WeakMap,Po=new WeakMap,ap=new WeakMap,Vd=new WeakMap,Ud=new WeakMap,Gd=new WeakMap,ie={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=ie.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 a=e[n],i=t[n];if(a!==i)break;r.push(a)}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),a=t.slice(0,r),i=e[r],c=t[r];return ie.equals(n,a)&&i>c},endsAt(e,t){var r=e.length,n=e.slice(0,r),a=t.slice(0,r);return ie.equals(n,a)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),a=t.slice(0,r),i=e[r],c=t[r];return ie.equals(n,a)&&i<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 ie.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&ie.compare(e,t)===0},isBefore(e,t){return ie.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&ie.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&ie.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&ie.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&ie.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),a=e[e.length-1],i=t[t.length-1];return a!==i&&ie.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],a=0;a<=e.length;a++)n.push(e.slice(0,a));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(!ie.isAncestor(t,e)&&!ie.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:a="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:i}=t;(ie.equals(i,n)||ie.endsBefore(i,n)||ie.isAncestor(i,n))&&(n[i.length-1]+=1);break}case"remove_node":{var{path:c}=t;if(ie.equals(c,n)||ie.isAncestor(c,n))return null;ie.endsBefore(c,n)&&(n[c.length-1]-=1);break}case"merge_node":{var{path:u,position:f}=t;ie.equals(u,n)||ie.endsBefore(u,n)?n[u.length-1]-=1:ie.isAncestor(u,n)&&(n[u.length-1]-=1,n[u.length]+=f);break}case"split_node":{var{path:d,position:m}=t;if(ie.equals(d,n)){if(a==="forward")n[n.length-1]+=1;else if(a!=="backward")return null}else ie.endsBefore(d,n)?n[d.length-1]+=1:ie.isAncestor(d,n)&&e[d.length]>=m&&(n[d.length-1]+=1,n[d.length]-=m);break}case"move_node":{var{path:g,newPath:v}=t;if(ie.equals(g,v))return n;if(ie.isAncestor(g,n)||ie.equals(g,n)){var w=v.slice();return ie.endsBefore(g,v)&&g.length<v.length&&(w[g.length-1]-=1),w.concat(n.slice(g.length))}else ie.isSibling(g,v)&&(ie.isAncestor(v,n)||ie.equals(v,n))?ie.endsBefore(g,n)?n[g.length-1]-=1:n[g.length-1]+=1:ie.endsBefore(v,n)||ie.equals(v,n)||ie.isAncestor(v,n)?(ie.endsBefore(g,n)&&(n[g.length-1]-=1),n[v.length-1]+=1):ie.endsBefore(g,n)&&(ie.equals(v,n)&&(n[v.length-1]+=1),n[g.length-1]-=1);break}}return n}};function Wo(e){"@babel/helpers - typeof";return Wo=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},Wo(e)}function $6(e,t){if(Wo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function P6(e){var t=$6(e,"string");return Wo(t)==="symbol"?t:String(t)}function an(e,t,r){return t=P6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Eo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var M6=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:a}=r,i=Qe.parent(e,n),c=n[n.length-1];if(c>i.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(i.children.splice(c,0,a),t)for(var[u,f]of Ne.points(t))t[f]=Gt.transform(u,r);break}case"insert_text":{var{path:d,offset:m,text:g}=r;if(g.length===0)break;var v=Qe.leaf(e,d),w=v.text.slice(0,m),x=v.text.slice(m);if(v.text=w+g+x,t)for(var[C,p]of Ne.points(t))t[p]=Gt.transform(C,r);break}case"merge_node":{var{path:A}=r,B=Qe.get(e,A),E=ie.previous(A),T=Qe.get(e,E),F=Qe.parent(e,A),P=A[A.length-1];if(ht.isText(B)&&ht.isText(T))T.text+=B.text;else if(!ht.isText(B)&&!ht.isText(T))T.children.push(...B.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(A,"] to nodes of different interfaces: ").concat(Wr.stringify(B)," ").concat(Wr.stringify(T)));if(F.children.splice(P,1),t)for(var[S,L]of Ne.points(t))t[L]=Gt.transform(S,r);break}case"move_node":{var{path:O,newPath:W}=r;if(ie.isAncestor(O,W))throw new Error("Cannot move a path [".concat(O,"] to new path [").concat(W,"] because the destination is inside itself."));var j=Qe.get(e,O),Y=Qe.parent(e,O),Z=O[O.length-1];Y.children.splice(Z,1);var _=ie.transform(O,r),H=Qe.get(e,ie.parent(_)),V=_[_.length-1];if(H.children.splice(V,0,j),t)for(var[G,te]of Ne.points(t))t[te]=Gt.transform(G,r);break}case"remove_node":{var{path:K}=r,X=K[K.length-1],ye=Qe.parent(e,K);if(ye.children.splice(X,1),t)for(var[xe,ke]of Ne.points(t)){var Be=Gt.transform(xe,r);if(t!=null&&Be!=null)t[ke]=Be;else{var _e=void 0,Q=void 0;for(var[oe,ue]of Qe.texts(e))if(ie.compare(ue,K)===-1)_e=[oe,ue];else{Q=[oe,ue];break}var le=!1;_e&&Q&&(ie.equals(Q[1],K)?le=!ie.hasPrevious(Q[1]):le=ie.common(_e[1],K).length<ie.common(Q[1],K).length),_e&&!le?(xe.path=_e[1],xe.offset=_e[0].text.length):Q?(xe.path=Q[1],xe.offset=0):t=null}}break}case"remove_text":{var{path:Se,offset:Fe,text:me}=r;if(me.length===0)break;var we=Qe.leaf(e,Se),De=we.text.slice(0,Fe),Te=we.text.slice(Fe+me.length);if(we.text=De+Te,t)for(var[be,Ae]of Ne.points(t))t[Ae]=Gt.transform(be,r);break}case"set_node":{var{path:Le,properties:ut,newProperties:ot}=r;if(Le.length===0)throw new Error("Cannot set properties on the root node!");var Oe=Qe.get(e,Le);for(var Ie in ot){if(Ie==="children"||Ie==="text")throw new Error('Cannot set the "'.concat(Ie,'" property of nodes!'));var Ge=ot[Ie];Ge==null?delete Oe[Ie]:Oe[Ie]=Ge}for(var dt in ut)ot.hasOwnProperty(dt)||delete Oe[dt];break}case"set_selection":{var{newProperties:Je}=r;if(Je==null)t=Je;else{if(t==null){if(!Ne.isRange(Je))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Wr.stringify(Je)," when there is no current selection."));t=Eo({},Je)}for(var at in Je){var Lt=Je[at];if(Lt==null){if(at==="anchor"||at==="focus")throw new Error('Cannot remove the "'.concat(at,'" selection property'));delete t[at]}else t[at]=Lt}}break}case"split_node":{var{path:Ct,position:At,properties:$t}=r;if(Ct.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Ct,"] because the root node cannot be split."));var je=Qe.get(e,Ct),fe=Qe.parent(e,Ct),lt=Ct[Ct.length-1],_t;if(ht.isText(je)){var Wt=je.text.slice(0,At),Pt=je.text.slice(At);je.text=Wt,_t=Eo(Eo({},$t),{},{text:Pt})}else{var Bt=je.children.slice(0,At),yt=je.children.slice(At);je.children=Bt,_t=Eo(Eo({},$t),{},{children:yt})}if(fe.children.splice(lt+1,0,_t),t)for(var[It,or]of Ne.points(t))t[or]=Gt.transform(It,r);break}}return t},R6={transform(e,t){e.children=Kd(e.children);var r=e.selection&&Kd(e.selection);try{r=M6(e,r,t)}finally{e.children=Wd(e.children),r?e.selection=Ma(r)?Wd(r):r:e.selection=null}}},z6={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)}},I6={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)}},op=(e,t)=>{for(var r in e){var n=e[r],a=t[r];if(Yr(n)&&Yr(a)){if(!op(n,a))return!1}else if(Array.isArray(n)&&Array.isArray(a)){if(n.length!==a.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==a[i])return!1}else if(n!==a)return!1}for(var c in t)if(e[c]===void 0&&t[c]!==void 0)return!1;return!0};function j6(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function ta(e,t){if(e==null)return{};var r=j6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var L6=["anchor","focus"];function Zd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zd(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ne={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:a}=e;return Ne.isBackward(e)===r?[n,a]:[a,n]},end(e){var[,t]=Ne.edges(e);return t},equals(e,t){return Gt.equals(e.anchor,t.anchor)&&Gt.equals(e.focus,t.focus)},includes(e,t){if(Ne.isRange(t)){if(Ne.includes(e,t.anchor)||Ne.includes(e,t.focus))return!0;var[r,n]=Ne.edges(e),[a,i]=Ne.edges(t);return Gt.isBefore(r,a)&&Gt.isAfter(n,i)}var[c,u]=Ne.edges(e),f=!1,d=!1;return Gt.isPoint(t)?(f=Gt.compare(t,c)>=0,d=Gt.compare(t,u)<=0):(f=ie.compare(t,c.path)>=0,d=ie.compare(t,u.path)<=0),f&&d},intersection(e,t){var r=ta(e,L6),[n,a]=Ne.edges(e),[i,c]=Ne.edges(t),u=Gt.isBefore(n,i)?i:n,f=Gt.isBefore(a,c)?a:c;return Gt.isBefore(f,u)?null:_6({anchor:u,focus:f},r)},isBackward(e){var{anchor:t,focus:r}=e;return Gt.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Gt.equals(t,r)},isExpanded(e){return!Ne.isCollapsed(e)},isForward(e){return!Ne.isBackward(e)},isRange(e){return Yr(e)&&Gt.isPoint(e.anchor)&&Gt.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Ne.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return hu(e,n=>{if(n===null)return null;var{affinity:a="inward"}=r,i,c;if(a==="inward"){var u=Ne.isCollapsed(n);Ne.isForward(n)?(i="forward",c=u?i:"backward"):(i="backward",c=u?i:"forward")}else a==="outward"?Ne.isForward(n)?(i="backward",c="forward"):(i="forward",c="backward"):(i=a,c=a);var f=Gt.transform(n.anchor,t,{affinity:i}),d=Gt.transform(n.focus,t,{affinity:c});if(!f||!d)return null;n.anchor=f,n.focus=d})}},Xd=e=>Yr(e)&&Qe.isNodeList(e.children)&&!R.isEditor(e),pt={isAncestor(e){return Yr(e)&&Qe.isNodeList(e.children)},isElement:Xd,isElementList(e){return Array.isArray(e)&&e.every(t=>pt.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 Xd(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},q6=["children"],H6=["text"],Qd=new WeakMap,Qe={ancestor(e,t){var r=Qe.get(e,t);if(ht.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Wr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ie.ancestors(t,r)){var a=Qe.ancestor(e,n),i=[a,n];yield i}})()},child(e,t){if(ht.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Wr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Wr.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,a=Qe.ancestor(e,t),{children:i}=a,c=n?i.length-1:0;n?c>=0:c<i.length;){var u=Qe.child(a,c),f=t.concat(c);yield[u,f],c=n?c-1:c+1}})()},common(e,t,r){var n=ie.common(t,r),a=Qe.get(e,n);return[a,n]},descendant(e,t){var r=Qe.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(Wr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Qe.nodes(e,t))n.length!==0&&(yield[r,n])})()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Qe.nodes(e,t))pt.isElement(r)&&(yield[r,n])})()},extractProps(e){if(pt.isAncestor(e)){var t=ta(e,q6);return t}else{var t=ta(e,H6);return t}},first(e,t){for(var r=t.slice(),n=Qe.get(e,r);n&&!(ht.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(ht.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Wr.stringify(e)));var r=hu({children:e.children},n=>{var[a,i]=Ne.edges(t),c=Qe.nodes(n,{reverse:!0,pass:v=>{var[,w]=v;return!Ne.includes(t,w)}});for(var[,u]of c){if(!Ne.includes(t,u)){var f=Qe.parent(n,u),d=u[u.length-1];f.children.splice(d,1)}if(ie.equals(u,i.path)){var m=Qe.leaf(n,u);m.text=m.text.slice(0,i.offset)}if(ie.equals(u,a.path)){var g=Qe.leaf(n,u);g.text=g.text.slice(a.offset)}}R.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var a=t[n];if(ht.isText(r)||!r.children[a])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Wr.stringify(e)));r=r.children[a]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var a=t[n];if(ht.isText(r)||!r.children[a])return!1;r=r.children[a]}return!0},isNode(e){return ht.isText(e)||pt.isElement(e)||R.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Qd.get(e);if(t!==void 0)return t;var r=e.every(n=>Qe.isNode(n));return Qd.set(e,r),r},last(e,t){for(var r=t.slice(),n=Qe.get(e,r);n&&!(ht.isText(n)||n.children.length===0);){var a=n.children.length-1;n=n.children[a],r.push(a)}return[n,r]},leaf(e,t){var r=Qe.get(e,t);if(!ht.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Wr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ie.levels(t,r)){var a=Qe.get(e,n);yield[a,n]}})()},matches(e,t){return pt.isElement(e)&&pt.isElementProps(t)&&pt.matches(e,t)||ht.isText(e)&&ht.isTextProps(t)&&ht.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var{pass:r,reverse:n=!1}=t,{from:a=[],to:i}=t,c=new Set,u=[],f=e;!(i&&(n?ie.isBefore(u,i):ie.isAfter(u,i)));){if(c.has(f)||(yield[f,u]),!c.has(f)&&!ht.isText(f)&&f.children.length!==0&&(r==null||r([f,u])===!1)){c.add(f);var d=n?f.children.length-1:0;ie.isAncestor(u,a)&&(d=a[u.length]),u=u.concat(d),f=Qe.get(e,u);continue}if(u.length===0)break;if(!n){var m=ie.next(u);if(Qe.has(e,m)){u=m,f=Qe.get(e,u);continue}}if(n&&u[u.length-1]!==0){var g=ie.previous(u);u=g,f=Qe.get(e,u);continue}u=ie.parent(u),f=Qe.get(e,u),c.add(f)}})()},parent(e,t){var r=ie.parent(t),n=Qe.get(e,r);if(ht.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return ht.isText(e)?e.text:e.children.map(Qe.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Qe.nodes(e,t))ht.isText(r)&&(yield[r,n])})()}};function Jd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Bo={isNodeOperation(e){return Bo.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Yr(e))return!1;switch(e.type){case"insert_node":return ie.isPath(e.path)&&Qe.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ie.isPath(e.path);case"merge_node":return typeof e.position=="number"&&ie.isPath(e.path)&&Yr(e.properties);case"move_node":return ie.isPath(e.path)&&ie.isPath(e.newPath);case"remove_node":return ie.isPath(e.path)&&Qe.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ie.isPath(e.path);case"set_node":return ie.isPath(e.path)&&Yr(e.properties)&&Yr(e.newProperties);case"set_selection":return e.properties===null&&Ne.isRange(e.newProperties)||e.newProperties===null&&Ne.isRange(e.properties)||Yr(e.properties)&&Yr(e.newProperties);case"split_node":return ie.isPath(e.path)&&typeof e.position=="number"&&Yr(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Bo.isOperation(t))},isSelectionOperation(e){return Bo.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Bo.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return Er(Er({},e),{},{type:"remove_node"});case"insert_text":return Er(Er({},e),{},{type:"remove_text"});case"merge_node":return Er(Er({},e),{},{type:"split_node",path:ie.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(ie.equals(t,r))return e;if(ie.isSibling(r,t))return Er(Er({},e),{},{path:t,newPath:r});var n=ie.transform(r,e),a=ie.transform(ie.next(r),e);return Er(Er({},e),{},{path:n,newPath:a})}case"remove_node":return Er(Er({},e),{},{type:"insert_node"});case"remove_text":return Er(Er({},e),{},{type:"insert_text"});case"set_node":{var{properties:i,newProperties:c}=e;return Er(Er({},e),{},{properties:c,newProperties:i})}case"set_selection":{var{properties:u,newProperties:f}=e;return u==null?Er(Er({},e),{},{properties:f,newProperties:null}):f==null?Er(Er({},e),{},{properties:null,newProperties:u}):Er(Er({},e),{},{properties:f,newProperties:u})}case"split_node":return Er(Er({},e),{},{type:"merge_node",path:ie.next(e.path)})}}},ef=new WeakMap,K6=e=>{var t=ef.get(e);if(t!==void 0)return t;if(!Yr(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||Yr(e.marks))&&(e.selection===null||Ne.isRange(e.selection))&&Qe.isNodeList(e.children)&&Bo.isOperationList(e.operations);return ef.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 K6(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)},W6={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(ie.isPath)}};function tf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Gt={compare(e,t){var r=ie.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Gt.compare(e,t)===1},isBefore(e,t){return Gt.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&ie.equals(e.path,t.path)},isPoint(e){return Yr(e)&&typeof e.offset=="number"&&ie.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return hu(e,n=>{if(n===null)return null;var{affinity:a="forward"}=r,{path:i,offset:c}=n;switch(t.type){case"insert_node":case"move_node":{n.path=ie.transform(i,t,r);break}case"insert_text":{ie.equals(t.path,i)&&(t.offset<c||t.offset===c&&a==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{ie.equals(t.path,i)&&(n.offset+=t.position),n.path=ie.transform(i,t,r);break}case"remove_text":{ie.equals(t.path,i)&&t.offset<=c&&(n.offset-=Math.min(c-t.offset,t.text.length));break}case"remove_node":{if(ie.equals(t.path,i)||ie.isAncestor(t.path,i))return null;n.path=ie.transform(i,t,r);break}case"split_node":{if(ie.equals(t.path,i)){if(t.position===c&&a==null)return null;(t.position<c||t.position===c&&a==="forward")&&(n.offset-=t.position,n.path=ie.transform(i,t,rf(rf({},r),{},{affinity:"forward"})))}else n.path=ie.transform(i,t,r);break}}})}},nf=void 0,Wr={setScrubber(e){nf=e},stringify(e){return JSON.stringify(e,nf)}},V6=["text"],U6=["anchor","focus"];function af(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?af(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):af(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ht={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function a(i){var c=ta(i,V6);return c}return op(n?a(e):e,n?a(t):t)},isText(e){return Yr(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>ht.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[Yn({},e)];for(var n of t){var a=ta(n,U6),[i,c]=Ne.edges(n),u=[],f=0,d=i.offset,m=c.offset;for(var g of r){var{length:v}=g.text,w=f;if(f+=v,d<=w&&f<=m){Object.assign(g,a),u.push(g);continue}if(d!==m&&(d===f||m===w)||d>f||m<w||m===w&&w!==0){u.push(g);continue}var x=g,C=void 0,p=void 0;if(m<f){var A=m-w;p=Yn(Yn({},x),{},{text:x.text.slice(A)}),x=Yn(Yn({},x),{},{text:x.text.slice(0,A)})}if(d>w){var B=d-w;C=Yn(Yn({},x),{},{text:x.text.slice(0,B)}),x=Yn(Yn({},x),{},{text:x.text.slice(B)})}Object.assign(x,a),C&&u.push(C),u.push(x),p&&u.push(p)}r=u}return r}},pu=e=>e.selection?e.selection:e.children.length>0?R.end(e,[]):[0],vo=(e,t)=>{var[r]=R.node(e,t);return n=>n===r},mu=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?J6(e):e,a=jt.None,i=jt.None,c=0,u=null,f=null;for(var d of n){var m=d.codePointAt(0);if(!m)break;var g=dv(d,m);if([a,i]=r?[i,g]:[g,a],Ga(a,jt.ZWJ)&&Ga(i,jt.ExtPict)&&(r?u=of(e.substring(0,c)):u=of(e.substring(0,e.length-c)),!u)||Ga(a,jt.RI)&&Ga(i,jt.RI)&&(f!==null?f=!f:r?f=!0:f=gv(e.substring(0,e.length-c)),!f)||a!==jt.None&&i!==jt.None&&hv(a,i))break;c+=d.length}return c||1},G6=/\s/,Y6=/[\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]/,Z6=/['\u2018\u2019]/,X6=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var a=mu(e,t),[i,c]=gu(e,a,t);if(Q6(i,c,t))n=!0,r+=a;else if(!n)r+=a;else break;e=c}return r},gu=(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)]},Q6=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(G6.test(t))return!1;if(Z6.test(t)){var a=mu(r,n),[i,c]=gu(r,a,n);if(e(i,c,n))return!0}return!Y6.test(t)},J6=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(tv(n.charCodeAt(0))){var a=e.charAt(t-r-1);if(ev(a.charCodeAt(0))){yield a+n,r++;continue}}yield n}},ev=e=>e>=55296&&e<=56319,tv=e=>e>=56320&&e<=57343,jt;(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"})(jt||(jt={}));var rv=/^(?:[\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])$/,nv=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,av=/^(?:[\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])$/,ov=/^[\u1100-\u115F\uA960-\uA97C]$/,iv=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,sv=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,lv=/^[\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]$/,uv=/^[\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]$/,cv=/^(?:[\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])$/,dv=(e,t)=>{var r=jt.Any;return e.search(rv)!==-1&&(r|=jt.Extend),t===8205&&(r|=jt.ZWJ),t>=127462&&t<=127487&&(r|=jt.RI),e.search(nv)!==-1&&(r|=jt.Prepend),e.search(av)!==-1&&(r|=jt.SpacingMark),e.search(ov)!==-1&&(r|=jt.L),e.search(iv)!==-1&&(r|=jt.V),e.search(sv)!==-1&&(r|=jt.T),e.search(lv)!==-1&&(r|=jt.LV),e.search(uv)!==-1&&(r|=jt.LVT),e.search(cv)!==-1&&(r|=jt.ExtPict),r};function Ga(e,t){return(e&t)!==0}var fv=[[jt.L,jt.L|jt.V|jt.LV|jt.LVT],[jt.LV|jt.V,jt.V|jt.T],[jt.LVT|jt.T,jt.T],[jt.Any,jt.Extend|jt.ZWJ],[jt.Any,jt.SpacingMark],[jt.Prepend,jt.Any],[jt.ZWJ,jt.ExtPict],[jt.RI,jt.RI]];function hv(e,t){return fv.findIndex(r=>Ga(e,r[0])&&Ga(t,r[1]))===-1}var pv=/(?:[\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$/,of=e=>e.search(pv)!==-1,mv=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,gv=e=>{var t=e.match(mv);if(t===null)return!1;var r=t[0].length/2;return r%2===1},vv={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:a=pu(e)}=r;if(ie.isPath(a)&&(a=R.range(e,a)),Ne.isRange(a))if(Ne.isCollapsed(a))a=a.anchor;else{var i=Ne.end(a);if(!n&&R.void(e,{at:i}))return;var c=Ne.start(a),u=R.pointRef(e,c),f=R.pointRef(e,i);Ke.delete(e,{at:a,voids:n});var d=u.unref(),m=f.unref();a=d||m,Ke.setSelection(e,{anchor:a,focus:a})}if(!(!n&&R.void(e,{at:a})||R.elementReadOnly(e,{at:a}))){var{path:g,offset:v}=a;t.length>0&&e.apply({type:"insert_text",path:g,offset:v,text:t})}})}};function sf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ke=wi(wi(wi(wi({},R6),z6),I6),vv),$i=new WeakMap,bv=e=>$i.get(e)||!1,yv=(e,t,r)=>{var n=$i.get(e)||!1;$i.set(e,!0);try{t(),r()}finally{$i.set(e,n)}};function ip(e,t,r){var n=ts.get(e)||[],a=rs.get(e)||new Set,i,c,u=g=>{if(g){var v=g.join(",");c.has(v)||(c.add(v),i.push(g))}};if(r){i=[],c=new Set;for(var f of n){var d=r(f);u(d)}}else i=n,c=a;for(var m of t)u(m);ts.set(e,i),rs.set(e,c)}var xv=(e,t)=>{for(var r of R.pathRefs(e))N6.transform(r,t);for(var n of R.pointRefs(e))T6.transform(n,t);for(var a of R.rangeRefs(e))O6.transform(a,t);if(!bv(e)){var i=ie.operationCanTransformPath(t)?c=>ie.transform(c,t):void 0;ip(e,e.getDirtyPaths(t),i)}Ke.transform(e,t),e.operations.push(t),R.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Po.get(e)||(Po.set(e,!0),Promise.resolve().then(()=>{Po.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},wv=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return ie.levels(r)}case"insert_node":{var{node:n,path:a}=t,i=ie.levels(a),c=ht.isText(n)?[]:Array.from(Qe.nodes(n),W=>{var[,j]=W;return a.concat(j)});return[...i,...c]}case"merge_node":{var{path:u}=t,f=ie.ancestors(u),d=ie.previous(u);return[...f,d]}case"move_node":{var{path:m,newPath:g}=t;if(ie.equals(m,g))return[];var v=[],w=[];for(var x of ie.ancestors(m)){var C=ie.transform(x,t);v.push(C)}for(var p of ie.ancestors(g)){var A=ie.transform(p,t);w.push(A)}var B=w[w.length-1],E=g[g.length-1],T=B.concat(E);return[...v,...w,T]}case"remove_node":{var{path:F}=t,P=ie.ancestors(F);return[...P]}case"split_node":{var{path:S}=t,L=ie.levels(S),O=ie.next(S);return[...L,O]}default:return[]}},Cv=e=>{var{selection:t}=e;return t?Qe.fragment(e,t):[]},Dv=(e,t)=>{var[r,n]=t;if(!ht.isText(r)){if(pt.isElement(r)&&r.children.length===0){var a={text:""};Ke.insertNodes(e,a,{at:n.concat(0),voids:!0});return}for(var i=R.isEditor(r)?!1:pt.isElement(r)&&(e.isInline(r)||r.children.length===0||ht.isText(r.children[0])||e.isInline(r.children[0])),c=0,u=0;u<r.children.length;u++,c++){var f=Qe.get(e,n);if(!ht.isText(f)){var d=f.children[c],m=f.children[c-1],g=u===r.children.length-1,v=ht.isText(d)||pt.isElement(d)&&e.isInline(d);if(v!==i)Ke.removeNodes(e,{at:n.concat(c),voids:!0}),c--;else if(pt.isElement(d)){if(e.isInline(d)){if(m==null||!ht.isText(m)){var w={text:""};Ke.insertNodes(e,w,{at:n.concat(c),voids:!0}),c++}else if(g){var x={text:""};Ke.insertNodes(e,x,{at:n.concat(c+1),voids:!0}),c++}}}else{if(!ht.isText(d)&&!("children"in d)){var C=d;C.children=[]}m!=null&&ht.isText(m)&&(ht.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--))}}}}},kv=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,a=n*42;if(r>a)throw new Error("Could not completely normalize the editor after ".concat(a," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},Ev=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:a=e.selection,match:i}=t;if(a){var c=R.path(e,a),u=n==="lowest";for(var[f,d]of R.levels(e,{at:c,voids:r,match:i,reverse:u}))if(!ht.isText(f)){if(Ne.isRange(a)){if(ie.isAncestor(d,a.anchor.path)&&ie.isAncestor(d,a.focus.path))return[f,d]}else if(!ie.equals(c,d))return[f,d]}}};function lf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function uf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Sv=(e,t,r)=>{var{selection:n}=e;if(n){var a=(g,v)=>{if(!ht.isText(g))return!1;var[w,x]=R.parent(e,v);return!e.isVoid(w)||e.markableVoid(w)},i=Ne.isExpanded(n),c=!1;if(!i){var[u,f]=R.node(e,n);if(u&&a(u,f)){var[d]=R.parent(e,f);c=d&&e.markableVoid(d)}}if(i||c)Ke.setNodes(e,{[t]:r},{match:a,split:!0,voids:!0});else{var m=uf(uf({},R.marks(e)||{}),{},{[t]:r});e.marks=m,Po.get(e)||e.onChange()}}};function cf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function df(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Av=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.point(e,t,{edge:"end"}),a=R.end(e,[]),i={anchor:n,focus:a},{distance:c=1}=r,u=0,f;for(var d of R.positions(e,df(df({},r),{},{at:i}))){if(u>c)break;u!==0&&(f=d),u++}return f};function ff(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ff(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ff(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Bv=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.start(e,[]),a=R.point(e,t,{edge:"start"}),i={anchor:n,focus:a},{distance:c=1}=r,u=0,f;for(var d of R.positions(e,hf(hf({},r),{},{at:i,reverse:!0}))){if(u>c)break;u!==0&&(f=d),u++}return f},Fv=(e,t)=>{var{selection:r}=e;r&&Ne.isCollapsed(r)&&Ke.delete(e,{unit:t,reverse:!0})},Nv=(e,t)=>{var{selection:r}=e;r&&Ne.isCollapsed(r)&&Ke.delete(e,{unit:t})},Tv=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&Ne.isExpanded(r)&&Ke.delete(e,{reverse:t==="backward"})},Ov=(e,t)=>[R.start(e,t),R.end(e,t)];function pf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function mf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $v=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return R.above(e,mf(mf({},t),{},{match:r=>pt.isElement(r)&&R.isElementReadOnly(e,r)}))},Pv=(e,t)=>R.point(e,t,{edge:"end"}),Mv=(e,t)=>{var r=R.path(e,t,{edge:"start"});return R.node(e,r)},Rv=(e,t)=>{var r=R.range(e,t);return Qe.fragment(e,r)};function gf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function vf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zv=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return R.above(e,vf(vf({},t),{},{match:r=>pt.isElement(r)&&R.isVoid(e,r)}))},Iv=(e,t)=>t.children.some(r=>pt.isElement(r)&&R.isBlock(e,r)),jv=(e,t)=>t.children.some(r=>ht.isText(r)||R.isInline(e,r)),Lv=(e,t)=>Qe.has(e,t),_v=(e,t)=>t.children.every(r=>ht.isText(r)),qv=e=>{Ke.splitNodes(e,{always:!0})},Hv=(e,t,r)=>{Ke.insertNodes(e,t,r)},Kv=e=>{Ke.splitNodes(e,{always:!0})};function bf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Vv=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n,marks:a}=e;if(n){if(a){var i=Wv({text:t},a);Ke.insertNodes(e,i,{at:r.at,voids:r.voids})}else Ke.insertText(e,t,r);e.marks=null}},Uv=(e,t)=>!e.isInline(t),Gv=(e,t,r)=>R.isStart(e,t,r)||R.isEnd(e,t,r),Yv=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&ht.isText(n)&&n.text===""&&!e.isVoid(t)},Zv=(e,t,r)=>{var n=R.end(e,r);return Gt.equals(t,n)},Xv=e=>{var t=ap.get(e);return t===void 0?!0:t},Qv=(e,t,r)=>{if(t.offset!==0)return!1;var n=R.start(e,r);return Gt.equals(t,n)},Jv=(e,t)=>{var r=R.path(e,t,{edge:"end"});return R.node(e,r)},e7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),a=Qe.leaf(e,n);return[a,n]};function t7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:a=!1}=t,{match:i}=t;if(i==null&&(i=()=>!0),!!r){var c=[],u=R.path(e,r);for(var[f,d]of Qe.levels(e,u))if(i(f,d)&&(c.push([f,d]),!a&&pt.isElement(f)&&R.isVoid(e,f)))break;n&&c.reverse(),yield*c}})()}var r7=["text"],n7=["text"],a7=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:a}=r;if(t)return t;if(Ne.isExpanded(r)){var i=R.isEnd(e,n,n.path);if(i){var c=R.after(e,n);c&&(n=c)}var[u]=R.nodes(e,{match:ht.isText,at:{anchor:n,focus:a}});if(u){var[f]=u,d=ta(f,r7);return d}else return{}}var{path:m}=n,[g]=R.leaf(e,m);if(n.offset===0){var v=R.previous(e,{at:m,match:ht.isText}),w=R.above(e,{match:E=>pt.isElement(E)&&R.isVoid(e,E)&&e.markableVoid(E)});if(!w){var x=R.above(e,{match:E=>pt.isElement(E)&&R.isBlock(e,E)});if(v&&x){var[C,p]=v,[,A]=x;ie.isAncestor(A,p)&&(g=C)}}}var B=ta(g,n7);return B},o7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:a,at:i=e.selection}=t;if(i){var c=R.after(e,i,{voids:n});if(c){var[,u]=R.last(e,[]),f=[c.path,u];if(ie.isPath(i)&&i.length===0)throw new Error("Cannot get the next node from the root node!");if(a==null)if(ie.isPath(i)){var[d]=R.parent(e,i);a=g=>d.children.includes(g)}else a=()=>!0;var[m]=R.nodes(e,{at:f,match:a,mode:r,voids:n});return m}}},i7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),a=Qe.get(e,n);return[a,n]};function s7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:a=!1,reverse:i=!1,voids:c=!1,ignoreNonSelectable:u=!1}=t,{match:f}=t;if(f||(f=()=>!0),!!r){var d,m;if(W6.isSpan(r))d=r[0],m=r[1];else{var g=R.path(e,r,{edge:"start"}),v=R.path(e,r,{edge:"end"});d=i?v:g,m=i?g:v}var w=Qe.nodes(e,{reverse:i,from:d,to:m,pass:T=>{var[F]=T;return pt.isElement(F)?!!(!c&&(R.isVoid(e,F)||R.isElementReadOnly(e,F))||u&&!R.isSelectable(e,F)):!1}}),x=[],C;for(var[p,A]of w)if(!(u&&pt.isElement(p)&&!R.isSelectable(e,p))){var B=C&&ie.compare(A,C[1])===0;if(!(n==="highest"&&B)){if(!f(p,A)){if(a&&!B&&ht.isText(p))return;continue}if(n==="lowest"&&B){C=[p,A];continue}var E=n==="lowest"?C:[p,A];E&&(a?x.push(E):yield E),C=[p,A]}}n==="lowest"&&C&&(a?x.push(C):yield C),a&&(yield*x)}})()}var l7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,a=d=>ts.get(d)||[],i=d=>rs.get(d)||new Set,c=d=>{var m=a(d).pop(),g=m.join(",");return i(d).delete(g),m};if(R.isNormalizing(e)){if(r){var u=Array.from(Qe.nodes(e),d=>{var[,m]=d;return m}),f=new Set(u.map(d=>d.join(",")));ts.set(e,u),rs.set(e,f)}a(e).length!==0&&R.withoutNormalizing(e,()=>{for(var d of a(e))if(Qe.has(e,d)){var m=R.node(e,d),[g,v]=m;pt.isElement(g)&&g.children.length===0&&e.normalizeNode(m,{operation:n})}for(var w=a(e),x=w.length,C=0;w.length!==0;){if(!e.shouldNormalize({dirtyPaths:w,iteration:C,initialDirtyPathsLength:x,operation:n}))return;var p=c(e);if(Qe.has(e,p)){var A=R.node(e,p);e.normalizeNode(A,{operation:n})}C++,w=a(e)}})}},u7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),a=ie.parent(n),i=R.node(e,a);return i},c7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,a={current:t,affinity:n,unref(){var{current:c}=a,u=R.pathRefs(e);return u.delete(a),a.current=null,c}},i=R.pathRefs(e);return i.add(a),a},d7=e=>{var t=Vd.get(e);return t||(t=new Set,Vd.set(e,t)),t},f7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:a}=r;if(ie.isPath(t)){if(a==="start"){var[,i]=Qe.first(e,t);t=i}else if(a==="end"){var[,c]=Qe.last(e,t);t=c}}return Ne.isRange(t)&&(a==="start"?t=Ne.start(t):a==="end"?t=Ne.end(t):t=ie.common(t.anchor.path,t.focus.path)),Gt.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},h7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,a={current:t,affinity:n,unref(){var{current:c}=a,u=R.pointRefs(e);return u.delete(a),a.current=null,c}},i=R.pointRefs(e);return i.add(a),a},p7=e=>{var t=Ud.get(e);return t||(t=new Set,Ud.set(e,t)),t},m7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(ie.isPath(t)){var a;if(n==="end"){var[,i]=Qe.last(e,t);a=i}else{var[,c]=Qe.first(e,t);a=c}var u=Qe.get(e,a);if(!ht.isText(u))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:a,offset:n==="end"?u.text.length:0}}if(Ne.isRange(t)){var[f,d]=Ne.edges(t);return n==="start"?f:d}return t};function g7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:a=!1,voids:i=!1,ignoreNonSelectable:c=!1}=t;if(!r)return;var u=R.range(e,r),[f,d]=Ne.edges(u),m=a?d:f,g=!1,v="",w=0,x=0,C=0;for(var[p,A]of R.nodes(e,{at:r,reverse:a,voids:i,ignoreNonSelectable:c})){if(pt.isElement(p)){if(!i&&(e.isVoid(p)||e.isElementReadOnly(p))){yield R.start(e,A);continue}if(e.isInline(p))continue;if(R.hasInlines(e,p)){var B=ie.isAncestor(A,d.path)?d:R.end(e,A),E=ie.isAncestor(A,f.path)?f:R.start(e,A);v=R.string(e,{anchor:E,focus:B},{voids:i}),g=!0}}if(ht.isText(p)){var T=ie.equals(A,m.path);for(T?(x=a?m.offset:p.text.length-m.offset,C=m.offset):(x=p.text.length,C=a?x:0),(T||g||n==="offset")&&(yield{path:A,offset:C},g=!1);;){if(w===0){if(v==="")break;w=F(v,n,a),v=gu(v,w,a)[1]}if(C=a?C-w:C+w,x=x-w,x<0){w=-x;break}w=0,yield{path:A,offset:C}}}}function F(P,S,L){return S==="character"?mu(P,L):S==="word"?X6(P,L):S==="line"||S==="block"?P.length:1}})()}var v7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:a,at:i=e.selection}=t;if(i){var c=R.before(e,i,{voids:n});if(c){var[,u]=R.first(e,[]),f=[c.path,u];if(ie.isPath(i)&&i.length===0)throw new Error("Cannot get the previous node from the root node!");if(a==null)if(ie.isPath(i)){var[d]=R.parent(e,i);a=g=>d.children.includes(g)}else a=()=>!0;var[m]=R.nodes(e,{reverse:!0,at:f,match:a,mode:r,voids:n});return m}}},b7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,a={current:t,affinity:n,unref(){var{current:c}=a,u=R.rangeRefs(e);return u.delete(a),a.current=null,c}},i=R.rangeRefs(e);return i.add(a),a},y7=e=>{var t=Gd.get(e);return t||(t=new Set,Gd.set(e,t)),t},x7=(e,t,r)=>{if(Ne.isRange(t)&&!r)return t;var n=R.start(e,t),a=R.end(e,r||t);return{anchor:n,focus:a}};function yf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function w7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var C7=(e,t)=>{var{selection:r}=e;if(r){var n=(m,g)=>{if(!ht.isText(m))return!1;var[v,w]=R.parent(e,g);return!e.isVoid(v)||e.markableVoid(v)},a=Ne.isExpanded(r),i=!1;if(!a){var[c,u]=R.node(e,r);if(c&&n(c,u)){var[f]=R.parent(e,u);i=f&&e.markableVoid(f)}}if(a||i)Ke.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var d=w7({},R.marks(e)||{});delete d[t],e.marks=d,Po.get(e)||e.onChange()}}},D7=(e,t)=>{ap.set(e,t)},k7=(e,t)=>R.point(e,t,{edge:"start"}),E7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,a=R.range(e,t),[i,c]=Ne.edges(a),u="";for(var[f,d]of R.nodes(e,{at:a,match:ht.isText,voids:n})){var m=f.text;ie.equals(d,c.path)&&(m=m.slice(0,c.offset)),ie.equals(d,i.path)&&(m=m.slice(i.offset)),u+=m}return u},S7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[a,i]=Ne.edges(t);if(a.offset!==0||i.offset!==0||Ne.isCollapsed(t)||ie.hasPrevious(i.path))return t;var c=R.above(e,{at:i,match:w=>pt.isElement(w)&&R.isBlock(e,w),voids:n}),u=c?c[1]:[],f=R.start(e,a),d={anchor:f,focus:i},m=!0;for(var[g,v]of R.nodes(e,{at:d,match:ht.isText,reverse:!0,voids:n})){if(m){m=!1;continue}if(g.text!==""||ie.isBefore(v,u)){i={path:v,offset:g.text.length};break}}return{anchor:a,focus:i}},A7=(e,t)=>{var r=R.isNormalizing(e);R.setNormalizing(e,!1);try{t()}finally{R.setNormalizing(e,r)}R.normalize(e)},B7=(e,t,r)=>{var[n,a]=t;return pt.isElement(n)&&R.isEmpty(e,n)||ht.isText(n)&&n.text===""&&a[a.length-1]!==0},F7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var r,n,{reverse:a=!1,unit:i="character",distance:c=1,voids:u=!1}=t,{at:f=e.selection,hanging:d=!1}=t;if(f){var m=!1;if(Ne.isRange(f)&&Ne.isCollapsed(f)&&(m=!0,f=f.anchor),Gt.isPoint(f)){var g=R.void(e,{at:f,mode:"highest"});if(!u&&g){var[,v]=g;f=v}else{var w={unit:i,distance:c},x=a?R.before(e,f,w)||R.start(e,[]):R.after(e,f,w)||R.end(e,[]);f={anchor:f,focus:x},d=!0}}if(ie.isPath(f)){Ke.removeNodes(e,{at:f,voids:u});return}if(!Ne.isCollapsed(f)){if(!d){var[,C]=Ne.edges(f),p=R.end(e,[]);Gt.equals(C,p)||(f=R.unhangRange(e,f,{voids:u}))}var[A,B]=Ne.edges(f),E=R.above(e,{match:we=>pt.isElement(we)&&R.isBlock(e,we),at:A,voids:u}),T=R.above(e,{match:we=>pt.isElement(we)&&R.isBlock(e,we),at:B,voids:u}),F=E&&T&&!ie.equals(E[1],T[1]),P=ie.equals(A.path,B.path),S=u?null:(r=R.void(e,{at:A,mode:"highest"}))!==null&&r!==void 0?r:R.elementReadOnly(e,{at:A,mode:"highest"}),L=u?null:(n=R.void(e,{at:B,mode:"highest"}))!==null&&n!==void 0?n:R.elementReadOnly(e,{at:B,mode:"highest"});if(S){var O=R.before(e,A);O&&E&&ie.isAncestor(E[1],O.path)&&(A=O)}if(L){var W=R.after(e,B);W&&T&&ie.isAncestor(T[1],W.path)&&(B=W)}var j=[],Y;for(var Z of R.nodes(e,{at:f,voids:u})){var[_,H]=Z;Y&&ie.compare(H,Y)===0||(!u&&pt.isElement(_)&&(R.isVoid(e,_)||R.isElementReadOnly(e,_))||!ie.isCommon(H,A.path)&&!ie.isCommon(H,B.path))&&(j.push(Z),Y=H)}var V=Array.from(j,we=>{var[,De]=we;return R.pathRef(e,De)}),G=R.pointRef(e,A),te=R.pointRef(e,B),K="";if(!P&&!S){var X=G.current,[ye]=R.leaf(e,X),{path:xe}=X,{offset:ke}=A,Be=ye.text.slice(ke);Be.length>0&&(e.apply({type:"remove_text",path:xe,offset:ke,text:Be}),K=Be)}if(V.reverse().map(we=>we.unref()).filter(we=>we!==null).forEach(we=>Ke.removeNodes(e,{at:we,voids:u})),!L){var _e=te.current,[Q]=R.leaf(e,_e),{path:oe}=_e,ue=P?A.offset:0,le=Q.text.slice(ue,B.offset);le.length>0&&(e.apply({type:"remove_text",path:oe,offset:ue,text:le}),K=le)}!P&&F&&te.current&&G.current&&Ke.mergeNodes(e,{at:te.current,hanging:!0,voids:u}),m&&a&&i==="character"&&K.length>1&&K.match(/[\u0E00-\u0E7F]+/)&&Ke.insertText(e,K.slice(0,K.length-c));var Se=G.unref(),Fe=te.unref(),me=a?Se||Fe:Fe||Se;t.at==null&&me&&Ke.select(e,me)}}})},N7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:a=!1}=r,{at:i=pu(e),batchDirty:c=!0}=r;if(t.length){if(Ne.isRange(i))if(n||(i=R.unhangRange(e,i,{voids:a})),Ne.isCollapsed(i))i=i.anchor;else{var[,u]=Ne.edges(i);if(!a&&R.void(e,{at:u}))return;var f=R.pointRef(e,u);Ke.delete(e,{at:i}),i=f.unref()}else ie.isPath(i)&&(i=R.start(e,i));if(!(!a&&R.void(e,{at:i}))){var d=R.above(e,{at:i,match:Be=>pt.isElement(Be)&&R.isInline(e,Be),mode:"highest",voids:a});if(d){var[,m]=d;if(R.isEnd(e,i,m)){var g=R.after(e,m);i=g}else if(R.isStart(e,i,m)){var v=R.before(e,m);i=v}}var w=R.above(e,{match:Be=>pt.isElement(Be)&&R.isBlock(e,Be),at:i,voids:a}),[,x]=w,C=R.isStart(e,i,x),p=R.isEnd(e,i,x),A=C&&p,B=!C||C&&p,E=!p,[,T]=Qe.first({children:t},[]),[,F]=Qe.last({children:t},[]),P=[],S=Be=>{var[_e,Q]=Be,oe=Q.length===0;return oe?!1:A?!0:!(B&&ie.isAncestor(Q,T)&&pt.isElement(_e)&&!e.isVoid(_e)&&!e.isInline(_e)||E&&ie.isAncestor(Q,F)&&pt.isElement(_e)&&!e.isVoid(_e)&&!e.isInline(_e))};for(var L of Qe.nodes({children:t},{pass:S}))S(L)&&P.push(L);var O=[],W=[],j=[],Y=!0,Z=!1;for(var[_]of P)pt.isElement(_)&&!e.isInline(_)?(Y=!1,Z=!0,W.push(_)):Y?O.push(_):j.push(_);var[H]=R.nodes(e,{at:i,match:Be=>ht.isText(Be)||R.isInline(e,Be),mode:"highest",voids:a}),[,V]=H,G=R.isStart(e,i,V),te=R.isEnd(e,i,V),K=R.pathRef(e,p&&!j.length?ie.next(x):x),X=R.pathRef(e,te?ie.next(V):V);Ke.splitNodes(e,{at:i,match:Be=>Z?pt.isElement(Be)&&R.isBlock(e,Be):ht.isText(Be)||R.isInline(e,Be),mode:Z?"lowest":"highest",always:Z&&(!C||O.length>0)&&(!p||j.length>0),voids:a});var ye=R.pathRef(e,!G||G&&te?ie.next(V):V);if(Ke.insertNodes(e,O,{at:ye.current,match:Be=>ht.isText(Be)||R.isInline(e,Be),mode:"highest",voids:a,batchDirty:c}),A&&!O.length&&W.length&&!j.length&&Ke.delete(e,{at:x,voids:a}),Ke.insertNodes(e,W,{at:K.current,match:Be=>pt.isElement(Be)&&R.isBlock(e,Be),mode:"lowest",voids:a,batchDirty:c}),Ke.insertNodes(e,j,{at:X.current,match:Be=>ht.isText(Be)||R.isInline(e,Be),mode:"highest",voids:a,batchDirty:c}),!r.at){var xe;if(j.length>0&&X.current?xe=ie.previous(X.current):W.length>0&&K.current?xe=ie.previous(K.current):ye.current&&(xe=ie.previous(ye.current)),xe){var ke=R.end(e,xe);Ke.select(e,ke)}}ye.unref(),K.unref(),X.unref()}}})},T7=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[a]=Ne.edges(n);Ke.select(e,a)}else if(r==="end"){var[,i]=Ne.edges(n);Ke.select(e,i)}}else return},O7=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},$7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:a="character",reverse:i=!1}=t,{edge:c=null}=t;if(r){c==="start"&&(c=Ne.isBackward(r)?"focus":"anchor"),c==="end"&&(c=Ne.isBackward(r)?"anchor":"focus");var{anchor:u,focus:f}=r,d={distance:n,unit:a,ignoreNonSelectable:!0},m={};if(c==null||c==="anchor"){var g=i?R.before(e,u,d):R.after(e,u,d);g&&(m.anchor=g)}if(c==null||c==="focus"){var v=i?R.before(e,f,d):R.after(e,f,d);v&&(m.focus=v)}Ke.setSelection(e,m)}},P7=(e,t)=>{var{selection:r}=e;if(t=R.range(e,t),r){Ke.setSelection(e,t);return}if(!Ne.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Wr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function xf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var M7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:a="both"}=r;if(n){a==="start"&&(a=Ne.isBackward(n)?"focus":"anchor"),a==="end"&&(a=Ne.isBackward(n)?"anchor":"focus");var{anchor:i,focus:c}=n,u=a==="anchor"?i:c;Ke.setSelection(e,{[a==="anchor"?"anchor":"focus"]:wf(wf({},u),t)})}},R7=(e,t)=>{var{selection:r}=e,n={},a={};if(r){for(var i in t)(i==="anchor"&&t.anchor!=null&&!Gt.equals(t.anchor,r.anchor)||i==="focus"&&t.focus!=null&&!Gt.equals(t.focus,r.focus)||i!=="anchor"&&i!=="focus"&&t[i]!==r[i])&&(n[i]=r[i],a[i]=t[i]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:a})}},z7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:a=!1,mode:i="lowest",batchDirty:c=!0}=r,{at:u,match:f,select:d}=r;if(Qe.isNode(t)&&(t=[t]),t.length!==0){var[m]=t;if(u||(u=pu(e),d!==!1&&(d=!0)),d==null&&(d=!1),Ne.isRange(u))if(n||(u=R.unhangRange(e,u,{voids:a})),Ne.isCollapsed(u))u=u.anchor;else{var[,g]=Ne.edges(u),v=R.pointRef(e,g);Ke.delete(e,{at:u}),u=v.unref()}if(Gt.isPoint(u)){f==null&&(ht.isText(m)?f=O=>ht.isText(O):e.isInline(m)?f=O=>ht.isText(O)||R.isInline(e,O):f=O=>pt.isElement(O)&&R.isBlock(e,O));var[w]=R.nodes(e,{at:u.path,match:f,mode:i,voids:a});if(w){var[,x]=w,C=R.pathRef(e,x),p=R.isEnd(e,u,x);Ke.splitNodes(e,{at:u,match:f,mode:i,voids:a});var A=C.unref();u=p?ie.next(A):A}else return}var B=ie.parent(u),E=u[u.length-1];if(!(!a&&R.void(e,{at:B}))){if(c){var T=[],F=ie.levels(B);yv(e,()=>{var O=function(){var j=B.concat(E);E++;var Y={type:"insert_node",path:j,node:W};e.apply(Y),u=ie.next(u),T.push(Y),ht.isText?F.push(...Array.from(Qe.nodes(W),Z=>{var[,_]=Z;return j.concat(_)})):F.push(j)};for(var W of t)O()},()=>{ip(e,F,O=>{var W=O;for(var j of T)if(ie.operationCanTransformPath(j)&&(W=ie.transform(W,j),!W))return null;return W})})}else for(var P of t){var S=B.concat(E);E++,e.apply({type:"insert_node",path:S,node:P}),u=ie.next(u)}if(u=ie.previous(u),d){var L=R.end(e,u);L&&Ke.select(e,L)}}}})},I7=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:a=!1}=t,{match:i}=t;if(i==null&&(i=ie.isPath(r)?vo(e,r):E=>pt.isElement(E)&&R.isBlock(e,E)),!!r){var c=R.nodes(e,{at:r,match:i,mode:n,voids:a}),u=Array.from(c,E=>{var[,T]=E;return R.pathRef(e,T)});for(var f of u){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,ie.parent(d)),[g,v]=m,w=d[d.length-1],{length:x}=g.children;if(x===1){var C=ie.next(v);Ke.moveNodes(e,{at:d,to:C,voids:a}),Ke.removeNodes(e,{at:v,voids:a})}else if(w===0)Ke.moveNodes(e,{at:d,to:v,voids:a});else if(w===x-1){var p=ie.next(v);Ke.moveNodes(e,{at:d,to:p,voids:a})}else{var A=ie.next(d),B=ie.next(v);Ke.splitNodes(e,{at:A,voids:a}),Ke.moveNodes(e,{at:d,to:B,voids:a})}}}})},j7=["text"],L7=["children"],sp=(e,t)=>{if(pt.isElement(t)){var r=t;return R.isVoid(e,t)?!0:r.children.length===1?sp(e,r.children[0]):!1}else return!R.isEditor(t)},_7=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:a=!1,voids:i=!1,mode:c="lowest"}=t;if(n){if(r==null)if(ie.isPath(n)){var[u]=R.parent(e,n);r=O=>u.children.includes(O)}else r=O=>pt.isElement(O)&&R.isBlock(e,O);if(!a&&Ne.isRange(n)&&(n=R.unhangRange(e,n,{voids:i})),Ne.isRange(n))if(Ne.isCollapsed(n))n=n.anchor;else{var[,f]=Ne.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:i,mode:c}),g=R.previous(e,{at:n,match:r,voids:i,mode:c});if(!(!m||!g)){var[v,w]=m,[x,C]=g;if(!(w.length===0||C.length===0)){var p=ie.next(C),A=ie.common(w,C),B=ie.isSibling(w,C),E=Array.from(R.levels(e,{at:w}),O=>{var[W]=O;return W}).slice(A.length).slice(0,-1),T=R.above(e,{at:w,mode:"highest",match:O=>E.includes(O)&&sp(e,O)}),F=T&&R.pathRef(e,T[1]),P,S;if(ht.isText(v)&&ht.isText(x)){var L=ta(v,j7);S=x.text.length,P=L}else if(pt.isElement(v)&&pt.isElement(x)){var L=ta(v,L7);S=x.children.length,P=L}else throw new Error("Cannot merge the node at path [".concat(w,"] with the previous sibling because it is not the same kind: ").concat(Wr.stringify(v)," ").concat(Wr.stringify(x)));B||Ke.moveNodes(e,{at:w,to:p,voids:i}),F&&Ke.removeNodes(e,{at:F.current,voids:i}),R.shouldMergeNodesRemovePrevNode(e,g,m)?Ke.removeNodes(e,{at:C,voids:i}):e.apply({type:"merge_node",path:p,position:S,properties:P}),F&&F.unref()}}}})},q7=(e,t)=>{R.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:a="lowest",voids:i=!1}=t,{match:c}=t;if(n){c==null&&(c=ie.isPath(n)?vo(e,n):w=>pt.isElement(w)&&R.isBlock(e,w));var u=R.pathRef(e,r),f=R.nodes(e,{at:n,match:c,mode:a,voids:i}),d=Array.from(f,w=>{var[,x]=w;return R.pathRef(e,x)});for(var m of d){var g=m.unref(),v=u.current;g.length!==0&&e.apply({type:"move_node",path:g,newPath:v}),u.current&&ie.isSibling(v,g)&&ie.isAfter(v,g)&&(u.current=ie.next(u.current))}u.unref()}})},H7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:a="lowest"}=t,{at:i=e.selection,match:c}=t;if(i){c==null&&(c=ie.isPath(i)?vo(e,i):v=>pt.isElement(v)&&R.isBlock(e,v)),!r&&Ne.isRange(i)&&(i=R.unhangRange(e,i,{voids:n}));var u=R.nodes(e,{at:i,match:c,mode:a,voids:n}),f=Array.from(u,v=>{var[,w]=v;return R.pathRef(e,w)});for(var d of f){var m=d.unref();if(m){var[g]=R.node(e,m);e.apply({type:"remove_node",path:m,node:g})}}}})},K7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{match:n,at:a=e.selection,compare:i,merge:c}=r,{hanging:u=!1,mode:f="lowest",split:d=!1,voids:m=!1}=r;if(a){if(n==null&&(n=ie.isPath(a)?vo(e,a):S=>pt.isElement(S)&&R.isBlock(e,S)),!u&&Ne.isRange(a)&&(a=R.unhangRange(e,a,{voids:m})),d&&Ne.isRange(a)){if(Ne.isCollapsed(a)&&R.leaf(e,a.anchor)[0].text.length>0)return;var g=R.rangeRef(e,a,{affinity:"inward"}),[v,w]=Ne.edges(a),x=f==="lowest"?"lowest":"highest",C=R.isEnd(e,w,w.path);Ke.splitNodes(e,{at:w,match:n,mode:x,voids:m,always:!C});var p=R.isStart(e,v,v.path);Ke.splitNodes(e,{at:v,match:n,mode:x,voids:m,always:!p}),a=g.unref(),r.at==null&&Ke.select(e,a)}i||(i=(S,L)=>S!==L);for(var[A,B]of R.nodes(e,{at:a,match:n,mode:f,voids:m})){var E={},T={};if(B.length!==0){var F=!1;for(var P in t)P==="children"||P==="text"||i(t[P],A[P])&&(F=!0,A.hasOwnProperty(P)&&(E[P]=A[P]),c?t[P]!=null&&(T[P]=c(A[P],t[P])):t[P]!=null&&(T[P]=t[P]));F&&e.apply({type:"set_node",path:B,properties:E,newProperties:T})}}}})},W7=(e,t)=>{if(Ne.isCollapsed(t))return t.anchor;var[,r]=Ne.edges(t),n=R.pointRef(e,r);return Ke.delete(e,{at:t}),n.unref()},V7=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:a,at:i=e.selection,height:c=0,always:u=!1}=t;if(a==null&&(a=te=>pt.isElement(te)&&R.isBlock(e,te)),Ne.isRange(i)&&(i=W7(e,i)),ie.isPath(i)){var f=i,d=R.point(e,f),[m]=R.parent(e,f);a=te=>te===m,c=d.path.length-f.length+1,i=d,u=!0}if(i){var g=R.pointRef(e,i,{affinity:"backward"}),v;try{var[w]=R.nodes(e,{at:i,match:a,mode:r,voids:n});if(!w)return;var x=R.void(e,{at:i,mode:"highest"}),C=0;if(!n&&x){var[p,A]=x;if(pt.isElement(p)&&e.isInline(p)){var B=R.after(e,A);if(!B){var E={text:""},T=ie.next(A);Ke.insertNodes(e,E,{at:T,voids:n}),B=R.point(e,T)}i=B,u=!0}var F=i.path.length-A.length;c=F+1,u=!0}v=R.pointRef(e,i);var P=i.path.length-c,[,S]=w,L=i.path.slice(0,P),O=c===0?i.offset:i.path[P]+C;for(var[W,j]of R.levels(e,{at:L,reverse:!0,voids:n})){var Y=!1;if(j.length<S.length||j.length===0||!n&&pt.isElement(W)&&R.isVoid(e,W))break;var Z=g.current,_=R.isEnd(e,Z,j);if(u||!g||!R.isEdge(e,Z,j)){Y=!0;var H=Qe.extractProps(W);e.apply({type:"split_node",path:j,position:O,properties:H})}O=j[j.length-1]+(Y||_?1:0)}if(t.at==null){var V=v.current||R.end(e,[]);Ke.select(e,V)}}finally{var G;g.unref(),(G=v)===null||G===void 0||G.unref()}}})},U7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var a of t)n[a]=null;Ke.setNodes(e,n,r)},G7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:a=!1}=t,{at:i=e.selection,match:c}=t;if(i){c==null&&(c=ie.isPath(i)?vo(e,i):v=>pt.isElement(v)&&R.isBlock(e,v)),ie.isPath(i)&&(i=R.range(e,i));var u=Ne.isRange(i)?R.rangeRef(e,i):null,f=R.nodes(e,{at:i,match:c,mode:r,voids:a}),d=Array.from(f,v=>{var[,w]=v;return R.pathRef(e,w)}).reverse(),m=function(){var v=g.unref(),[w]=R.node(e,v),x=R.range(e,v);n&&u&&(x=Ne.intersection(u.current,x)),Ke.liftNodes(e,{at:x,match:C=>pt.isAncestor(w)&&w.children.includes(C),voids:a})};for(var g of d)m();u&&u.unref()}})};function Cf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Df(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cf(Object(r),!0).forEach(function(n){an(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Y7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{mode:n="lowest",split:a=!1,voids:i=!1}=r,{match:c,at:u=e.selection}=r;if(u){if(c==null&&(ie.isPath(u)?c=vo(e,u):e.isInline(t)?c=x=>pt.isElement(x)&&R.isInline(e,x)||ht.isText(x):c=x=>pt.isElement(x)&&R.isBlock(e,x)),a&&Ne.isRange(u)){var[f,d]=Ne.edges(u),m=R.rangeRef(e,u,{affinity:"inward"});Ke.splitNodes(e,{at:d,match:c,voids:i}),Ke.splitNodes(e,{at:f,match:c,voids:i}),u=m.unref(),r.at==null&&Ke.select(e,u)}var g=Array.from(R.nodes(e,{at:u,match:e.isInline(t)?x=>pt.isElement(x)&&R.isBlock(e,x):x=>R.isEditor(x),mode:"lowest",voids:i})),v=function(){var x=Ne.isRange(u)?Ne.intersection(u,R.range(e,w)):u;if(!x)return 0;var C=Array.from(R.nodes(e,{at:x,match:c,mode:n,voids:i}));if(C.length>0){var[p]=C,A=C[C.length-1],[,B]=p,[,E]=A;if(B.length===0&&E.length===0)return 0;var T=ie.equals(B,E)?ie.parent(B):ie.common(B,E),F=R.range(e,B,E),P=R.node(e,T),[S]=P,L=T.length+1,O=ie.next(E.slice(0,L)),W=Df(Df({},t),{},{children:[]});Ke.insertNodes(e,W,{at:O,voids:i}),Ke.moveNodes(e,{at:F,match:j=>pt.isAncestor(S)&&S.children.includes(j),to:O.concat(0),voids:i})}};for(var[,w]of g)v()}})},Z7=()=>{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 xv(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sv(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fv(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Nv(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tv(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cv(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qv(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kv(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N7(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hv(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vv(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dv(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C7(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wv(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kv(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ev(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Av(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Bv(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return T7(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F7(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O7(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ov(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $v(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Pv(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mv(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Rv(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a7(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Iv(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jv(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lv(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _v(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return z7(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Uv(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gv(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yv(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zv(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xv(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qv(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Jv(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e7(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return t7(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return I7(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _7(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $7(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return q7(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o7(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return i7(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s7(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return l7(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return u7(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f7(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c7(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return d7(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m7(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h7(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return p7(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return g7(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v7(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x7(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b7(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y7(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H7(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P7(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return K7(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D7(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M7(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return R7(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return V7(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k7(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E7(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S7(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return U7(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return G7(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zv(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return A7(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Y7(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return B7(e,...r)}};return e},ml,kf;function X7(){if(kf)return ml;kf=1,ml=a;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 a(i){return i=String(i||""),r.test(i)?"rtl":n.test(i)?"ltr":"neutral"}return ml}var Q7=X7();const lp=ai(Q7);var gl,Ef;function vu(){if(Ef)return gl;Ef=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return gl=e,gl}var vl,Sf;function J7(){if(Sf)return vl;Sf=1;var e=typeof Ua=="object"&&Ua&&Ua.Object===Object&&Ua;return vl=e,vl}var bl,Af;function up(){if(Af)return bl;Af=1;var e=J7(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return bl=r,bl}var yl,Bf;function e8(){if(Bf)return yl;Bf=1;var e=up(),t=function(){return e.Date.now()};return yl=t,yl}var xl,Ff;function t8(){if(Ff)return xl;Ff=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return xl=t,xl}var wl,Nf;function r8(){if(Nf)return wl;Nf=1;var e=t8(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return wl=r,wl}var Cl,Tf;function cp(){if(Tf)return Cl;Tf=1;var e=up(),t=e.Symbol;return Cl=t,Cl}var Dl,Of;function n8(){if(Of)return Dl;Of=1;var e=cp(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(c){var u=r.call(c,a),f=c[a];try{c[a]=void 0;var d=!0}catch{}var m=n.call(c);return d&&(u?c[a]=f:delete c[a]),m}return Dl=i,Dl}var kl,$f;function a8(){if($f)return kl;$f=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return kl=r,kl}var El,Pf;function o8(){if(Pf)return El;Pf=1;var e=cp(),t=n8(),r=a8(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function c(u){return u==null?u===void 0?a:n:i&&i in Object(u)?t(u):r(u)}return El=c,El}var Sl,Mf;function i8(){if(Mf)return Sl;Mf=1;function e(t){return t!=null&&typeof t=="object"}return Sl=e,Sl}var Al,Rf;function s8(){if(Rf)return Al;Rf=1;var e=o8(),t=i8(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return Al=n,Al}var Bl,zf;function l8(){if(zf)return Bl;zf=1;var e=r8(),t=vu(),r=s8(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=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 g=i.test(d);return g||c.test(d)?u(d.slice(2),g?2:8):a.test(d)?n:+d}return Bl=f,Bl}var Fl,If;function dp(){if(If)return Fl;If=1;var e=vu(),t=e8(),r=l8(),n="Expected a function",a=Math.max,i=Math.min;function c(u,f,d){var m,g,v,w,x,C,p=0,A=!1,B=!1,E=!0;if(typeof u!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(A=!!d.leading,B="maxWait"in d,v=B?a(r(d.maxWait)||0,f):v,E="trailing"in d?!!d.trailing:E);function T(Z){var _=m,H=g;return m=g=void 0,p=Z,w=u.apply(H,_),w}function F(Z){return p=Z,x=setTimeout(L,f),A?T(Z):w}function P(Z){var _=Z-C,H=Z-p,V=f-_;return B?i(V,v-H):V}function S(Z){var _=Z-C,H=Z-p;return C===void 0||_>=f||_<0||B&&H>=v}function L(){var Z=t();if(S(Z))return O(Z);x=setTimeout(L,P(Z))}function O(Z){return x=void 0,E&&m?T(Z):(m=g=void 0,w)}function W(){x!==void 0&&clearTimeout(x),p=0,m=C=g=x=void 0}function j(){return x===void 0?w:O(t())}function Y(){var Z=t(),_=S(Z);if(m=arguments,g=this,C=Z,_){if(x===void 0)return F(C);if(B)return clearTimeout(x),x=setTimeout(L,f),T(C)}return x===void 0&&(x=setTimeout(L,f)),w}return Y.cancel=W,Y.flush=j,Y}return Fl=c,Fl}var u8=dp();const c8=ai(u8);var Nl,jf;function d8(){if(jf)return Nl;jf=1;var e=dp(),t=vu(),r="Expected a function";function n(a,i,c){var u=!0,f=!0;if(typeof a!="function")throw new TypeError(r);return t(c)&&(u="leading"in c?!!c.leading:u,f="trailing"in c?!!c.trailing:f),e(a,i,{leading:u,maxWait:i,trailing:f})}return Nl=n,Nl}var f8=d8();const h8=ai(f8),Lf=e=>typeof e=="object"&&e!=null&&e.nodeType===1,_f=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Ci=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return _f(r.overflowY,t)||_f(r.overflowX,t)||(n=>{const a=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!a&&(a.clientHeight<n.scrollHeight||a.clientWidth<n.scrollWidth)})(e)}return!1},Di=(e,t,r,n,a,i,c,u)=>i<e&&c>t||i>e&&c<t?0:i<=e&&u<=r||c>=t&&u>=r?i-e-n:c>t&&u<r||i<e&&u>r?c-t+a:0,p8=e=>e.parentElement??(e.getRootNode().host||null),qf=(e,t)=>{var r,n,a,i;if(typeof document>"u")return[];const{scrollMode:c,block:u,inline:f,boundary:d,skipOverflowHiddenElements:m}=t,g=typeof d=="function"?d:V=>V!==d;if(!Lf(e))throw new TypeError("Invalid target");const v=document.scrollingElement||document.documentElement,w=[];let x=e;for(;Lf(x)&&g(x);){if(x=p8(x),x===v){w.push(x);break}x!=null&&x===document.body&&Ci(x)&&!Ci(document.documentElement)||x!=null&&Ci(x,m)&&w.push(x)}const C=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,p=(i=(a=window.visualViewport)==null?void 0:a.height)!=null?i:innerHeight,{scrollX:A,scrollY:B}=window,{height:E,width:T,top:F,right:P,bottom:S,left:L}=e.getBoundingClientRect(),{top:O,right:W,bottom:j,left:Y}=(V=>{const G=window.getComputedStyle(V);return{top:parseFloat(G.scrollMarginTop)||0,right:parseFloat(G.scrollMarginRight)||0,bottom:parseFloat(G.scrollMarginBottom)||0,left:parseFloat(G.scrollMarginLeft)||0}})(e);let Z=u==="start"||u==="nearest"?F-O:u==="end"?S+j:F+E/2-O+j,_=f==="center"?L+T/2-Y+W:f==="end"?P+W:L-Y;const H=[];for(let V=0;V<w.length;V++){const G=w[V],{height:te,width:K,top:X,right:ye,bottom:xe,left:ke}=G.getBoundingClientRect();if(c==="if-needed"&&F>=0&&L>=0&&S<=p&&P<=C&&(G===v&&!Ci(G)||F>=X&&S<=xe&&L>=ke&&P<=ye))return H;const Be=getComputedStyle(G),_e=parseInt(Be.borderLeftWidth,10),Q=parseInt(Be.borderTopWidth,10),oe=parseInt(Be.borderRightWidth,10),ue=parseInt(Be.borderBottomWidth,10);let le=0,Se=0;const Fe="offsetWidth"in G?G.offsetWidth-G.clientWidth-_e-oe:0,me="offsetHeight"in G?G.offsetHeight-G.clientHeight-Q-ue:0,we="offsetWidth"in G?G.offsetWidth===0?0:K/G.offsetWidth:0,De="offsetHeight"in G?G.offsetHeight===0?0:te/G.offsetHeight:0;if(v===G)le=u==="start"?Z:u==="end"?Z-p:u==="nearest"?Di(B,B+p,p,Q,ue,B+Z,B+Z+E,E):Z-p/2,Se=f==="start"?_:f==="center"?_-C/2:f==="end"?_-C:Di(A,A+C,C,_e,oe,A+_,A+_+T,T),le=Math.max(0,le+B),Se=Math.max(0,Se+A);else{le=u==="start"?Z-X-Q:u==="end"?Z-xe+ue+me:u==="nearest"?Di(X,xe,te,Q,ue+me,Z,Z+E,E):Z-(X+te/2)+me/2,Se=f==="start"?_-ke-_e:f==="center"?_-(ke+K/2)+Fe/2:f==="end"?_-ye+oe+Fe:Di(ke,ye,K,_e,oe+Fe,_,_+T,T);const{scrollLeft:Te,scrollTop:be}=G;le=De===0?0:Math.max(0,Math.min(be+le/De,G.scrollHeight-te/De+me)),Se=we===0?0:Math.max(0,Math.min(Te+Se/we,G.scrollWidth-K/we+Fe)),Z+=be-le,_+=Te-Se}H.push({el:G,top:le,left:Se})}return H},m8=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function g8(e,t){if(!e.isConnected||!(a=>{let i=a;for(;i&&i.parentNode;){if(i.parentNode===document)return!0;i=i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}return!1})(e))return;const r=(a=>{const i=window.getComputedStyle(a);return{top:parseFloat(i.scrollMarginTop)||0,right:parseFloat(i.scrollMarginRight)||0,bottom:parseFloat(i.scrollMarginBottom)||0,left:parseFloat(i.scrollMarginLeft)||0}})(e);if((a=>typeof a=="object"&&typeof a.behavior=="function")(t))return t.behavior(qf(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:a,top:i,left:c}of qf(e,m8(t))){const u=i-r.top+r.bottom,f=c-r.left+r.right;a.scroll({top:u,left:f,behavior:n})}}var Fa=[],v8=function(){return Fa.some(function(e){return e.activeTargets.length>0})},b8=function(){return Fa.some(function(e){return e.skippedTargets.length>0})},Hf="ResizeObserver loop completed with undelivered notifications.",y8=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Hf}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Hf),window.dispatchEvent(e)},Vo;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Vo||(Vo={}));var Na=function(e){return Object.freeze(e)},x8=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Na(this)}return e})(),fp=(function(){function e(t,r,n,a){return this.x=t,this.y=r,this.width=n,this.height=a,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Na(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,a=t.top,i=t.right,c=t.bottom,u=t.left,f=t.width,d=t.height;return{x:r,y:n,top:a,right:i,bottom:c,left:u,width:f,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),bu=function(e){return e instanceof SVGElement&&"getBBox"in e},hp=function(e){if(bu(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var a=e,i=a.offsetWidth,c=a.offsetHeight;return!(i||c||e.getClientRects().length)},Kf=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)},w8=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},Mo=typeof window<"u"?window:{},ki=new WeakMap,Wf=/auto|scroll/,C8=/^tb|vertical/,D8=/msie|trident/i.test(Mo.navigator&&Mo.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},eo=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new x8((r?t:e)||0,(r?e:t)||0)},Vf=Na({devicePixelContentBoxSize:eo(),borderBoxSize:eo(),contentBoxSize:eo(),contentRect:new fp(0,0,0,0)}),pp=function(e,t){if(t===void 0&&(t=!1),ki.has(e)&&!t)return ki.get(e);if(hp(e))return ki.set(e,Vf),Vf;var r=getComputedStyle(e),n=bu(e)&&e.ownerSVGElement&&e.getBBox(),a=!D8&&r.boxSizing==="border-box",i=C8.test(r.writingMode||""),c=!n&&Wf.test(r.overflowY||""),u=!n&&Wf.test(r.overflowX||""),f=n?0:jn(r.paddingTop),d=n?0:jn(r.paddingRight),m=n?0:jn(r.paddingBottom),g=n?0:jn(r.paddingLeft),v=n?0:jn(r.borderTopWidth),w=n?0:jn(r.borderRightWidth),x=n?0:jn(r.borderBottomWidth),C=n?0:jn(r.borderLeftWidth),p=g+d,A=f+m,B=C+w,E=v+x,T=u?e.offsetHeight-E-e.clientHeight:0,F=c?e.offsetWidth-B-e.clientWidth:0,P=a?p+B:0,S=a?A+E:0,L=n?n.width:jn(r.width)-P-F,O=n?n.height:jn(r.height)-S-T,W=L+p+F+B,j=O+A+T+E,Y=Na({devicePixelContentBoxSize:eo(Math.round(L*devicePixelRatio),Math.round(O*devicePixelRatio),i),borderBoxSize:eo(W,j,i),contentBoxSize:eo(L,O,i),contentRect:new fp(g,f,L,O)});return ki.set(e,Y),Y},mp=function(e,t,r){var n=pp(e,r),a=n.borderBoxSize,i=n.contentBoxSize,c=n.devicePixelContentBoxSize;switch(t){case Vo.DEVICE_PIXEL_CONTENT_BOX:return c;case Vo.BORDER_BOX:return a;default:return i}},k8=(function(){function e(t){var r=pp(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Na([r.borderBoxSize]),this.contentBoxSize=Na([r.contentBoxSize]),this.devicePixelContentBoxSize=Na([r.devicePixelContentBoxSize])}return e})(),gp=function(e){if(hp(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},E8=function(){var e=1/0,t=[];Fa.forEach(function(i){if(i.activeTargets.length!==0){var c=[];i.activeTargets.forEach(function(u){var f=new k8(u.target),d=gp(u.target);c.push(f),u.lastReportedSize=mp(u.target,u.observedBox),d<e&&(e=d)}),t.push(function(){i.callback.call(i.observer,c,i.observer)}),i.activeTargets.splice(0,i.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var a=n[r];a()}return e},Uf=function(e){Fa.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(gp(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},S8=function(){var e=0;for(Uf(e);v8();)e=E8(),Uf(e);return b8()&&y8(),e>0},Tl,vp=[],A8=function(){return vp.splice(0).forEach(function(e){return e()})},B8=function(e){if(!Tl){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return A8()}).observe(r,n),Tl=function(){r.textContent="".concat(t?t--:t++)}}vp.push(e),Tl()},F8=function(e){B8(function(){requestAnimationFrame(e)})},Pi=0,N8=function(){return!!Pi},T8=250,O8={attributes:!0,characterData:!0,childList:!0,subtree:!0},Gf=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Yf=function(e){return e===void 0&&(e=0),Date.now()+e},Ol=!1,$8=(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=T8),!Ol){Ol=!0;var n=Yf(t);F8(function(){var a=!1;try{a=S8()}finally{if(Ol=!1,t=n-Yf(),!N8())return;a?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,O8)};document.body?r():Mo.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Gf.forEach(function(r){return Mo.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Gf.forEach(function(r){return Mo.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),E0=new $8,Zf=function(e){!Pi&&e>0&&E0.start(),Pi+=e,!Pi&&E0.stop()},P8=function(e){return!bu(e)&&!w8(e)&&getComputedStyle(e).display==="inline"},M8=(function(){function e(t,r){this.target=t,this.observedBox=r||Vo.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=mp(this.target,this.observedBox,!0);return P8(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),R8=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ei=new WeakMap,Xf=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Si=(function(){function e(){}return e.connect=function(t,r){var n=new R8(t,r);Ei.set(t,n)},e.observe=function(t,r,n){var a=Ei.get(t),i=a.observationTargets.length===0;Xf(a.observationTargets,r)<0&&(i&&Fa.push(a),a.observationTargets.push(new M8(r,n&&n.box)),Zf(1),E0.schedule())},e.unobserve=function(t,r){var n=Ei.get(t),a=Xf(n.observationTargets,r),i=n.observationTargets.length===1;a>=0&&(i&&Fa.splice(Fa.indexOf(n),1),n.observationTargets.splice(a,1),Zf(-1))},e.disconnect=function(t){var r=this,n=Ei.get(t);n.observationTargets.slice().forEach(function(a){return r.unobserve(t,a.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),z8=(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.");Si.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(!Kf(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Si.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(!Kf(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Si.unobserve(this,t)},e.prototype.disconnect=function(){Si.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Bn={},Qf;function I8(){if(Qf)return Bn;Qf=1,Object.defineProperty(Bn,"__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},a=1;a<20;a++)n["f"+a]=111+a;function i(v,w,x){w&&!("byKey"in w)&&(x=w,w=null),Array.isArray(v)||(v=[v]);var C=v.map(function(B){return f(B,w)}),p=function(B){return C.some(function(E){return d(E,B)})},A=x==null?p:p(x);return A}function c(v,w){return i(v,w)}function u(v,w){return i(v,{byKey:!0},w)}function f(v,w){var x=w&&w.byKey,C={};v=v.replace("++","+add");var p=v.split("+"),A=p.length;for(var B in t)C[t[B]]=!1;var E=!0,T=!1,F=void 0;try{for(var P=p[Symbol.iterator](),S;!(E=(S=P.next()).done);E=!0){var L=S.value,O=L.endsWith("?")&&L.length>1;O&&(L=L.slice(0,-1));var W=g(L),j=t[W];if(L.length>1&&!j&&!r[L]&&!n[W])throw new TypeError('Unknown modifier: "'+L+'"');(A===1||!j)&&(x?C.key=W:C.which=m(L)),j&&(C[j]=O?null:!0)}}catch(Y){T=!0,F=Y}finally{try{!E&&P.return&&P.return()}finally{if(T)throw F}}return C}function d(v,w){for(var x in v){var C=v[x],p=void 0;if(C!=null&&(x==="key"&&w.key!=null?p=w.key.toLowerCase():x==="which"?p=C===91&&w.which===93?91:w.which:p=w[x],!(p==null&&C===!1)&&p!==C))return!1}return!0}function m(v){v=g(v);var w=n[v]||v.toUpperCase().charCodeAt(0);return w}function g(v){return v=v.toLowerCase(),v=r[v]||v,v}return Bn.default=i,Bn.isHotkey=i,Bn.isCodeHotkey=c,Bn.isKeyHotkey=u,Bn.parseHotkey=f,Bn.compareHotkey=d,Bn.toKeyCode=m,Bn.toKeyName=g,Bn}var $l=I8();function j8(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function oo(e,t){if(e==null)return{};var r=j8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Uo(e){"@babel/helpers - typeof";return Uo=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},Uo(e)}function L8(e,t){if(Uo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Uo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _8(e){var t=L8(e,"string");return Uo(t)==="symbol"?t:String(t)}function kn(e,t,r){return t=_8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yu=Ca(null),Da=()=>{var e=wa(yu);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},Pl,Ml,bp=parseInt(We.version.split(".")[0],10),yp=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Jf=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),tn=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Ya=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Sa=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),q8=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),xp=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),H8=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),K8=tn&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),W8=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),V8=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),U8=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Mi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(Pl=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Pl!==void 0&&Pl[1]&&parseInt((Ml=navigator.userAgent.match(/Version\/(\d+)/))===null||Ml===void 0?void 0:Ml[1],10)<17;var la=(!H8||!K8)&&!q8&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",to=new WeakMap,xu=new WeakMap,wu=new WeakMap,wp=new WeakMap,Ri=new WeakMap,S0=new WeakMap,Go=new WeakMap,Ta=new WeakMap,ns=new WeakMap,bs=new WeakMap,A0=new WeakMap,ga=new WeakMap,Aa=new WeakMap,Ro=new WeakMap,B0=new WeakMap,Cu=new WeakMap,Tn=new WeakMap,Qn=new WeakMap,ln=new WeakMap,fa=new WeakMap,ha=new WeakMap,Cp=new WeakMap,io=Symbol("placeholder"),Dp=Symbol("mark-placeholder"),kp=globalThis.Node,G8=globalThis.Text,Du=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,Y8=e=>xa(e)&&e.nodeType===8,Dn=e=>xa(e)&&e.nodeType===1,xa=e=>{var t=Du(e);return!!t&&e instanceof t.Node},F0=e=>{var t=e&&e.anchorNode&&Du(e.anchorNode);return!!t&&e instanceof t.Selection},Ep=e=>xa(e)&&e.nodeType===3,Z8=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,X8=e=>{var[t,r]=e;if(Dn(t)&&t.childNodes.length){var n=r===t.childNodes.length,a=n?r-1:r;for([t,a]=Sp(t,a,n?"backward":"forward"),n=a<r;Dn(t)&&t.childNodes.length;){var i=n?t.childNodes.length-1:0;t=J8(t,i,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},Q8=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},Sp=(e,t,r)=>{for(var{childNodes:n}=e,a=n[t],i=t,c=!1,u=!1;(Y8(a)||Dn(a)&&a.childNodes.length===0||Dn(a)&&a.getAttribute("contenteditable")==="false")&&!(c&&u);){if(i>=n.length){c=!0,i=t-1,r="backward";continue}if(i<0){u=!0,i=t+1,r="forward";continue}a=n[i],t=i,i+=r==="forward"?1:-1}return[a,t]},J8=(e,t,r)=>{var[n]=Sp(e,t,r);return n},Ap=e=>{var t="";if(Ep(e)&&e.nodeValue)return e.nodeValue;if(Dn(e)){for(var r of Array.from(e.childNodes))t+=Ap(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
77
|
-
`)}return t},eb=/data-slate-fragment="(.+?)"/m,tb=e=>{var t=e.getData("text/html"),[,r]=t.match(eb)||[];return r},zo=e=>e.getSelection!=null?e.getSelection():document.getSelection(),ku=(e,t,r)=>{var{target:n}=t;if(Dn(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:a}=$e.getWindow(e);if(a.contains(n))return $e.hasDOMNode(e,n,{editable:!0});var i=r.find(c=>{var{addedNodes:u,removedNodes:f}=c;for(var d of u)if(d===n||d.contains(n))return!0;for(var m of f)if(m===n||m.contains(n))return!0});return!i||i===t?!1:ku(e,i,r)},rb=()=>{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},eh=(e,t)=>!!(e.compareDocumentPosition(t)&kp.DOCUMENT_POSITION_PRECEDING),nb=(e,t)=>!!(e.compareDocumentPosition(t)&kp.DOCUMENT_POSITION_FOLLOWING),ab=0;class ob{constructor(){kn(this,"id",void 0),this.id="".concat(ab++)}}var $e={androidPendingDiffs:e=>ln.get(e),androidScheduleFlush:e=>{var t;(t=Cu.get(e))===null||t===void 0||t()},blur:e=>{var t=$e.toDOMNode(e,e),r=$e.findDocumentOrShadowRoot(e);ga.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=$e.findDocumentOrShadowRoot(e),n=zo(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&Ke.deselect(e)},findDocumentOrShadowRoot:e=>{var t=$e.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:a}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i=$e.toSlateNode(e,t.target),c=$e.findPath(e,i);if(pt.isElement(i)&&R.isVoid(e,i)){var u=a.getBoundingClientRect(),f=e.isInline(i)?r-u.left<u.left+u.width-r:n-u.top<u.top+u.height-n,d=R.point(e,c,{edge:f?"start":"end"}),m=f?R.before(e,d):R.after(e,d);if(m){var g=R.range(e,m);return g}}var v,{document:w}=$e.getWindow(e);if(w.caretRangeFromPoint)v=w.caretRangeFromPoint(r,n);else{var x=w.caretPositionFromPoint(r,n);x&&(v=w.createRange(),v.setStart(x.offsetNode,x.offset),v.setEnd(x.offsetNode,x.offset))}if(!v)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var C=$e.toSlateRange(e,v,{exactMatch:!1,suppressThrow:!1});return C},findKey:(e,t)=>{var r=ns.get(t);return r||(r=new ob,ns.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var a=wu.get(n);if(a==null){if(R.isEditor(n))return r;break}var i=xu.get(n);if(i==null)break;r.unshift(i),n=a}throw new Error("Unable to find the path for Slate node: ".concat(Wr.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!ga.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(()=>{$e.focus(e,{retries:t.retries-1})},10);return}var r=$e.toDOMNode(e,e),n=$e.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var a=zo(n),i=$e.toDOMRange(e,e.selection);a==null||a.removeAllRanges(),a==null||a.addRange(i)}e.selection||Ke.select(e,R.start(e,[])),ga.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=wp.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,a=$e.toDOMNode(e,e),i;try{i=Dn(t)?t:t.parentElement}catch(c){if(c instanceof Error&&!c.message.includes('Permission denied to access property "nodeType"'))throw c}return i?i.closest("[data-slate-editor]")===a&&(!n||i.isContentEditable?!0:typeof i.isContentEditable=="boolean"&&i.closest('[contenteditable="false"]')===a||!!i.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>xa(t)&&$e.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)=>$e.hasEditableTarget(e,t)||$e.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>xa(t)&&$e.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Aa.get(e),isFocused:e=>!!ga.get(e),isReadOnly:e=>!!A0.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(A0.get(e))return!1;var r=$e.hasTarget(e,t)&&$e.toSlateNode(e,t);return pt.isElement(r)&&R.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=bs.get(e),n=R.isEditor(t)?Ri.get(e):r==null?void 0:r.get($e.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Wr.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=R.node(e,t.path),n=$e.toDOMNode(e,r),a;R.void(e,{at:t})&&(t={path:t.path,offset:0});for(var i="[data-slate-string], [data-slate-zero-width]",c=Array.from(n.querySelectorAll(i)),u=0,f=0;f<c.length;f++){var d=c[f],m=d.childNodes[0];if(!(m==null||m.textContent==null)){var{length:g}=m.textContent,v=d.getAttribute("data-slate-length"),w=v==null?g:parseInt(v,10),x=u+w,C=c[f+1];if(t.offset===x&&C!==null&&C!==void 0&&C.hasAttribute("data-slate-mark-placeholder")){var p,A=C.childNodes[0];a=[A instanceof G8?A:C,(p=C.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")?1:0];break}if(t.offset<=x){var B=Math.min(g,Math.max(0,t.offset-u));a=[m,B];break}u=x}}if(!a)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Wr.stringify(t)));return a},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,a=Ne.isBackward(t),i=$e.toDOMPoint(e,r),c=Ne.isCollapsed(t)?i:$e.toDOMPoint(e,n),u=$e.getWindow(e),f=u.document.createRange(),[d,m]=a?c:i,[g,v]=a?i:c,w=Dn(d)?d:d.parentElement,x=!!w.getAttribute("data-slate-zero-width"),C=Dn(g)?g:g.parentElement,p=!!C.getAttribute("data-slate-zero-width");return f.setStart(d,x?1:m),f.setEnd(g,p?1:v),f},toSlateNode:(e,t)=>{var r=Dn(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Go.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:a,searchDirection:i="backward"}=r,[c,u]=n?t:X8(t),f=c.parentNode,d=null,m=0;if(f){var g,v,w=$e.toDOMNode(e,e),x=f.closest('[data-slate-void="true"]'),C=x&&w.contains(x)?x:null,p=f.closest('[contenteditable="false"]'),A=p&&w.contains(p)?p:null,B=f.closest("[data-slate-leaf]"),E=null;if(B){if(d=B.closest('[data-slate-node="text"]'),d){var T=$e.getWindow(e),F=T.document.createRange();F.setStart(d,0),F.setEnd(c,u);var P=F.cloneContents(),S=[...Array.prototype.slice.call(P.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(P.querySelectorAll("[contenteditable=false]"))];S.forEach(ke=>{if(tn&&!n&&ke.hasAttribute("data-slate-zero-width")&&ke.textContent.length>0&&ke.textContext!=="\uFEFF"){ke.textContent.startsWith("\uFEFF")&&(ke.textContent=ke.textContent.slice(1));return}ke.parentNode.removeChild(ke)}),m=P.textContent.length,E=d}}else if(C){for(var L=C.querySelectorAll("[data-slate-leaf]"),O=0;O<L.length;O++){var W=L[O];if($e.hasDOMNode(e,W)){B=W;break}}B?(d=B.closest('[data-slate-node="text"]'),E=B,m=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(ke=>{m-=ke.textContent.length})):m=1}else if(A){var j=ke=>ke?ke.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],Y=A.closest('[data-slate-node="element"]');if(i==="forward"){var Z,_=[...j(Y),...j(Y==null?void 0:Y.nextElementSibling)];B=(Z=_.find(ke=>nb(A,ke)))!==null&&Z!==void 0?Z:null}else{var H,V=[...j(Y==null?void 0:Y.previousElementSibling),...j(Y)];B=(H=V.findLast(ke=>eh(A,ke)))!==null&&H!==void 0?H:null}B&&(d=B.closest('[data-slate-node="text"]'),E=B,i==="forward"?m=0:(m=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(ke=>{m-=ke.textContent.length})))}E&&m===E.textContent.length&&tn&&E.getAttribute("data-slate-zero-width")==="z"&&(g=E.textContent)!==null&&g!==void 0&&g.startsWith("\uFEFF")&&(f.hasAttribute("data-slate-zero-width")||Ya&&(v=E.textContent)!==null&&v!==void 0&&v.endsWith(`
|
|
78
|
-
|
|
79
|
-
`))&&m--}if(tn&&!d&&!n){var G=f.hasAttribute("data-slate-node")?f:f.closest("[data-slate-node]");if(G&&$e.hasDOMNode(e,G,{editable:!0})){var te=$e.toSlateNode(e,G),{path:K,offset:X}=R.start(e,$e.findPath(e,te));return G.querySelector("[data-slate-leaf]")||(X=u),{path:K,offset:X}}}if(!d){if(a)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var ye=$e.toSlateNode(e,d),xe=$e.findPath(e,ye);return{path:xe,offset:m}},toSlateRange:(e,t,r)=>{var n,{exactMatch:a,suppressThrow:i}=r,c=F0(t)?t.anchorNode:t.startContainer,u,f,d,m,g;if(c)if(F0(t)){if(Ya&&t.rangeCount>1){d=t.focusNode;var v=t.getRangeAt(0),w=t.getRangeAt(t.rangeCount-1);if(d instanceof HTMLTableRowElement&&v.startContainer instanceof HTMLTableRowElement&&w.startContainer instanceof HTMLTableRowElement){let P=function(S){return S.childElementCount>0?P(S.children[0]):S};var x=v.startContainer,C=w.startContainer,p=P(x.children[v.startOffset]),A=P(C.children[w.startOffset]);m=0,A.childNodes.length>0?u=A.childNodes[0]:u=A,p.childNodes.length>0?d=p.childNodes[0]:d=p,A instanceof HTMLElement?f=A.innerHTML.length:f=0}else v.startContainer===d?(u=w.endContainer,f=w.endOffset,m=v.startOffset):(u=v.startContainer,f=v.endOffset,m=w.startOffset)}else u=t.anchorNode,f=t.anchorOffset,d=t.focusNode,m=t.focusOffset;xp&&Q8(u)||Ya?g=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:g=t.isCollapsed}else u=t.startContainer,f=t.startOffset,d=t.endContainer,m=t.endOffset,g=t.collapsed;if(u==null||d==null||f==null||m==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Ya&&(n=d.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
80
|
-
|
|
81
|
-
`)&&m===d.textContent.length&&m--;var B=$e.toSlatePoint(e,[u,f],{exactMatch:a,suppressThrow:i});if(!B)return null;var E=eh(u,d)||u===d&&m<f,T=g?B:$e.toSlatePoint(e,[d,m],{exactMatch:a,suppressThrow:i,searchDirection:E?"forward":"backward"});if(!T)return null;var F={anchor:B,focus:T};return Ne.isExpanded(F)&&Ne.isForward(F)&&Dn(d)&&R.void(e,{at:F.focus,mode:"highest"})&&(F=R.unhangRange(e,F,{voids:!0})),F}};function ib(e,t){var{path:r,diff:n}=t;if(!R.hasPath(e,r))return!1;var a=Qe.get(e,r);if(!ht.isText(a))return!1;if(n.start!==a.text.length||n.text.length===0)return a.text.slice(n.start,n.start+n.text.length)===n.text;var i=ie.next(r);if(!R.hasPath(e,i))return!1;var c=Qe.get(e,i);return ht.isText(c)&&c.text.startsWith(n.text)}function Bp(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((a,i)=>a.slice(0,i.start)+i.text+a.slice(i.end),e)}function sb(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 lb(e,t,r){for(var n=Math.min(e.length,t.length,r),a=0;a<n;a++)if(e.charAt(e.length-a-1)!==t.charAt(t.length-a-1))return a;return n}function Fp(e,t){var{start:r,end:n,text:a}=t,i=e.slice(r,n),c=sb(i,a),u=Math.min(i.length-c,a.length-c),f=lb(i,a,u),d={start:r+c,end:n-f,text:a.slice(c,a.length-f)};return d.start===d.end&&d.text.length===0?null:d}function ub(e,t,r){var n=Math.min(t.start,r.start),a=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),i=Bp(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)-a),u=i.slice(n,c),f=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return Fp(e,{start:n,end:f,text:u})}function cb(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function N0(e,t){var{path:r,offset:n}=t;if(!R.hasPath(e,r))return null;var a=Qe.get(e,r);if(!ht.isText(a))return null;var i=R.above(e,{match:u=>pt.isElement(u)&&R.isBlock(e,u),at:r});if(!i)return null;for(;n>a.text.length;){var c=R.next(e,{at:r,match:ht.isText});if(!c||!ie.isDescendant(c[1],i[1]))return null;n-=a.text.length,a=c[0],r=c[1]}return{path:r,offset:n}}function th(e,t){var r=N0(e,t.anchor);if(!r)return null;if(Ne.isCollapsed(t))return{anchor:r,focus:r};var n=N0(e,t.focus);return n?{anchor:r,focus:n}:null}function T0(e,t,r){var n=ln.get(e),a=n==null?void 0:n.find(m=>{var{path:g}=m;return ie.equals(g,t.path)});if(!a||t.offset<=a.diff.start)return Gt.transform(t,r,{affinity:"backward"});var{diff:i}=a;if(t.offset<=i.start+i.text.length){var c={path:t.path,offset:i.start},u=Gt.transform(c,r,{affinity:"backward"});return u?{path:u.path,offset:u.offset+t.offset-i.start}:null}var f={path:t.path,offset:t.offset-i.text.length+i.end-i.start},d=Gt.transform(f,r,{affinity:"backward"});return d?r.type==="split_node"&&ie.equals(r.path,t.path)&&f.offset<r.position&&i.start<r.position?d:{path:d.path,offset:d.offset+i.text.length-i.end+i.start}:null}function rh(e,t,r){var n=T0(e,t.anchor,r);if(!n)return null;if(Ne.isCollapsed(t))return{anchor:n,focus:n};var a=T0(e,t.focus,r);return a?{anchor:n,focus:a}:null}function db(e,t){var{path:r,diff:n,id:a}=e;switch(t.type){case"insert_text":return!ie.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:a,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:a,path:r};case"remove_text":return!ie.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:a,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:a,path:r};case"split_node":return!ie.equals(t.path,r)||t.position>=n.end?{diff:n,id:a,path:ie.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:a,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:a,path:ie.transform(r,t,{affinity:"forward"})};case"merge_node":return ie.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:a,path:ie.transform(r,t)}:{diff:n,id:a,path:ie.transform(r,t)}}var i=ie.transform(r,t);return i?{diff:n,path:i,id:a}:null}function nh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ai(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){kn(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 fb=25,hb=200,pb=function(){},mb=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function gb(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,a=!1,i=null,c=null,u=null,f=0,d=!1,m=()=>{var Y=ha.get(t);if(ha.delete(t),Y){var{selection:Z}=t,_=th(t,Y);_&&(!Z||!Ne.equals(_,Z))&&Ke.select(t,_)}},g=()=>{var Y=fa.get(t);if(fa.delete(t),!!Y){if(Y.at){var Z=Gt.isPoint(Y.at)?N0(t,Y.at):th(t,Y.at);if(!Z)return;var _=R.range(t,Z);(!t.selection||!Ne.equals(t.selection,_))&&Ke.select(t,Z)}Y.run()}},v=()=>{if(c&&(clearTimeout(c),c=null),u&&(clearTimeout(u),u=null),!T()&&!E()){m();return}a||(a=!0,setTimeout(()=>a=!1)),E()&&(a="action");var Y=t.selection&&R.rangeRef(t,t.selection,{affinity:"forward"});Qn.set(t,t.marks),pb("flush",fa.get(t),ln.get(t));for(var Z=T(),_;_=(H=ln.get(t))===null||H===void 0?void 0:H[0];){var H,V,G=Tn.get(t);G!==void 0&&(Tn.delete(t),t.marks=G),G&&d===!1&&(d=null);var te=cb(_);(!t.selection||!Ne.equals(t.selection,te))&&Ke.select(t,te),_.diff.text?R.insertText(t,_.diff.text):R.deleteFragment(t),ln.set(t,(V=ln.get(t))===null||V===void 0?void 0:V.filter(ye=>{var{id:xe}=ye;return xe!==_.id})),ib(t,_)||(Z=!1,fa.delete(t),Qn.delete(t),a="action",ha.delete(t),r.cancel(),n.cancel(),Y==null||Y.unref())}var K=Y==null?void 0:Y.unref();if(K&&!ha.get(t)&&(!t.selection||!Ne.equals(K,t.selection))&&Ke.select(t,K),E()){g();return}Z&&r(),r.flush(),n.flush(),m();var X=Qn.get(t);Qn.delete(t),X!==void 0&&(t.marks=X,t.onChange())},w=Y=>{i&&clearTimeout(i),i=setTimeout(()=>{Aa.set(t,!1),v()},fb)},x=Y=>{Aa.set(t,!0),i&&(clearTimeout(i),i=null)},C=function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Z=S0.get(t);if(Z){if(T()||Y){Z.style.display="none";return}Z.style.removeProperty("display")}},p=(Y,Z)=>{var _,H=(_=ln.get(t))!==null&&_!==void 0?_:[];ln.set(t,H);var V=Qe.leaf(t,Y),G=H.findIndex(X=>ie.equals(X.path,Y));if(G<0){var te=Fp(V.text,Z);te&&H.push({path:Y,diff:Z,id:f++}),C();return}var K=ub(V.text,H[G].diff,Z);if(!K){H.splice(G,1),C();return}H[G]=Ai(Ai({},H[G]),{},{diff:K})},A=function(Y){var{at:Z}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};d=!1,ha.delete(t),r.cancel(),n.cancel(),E()&&v(),fa.set(t,{at:Z,run:Y}),u=setTimeout(v)},B=Y=>{var Z;if(c&&(clearTimeout(c),c=null),!to.get(t)){var{inputType:_}=Y,H=null,V=Y.dataTransfer||Y.data||void 0;d!==!1&&_!=="insertText"&&_!=="insertCompositionText"&&(d=!1);var[G]=Y.getTargetRanges();G&&(H=$e.toSlateRange(t,G,{exactMatch:!1,suppressThrow:!0}));var te=$e.getWindow(t),K=te.getSelection();if(!H&&K&&(G=K,H=$e.toSlateRange(t,K,{exactMatch:!1,suppressThrow:!0})),H=(Z=H)!==null&&Z!==void 0?Z:t.selection,!!H){var X=!0;if(_.startsWith("delete")){if(Ne.isExpanded(H)){var[ye,xe]=Ne.edges(H),ke=Qe.leaf(t,ye.path);if(ke.text.length===ye.offset&&xe.offset===0){var Be=R.next(t,{at:ye.path,match:ht.isText});Be&&ie.equals(Be[1],xe.path)&&(H={anchor:xe,focus:xe})}}var _e=_.endsWith("Backward")?"backward":"forward",[Q,oe]=Ne.edges(H),[ue,le]=R.leaf(t,Q.path),Se={text:"",start:Q.offset,end:oe.offset},Fe=ln.get(t),me=Fe==null?void 0:Fe.find(Ct=>ie.equals(Ct.path,le)),we=me?[me.diff,Se]:[Se],De=Bp(ue.text,...we);if(De.length===0&&(X=!1),Ne.isExpanded(H)){if(X&&ie.equals(H.anchor.path,H.focus.path)){var Te={path:H.anchor.path,offset:Q.offset},be=R.range(t,Te,Te);return S(be),p(H.anchor.path,{text:"",end:oe.offset,start:Q.offset})}return A(()=>R.deleteFragment(t,{direction:_e}),{at:H})}}switch(_){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return A(()=>R.deleteFragment(t),{at:H});case"deleteContent":case"deleteContentForward":{var{anchor:Ae}=H;if(X&&Ne.isCollapsed(H)){var Le=Qe.leaf(t,Ae.path);if(Ae.offset<Le.text.length)return p(Ae.path,{text:"",start:Ae.offset,end:Ae.offset+1})}return A(()=>R.deleteForward(t),{at:H})}case"deleteContentBackward":{var ut,{anchor:ot}=H,Oe=F0(G)?G.isCollapsed:!!((ut=G)!==null&&ut!==void 0&&ut.collapsed);return X&&Oe&&Ne.isCollapsed(H)&&ot.offset>0?p(ot.path,{text:"",start:ot.offset-1,end:ot.offset}):A(()=>R.deleteBackward(t),{at:H})}case"deleteEntireSoftLine":return A(()=>{R.deleteBackward(t,{unit:"line"}),R.deleteForward(t,{unit:"line"})},{at:H});case"deleteHardLineBackward":return A(()=>R.deleteBackward(t,{unit:"block"}),{at:H});case"deleteSoftLineBackward":return A(()=>R.deleteBackward(t,{unit:"line"}),{at:H});case"deleteHardLineForward":return A(()=>R.deleteForward(t,{unit:"block"}),{at:H});case"deleteSoftLineForward":return A(()=>R.deleteForward(t,{unit:"line"}),{at:H});case"deleteWordBackward":return A(()=>R.deleteBackward(t,{unit:"word"}),{at:H});case"deleteWordForward":return A(()=>R.deleteForward(t,{unit:"word"}),{at:H});case"insertLineBreak":return A(()=>R.insertSoftBreak(t),{at:H});case"insertParagraph":return A(()=>R.insertBreak(t),{at:H});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(mb(V))return A(()=>$e.insertData(t,V),{at:H});var Ie=V??"";if(Tn.get(t)&&(Ie=Ie.replace("\uFEFF","")),_==="insertText"&&/.*\n.*\n$/.test(Ie)&&(Ie=Ie.slice(0,-1)),Ie.includes(`
|
|
82
|
-
`))return A(()=>{var Ct=Ie.split(`
|
|
83
|
-
`);Ct.forEach((At,$t)=>{At&&R.insertText(t,At),$t!==Ct.length-1&&R.insertSoftBreak(t)})},{at:H});if(ie.equals(H.anchor.path,H.focus.path)){var[Ge,dt]=Ne.edges(H),Je={start:Ge.offset,end:dt.offset,text:Ie};if(Ie&&d&&_==="insertCompositionText"){var at=d.start+d.text.search(/\S|$/),Lt=Je.start+Je.text.search(/\S|$/);Lt===at+1&&Je.end===d.start+d.text.length?(Je.start-=1,d=null,W()):d=!1}else _==="insertText"?d===null?d=Je:d&&Ne.isCollapsed(H)&&d.end+d.text.length===Ge.offset?d=Ai(Ai({},d),{},{text:d.text+Ie}):d=!1:d=!1;if(X){p(Ge.path,Je);return}}return A(()=>R.insertText(t,Ie),{at:H})}}}}},E=()=>!!fa.get(t),T=()=>{var Y;return!!((Y=ln.get(t))!==null&&Y!==void 0&&Y.length)},F=()=>E()||T(),P=()=>a,S=Y=>{ha.set(t,Y),c&&(clearTimeout(c),c=null);var{selection:Z}=t;if(Y){var _=!Z||!ie.equals(Z.anchor.path,Y.anchor.path),H=!Z||!ie.equals(Z.anchor.path.slice(0,-1),Y.anchor.path.slice(0,-1));(_&&d||H)&&(d=!1),(_||T())&&(c=setTimeout(v,hb))}},L=()=>{(E()||!T())&&v()},O=Y=>{T()||(C(!0),setTimeout(C))},W=()=>{E()||(u=setTimeout(v))},j=Y=>{if(!(T()||E())&&Y.some(_=>ku(t,_,Y))){var Z;(Z=Cp.get(t))===null||Z===void 0||Z()}};return{flush:v,scheduleFlush:W,hasPendingDiffs:T,hasPendingAction:E,hasPendingChanges:F,isFlushing:P,handleUserSelect:S,handleCompositionEnd:w,handleCompositionStart:x,handleDOMBeforeInput:B,handleKeyDown:O,handleDomMutations:j,handleInput:L}}function vb(){var e=Kt(!1);return Qt(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var Yo=Mi?Sg:Qt;function bb(e,t,r){var[n]=St(()=>new MutationObserver(t));Yo(()=>{n.takeRecords()}),Qt(()=>{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 yb=["node"];function ah(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function xb(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){kn(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 wb={subtree:!0,childList:!0,characterData:!0},Cb=tn?e=>{var{node:t}=e,r=oo(e,yb);if(!tn)return null;var n=Da(),a=vb(),[i]=St(()=>gb(xb({editor:n},r)));return bb(t,i.handleDomMutations,wb),Cu.set(n,i.scheduleFlush),a&&i.flush(),i}:()=>null,Db=["anchor","focus"],kb=["anchor","focus"],Eb=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),Np=(e,t)=>{var r=oo(e,Db),n=oo(t,kb);return e[io]===t[io]&&Eb(r,n)},Sb=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],a=t[r];if(!Ne.equals(n,a)||!Np(n,a))return!1}return!0},Ab=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],a=t[r];if(n.anchor.offset!==a.anchor.offset||n.focus.offset!==a.focus.offset||!Np(n,a))return!1}return!0};function oh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oh(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Fb=e=>{var{isLast:t,leaf:r,parent:n,text:a}=e,i=Da(),c=$e.findPath(i,a),u=ie.parent(c),f=!!r[Dp];return i.isVoid(n)?We.createElement(Rl,{length:Qe.string(n).length}):r.text===""&&n.children[n.children.length-1]===a&&!i.isInline(n)&&R.string(i,u)===""?We.createElement(Rl,{isLineBreak:!0,isMarkPlaceholder:f}):r.text===""?We.createElement(Rl,{isMarkPlaceholder:f}):t&&r.text.slice(-1)===`
|
|
84
|
-
`?We.createElement(ih,{isTrailing:!0,text:r.text}):We.createElement(ih,{text:r.text})},ih=e=>{var{text:t,isTrailing:r=!1}=e,n=Kt(null),a=()=>"".concat(t??"").concat(r?`
|
|
85
|
-
`:""),[i]=St(a);return Yo(()=>{var c=a();n.current&&n.current.textContent!==c&&(n.current.textContent=c)}),We.createElement(Nb,{ref:n},i)},Nb=Fg(Jo((e,t)=>We.createElement("span",{"data-slate-string":!0,ref:t},e.children))),Rl=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,a={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(a["data-slate-mark-placeholder"]=!0),We.createElement("span",Bb({},a),!(tn||yp)||!r?"\uFEFF":null,r?We.createElement("br",null):null)};function sh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sh(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tb=tn?300:0;function Ob(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function lh(e){e.current&&(clearTimeout(e.current),e.current=null)}var $b=e=>{var{leaf:t,isLast:r,text:n,parent:a,renderPlaceholder:i,renderLeaf:c=B=>We.createElement(Mb,Tp({},B))}=e,u=Da(),f=Kt(null),d=Kt(null),[m,g]=St(!1),v=Kt(null),w=Tt(B=>{if(Ob(f,B==null),B==null){var E;S0.delete(u),(E=t.onPlaceholderResize)===null||E===void 0||E.call(t,null)}else{if(S0.set(u,B),!f.current){var T=window.ResizeObserver||z8;f.current=new T(()=>{var F;(F=t.onPlaceholderResize)===null||F===void 0||F.call(t,B)})}f.current.observe(B),d.current=B}},[d,t,u]),x=We.createElement(Fb,{isLast:r,leaf:t,parent:a,text:n}),C=!!t[io];if(Qt(()=>(C?v.current||(v.current=setTimeout(()=>{g(!0),v.current=null},Tb)):(lh(v),g(!1)),()=>lh(v)),[C,g]),C&&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:Sa?"inherit":void 0},contentEditable:!1,ref:w}};x=We.createElement(We.Fragment,null,i(p),x)}var A={"data-slate-leaf":!0};return c({attributes:A,children:x,leaf:t,text:n})},Pb=We.memo($b,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&ht.equals(t.leaf,e.leaf)&&t.leaf[io]===e.leaf[io]),Mb=e=>{var{attributes:t,children:r}=e;return We.createElement("span",Tp({},t),r)},Rb=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:a,renderLeaf:i,text:c}=e,u=Da(),f=Kt(null),d=ht.decorations(c,t),m=$e.findKey(u,c),g=[],v=0;v<d.length;v++){var w=d[v];g.push(We.createElement(Pb,{isLast:r&&v===d.length-1,key:"".concat(m.id,"-").concat(v),renderPlaceholder:a,leaf:w,text:c,parent:n,renderLeaf:i}))}var x=Tt(C=>{var p=bs.get(u);C?(p==null||p.set(m,C),Ta.set(c,C),Go.set(C,c)):(p==null||p.delete(m),Ta.delete(c),f.current&&Go.delete(f.current)),f.current=C},[f,u,m,c]);return We.createElement("span",{"data-slate-node":"text",ref:x},g)},Op=We.memo(Rb,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Ab(t.decorations,e.decorations));function uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function O0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uh(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zb=e=>{var{decorations:t,element:r,renderElement:n=B=>We.createElement(jb,O0({},B)),renderPlaceholder:a,renderLeaf:i,selection:c}=e,u=Da(),f=qb(),d=u.isInline(r),m=$e.findKey(u,r),g=Tt(B=>{var E=bs.get(u);B?(E==null||E.set(m,B),Ta.set(r,B),Go.set(B,r)):(E==null||E.delete(m),Ta.delete(r))},[u,m,r]),v=Pp({decorations:t,node:r,renderElement:n,renderPlaceholder:a,renderLeaf:i,selection:c}),w={"data-slate-node":"element",ref:g};if(d&&(w["data-slate-inline"]=!0),!d&&R.hasInlines(u,r)){var x=Qe.string(r),C=lp(x);C==="rtl"&&(w.dir=C)}if(R.isVoid(u,r)){w["data-slate-void"]=!0,!f&&d&&(w.contentEditable=!1);var p=d?"span":"div",[[A]]=Qe.texts(r);v=We.createElement(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},We.createElement(Op,{renderPlaceholder:a,decorations:[],isLast:!1,parent:r,text:A})),xu.set(A,0),wu.set(A,r)}return n({attributes:w,children:v,element:r})},Ib=We.memo(zb,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&Sb(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&Ne.equals(e.selection,t.selection))),jb=e=>{var{attributes:t,children:r,element:n}=e,a=Da(),i=a.isInline(n)?"span":"div";return We.createElement(i,O0(O0({},t),{},{style:{position:"relative"}}),r)},$p=Ca(()=>[]),Lb=()=>wa($p),_b=Ca(!1),Pp=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:a,renderLeaf:i,selection:c}=e,u=Lb(),f=Da();to.set(f,!1);for(var d=$e.findPath(f,r),m=[],g=pt.isElement(r)&&!f.isInline(r)&&R.hasInlines(f,r),v=0;v<r.children.length;v++){var w=d.concat(v),x=r.children[v],C=$e.findKey(f,x),p=R.range(f,w),A=c&&Ne.intersection(p,c),B=u([x,w]);for(var E of t){var T=Ne.intersection(E,p);T&&B.push(T)}pt.isElement(x)?m.push(We.createElement(_b.Provider,{key:"provider-".concat(C.id),value:!!A},We.createElement(Ib,{decorations:B,element:x,key:C.id,renderElement:n,renderPlaceholder:a,renderLeaf:i,selection:A}))):m.push(We.createElement(Op,{decorations:B,key:C.id,isLast:g&&v===r.children.length-1,parent:r,renderPlaceholder:a,renderLeaf:i,text:x})),xu.set(x,v),wu.set(x,r)}return m},Mp=Ca(!1),qb=()=>wa(Mp),Rp=Ca(null),zp=()=>{var e=wa(Rp);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function Hb(){var e=Da(),t=Kt(!1),r=Kt(0),n=Tt(()=>{if(!t.current){t.current=!0;var a=$e.getWindow(e);a.cancelAnimationFrame(r.current),r.current=a.requestAnimationFrame(()=>{t.current=!1})}},[e]);return Qt(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var Kb=3,Wb={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"},Vb={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"},Ub={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Sr=e=>{var t=Wb[e],r=Vb[e],n=Ub[e],a=t&&$l.isHotkey(t),i=r&&$l.isHotkey(r),c=n&&$l.isHotkey(n);return u=>!!(a&&a(u)||Jf&&i&&i(u)||!Jf&&c&&c(u))},Br={isBold:Sr("bold"),isCompose:Sr("compose"),isMoveBackward:Sr("moveBackward"),isMoveForward:Sr("moveForward"),isDeleteBackward:Sr("deleteBackward"),isDeleteForward:Sr("deleteForward"),isDeleteLineBackward:Sr("deleteLineBackward"),isDeleteLineForward:Sr("deleteLineForward"),isDeleteWordBackward:Sr("deleteWordBackward"),isDeleteWordForward:Sr("deleteWordForward"),isExtendBackward:Sr("extendBackward"),isExtendForward:Sr("extendForward"),isExtendLineBackward:Sr("extendLineBackward"),isExtendLineForward:Sr("extendLineForward"),isItalic:Sr("italic"),isMoveLineBackward:Sr("moveLineBackward"),isMoveLineForward:Sr("moveLineForward"),isMoveWordBackward:Sr("moveWordBackward"),isMoveWordForward:Sr("moveWordForward"),isRedo:Sr("redo"),isSoftBreak:Sr("insertSoftBreak"),isSplitBlock:Sr("splitBlock"),isTransposeCharacter:Sr("transposeCharacter"),isUndo:Sr("undo")},Gb=(e,t)=>{var r=[],n=()=>{r=[]},a=c=>{if(t.current){var u=c.filter(f=>ku(e,f,c));r.push(...u)}};function i(){r.length>0&&(r.reverse().forEach(c=>{c.type!=="characterData"&&(c.removedNodes.forEach(u=>{c.target.insertBefore(u,c.nextSibling)}),c.addedNodes.forEach(u=>{c.target.removeChild(u)}))}),n())}return{registerMutations:a,restoreDOM:i,clear:n}},Yb={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class Ip extends Bg{constructor(){super(...arguments),kn(this,"context",null),kn(this,"manager",null),kn(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,Yb)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=Gb(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,a=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(a!=null&&a.length){var i;(i=this.manager)===null||i===void 0||i.registerMutations(a)}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}}kn(Ip,"contextType",yu);var Zb=tn?Ip:e=>{var{children:t}=e;return We.createElement(We.Fragment,null,t)},Xb=Ca(!1),Qb=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Jb=["text"];function ch(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _n(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){kn(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 ey=e=>We.createElement(We.Fragment,null,Pp(e)),zl=Jo((e,t)=>{var r=Tt(Q=>We.createElement(ty,_n({},Q)),[]),{autoFocus:n,decorate:a=ry,onDOMBeforeInput:i,placeholder:c,readOnly:u=!1,renderElement:f,renderLeaf:d,renderPlaceholder:m=r,scrollSelectionIntoView:g=ny,style:v={},as:w="div",disableDefaultStyles:x=!1}=e,C=oo(e,Qb),p=zp(),[A,B]=St(!1),E=Kt(null),T=Kt([]),[F,P]=St(),S=Kt(!1),{onUserInput:L,receivedUserInput:O}=Hb(),[,W]=Ag(Q=>Q+1,0);Cp.set(p,W),A0.set(p,u);var j=mt(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Qt(()=>{E.current&&n&&E.current.focus()},[n]);var Y=Kt(),Z=mt(()=>h8(()=>{if(to.get(p)){Z();return}var Q=$e.toDOMNode(p,p),oe=Q.getRootNode();if(!S.current&&Sa&&oe instanceof ShadowRoot){S.current=!0;var ue=rb();ue?document.execCommand("indent"):Ke.deselect(p),S.current=!1;return}var le=Y.current;if((tn||!$e.isComposing(p))&&(!j.isUpdatingSelection||le!=null&&le.isFlushing())&&!j.isDraggingInternally){var Se=$e.findDocumentOrShadowRoot(p),{activeElement:Fe}=Se,me=$e.toDOMNode(p,p),we=zo(Se);if(Fe===me?(j.latestElement=Fe,ga.set(p,!0)):ga.delete(p),!we)return Ke.deselect(p);var{anchorNode:De,focusNode:Te}=we,be=$e.hasEditableTarget(p,De)||$e.isTargetInsideNonReadonlyVoid(p,De),Ae=$e.hasTarget(p,Te);if(be&&Ae){var Le=$e.toSlateRange(p,we,{exactMatch:!1,suppressThrow:!0});Le&&(!$e.isComposing(p)&&!(le!=null&&le.hasPendingChanges())&&!(le!=null&&le.isFlushing())?Ke.select(p,Le):le==null||le.handleUserSelect(Le))}u&&(!be||!Ae)&&Ke.deselect(p)}},100),[p,u,j]),_=mt(()=>c8(Z,0),[Z]);Y.current=Cb({node:E,onDOMSelectionChange:Z,scheduleOnDOMSelectionChange:_}),Yo(()=>{var Q,oe,ue;E.current&&(ue=Du(E.current))?(wp.set(p,ue),Ri.set(p,E.current),Ta.set(p,E.current),Go.set(E.current,p)):Ta.delete(p);var{selection:le}=p,Se=$e.findDocumentOrShadowRoot(p),Fe=zo(Se);if(!(!Fe||!$e.isFocused(p)||(Q=Y.current)!==null&&Q!==void 0&&Q.hasPendingAction())){var me=be=>{var Ae=Fe.type!=="None";if(!(!le&&!Ae)){var Le=Fe.focusNode,ut;if(Ya&&Fe.rangeCount>1){var ot=Fe.getRangeAt(0),Oe=Fe.getRangeAt(Fe.rangeCount-1);ot.startContainer===Le?ut=Oe.endContainer:ut=ot.startContainer}else ut=Fe.anchorNode;var Ie=Ri.get(p),Ge=!1;if(Ie.contains(ut)&&Ie.contains(Le)&&(Ge=!0),Ae&&Ge&&le&&!be){var dt=$e.toSlateRange(p,Fe,{exactMatch:!0,suppressThrow:!0});if(dt&&Ne.equals(dt,le)){var Je;if(!j.hasMarkPlaceholder||(Je=ut)!==null&&Je!==void 0&&(Je=Je.parentElement)!==null&&Je!==void 0&&Je.hasAttribute("data-slate-mark-placeholder"))return}}if(le&&!$e.hasRange(p,le)){p.selection=$e.toSlateRange(p,Fe,{exactMatch:!1,suppressThrow:!0});return}j.isUpdatingSelection=!0;var at=le&&$e.toDOMRange(p,le);return at?($e.isComposing(p)&&!tn?Fe.collapseToEnd():Ne.isBackward(le)?Fe.setBaseAndExtent(at.endContainer,at.endOffset,at.startContainer,at.startOffset):Fe.setBaseAndExtent(at.startContainer,at.startOffset,at.endContainer,at.endOffset),g(p,at)):Fe.removeAllRanges(),at}};Fe.rangeCount<=1&&me();var we=((oe=Y.current)===null||oe===void 0?void 0:oe.isFlushing())==="action";if(!tn||!we){setTimeout(()=>{j.isUpdatingSelection=!1});return}var De=null,Te=requestAnimationFrame(()=>{if(we){var be=Ae=>{try{var Le=$e.toDOMNode(p,p);Le.focus(),me(Ae)}catch{}};be(),De=setTimeout(()=>{be(!0),j.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Te),De&&clearTimeout(De)}}});var H=Tt(Q=>{var oe=$e.toDOMNode(p,p),ue=oe.getRootNode();if(S!=null&&S.current&&Sa&&ue instanceof ShadowRoot){var le=Q.getTargetRanges(),Se=le[0],Fe=new window.Range;Fe.setStart(Se.startContainer,Se.startOffset),Fe.setEnd(Se.endContainer,Se.endOffset);var me=$e.toSlateRange(p,Fe,{exactMatch:!1,suppressThrow:!1});Ke.select(p,me),Q.preventDefault(),Q.stopImmediatePropagation();return}if(L(),!u&&$e.hasEditableTarget(p,Q.target)&&!ay(Q,i)){var we;if(Y.current)return Y.current.handleDOMBeforeInput(Q);_.flush(),Z.flush();var{selection:De}=p,{inputType:Te}=Q,be=Q.dataTransfer||Q.data||void 0,Ae=Te==="insertCompositionText"||Te==="deleteCompositionText";if(Ae&&$e.isComposing(p))return;var Le=!1;if(Te==="insertText"&&De&&Ne.isCollapsed(De)&&Q.data&&Q.data.length===1&&/[a-z ]/i.test(Q.data)&&De.anchor.offset!==0&&(Le=!0,p.marks&&(Le=!1),!to.get(p))){var ut,ot,{anchor:Oe}=De,[Ie,Ge]=$e.toDOMPoint(p,Oe),dt=(ut=Ie.parentElement)===null||ut===void 0?void 0:ut.closest("a"),Je=$e.getWindow(p);if(Le&&dt&&$e.hasDOMNode(p,dt)){var at,Lt=Je==null?void 0:Je.document.createTreeWalker(dt,NodeFilter.SHOW_TEXT).lastChild();Lt===Ie&&((at=Lt.textContent)===null||at===void 0?void 0:at.length)===Ge&&(Le=!1)}if(Le&&Ie.parentElement&&(Je==null||(ot=Je.getComputedStyle(Ie.parentElement))===null||ot===void 0?void 0:ot.whiteSpace)==="pre"){var Ct=R.above(p,{at:Oe.path,match:_t=>pt.isElement(_t)&&R.isBlock(p,_t)});Ct&&Qe.string(Ct[0]).includes(" ")&&(Le=!1)}}if((!Te.startsWith("delete")||Te.startsWith("deleteBy"))&&!to.get(p)){var[At]=Q.getTargetRanges();if(At){var $t=$e.toSlateRange(p,At,{exactMatch:!1,suppressThrow:!1});if(!De||!Ne.equals(De,$t)){Le=!1;var je=!Ae&&p.selection&&R.rangeRef(p,p.selection);Ke.select(p,$t),je&&Ro.set(p,je)}}}if(Ae)return;if(Le||Q.preventDefault(),De&&Ne.isExpanded(De)&&Te.startsWith("delete")){var fe=Te.endsWith("Backward")?"backward":"forward";R.deleteFragment(p,{direction:fe});return}switch(Te){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":{Te==="insertFromComposition"&&$e.isComposing(p)&&(B(!1),Aa.set(p,!1)),(be==null?void 0:be.constructor.name)==="DataTransfer"?$e.insertData(p,be):typeof be=="string"&&(Le?T.current.push(()=>R.insertText(p,be)):R.insertText(p,be));break}}var lt=(we=Ro.get(p))===null||we===void 0?void 0:we.unref();Ro.delete(p),lt&&(!p.selection||!Ne.equals(p.selection,lt))&&Ke.select(p,lt)}},[p,Z,L,i,u,_]),V=Tt(Q=>{Q==null?(Z.cancel(),_.cancel(),Ri.delete(p),Ta.delete(p),E.current&&la&&E.current.removeEventListener("beforeinput",H)):la&&Q.addEventListener("beforeinput",H),E.current=Q,typeof t=="function"?t(Q):t&&(t.current=Q)},[Z,_,p,H,t]);Yo(()=>{var Q=$e.getWindow(p);Q.document.addEventListener("selectionchange",_);var oe=()=>{j.isDraggingInternally=!1};return Q.document.addEventListener("dragend",oe),Q.document.addEventListener("drop",oe),()=>{Q.document.removeEventListener("selectionchange",_),Q.document.removeEventListener("dragend",oe),Q.document.removeEventListener("drop",oe)}},[_,j]);var G=a([p,[]]),te=c&&p.children.length===1&&Array.from(Qe.texts(p)).length===1&&Qe.string(p)===""&&!A,K=Tt(Q=>{if(Q&&te){var oe;P((oe=Q.getBoundingClientRect())===null||oe===void 0?void 0:oe.height)}else P(void 0)},[te]);if(te){var X=R.start(p,[]);G.push({[io]:!0,placeholder:c,onPlaceholderResize:K,anchor:X,focus:X})}var{marks:ye}=p;if(j.hasMarkPlaceholder=!1,p.selection&&Ne.isCollapsed(p.selection)&&ye){var{anchor:xe}=p.selection,ke=Qe.leaf(p,xe.path),Be=oo(ke,Jb);if(!ht.equals(ke,ye,{loose:!0})){j.hasMarkPlaceholder=!0;var _e=Object.fromEntries(Object.keys(Be).map(Q=>[Q,null]));G.push(_n(_n(_n({[Dp]:!0},_e),ye),{},{anchor:xe,focus:xe}))}}return Qt(()=>{setTimeout(()=>{var{selection:Q}=p;if(Q){var{anchor:oe}=Q,ue=Qe.leaf(p,oe.path);if(ye&&!ht.equals(ue,ye,{loose:!0})){Tn.set(p,ye);return}}Tn.delete(p)})}),We.createElement(Mp.Provider,{value:u},We.createElement(Xb.Provider,{value:A},We.createElement($p.Provider,{value:a},We.createElement(Zb,{node:E,receivedUserInput:O},We.createElement(w,_n(_n({role:u?void 0:"textbox","aria-multiline":u?void 0:!0},C),{},{spellCheck:la||!Mi?C.spellCheck:!1,autoCorrect:la||!Mi?C.autoCorrect:"false",autoCapitalize:la||!Mi?C.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!u,zindex:-1,suppressContentEditableWarning:!0,ref:V,style:_n(_n({},x?{}:_n({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},F?{minHeight:F}:{})),v),onBeforeInput:Tt(Q=>{if(!la&&!u&&!en(Q,C.onBeforeInput)&&$e.hasSelectableTarget(p,Q.target)&&(Q.preventDefault(),!$e.isComposing(p))){var oe=Q.data;R.insertText(p,oe)}},[C.onBeforeInput,p,u]),onInput:Tt(Q=>{if(!en(Q,C.onInput)){if(Y.current){Y.current.handleInput();return}for(var oe of T.current)oe();if(T.current=[],!$e.isFocused(p)){var ue=Q.nativeEvent,le=p;if(ue.inputType==="historyUndo"&&typeof le.undo=="function"){le.undo();return}if(ue.inputType==="historyRedo"&&typeof le.redo=="function"){le.redo();return}}}},[C.onInput,p]),onBlur:Tt(Q=>{if(!(u||j.isUpdatingSelection||!$e.hasSelectableTarget(p,Q.target)||en(Q,C.onBlur))){var oe=$e.findDocumentOrShadowRoot(p);if(j.latestElement!==oe.activeElement){var{relatedTarget:ue}=Q,le=$e.toDOMNode(p,p);if(ue!==le&&!(Dn(ue)&&ue.hasAttribute("data-slate-spacer"))){if(ue!=null&&xa(ue)&&$e.hasDOMNode(p,ue)){var Se=$e.toSlateNode(p,ue);if(pt.isElement(Se)&&!p.isVoid(Se))return}if(Sa){var Fe=zo(oe);Fe==null||Fe.removeAllRanges()}ga.delete(p)}}}},[u,j.isUpdatingSelection,j.latestElement,p,C.onBlur]),onClick:Tt(Q=>{if($e.hasTarget(p,Q.target)&&!en(Q,C.onClick)&&xa(Q.target)){var oe=$e.toSlateNode(p,Q.target),ue=$e.findPath(p,oe);if(!R.hasPath(p,ue)||Qe.get(p,ue)!==oe)return;if(Q.detail===Kb&&ue.length>=1){var le=ue;if(!(pt.isElement(oe)&&R.isBlock(p,oe))){var Se,Fe=R.above(p,{match:Le=>pt.isElement(Le)&&R.isBlock(p,Le),at:ue});le=(Se=Fe==null?void 0:Fe[1])!==null&&Se!==void 0?Se:ue.slice(0,1)}var me=R.range(p,le);Ke.select(p,me);return}if(u)return;var we=R.start(p,ue),De=R.end(p,ue),Te=R.void(p,{at:we}),be=R.void(p,{at:De});if(Te&&be&&ie.equals(Te[1],be[1])){var Ae=R.range(p,we);Ke.select(p,Ae)}}},[p,C.onClick,u]),onCompositionEnd:Tt(Q=>{if($e.hasSelectableTarget(p,Q.target)){var oe;if($e.isComposing(p)&&Promise.resolve().then(()=>{B(!1),Aa.set(p,!1)}),(oe=Y.current)===null||oe===void 0||oe.handleCompositionEnd(Q),en(Q,C.onCompositionEnd)||tn)return;if(!Sa&&!W8&&!yp&&!U8&&!V8&&Q.data){var ue=Tn.get(p);Tn.delete(p),ue!==void 0&&(Qn.set(p,p.marks),p.marks=ue),R.insertText(p,Q.data);var le=Qn.get(p);Qn.delete(p),le!==void 0&&(p.marks=le)}}},[C.onCompositionEnd,p]),onCompositionUpdate:Tt(Q=>{$e.hasSelectableTarget(p,Q.target)&&!en(Q,C.onCompositionUpdate)&&($e.isComposing(p)||(B(!0),Aa.set(p,!0)))},[C.onCompositionUpdate,p]),onCompositionStart:Tt(Q=>{if($e.hasSelectableTarget(p,Q.target)){var oe;if((oe=Y.current)===null||oe===void 0||oe.handleCompositionStart(Q),en(Q,C.onCompositionStart)||tn)return;B(!0);var{selection:ue}=p;if(ue&&Ne.isExpanded(ue)){R.deleteFragment(p);return}}},[C.onCompositionStart,p]),onCopy:Tt(Q=>{$e.hasSelectableTarget(p,Q.target)&&!en(Q,C.onCopy)&&!dh(Q)&&(Q.preventDefault(),$e.setFragmentData(p,Q.clipboardData,"copy"))},[C.onCopy,p]),onCut:Tt(Q=>{if(!u&&$e.hasSelectableTarget(p,Q.target)&&!en(Q,C.onCut)&&!dh(Q)){Q.preventDefault(),$e.setFragmentData(p,Q.clipboardData,"cut");var{selection:oe}=p;if(oe)if(Ne.isExpanded(oe))R.deleteFragment(p);else{var ue=Qe.parent(p,oe.anchor.path);R.isVoid(p,ue)&&Ke.delete(p)}}},[u,p,C.onCut]),onDragOver:Tt(Q=>{if($e.hasTarget(p,Q.target)&&!en(Q,C.onDragOver)){var oe=$e.toSlateNode(p,Q.target);pt.isElement(oe)&&R.isVoid(p,oe)&&Q.preventDefault()}},[C.onDragOver,p]),onDragStart:Tt(Q=>{if(!u&&$e.hasTarget(p,Q.target)&&!en(Q,C.onDragStart)){var oe=$e.toSlateNode(p,Q.target),ue=$e.findPath(p,oe),le=pt.isElement(oe)&&R.isVoid(p,oe)||R.void(p,{at:ue,voids:!0});if(le){var Se=R.range(p,ue);Ke.select(p,Se)}j.isDraggingInternally=!0,$e.setFragmentData(p,Q.dataTransfer,"drag")}},[u,p,C.onDragStart,j]),onDrop:Tt(Q=>{if(!u&&$e.hasTarget(p,Q.target)&&!en(Q,C.onDrop)){Q.preventDefault();var oe=p.selection,ue=$e.findEventRange(p,Q),le=Q.dataTransfer;Ke.select(p,ue),j.isDraggingInternally&&oe&&!Ne.equals(oe,ue)&&!R.void(p,{at:ue,voids:!0})&&Ke.delete(p,{at:oe}),$e.insertData(p,le),$e.isFocused(p)||$e.focus(p)}},[u,p,C.onDrop,j]),onDragEnd:Tt(Q=>{!u&&j.isDraggingInternally&&C.onDragEnd&&$e.hasTarget(p,Q.target)&&C.onDragEnd(Q)},[u,j,C,p]),onFocus:Tt(Q=>{if(!u&&!j.isUpdatingSelection&&$e.hasEditableTarget(p,Q.target)&&!en(Q,C.onFocus)){var oe=$e.toDOMNode(p,p),ue=$e.findDocumentOrShadowRoot(p);if(j.latestElement=ue.activeElement,Ya&&Q.target!==oe){oe.focus();return}ga.set(p,!0)}},[u,j,p,C.onFocus]),onKeyDown:Tt(Q=>{if(!u&&$e.hasEditableTarget(p,Q.target)){var oe;(oe=Y.current)===null||oe===void 0||oe.handleKeyDown(Q);var{nativeEvent:ue}=Q;if($e.isComposing(p)&&ue.isComposing===!1&&(Aa.set(p,!1),B(!1)),en(Q,C.onKeyDown)||$e.isComposing(p))return;var{selection:le}=p,Se=p.children[le!==null?le.focus.path[0]:0],Fe=lp(Qe.string(Se))==="rtl";if(Br.isRedo(ue)){Q.preventDefault();var me=p;typeof me.redo=="function"&&me.redo();return}if(Br.isUndo(ue)){Q.preventDefault();var we=p;typeof we.undo=="function"&&we.undo();return}if(Br.isMoveLineBackward(ue)){Q.preventDefault(),Ke.move(p,{unit:"line",reverse:!0});return}if(Br.isMoveLineForward(ue)){Q.preventDefault(),Ke.move(p,{unit:"line"});return}if(Br.isExtendLineBackward(ue)){Q.preventDefault(),Ke.move(p,{unit:"line",edge:"focus",reverse:!0});return}if(Br.isExtendLineForward(ue)){Q.preventDefault(),Ke.move(p,{unit:"line",edge:"focus"});return}if(Br.isMoveBackward(ue)){Q.preventDefault(),le&&Ne.isCollapsed(le)?Ke.move(p,{reverse:!Fe}):Ke.collapse(p,{edge:Fe?"end":"start"});return}if(Br.isMoveForward(ue)){Q.preventDefault(),le&&Ne.isCollapsed(le)?Ke.move(p,{reverse:Fe}):Ke.collapse(p,{edge:Fe?"start":"end"});return}if(Br.isMoveWordBackward(ue)){Q.preventDefault(),le&&Ne.isExpanded(le)&&Ke.collapse(p,{edge:"focus"}),Ke.move(p,{unit:"word",reverse:!Fe});return}if(Br.isMoveWordForward(ue)){Q.preventDefault(),le&&Ne.isExpanded(le)&&Ke.collapse(p,{edge:"focus"}),Ke.move(p,{unit:"word",reverse:Fe});return}if(la){if((xp||Sa)&&le&&(Br.isDeleteBackward(ue)||Br.isDeleteForward(ue))&&Ne.isCollapsed(le)){var De=Qe.parent(p,le.anchor.path);if(pt.isElement(De)&&R.isVoid(p,De)&&(R.isInline(p,De)||R.isBlock(p,De))){Q.preventDefault(),R.deleteBackward(p,{unit:"block"});return}}}else{if(Br.isBold(ue)||Br.isItalic(ue)||Br.isTransposeCharacter(ue)){Q.preventDefault();return}if(Br.isSoftBreak(ue)){Q.preventDefault(),R.insertSoftBreak(p);return}if(Br.isSplitBlock(ue)){Q.preventDefault(),R.insertBreak(p);return}if(Br.isDeleteBackward(ue)){Q.preventDefault(),le&&Ne.isExpanded(le)?R.deleteFragment(p,{direction:"backward"}):R.deleteBackward(p);return}if(Br.isDeleteForward(ue)){Q.preventDefault(),le&&Ne.isExpanded(le)?R.deleteFragment(p,{direction:"forward"}):R.deleteForward(p);return}if(Br.isDeleteLineBackward(ue)){Q.preventDefault(),le&&Ne.isExpanded(le)?R.deleteFragment(p,{direction:"backward"}):R.deleteBackward(p,{unit:"line"});return}if(Br.isDeleteLineForward(ue)){Q.preventDefault(),le&&Ne.isExpanded(le)?R.deleteFragment(p,{direction:"forward"}):R.deleteForward(p,{unit:"line"});return}if(Br.isDeleteWordBackward(ue)){Q.preventDefault(),le&&Ne.isExpanded(le)?R.deleteFragment(p,{direction:"backward"}):R.deleteBackward(p,{unit:"word"});return}if(Br.isDeleteWordForward(ue)){Q.preventDefault(),le&&Ne.isExpanded(le)?R.deleteFragment(p,{direction:"forward"}):R.deleteForward(p,{unit:"word"});return}}}},[u,p,C.onKeyDown]),onPaste:Tt(Q=>{!u&&$e.hasEditableTarget(p,Q.target)&&!en(Q,C.onPaste)&&(!la||Z8(Q.nativeEvent)||Sa)&&(Q.preventDefault(),$e.insertData(p,Q.clipboardData))},[u,p,C.onPaste])}),We.createElement(ey,{decorations:G,node:p,renderElement:f,renderPlaceholder:m,renderLeaf:d,selection:p.selection}))))))}),ty=e=>{var{attributes:t,children:r}=e;return We.createElement("span",_n({},t),r,tn&&We.createElement("br",null))},ry=()=>[],ny=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&Ne.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),g8(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},en=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},dh=e=>xa(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),ay=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},oy=Ca(!1),iy=Ca({});function sy(e){var t=Kt([]).current,r=Kt({editor:e}).current,n=Tt(i=>{r.editor=i,t.forEach(c=>c(i))},[t,r]),a=mt(()=>({getSlate:()=>r.editor,addEventListener:i=>(t.push(i),()=>{t.splice(t.indexOf(i),1)})}),[t,r]);return{selectorContext:a,onChange:n}}var ly=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],Il=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:a,onValueChange:i,initialValue:c}=e,u=oo(e,ly),[f,d]=We.useState(()=>{if(!Qe.isNodeList(c))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Wr.stringify(c)));if(!R.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Wr.stringify(t)));return t.children=c,Object.assign(t,u),{v:0,editor:t}}),{selectorContext:m,onChange:g}=sy(t),v=Tt(C=>{var p;switch(n&&n(t.children),C==null||(p=C.operation)===null||p===void 0?void 0:p.type){case"set_selection":a==null||a(t.selection);break;default:i==null||i(t.children)}d(A=>({v:A.v+1,editor:t})),g(t)},[t,g,n,a,i]);Qt(()=>(B0.set(t,v),()=>{B0.set(t,()=>{})}),[t,v]);var[w,x]=St($e.isFocused(t));return Qt(()=>{x($e.isFocused(t))},[t]),Yo(()=>{var C=()=>x($e.isFocused(t));return bp>=17?(document.addEventListener("focusin",C),document.addEventListener("focusout",C),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",C)}):(document.addEventListener("focus",C,!0),document.addEventListener("blur",C,!0),()=>{document.removeEventListener("focus",C,!0),document.removeEventListener("blur",C,!0)})},[]),We.createElement(iy.Provider,{value:m},We.createElement(Rp.Provider,{value:f},We.createElement(yu.Provider,{value:f.editor},We.createElement(oy.Provider,{value:w},r))))},fh=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},hh=(e,t,r)=>{var n=$e.toDOMRange(e,t).getBoundingClientRect(),a=$e.toDOMRange(e,r).getBoundingClientRect();return fh(n,a)&&fh(a,n)},uy=(e,t)=>{var r=R.range(e,Ne.end(t)),n=Array.from(R.positions(e,{at:t})),a=0,i=n.length,c=Math.floor(i/2);if(hh(e,R.range(e,n[a]),r))return R.range(e,n[a],r);if(n.length<2)return R.range(e,n[n.length-1],r);for(;c!==n.length&&c!==a;)hh(e,R.range(e,n[c]),r)?i=c:a=c,c=Math.floor((a+i)/2);return R.range(e,n[i],r)};function ph(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function mh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var cy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:n,onChange:a,deleteBackward:i,addMark:c,removeMark:u}=r;return bs.set(r,new WeakMap),r.addMark=(f,d)=>{var m,g;(m=Cu.get(r))===null||m===void 0||m(),!Tn.get(r)&&(g=ln.get(r))!==null&&g!==void 0&&g.length&&Tn.set(r,null),Qn.delete(r),c(f,d)},r.removeMark=f=>{var d;!Tn.get(r)&&(d=ln.get(r))!==null&&d!==void 0&&d.length&&Tn.set(r,null),Qn.delete(r),u(f)},r.deleteBackward=f=>{if(f!=="line")return i(f);if(r.selection&&Ne.isCollapsed(r.selection)){var d=R.above(r,{match:w=>pt.isElement(w)&&R.isBlock(r,w),at:r.selection});if(d){var[,m]=d,g=R.range(r,m,r.selection.anchor),v=uy(r,g);Ne.isCollapsed(v)||Ke.delete(r,{at:v})}}},r.apply=f=>{var d=[],m=[],g=ln.get(r);if(g!=null&&g.length){var v=g.map(Z=>db(Z,f)).filter(Boolean);ln.set(r,v)}var w=ha.get(r);w&&ha.set(r,rh(r,w,f));var x=fa.get(r);if(x!=null&&x.at){var C=Gt.isPoint(x==null?void 0:x.at)?T0(r,x.at,f):rh(r,x.at,f);fa.set(r,C?mh(mh({},x),{},{at:C}):null)}switch(f.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{d.push(...qa(r,f.path));break}case"set_selection":{var p;(p=Ro.get(r))===null||p===void 0||p.unref(),Ro.delete(r);break}case"insert_node":case"remove_node":{d.push(...qa(r,ie.parent(f.path)));break}case"merge_node":{var A=ie.previous(f.path);d.push(...qa(r,A));break}case"move_node":{var B=ie.common(ie.parent(f.path),ie.parent(f.newPath));d.push(...qa(r,B));var E;ie.isBefore(f.path,f.newPath)?(d.push(...qa(r,ie.parent(f.path))),E=f.newPath):(d.push(...qa(r,ie.parent(f.newPath))),E=f.path);var T=Qe.get(e,ie.parent(E)),F=$e.findKey(r,T),P=R.pathRef(r,ie.parent(E));m.push([P,F]);break}}switch(n(f),f.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":to.set(r,!0)}for(var[S,L]of d){var[O]=R.node(r,S);ns.set(O,L)}for(var[W,j]of m){if(W.current){var[Y]=R.node(r,W.current);ns.set(Y,j)}W.unref()}},r.setFragmentData=f=>{var{selection:d}=r;if(d){var[m,g]=Ne.edges(d),v=R.void(r,{at:m.path}),w=R.void(r,{at:g.path});if(!(Ne.isCollapsed(d)&&!v)){var x=$e.toDOMRange(r,d),C=x.cloneContents(),p=C.childNodes[0];if(C.childNodes.forEach(O=>{O.textContent&&O.textContent.trim()!==""&&(p=O)}),w){var[A]=w,B=x.cloneRange(),E=$e.toDOMNode(r,A);B.setEndAfter(E),C=B.cloneContents()}if(v&&(p=C.querySelector("[data-slate-spacer]")),Array.from(C.querySelectorAll("[data-slate-zero-width]")).forEach(O=>{var W=O.getAttribute("data-slate-zero-width")==="n";O.textContent=W?`
|
|
86
|
-
`:""}),Ep(p)){var T=p.ownerDocument.createElement("span");T.style.whiteSpace="pre",T.appendChild(p),C.appendChild(T),p=T}var F=r.getFragment(),P=JSON.stringify(F),S=window.btoa(encodeURIComponent(P));p.setAttribute("data-slate-fragment",S),f.setData("application/".concat(t),S);var L=C.ownerDocument.createElement("div");return L.appendChild(C),L.setAttribute("hidden","true"),C.ownerDocument.body.appendChild(L),f.setData("text/html",L.innerHTML),f.setData("text/plain",Ap(L)),C.ownerDocument.body.removeChild(L),f}}},r.insertData=f=>{r.insertFragmentData(f)||r.insertTextData(f)},r.insertFragmentData=f=>{var d=f.getData("application/".concat(t))||tb(f);if(d){var m=decodeURIComponent(window.atob(d)),g=JSON.parse(m);return r.insertFragment(g),!0}return!1},r.insertTextData=f=>{var d=f.getData("text/plain");if(d){var m=d.split(/\r\n|\r|\n/),g=!1;for(var v of m)g&&Ke.splitNodes(r,{always:!0}),r.insertText(v),g=!0;return!0}return!1},r.onChange=f=>{var d=bp<18?t0.unstable_batchedUpdates:m=>m();d(()=>{var m=B0.get(r);m&&m(f),a(f)})},r},qa=(e,t)=>{var r=[];for(var[n,a]of R.levels(e,{at:t})){var i=$e.findKey(e,n);r.push([a,i])}return r};function Eu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ja=Eu();function jp(e){ja=e}var Io={exec:()=>null};function dr(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(a,i)=>{let c=typeof i=="string"?i:i.source;return c=c.replace(rn.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,t)};return n}var rn={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")},dy=/^(?:[ \t]*(?:\n|$))+/,fy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ii=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,py=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Su=/(?:[*+-]|\d{1,9}[.)])/,Lp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_p=dr(Lp).replace(/bull/g,Su).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(),my=dr(Lp).replace(/bull/g,Su).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(),Au=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gy=/^[^\n]+/,Bu=/(?!\s*\])(?:\\.|[^\[\]\\])+/,vy=dr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Bu).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),by=dr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Su).getRegex(),ys="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",Fu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,yy=dr("^ {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",Fu).replace("tag",ys).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),qp=dr(Au).replace("hr",ii).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",ys).getRegex(),xy=dr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",qp).getRegex(),Nu={blockquote:xy,code:fy,def:vy,fences:hy,heading:py,hr:ii,html:yy,lheading:_p,list:by,newline:dy,paragraph:qp,table:Io,text:gy},gh=dr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ii).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",ys).getRegex(),wy={...Nu,lheading:my,table:gh,paragraph:dr(Au).replace("hr",ii).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gh).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",ys).getRegex()},Cy={...Nu,html:dr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fu).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:Io,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:dr(Au).replace("hr",ii).replace("heading",` *#{1,6} *[^
|
|
87
|
-
]`).replace("lheading",_p).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Dy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ky=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hp=/^( {2,}|\\)\n(?!\s*$)/,Ey=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xs=/[\p{P}\p{S}]/u,Tu=/[\s\p{P}\p{S}]/u,Kp=/[^\s\p{P}\p{S}]/u,Sy=dr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Tu).getRegex(),Wp=/(?!~)[\p{P}\p{S}]/u,Ay=/(?!~)[\s\p{P}\p{S}]/u,By=/(?:[^\s\p{P}\p{S}]|~)/u,Fy=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Vp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ny=dr(Vp,"u").replace(/punct/g,xs).getRegex(),Ty=dr(Vp,"u").replace(/punct/g,Wp).getRegex(),Up="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Oy=dr(Up,"gu").replace(/notPunctSpace/g,Kp).replace(/punctSpace/g,Tu).replace(/punct/g,xs).getRegex(),$y=dr(Up,"gu").replace(/notPunctSpace/g,By).replace(/punctSpace/g,Ay).replace(/punct/g,Wp).getRegex(),Py=dr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Kp).replace(/punctSpace/g,Tu).replace(/punct/g,xs).getRegex(),My=dr(/\\(punct)/,"gu").replace(/punct/g,xs).getRegex(),Ry=dr(/^<(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(),zy=dr(Fu).replace("(?:-->|$)","-->").getRegex(),Iy=dr("^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",zy).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),as=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,jy=dr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",as).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Gp=dr(/^!?\[(label)\]\[(ref)\]/).replace("label",as).replace("ref",Bu).getRegex(),Yp=dr(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bu).getRegex(),Ly=dr("reflink|nolink(?!\\()","g").replace("reflink",Gp).replace("nolink",Yp).getRegex(),Ou={_backpedal:Io,anyPunctuation:My,autolink:Ry,blockSkip:Fy,br:Hp,code:ky,del:Io,emStrongLDelim:Ny,emStrongRDelimAst:Oy,emStrongRDelimUnd:Py,escape:Dy,link:jy,nolink:Yp,punctuation:Sy,reflink:Gp,reflinkSearch:Ly,tag:Iy,text:Ey,url:Io},_y={...Ou,link:dr(/^!?\[(label)\]\((.*?)\)/).replace("label",as).getRegex(),reflink:dr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",as).getRegex()},$0={...Ou,emStrongRDelimAst:$y,emStrongLDelim:Ty,url:dr(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},qy={...$0,br:dr(Hp).replace("{2,}","*").getRegex(),text:dr($0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Bi={normal:Nu,gfm:wy,pedantic:Cy},So={normal:Ou,gfm:$0,breaks:qy,pedantic:_y},Hy={"&":"&","<":"<",">":">",'"':""","'":"'"},vh=e=>Hy[e];function qn(e,t){if(t){if(rn.escapeTest.test(e))return e.replace(rn.escapeReplace,vh)}else if(rn.escapeTestNoEncode.test(e))return e.replace(rn.escapeReplaceNoEncode,vh);return e}function bh(e){try{e=encodeURI(e).replace(rn.percentDecode,"%")}catch{return null}return e}function yh(e,t){var i;const r=e.replace(rn.findPipe,(c,u,f)=>{let d=!1,m=u;for(;--m>=0&&f[m]==="\\";)d=!d;return d?"|":" |"}),n=r.split(rn.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(rn.slashPipe,"|");return n}function Ao(e,t,r){const n=e.length;if(n===0)return"";let a=0;for(;a<n&&e.charAt(n-a-1)===t;)a++;return e.slice(0,n-a)}function Ky(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 xh(e,t,r,n,a){const i=t.href,c=t.title||null,u=e[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:c,text:u,tokens:n.inlineTokens(u)};return n.state.inLink=!1,f}function Wy(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const a=n[1];return t.split(`
|
|
88
|
-
`).map(i=>{const c=i.match(r.other.beginningSpace);if(c===null)return i;const[u]=c;return u.length>=a.length?i.slice(a.length):i}).join(`
|
|
89
|
-
`)}var os=class{constructor(e){vr(this,"options"),vr(this,"rules"),vr(this,"lexer"),this.options=e||ja}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:Ao(r,`
|
|
90
|
-
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=Wy(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=Ao(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:Ao(t[0],`
|
|
91
|
-
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=Ao(t[0],`
|
|
92
|
-
`).split(`
|
|
93
|
-
`),n="",a="";const i=[];for(;r.length>0;){let c=!1;const u=[];let f;for(f=0;f<r.length;f++)if(this.rules.other.blockquoteStart.test(r[f]))u.push(r[f]),c=!0;else if(!c)u.push(r[f]);else break;r=r.slice(f);const d=u.join(`
|
|
94
|
-
`),m=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
95
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
96
|
-
${d}`:d,a=a?`${a}
|
|
97
|
-
${m}`:m;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,i,!0),this.lexer.state.top=g,r.length===0)break;const v=i.at(-1);if((v==null?void 0:v.type)==="code")break;if((v==null?void 0:v.type)==="blockquote"){const w=v,x=w.raw+`
|
|
98
|
-
`+r.join(`
|
|
99
|
-
`),C=this.blockquote(x);i[i.length-1]=C,n=n.substring(0,n.length-w.raw.length)+C.raw,a=a.substring(0,a.length-w.text.length)+C.text;break}else if((v==null?void 0:v.type)==="list"){const w=v,x=w.raw+`
|
|
100
|
-
`+r.join(`
|
|
101
|
-
`),C=this.list(x);i[i.length-1]=C,n=n.substring(0,n.length-v.raw.length)+C.raw,a=a.substring(0,a.length-w.raw.length)+C.raw,r=x.substring(i.at(-1).raw.length).split(`
|
|
102
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:a}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,a={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 i=this.rules.other.listItemRegex(r);let c=!1;for(;e;){let f=!1,d="",m="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let g=t[2].split(`
|
|
103
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,A=>" ".repeat(3*A.length)),v=e.split(`
|
|
104
|
-
`,1)[0],w=!g.trim(),x=0;if(this.options.pedantic?(x=2,m=g.trimStart()):w?x=t[1].length+1:(x=t[2].search(this.rules.other.nonSpaceChar),x=x>4?1:x,m=g.slice(x),x+=t[1].length),w&&this.rules.other.blankLine.test(v)&&(d+=v+`
|
|
105
|
-
`,e=e.substring(v.length+1),f=!0),!f){const A=this.rules.other.nextBulletRegex(x),B=this.rules.other.hrRegex(x),E=this.rules.other.fencesBeginRegex(x),T=this.rules.other.headingBeginRegex(x),F=this.rules.other.htmlBeginRegex(x);for(;e;){const P=e.split(`
|
|
106
|
-
`,1)[0];let S;if(v=P,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),S=v):S=v.replace(this.rules.other.tabCharGlobal," "),E.test(v)||T.test(v)||F.test(v)||A.test(v)||B.test(v))break;if(S.search(this.rules.other.nonSpaceChar)>=x||!v.trim())m+=`
|
|
107
|
-
`+S.slice(x);else{if(w||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(g)||T.test(g)||B.test(g))break;m+=`
|
|
108
|
-
`+v}!w&&!v.trim()&&(w=!0),d+=P+`
|
|
109
|
-
`,e=e.substring(P.length+1),g=S.slice(x)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let C=null,p;this.options.gfm&&(C=this.rules.other.listIsTask.exec(m),C&&(p=C[0]!=="[ ] ",m=m.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:d,task:!!C,checked:p,loose:!1,text:m,tokens:[]}),a.raw+=d}const u=a.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let f=0;f<a.items.length;f++)if(this.lexer.state.top=!1,a.items[f].tokens=this.lexer.blockTokens(a.items[f].text,[]),!a.loose){const d=a.items[f].tokens.filter(g=>g.type==="space"),m=d.length>0&&d.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=m}if(a.loose)for(let f=0;f<a.items.length;f++)a.items[f].loose=!0;return a}}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"):"",a=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:a}}}table(e){var c;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=yh(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=t[3])!=null&&c.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
110
|
-
`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const u of n)this.rules.other.tableAlignRight.test(u)?i.align.push("right"):this.rules.other.tableAlignCenter.test(u)?i.align.push("center"):this.rules.other.tableAlignLeft.test(u)?i.align.push("left"):i.align.push(null);for(let u=0;u<r.length;u++)i.header.push({text:r[u],tokens:this.lexer.inline(r[u]),header:!0,align:i.align[u]});for(const u of a)i.rows.push(yh(u,i.header.length).map((f,d)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:i.align[d]})));return i}}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)===`
|
|
111
|
-
`?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 i=Ao(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{const i=Ky(t[2],"()");if(i===-2)return;if(i>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let n=t[2],a="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],a=i[3])}else a=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)),xh(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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," "),a=t[n.toLowerCase()];if(!a){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return xh(r,a,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 a=[...n[0]].length-1;let i,c,u=a,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+a);(n=d.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(c=[...i].length,n[3]||n[4]){u+=c;continue}else if((n[5]||n[6])&&a%3&&!((a+c)%3)){f+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+f);const m=[...n[0]][0].length,g=e.slice(0,a+n.index+m+c);if(Math.min(a,c)%2){const w=g.slice(1,-1);return{type:"em",raw:g,text:w,tokens:this.lexer.inlineTokens(w)}}const v=g.slice(2,-2);return{type:"strong",raw:g,text:v,tokens:this.lexer.inlineTokens(v)}}}}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),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&a&&(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,a;if(t[2]==="@")n=t[0],a="mailto:"+n;else{let i;do i=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(i!==t[0]);n=t[0],t[1]==="www."?a="http://"+t[0]:a=t[0]}return{type:"link",raw:t[0],text:n,href:a,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}}}},Jn=class P0{constructor(t){vr(this,"tokens"),vr(this,"options"),vr(this,"state"),vr(this,"tokenizer"),vr(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ja,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:rn,block:Bi.normal,inline:So.normal};this.options.pedantic?(r.block=Bi.pedantic,r.inline=So.pedantic):this.options.gfm&&(r.block=Bi.gfm,this.options.breaks?r.inline=So.breaks:r.inline=So.gfm),this.tokenizer.rules=r}static get rules(){return{block:Bi,inline:So}}static lex(t,r){return new P0(r).lex(t)}static lexInline(t,r){return new P0(r).inlineTokens(t)}lex(t){t=t.replace(rn.carriageReturn,`
|
|
112
|
-
`),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 a,i,c;for(this.options.pedantic&&(t=t.replace(rn.tabCharGlobal," ").replace(rn.spaceLine,""));t;){let u;if((i=(a=this.options.extensions)==null?void 0:a.block)!=null&&i.some(d=>(u=d.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.space(t)){t=t.substring(u.raw.length);const d=r.at(-1);u.raw.length===1&&d!==void 0?d.raw+=`
|
|
113
|
-
`:r.push(u);continue}if(u=this.tokenizer.code(t)){t=t.substring(u.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
114
|
-
`+u.raw,d.text+=`
|
|
115
|
-
`+u.text,this.inlineQueue.at(-1).src=d.text):r.push(u);continue}if(u=this.tokenizer.fences(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.heading(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.hr(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.blockquote(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.list(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.html(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.def(t)){t=t.substring(u.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
116
|
-
`+u.raw,d.text+=`
|
|
117
|
-
`+u.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title});continue}if(u=this.tokenizer.table(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.lheading(t)){t=t.substring(u.raw.length),r.push(u);continue}let f=t;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0;const m=t.slice(1);let g;this.options.extensions.startBlock.forEach(v=>{g=v.call({lexer:this},m),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(this.state.top&&(u=this.tokenizer.paragraph(f))){const d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
|
|
118
|
-
`+u.raw,d.text+=`
|
|
119
|
-
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(u),n=f.length!==t.length,t=t.substring(u.raw.length);continue}if(u=this.tokenizer.text(t)){t=t.substring(u.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
120
|
-
`+u.raw,d.text+=`
|
|
121
|
-
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(u);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 u,f,d;let n=t,a=null;if(this.tokens.links){const m=Object.keys(this.tokens.links);if(m.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)m.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,c="";for(;t;){i||(c=""),i=!1;let m;if((f=(u=this.options.extensions)==null?void 0:u.inline)!=null&&f.some(v=>(m=v.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 v=r.at(-1);m.type==="text"&&(v==null?void 0:v.type)==="text"?(v.raw+=m.raw,v.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 g=t;if((d=this.options.extensions)!=null&&d.startInline){let v=1/0;const w=t.slice(1);let x;this.options.extensions.startInline.forEach(C=>{x=C.call({lexer:this},w),typeof x=="number"&&x>=0&&(v=Math.min(v,x))}),v<1/0&&v>=0&&(g=t.substring(0,v+1))}if(m=this.tokenizer.inlineText(g)){t=t.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(c=m.raw.slice(-1)),i=!0;const v=r.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=m.raw,v.text+=m.text):r.push(m);continue}if(t){const v="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return r}},is=class{constructor(e){vr(this,"options"),vr(this,"parser"),this.options=e||ja}space(e){return""}code({text:e,lang:t,escaped:r}){var i;const n=(i=(t||"").match(rn.notSpaceStart))==null?void 0:i[0],a=e.replace(rn.endingNewline,"")+`
|
|
122
|
-
`;return n?'<pre><code class="language-'+qn(n)+'">'+(r?a:qn(a,!0))+`</code></pre>
|
|
123
|
-
`:"<pre><code>"+(r?a:qn(a,!0))+`</code></pre>
|
|
124
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
125
|
-
${this.parser.parse(e)}</blockquote>
|
|
126
|
-
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
127
|
-
`}hr(e){return`<hr>
|
|
128
|
-
`}list(e){const t=e.ordered,r=e.start;let n="";for(let c=0;c<e.items.length;c++){const u=e.items[c];n+=this.listitem(u)}const a=t?"ol":"ul",i=t&&r!==1?' start="'+r+'"':"";return"<"+a+i+`>
|
|
129
|
-
`+n+"</"+a+`>
|
|
130
|
-
`}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+" "+qn(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>
|
|
131
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
132
|
-
`}table(e){let t="",r="";for(let a=0;a<e.header.length;a++)r+=this.tablecell(e.header[a]);t+=this.tablerow({text:r});let n="";for(let a=0;a<e.rows.length;a++){const i=e.rows[a];r="";for(let c=0;c<i.length;c++)r+=this.tablecell(i[c]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
133
|
-
<thead>
|
|
134
|
-
`+t+`</thead>
|
|
135
|
-
`+n+`</table>
|
|
136
|
-
`}tablerow({text:e}){return`<tr>
|
|
137
|
-
${e}</tr>
|
|
138
|
-
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
139
|
-
`}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>${qn(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),a=bh(e);if(a===null)return n;e=a;let i='<a href="'+e+'"';return t&&(i+=' title="'+qn(t)+'"'),i+=">"+n+"</a>",i}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const a=bh(e);if(a===null)return qn(r);e=a;let i=`<img src="${e}" alt="${r}"`;return t&&(i+=` title="${qn(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:qn(e.text)}},$u=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""}},ea=class M0{constructor(t){vr(this,"options"),vr(this,"renderer"),vr(this,"textRenderer"),this.options=t||ja,this.options.renderer=this.options.renderer||new is,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $u}static parse(t,r){return new M0(r).parse(t)}static parseInline(t,r){return new M0(r).parseInline(t)}parse(t,r=!0){var a,i;let n="";for(let c=0;c<t.length;c++){const u=t[c];if((i=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&i[u.type]){const d=u,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=u;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+=`
|
|
140
|
-
`+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 a,i;let n="";for(let c=0;c<t.length;c++){const u=t[c];if((i=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&i[u.type]){const d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){n+=d||"";continue}}const f=u;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}},jl,zi=(jl=class{constructor(e){vr(this,"options"),vr(this,"block"),this.options=e||ja}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Jn.lex:Jn.lexInline}provideParser(){return this.block?ea.parse:ea.parseInline}},vr(jl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),jl),Vy=class{constructor(...e){vr(this,"defaults",Eu()),vr(this,"options",this.setOptions),vr(this,"parse",this.parseMarkdown(!0)),vr(this,"parseInline",this.parseMarkdown(!1)),vr(this,"Parser",ea),vr(this,"Renderer",is),vr(this,"TextRenderer",$u),vr(this,"Lexer",Jn),vr(this,"Tokenizer",os),vr(this,"Hooks",zi),this.use(...e)}walkTokens(e,t){var n,a;let r=[];for(const i of e)switch(r=r.concat(t.call(this,i)),i.type){case"table":{const c=i;for(const u of c.header)r=r.concat(this.walkTokens(u.tokens,t));for(const u of c.rows)for(const f of u)r=r.concat(this.walkTokens(f.tokens,t));break}case"list":{const c=i;r=r.concat(this.walkTokens(c.items,t));break}default:{const c=i;(a=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{const f=c[u].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(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const i=t.renderers[a.name];i?t.renderers[a.name]=function(...c){let u=a.renderer.apply(this,c);return u===!1&&(u=i.apply(this,c)),u}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=t[a.level];i?i.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),n.extensions=t),r.renderer){const a=this.defaults.renderer||new is(this.defaults);for(const i in r.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const c=i,u=r.renderer[c],f=a[c];a[c]=(...d)=>{let m=u.apply(a,d);return m===!1&&(m=f.apply(a,d)),m||""}}n.renderer=a}if(r.tokenizer){const a=this.defaults.tokenizer||new os(this.defaults);for(const i in r.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const c=i,u=r.tokenizer[c],f=a[c];a[c]=(...d)=>{let m=u.apply(a,d);return m===!1&&(m=f.apply(a,d)),m}}n.tokenizer=a}if(r.hooks){const a=this.defaults.hooks||new zi;for(const i in r.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const c=i,u=r.hooks[c],f=a[c];zi.passThroughHooks.has(i)?a[c]=d=>{if(this.defaults.async)return Promise.resolve(u.call(a,d)).then(g=>f.call(a,g));const m=u.call(a,d);return f.call(a,m)}:a[c]=(...d)=>{let m=u.apply(a,d);return m===!1&&(m=f.apply(a,d)),m}}n.hooks=a}if(r.walkTokens){const a=this.defaults.walkTokens,i=r.walkTokens;n.walkTokens=function(c){let u=[];return u.push(i.call(this,c)),a&&(u=u.concat(a.call(this,c))),u}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Jn.lex(e,t??this.defaults)}parser(e,t){return ea.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},a={...this.defaults,...n},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return i(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 i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const c=a.hooks?a.hooks.provideLexer():e?Jn.lex:Jn.lexInline,u=a.hooks?a.hooks.provideParser():e?ea.parse:ea.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(t):t).then(f=>c(f,a)).then(f=>a.hooks?a.hooks.processAllTokens(f):f).then(f=>a.walkTokens?Promise.all(this.walkTokens(f,a.walkTokens)).then(()=>f):f).then(f=>u(f,a)).then(f=>a.hooks?a.hooks.postprocess(f):f).catch(i);try{a.hooks&&(t=a.hooks.preprocess(t));let f=c(t,a);a.hooks&&(f=a.hooks.processAllTokens(f)),a.walkTokens&&this.walkTokens(f,a.walkTokens);let d=u(f,a);return a.hooks&&(d=a.hooks.postprocess(d)),d}catch(f){return i(f)}}}onError(e,t){return r=>{if(r.message+=`
|
|
141
|
-
Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+qn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Ia=new Vy;function sr(e,t){return Ia.parse(e,t)}sr.options=sr.setOptions=function(e){return Ia.setOptions(e),sr.defaults=Ia.defaults,jp(sr.defaults),sr};sr.getDefaults=Eu;sr.defaults=ja;sr.use=function(...e){return Ia.use(...e),sr.defaults=Ia.defaults,jp(sr.defaults),sr};sr.walkTokens=function(e,t){return Ia.walkTokens(e,t)};sr.parseInline=Ia.parseInline;sr.Parser=ea;sr.parser=ea.parse;sr.Renderer=is;sr.TextRenderer=$u;sr.Lexer=Jn;sr.lexer=Jn.lex;sr.Tokenizer=os;sr.Hooks=zi;sr.parse=sr;sr.options;sr.setOptions;sr.use;sr.walkTokens;sr.parseInline;ea.parse;Jn.lex;var cn=function(){return cn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},cn.apply(this,arguments)};function Zo(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var Cr="-ms-",jo="-moz-",cr="-webkit-",Zp="comm",ws="rule",Pu="decl",Uy="@import",Xp="@keyframes",Gy="@layer",Qp=Math.abs,Mu=String.fromCharCode,R0=Object.assign;function Yy(e,t){return Kr(e,0)^45?(((t<<2^Kr(e,0))<<2^Kr(e,1))<<2^Kr(e,2))<<2^Kr(e,3):0}function Jp(e){return e.trim()}function Xn(e,t){return(e=t.exec(e))?e[0]:e}function Vt(e,t,r){return e.replace(t,r)}function Ii(e,t,r){return e.indexOf(t,r)}function Kr(e,t){return e.charCodeAt(t)|0}function so(e,t,r){return e.slice(t,r)}function Hn(e){return e.length}function em(e){return e.length}function Fo(e,t){return t.push(e),e}function Zy(e,t){return e.map(t).join("")}function wh(e,t){return e.filter(function(r){return!Xn(r,t)})}var Cs=1,lo=1,tm=0,En=0,Rr=0,bo="";function Ds(e,t,r,n,a,i,c,u){return{value:e,root:t,parent:r,type:n,props:a,children:i,line:Cs,column:lo,length:c,return:"",siblings:u}}function ca(e,t){return R0(Ds("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Ha(e){for(;e.root;)e=ca(e.root,{children:[e]});Fo(e,e.siblings)}function Xy(){return Rr}function Qy(){return Rr=En>0?Kr(bo,--En):0,lo--,Rr===10&&(lo=1,Cs--),Rr}function On(){return Rr=En<tm?Kr(bo,En++):0,lo++,Rr===10&&(lo=1,Cs++),Rr}function Oa(){return Kr(bo,En)}function ji(){return En}function ks(e,t){return so(bo,e,t)}function z0(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 Jy(e){return Cs=lo=1,tm=Hn(bo=e),En=0,[]}function ex(e){return bo="",e}function Ll(e){return Jp(ks(En-1,I0(e===91?e+2:e===40?e+1:e)))}function tx(e){for(;(Rr=Oa())&&Rr<33;)On();return z0(e)>2||z0(Rr)>3?"":" "}function rx(e,t){for(;--t&&On()&&!(Rr<48||Rr>102||Rr>57&&Rr<65||Rr>70&&Rr<97););return ks(e,ji()+(t<6&&Oa()==32&&On()==32))}function I0(e){for(;On();)switch(Rr){case e:return En;case 34:case 39:e!==34&&e!==39&&I0(Rr);break;case 40:e===41&&I0(e);break;case 92:On();break}return En}function nx(e,t){for(;On()&&e+Rr!==57&&!(e+Rr===84&&Oa()===47););return"/*"+ks(t,En-1)+"*"+Mu(e===47?e:On())}function ax(e){for(;!z0(Oa());)On();return ks(e,En)}function ox(e){return ex(Li("",null,null,null,[""],e=Jy(e),0,[0],e))}function Li(e,t,r,n,a,i,c,u,f){for(var d=0,m=0,g=c,v=0,w=0,x=0,C=1,p=1,A=1,B=0,E="",T=a,F=i,P=n,S=E;p;)switch(x=B,B=On()){case 40:if(x!=108&&Kr(S,g-1)==58){Ii(S+=Vt(Ll(B),"&","&\f"),"&\f",Qp(d?u[d-1]:0))!=-1&&(A=-1);break}case 34:case 39:case 91:S+=Ll(B);break;case 9:case 10:case 13:case 32:S+=tx(x);break;case 92:S+=rx(ji()-1,7);continue;case 47:switch(Oa()){case 42:case 47:Fo(ix(nx(On(),ji()),t,r,f),f);break;default:S+="/"}break;case 123*C:u[d++]=Hn(S)*A;case 125*C:case 59:case 0:switch(B){case 0:case 125:p=0;case 59+m:A==-1&&(S=Vt(S,/\f/g,"")),w>0&&Hn(S)-g&&Fo(w>32?Dh(S+";",n,r,g-1,f):Dh(Vt(S," ","")+";",n,r,g-2,f),f);break;case 59:S+=";";default:if(Fo(P=Ch(S,t,r,d,m,a,u,E,T=[],F=[],g,i),i),B===123)if(m===0)Li(S,t,P,P,T,i,g,u,F);else switch(v===99&&Kr(S,3)===110?100:v){case 100:case 108:case 109:case 115:Li(e,P,P,n&&Fo(Ch(e,P,P,0,0,a,u,E,a,T=[],g,F),F),a,F,g,u,n?T:F);break;default:Li(S,P,P,P,[""],F,0,u,F)}}d=m=w=0,C=A=1,E=S="",g=c;break;case 58:g=1+Hn(S),w=x;default:if(C<1){if(B==123)--C;else if(B==125&&C++==0&&Qy()==125)continue}switch(S+=Mu(B),B*C){case 38:A=m>0?1:(S+="\f",-1);break;case 44:u[d++]=(Hn(S)-1)*A,A=1;break;case 64:Oa()===45&&(S+=Ll(On())),v=Oa(),m=g=Hn(E=S+=ax(ji())),B++;break;case 45:x===45&&Hn(S)==2&&(C=0)}}return i}function Ch(e,t,r,n,a,i,c,u,f,d,m,g){for(var v=a-1,w=a===0?i:[""],x=em(w),C=0,p=0,A=0;C<n;++C)for(var B=0,E=so(e,v+1,v=Qp(p=c[C])),T=e;B<x;++B)(T=Jp(p>0?w[B]+" "+E:Vt(E,/&\f/g,w[B])))&&(f[A++]=T);return Ds(e,t,r,a===0?ws:u,f,d,m,g)}function ix(e,t,r,n){return Ds(e,t,r,Zp,Mu(Xy()),so(e,2,-2),0,n)}function Dh(e,t,r,n,a){return Ds(e,t,r,Pu,so(e,0,n),so(e,n+1,-1),n,a)}function rm(e,t,r){switch(Yy(e,t)){case 5103:return cr+"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 cr+e+e;case 4789:return jo+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return cr+e+jo+e+Cr+e+e;case 5936:switch(Kr(e,t+11)){case 114:return cr+e+Cr+Vt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return cr+e+Cr+Vt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return cr+e+Cr+Vt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return cr+e+Cr+e+e;case 6165:return cr+e+Cr+"flex-"+e+e;case 5187:return cr+e+Vt(e,/(\w+).+(:[^]+)/,cr+"box-$1$2"+Cr+"flex-$1$2")+e;case 5443:return cr+e+Cr+"flex-item-"+Vt(e,/flex-|-self/g,"")+(Xn(e,/flex-|baseline/)?"":Cr+"grid-row-"+Vt(e,/flex-|-self/g,""))+e;case 4675:return cr+e+Cr+"flex-line-pack"+Vt(e,/align-content|flex-|-self/g,"")+e;case 5548:return cr+e+Cr+Vt(e,"shrink","negative")+e;case 5292:return cr+e+Cr+Vt(e,"basis","preferred-size")+e;case 6060:return cr+"box-"+Vt(e,"-grow","")+cr+e+Cr+Vt(e,"grow","positive")+e;case 4554:return cr+Vt(e,/([^-])(transform)/g,"$1"+cr+"$2")+e;case 6187:return Vt(Vt(Vt(e,/(zoom-|grab)/,cr+"$1"),/(image-set)/,cr+"$1"),e,"")+e;case 5495:case 3959:return Vt(e,/(image-set\([^]*)/,cr+"$1$`$1");case 4968:return Vt(Vt(e,/(.+:)(flex-)?(.*)/,cr+"box-pack:$3"+Cr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+cr+e+e;case 4200:if(!Xn(e,/flex-|baseline/))return Cr+"grid-column-align"+so(e,t)+e;break;case 2592:case 3360:return Cr+Vt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,a){return t=a,Xn(n.props,/grid-\w+-end/)})?~Ii(e+(r=r[t].value),"span",0)?e:Cr+Vt(e,"-start","")+e+Cr+"grid-row-span:"+(~Ii(r,"span",0)?Xn(r,/\d+/):+Xn(r,/\d+/)-+Xn(e,/\d+/))+";":Cr+Vt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return Xn(n.props,/grid-\w+-start/)})?e:Cr+Vt(Vt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Vt(e,/(.+)-inline(.+)/,cr+"$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(Hn(e)-1-t>6)switch(Kr(e,t+1)){case 109:if(Kr(e,t+4)!==45)break;case 102:return Vt(e,/(.+:)(.+)-([^]+)/,"$1"+cr+"$2-$3$1"+jo+(Kr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ii(e,"stretch",0)?rm(Vt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Vt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,a,i,c,u,f,d){return Cr+a+":"+i+d+(c?Cr+a+"-span:"+(u?f:+f-+i)+d:"")+e});case 4949:if(Kr(e,t+6)===121)return Vt(e,":",":"+cr)+e;break;case 6444:switch(Kr(e,Kr(e,14)===45?18:11)){case 120:return Vt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+cr+(Kr(e,14)===45?"inline-":"")+"box$3$1"+cr+"$2$3$1"+Cr+"$2box$3")+e;case 100:return Vt(e,":",":"+Cr)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Vt(e,"scroll-","scroll-snap-")+e}return e}function ss(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function sx(e,t,r,n){switch(e.type){case Gy:if(e.children.length)break;case Uy:case Pu:return e.return=e.return||e.value;case Zp:return"";case Xp:return e.return=e.value+"{"+ss(e.children,n)+"}";case ws:if(!Hn(e.value=e.props.join(",")))return""}return Hn(r=ss(e.children,n))?e.return=e.value+"{"+r+"}":""}function lx(e){var t=em(e);return function(r,n,a,i){for(var c="",u=0;u<t;u++)c+=e[u](r,n,a,i)||"";return c}}function ux(e){return function(t){t.root||(t=t.return)&&e(t)}}function cx(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Pu:e.return=rm(e.value,e.length,r);return;case Xp:return ss([ca(e,{value:Vt(e.value,"@","@"+cr)})],n);case ws:if(e.length)return Zy(r=e.props,function(a){switch(Xn(a,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ha(ca(e,{props:[Vt(a,/:(read-\w+)/,":"+jo+"$1")]})),Ha(ca(e,{props:[a]})),R0(e,{props:wh(r,n)});break;case"::placeholder":Ha(ca(e,{props:[Vt(a,/:(plac\w+)/,":"+cr+"input-$1")]})),Ha(ca(e,{props:[Vt(a,/:(plac\w+)/,":"+jo+"$1")]})),Ha(ca(e,{props:[Vt(a,/:(plac\w+)/,Cr+"input-$1")]})),Ha(ca(e,{props:[a]})),R0(e,{props:wh(r,n)});break}return""})}}var dx={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},uo=typeof process<"u"&&hn!==void 0&&(hn.REACT_APP_SC_ATTR||hn.SC_ATTR)||"data-styled",nm="active",am="data-styled-version",Es="6.1.19",Ru=`/*!sc*/
|
|
142
|
-
`,ls=typeof window<"u"&&typeof document<"u",fx=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&hn!==void 0&&hn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&hn.REACT_APP_SC_DISABLE_SPEEDY!==""?hn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&hn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&hn!==void 0&&hn.SC_DISABLE_SPEEDY!==void 0&&hn.SC_DISABLE_SPEEDY!==""&&hn.SC_DISABLE_SPEEDY!=="false"&&hn.SC_DISABLE_SPEEDY),Ss=Object.freeze([]),co=Object.freeze({});function hx(e,t,r){return r===void 0&&(r=co),e.theme!==r.theme&&e.theme||t||r.theme}var om=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"]),px=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,mx=/(^-|-$)/g;function kh(e){return e.replace(px,"-").replace(mx,"")}var gx=/(a)(d)/gi,Fi=52,Eh=function(e){return String.fromCharCode(e+(e>25?39:97))};function j0(e){var t,r="";for(t=Math.abs(e);t>Fi;t=t/Fi|0)r=Eh(t%Fi)+r;return(Eh(t%Fi)+r).replace(gx,"$1-$2")}var _l,im=5381,Za=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},sm=function(e){return Za(im,e)};function lm(e){return j0(sm(e)>>>0)}function vx(e){return e.displayName||e.name||"Component"}function ql(e){return typeof e=="string"&&!0}var um=typeof Symbol=="function"&&Symbol.for,cm=um?Symbol.for("react.memo"):60115,bx=um?Symbol.for("react.forward_ref"):60112,yx={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},xx={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},dm={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},wx=((_l={})[bx]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},_l[cm]=dm,_l);function Sh(e){return("type"in(t=e)&&t.type.$$typeof)===cm?dm:"$$typeof"in e?wx[e.$$typeof]:yx;var t}var Cx=Object.defineProperty,Dx=Object.getOwnPropertyNames,Ah=Object.getOwnPropertySymbols,kx=Object.getOwnPropertyDescriptor,Ex=Object.getPrototypeOf,Bh=Object.prototype;function fm(e,t,r){if(typeof t!="string"){if(Bh){var n=Ex(t);n&&n!==Bh&&fm(e,n,r)}var a=Dx(t);Ah&&(a=a.concat(Ah(t)));for(var i=Sh(e),c=Sh(t),u=0;u<a.length;++u){var f=a[u];if(!(f in xx||r&&r[f]||c&&f in c||i&&f in i)){var d=kx(t,f);try{Cx(e,f,d)}catch{}}}}return e}function fo(e){return typeof e=="function"}function zu(e){return typeof e=="object"&&"styledComponentId"in e}function Ba(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function L0(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Xo(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function _0(e,t,r){if(r===void 0&&(r=!1),!r&&!Xo(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=_0(e[n],t[n]);else if(Xo(t))for(var n in t)e[n]=_0(e[n],t[n]);return e}function Iu(e,t){Object.defineProperty(e,"toString",{value:t})}function si(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 Sx=(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,a=n.length,i=a;t>=i;)if((i<<=1)<0)throw si(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var c=a;c<i;c++)this.groupSizes[c]=0}for(var u=this.indexOfGroup(t+1),f=(c=0,r.length);c<f;c++)this.tag.insertRule(u,r[c])&&(this.groupSizes[t]++,u++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),a=n+r;this.groupSizes[t]=0;for(var i=n;i<a;i++)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],a=this.indexOfGroup(t),i=a+n,c=a;c<i;c++)r+="".concat(this.tag.getRule(c)).concat(Ru);return r},e})(),_i=new Map,us=new Map,qi=1,Ni=function(e){if(_i.has(e))return _i.get(e);for(;us.has(qi);)qi++;var t=qi++;return _i.set(e,t),us.set(t,e),t},Ax=function(e,t){qi=t+1,_i.set(e,t),us.set(t,e)},Bx="style[".concat(uo,"][").concat(am,'="').concat(Es,'"]'),Fx=new RegExp("^".concat(uo,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Nx=function(e,t,r){for(var n,a=r.split(","),i=0,c=a.length;i<c;i++)(n=a[i])&&e.registerName(t,n)},Tx=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(Ru),a=[],i=0,c=n.length;i<c;i++){var u=n[i].trim();if(u){var f=u.match(Fx);if(f){var d=0|parseInt(f[1],10),m=f[2];d!==0&&(Ax(m,d),Nx(e,m,f[3]),e.getTag().insertRules(d,a)),a.length=0}else a.push(u)}}},Fh=function(e){for(var t=document.querySelectorAll(Bx),r=0,n=t.length;r<n;r++){var a=t[r];a&&a.getAttribute(uo)!==nm&&(Tx(e,a),a.parentNode&&a.parentNode.removeChild(a))}};function Ox(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var hm=function(e){var t=document.head,r=e||t,n=document.createElement("style"),a=(function(u){var f=Array.from(u.querySelectorAll("style[".concat(uo,"]")));return f[f.length-1]})(r),i=a!==void 0?a.nextSibling:null;n.setAttribute(uo,nm),n.setAttribute(am,Es);var c=Ox();return c&&n.setAttribute("nonce",c),r.insertBefore(n,i),n},$x=(function(){function e(t){this.element=hm(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,a=0,i=n.length;a<i;a++){var c=n[a];if(c.ownerNode===r)return c}throw si(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})(),Px=(function(){function e(t){this.element=hm(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})(),Mx=(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})(),Nh=ls,Rx={isServer:!ls,useCSSOMInjection:!fx},pm=(function(){function e(t,r,n){t===void 0&&(t=co),r===void 0&&(r={});var a=this;this.options=cn(cn({},Rx),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&ls&&Nh&&(Nh=!1,Fh(this)),Iu(this,function(){return(function(i){for(var c=i.getTag(),u=c.length,f="",d=function(g){var v=(function(A){return us.get(A)})(g);if(v===void 0)return"continue";var w=i.names.get(v),x=c.getGroup(g);if(w===void 0||!w.size||x.length===0)return"continue";var C="".concat(uo,".g").concat(g,'[id="').concat(v,'"]'),p="";w!==void 0&&w.forEach(function(A){A.length>0&&(p+="".concat(A,","))}),f+="".concat(x).concat(C,'{content:"').concat(p,'"}').concat(Ru)},m=0;m<u;m++)d(m);return f})(a)})}return e.registerId=function(t){return Ni(t)},e.prototype.rehydrate=function(){!this.server&&ls&&Fh(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(cn(cn({},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,a=r.target;return r.isServer?new Mx(a):n?new $x(a):new Px(a)})(this.options),new Sx(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(Ni(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(Ni(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Ni(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),zx=/&/g,Ix=/^\s*\/\/.*$/gm;function mm(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=mm(r.children,t)),r})}function jx(e){var t,r,n,a=co,i=a.options,c=i===void 0?co:i,u=a.plugins,f=u===void 0?Ss:u,d=function(v,w,x){return x.startsWith(r)&&x.endsWith(r)&&x.replaceAll(r,"").length>0?".".concat(t):v},m=f.slice();m.push(function(v){v.type===ws&&v.value.includes("&")&&(v.props[0]=v.props[0].replace(zx,r).replace(n,d))}),c.prefix&&m.push(cx),m.push(sx);var g=function(v,w,x,C){w===void 0&&(w=""),x===void 0&&(x=""),C===void 0&&(C="&"),t=C,r=w,n=new RegExp("\\".concat(r,"\\b"),"g");var p=v.replace(Ix,""),A=ox(x||w?"".concat(x," ").concat(w," { ").concat(p," }"):p);c.namespace&&(A=mm(A,c.namespace));var B=[];return ss(A,lx(m.concat(ux(function(E){return B.push(E)})))),B};return g.hash=f.length?f.reduce(function(v,w){return w.name||si(15),Za(v,w.name)},im).toString():"",g}var Lx=new pm,q0=jx(),gm=We.createContext({shouldForwardProp:void 0,styleSheet:Lx,stylis:q0});gm.Consumer;We.createContext(void 0);function Th(){return wa(gm)}var vm=(function(){function e(t,r){var n=this;this.inject=function(a,i){i===void 0&&(i=q0);var c=n.name+i.hash;a.hasNameForId(n.id,c)||a.insertRules(n.id,c,i(n.rules,c,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,Iu(this,function(){throw si(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=q0),this.name+t.hash},e})(),_x=function(e){return e>="A"&&e<="Z"};function Oh(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;_x(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var bm=function(e){return e==null||e===!1||e===""},ym=function(e){var t,r,n=[];for(var a in e){var i=e[a];e.hasOwnProperty(a)&&!bm(i)&&(Array.isArray(i)&&i.isCss||fo(i)?n.push("".concat(Oh(a),":"),i,";"):Xo(i)?n.push.apply(n,Zo(Zo(["".concat(a," {")],ym(i),!1),["}"],!1)):n.push("".concat(Oh(a),": ").concat((t=a,(r=i)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in dx||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function $a(e,t,r,n){if(bm(e))return[];if(zu(e))return[".".concat(e.styledComponentId)];if(fo(e)){if(!fo(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return[e];var a=e(t);return $a(a,t,r,n)}var i;return e instanceof vm?r?(e.inject(r,n),[e.getName(n)]):[e]:Xo(e)?ym(e):Array.isArray(e)?Array.prototype.concat.apply(Ss,e.map(function(c){return $a(c,t,r,n)})):[e.toString()]}function qx(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(fo(r)&&!zu(r))return!1}return!0}var Hx=sm(Es),Kx=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&qx(t),this.componentId=r,this.baseHash=Za(Hx,r),this.baseStyle=n,pm.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var a=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))a=Ba(a,this.staticRulesId);else{var i=L0($a(this.rules,t,r,n)),c=j0(Za(this.baseHash,i)>>>0);if(!r.hasNameForId(this.componentId,c)){var u=n(i,".".concat(c),void 0,this.componentId);r.insertRules(this.componentId,c,u)}a=Ba(a,c),this.staticRulesId=c}else{for(var f=Za(this.baseHash,n.hash),d="",m=0;m<this.rules.length;m++){var g=this.rules[m];if(typeof g=="string")d+=g;else if(g){var v=L0($a(g,t,r,n));f=Za(f,v+m),d+=v}}if(d){var w=j0(f>>>0);r.hasNameForId(this.componentId,w)||r.insertRules(this.componentId,w,n(d,".".concat(w),void 0,this.componentId)),a=Ba(a,w)}}return a},e})(),xm=We.createContext(void 0);xm.Consumer;var Hl={};function Wx(e,t,r){var n=zu(e),a=e,i=!ql(e),c=t.attrs,u=c===void 0?Ss:c,f=t.componentId,d=f===void 0?(function(T,F){var P=typeof T!="string"?"sc":kh(T);Hl[P]=(Hl[P]||0)+1;var S="".concat(P,"-").concat(lm(Es+P+Hl[P]));return F?"".concat(F,"-").concat(S):S})(t.displayName,t.parentComponentId):f,m=t.displayName,g=m===void 0?(function(T){return ql(T)?"styled.".concat(T):"Styled(".concat(vx(T),")")})(e):m,v=t.displayName&&t.componentId?"".concat(kh(t.displayName),"-").concat(t.componentId):t.componentId||d,w=n&&a.attrs?a.attrs.concat(u).filter(Boolean):u,x=t.shouldForwardProp;if(n&&a.shouldForwardProp){var C=a.shouldForwardProp;if(t.shouldForwardProp){var p=t.shouldForwardProp;x=function(T,F){return C(T,F)&&p(T,F)}}else x=C}var A=new Kx(r,v,n?a.componentStyle:void 0);function B(T,F){return(function(P,S,L){var O=P.attrs,W=P.componentStyle,j=P.defaultProps,Y=P.foldedComponentIds,Z=P.styledComponentId,_=P.target,H=We.useContext(xm),V=Th(),G=P.shouldForwardProp||V.shouldForwardProp,te=hx(S,H,j)||co,K=(function(_e,Q,oe){for(var ue,le=cn(cn({},Q),{className:void 0,theme:oe}),Se=0;Se<_e.length;Se+=1){var Fe=fo(ue=_e[Se])?ue(le):ue;for(var me in Fe)le[me]=me==="className"?Ba(le[me],Fe[me]):me==="style"?cn(cn({},le[me]),Fe[me]):Fe[me]}return Q.className&&(le.className=Ba(le.className,Q.className)),le})(O,S,te),X=K.as||_,ye={};for(var xe in K)K[xe]===void 0||xe[0]==="$"||xe==="as"||xe==="theme"&&K.theme===te||(xe==="forwardedAs"?ye.as=K.forwardedAs:G&&!G(xe,X)||(ye[xe]=K[xe]));var ke=(function(_e,Q){var oe=Th(),ue=_e.generateAndInjectStyles(Q,oe.styleSheet,oe.stylis);return ue})(W,K),Be=Ba(Y,Z);return ke&&(Be+=" "+ke),K.className&&(Be+=" "+K.className),ye[ql(X)&&!om.has(X)?"class":"className"]=Be,L&&(ye.ref=L),Ki(X,ye)})(E,T,F)}B.displayName=g;var E=We.forwardRef(B);return E.attrs=w,E.componentStyle=A,E.displayName=g,E.shouldForwardProp=x,E.foldedComponentIds=n?Ba(a.foldedComponentIds,a.styledComponentId):"",E.styledComponentId=v,E.target=n?a.target:e,Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(T){this._foldedDefaultProps=n?(function(F){for(var P=[],S=1;S<arguments.length;S++)P[S-1]=arguments[S];for(var L=0,O=P;L<O.length;L++)_0(F,O[L],!0);return F})({},a.defaultProps,T):T}}),Iu(E,function(){return".".concat(E.styledComponentId)}),i&&fm(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function $h(e,t){for(var r=[e[0]],n=0,a=t.length;n<a;n+=1)r.push(t[n],e[n+1]);return r}var Ph=function(e){return Object.assign(e,{isCss:!0})};function As(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(fo(e)||Xo(e))return Ph($a($h(Ss,Zo([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?$a(n):Ph($a($h(n,t)))}function H0(e,t,r){if(r===void 0&&(r=co),!t)throw si(1,t);var n=function(a){for(var i=[],c=1;c<arguments.length;c++)i[c-1]=arguments[c];return e(t,r,As.apply(void 0,Zo([a],i,!1)))};return n.attrs=function(a){return H0(e,t,cn(cn({},r),{attrs:Array.prototype.concat(r.attrs,a).filter(Boolean)}))},n.withConfig=function(a){return H0(e,t,cn(cn({},r),a))},n}var wm=function(e){return H0(Wx,e)},qe=wm;om.forEach(function(e){qe[e]=wm(e)});function Cm(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=L0(As.apply(void 0,Zo([e],t,!1))),a=lm(n);return new vm(a,n)}var Mh={exports:{}},Rh;function Vx(){return Rh||(Rh=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
143
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
144
|
-
*
|
|
145
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
146
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
147
|
-
* @namespace
|
|
148
|
-
* @public
|
|
149
|
-
*/var r=(function(n){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,c={},u={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function B(E){return E instanceof f?new f(E.type,B(E.content),E.alias):Array.isArray(E)?E.map(B):E.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(B){return Object.prototype.toString.call(B).slice(8,-1)},objId:function(B){return B.__id||Object.defineProperty(B,"__id",{value:++i}),B.__id},clone:function B(E,T){T=T||{};var F,P;switch(u.util.type(E)){case"Object":if(P=u.util.objId(E),T[P])return T[P];F={},T[P]=F;for(var S in E)E.hasOwnProperty(S)&&(F[S]=B(E[S],T));return F;case"Array":return P=u.util.objId(E),T[P]?T[P]:(F=[],T[P]=F,E.forEach(function(L,O){F[O]=B(L,T)}),F);default:return E}},getLanguage:function(B){for(;B;){var E=a.exec(B.className);if(E)return E[1].toLowerCase();B=B.parentElement}return"none"},setLanguage:function(B,E){B.className=B.className.replace(RegExp(a,"gi"),""),B.classList.add("language-"+E)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(F){var B=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(F.stack)||[])[1];if(B){var E=document.getElementsByTagName("script");for(var T in E)if(E[T].src==B)return E[T]}return null}},isActive:function(B,E,T){for(var F="no-"+E;B;){var P=B.classList;if(P.contains(E))return!0;if(P.contains(F))return!1;B=B.parentElement}return!!T}},languages:{plain:c,plaintext:c,text:c,txt:c,extend:function(B,E){var T=u.util.clone(u.languages[B]);for(var F in E)T[F]=E[F];return T},insertBefore:function(B,E,T,F){F=F||u.languages;var P=F[B],S={};for(var L in P)if(P.hasOwnProperty(L)){if(L==E)for(var O in T)T.hasOwnProperty(O)&&(S[O]=T[O]);T.hasOwnProperty(L)||(S[L]=P[L])}var W=F[B];return F[B]=S,u.languages.DFS(u.languages,function(j,Y){Y===W&&j!=B&&(this[j]=S)}),S},DFS:function B(E,T,F,P){P=P||{};var S=u.util.objId;for(var L in E)if(E.hasOwnProperty(L)){T.call(E,L,E[L],F||L);var O=E[L],W=u.util.type(O);W==="Object"&&!P[S(O)]?(P[S(O)]=!0,B(O,T,null,P)):W==="Array"&&!P[S(O)]&&(P[S(O)]=!0,B(O,T,L,P))}}},plugins:{},highlightAll:function(B,E){u.highlightAllUnder(document,B,E)},highlightAllUnder:function(B,E,T){var F={callback:T,container:B,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",F),F.elements=Array.prototype.slice.apply(F.container.querySelectorAll(F.selector)),u.hooks.run("before-all-elements-highlight",F);for(var P=0,S;S=F.elements[P++];)u.highlightElement(S,E===!0,F.callback)},highlightElement:function(B,E,T){var F=u.util.getLanguage(B),P=u.languages[F];u.util.setLanguage(B,F);var S=B.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&u.util.setLanguage(S,F);var L=B.textContent,O={element:B,language:F,grammar:P,code:L};function W(Y){O.highlightedCode=Y,u.hooks.run("before-insert",O),O.element.innerHTML=O.highlightedCode,u.hooks.run("after-highlight",O),u.hooks.run("complete",O),T&&T.call(O.element)}if(u.hooks.run("before-sanity-check",O),S=O.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!O.code){u.hooks.run("complete",O),T&&T.call(O.element);return}if(u.hooks.run("before-highlight",O),!O.grammar){W(u.util.encode(O.code));return}if(E&&n.Worker){var j=new Worker(u.filename);j.onmessage=function(Y){W(Y.data)},j.postMessage(JSON.stringify({language:O.language,code:O.code,immediateClose:!0}))}else W(u.highlight(O.code,O.grammar,O.language))},highlight:function(B,E,T){var F={code:B,grammar:E,language:T};if(u.hooks.run("before-tokenize",F),!F.grammar)throw new Error('The language "'+F.language+'" has no grammar.');return F.tokens=u.tokenize(F.code,F.grammar),u.hooks.run("after-tokenize",F),f.stringify(u.util.encode(F.tokens),F.language)},tokenize:function(B,E){var T=E.rest;if(T){for(var F in T)E[F]=T[F];delete E.rest}var P=new g;return v(P,P.head,B),m(B,P,E,P.head,0),x(P)},hooks:{all:{},add:function(B,E){var T=u.hooks.all;T[B]=T[B]||[],T[B].push(E)},run:function(B,E){var T=u.hooks.all[B];if(!(!T||!T.length))for(var F=0,P;P=T[F++];)P(E)}},Token:f};n.Prism=u;function f(B,E,T,F){this.type=B,this.content=E,this.alias=T,this.length=(F||"").length|0}f.stringify=function B(E,T){if(typeof E=="string")return E;if(Array.isArray(E)){var F="";return E.forEach(function(W){F+=B(W,T)}),F}var P={type:E.type,content:B(E.content,T),tag:"span",classes:["token",E.type],attributes:{},language:T},S=E.alias;S&&(Array.isArray(S)?Array.prototype.push.apply(P.classes,S):P.classes.push(S)),u.hooks.run("wrap",P);var L="";for(var O in P.attributes)L+=" "+O+'="'+(P.attributes[O]||"").replace(/"/g,""")+'"';return"<"+P.tag+' class="'+P.classes.join(" ")+'"'+L+">"+P.content+"</"+P.tag+">"};function d(B,E,T,F){B.lastIndex=E;var P=B.exec(T);if(P&&F&&P[1]){var S=P[1].length;P.index+=S,P[0]=P[0].slice(S)}return P}function m(B,E,T,F,P,S){for(var L in T)if(!(!T.hasOwnProperty(L)||!T[L])){var O=T[L];O=Array.isArray(O)?O:[O];for(var W=0;W<O.length;++W){if(S&&S.cause==L+","+W)return;var j=O[W],Y=j.inside,Z=!!j.lookbehind,_=!!j.greedy,H=j.alias;if(_&&!j.pattern.global){var V=j.pattern.toString().match(/[imsuy]*$/)[0];j.pattern=RegExp(j.pattern.source,V+"g")}for(var G=j.pattern||j,te=F.next,K=P;te!==E.tail&&!(S&&K>=S.reach);K+=te.value.length,te=te.next){var X=te.value;if(E.length>B.length)return;if(!(X instanceof f)){var ye=1,xe;if(_){if(xe=d(G,K,B,Z),!xe||xe.index>=B.length)break;var Q=xe.index,ke=xe.index+xe[0].length,Be=K;for(Be+=te.value.length;Q>=Be;)te=te.next,Be+=te.value.length;if(Be-=te.value.length,K=Be,te.value instanceof f)continue;for(var _e=te;_e!==E.tail&&(Be<ke||typeof _e.value=="string");_e=_e.next)ye++,Be+=_e.value.length;ye--,X=B.slice(K,Be),xe.index-=K}else if(xe=d(G,0,X,Z),!xe)continue;var Q=xe.index,oe=xe[0],ue=X.slice(0,Q),le=X.slice(Q+oe.length),Se=K+X.length;S&&Se>S.reach&&(S.reach=Se);var Fe=te.prev;ue&&(Fe=v(E,Fe,ue),K+=ue.length),w(E,Fe,ye);var me=new f(L,Y?u.tokenize(oe,Y):oe,H,oe);if(te=v(E,Fe,me),le&&v(E,te,le),ye>1){var we={cause:L+","+W,reach:Se};m(B,E,T,te.prev,K,we),S&&we.reach>S.reach&&(S.reach=we.reach)}}}}}}function g(){var B={value:null,prev:null,next:null},E={value:null,prev:B,next:null};B.next=E,this.head=B,this.tail=E,this.length=0}function v(B,E,T){var F=E.next,P={value:T,prev:E,next:F};return E.next=P,F.prev=P,B.length++,P}function w(B,E,T){for(var F=E.next,P=0;P<T&&F!==B.tail;P++)F=F.next;E.next=F,F.prev=E,B.length-=P}function x(B){for(var E=[],T=B.head.next;T!==B.tail;)E.push(T.value),T=T.next;return E}if(!n.document)return n.addEventListener&&(u.disableWorkerMessageHandler||n.addEventListener("message",function(B){var E=JSON.parse(B.data),T=E.language,F=E.code,P=E.immediateClose;n.postMessage(u.highlight(F,u.languages[T],T)),P&&n.close()},!1)),u;var C=u.util.currentScript();C&&(u.filename=C.src,C.hasAttribute("data-manual")&&(u.manual=!0));function p(){u.manual||u.highlightAll()}if(!u.manual){var A=document.readyState;A==="loading"||A==="interactive"&&C&&C.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return u})(t);e.exports&&(e.exports=r),typeof Ua<"u"&&(Ua.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(n,a){var i={};i["language-"+a]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[a]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var c={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};c["language-"+a]={pattern:/[\s\S]+/,inside:r.languages[a]};var u={};u[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:c},r.languages.insertBefore("markup","cdata",u)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,a){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[a,"language-"+a],inside:r.languages[a]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,(function(n){var a=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+a.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+a.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var i=n.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))})(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,(function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading\u2026",a=function(C,p){return"\u2716 Error "+C+" while fetching file: "+p},i="\u2716 Error: File does not exist or is empty",c={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="data-src-status",f="loading",d="loaded",m="failed",g="pre[data-src]:not(["+u+'="'+d+'"]):not(['+u+'="'+f+'"])';function v(C,p,A){var B=new XMLHttpRequest;B.open("GET",C,!0),B.onreadystatechange=function(){B.readyState==4&&(B.status<400&&B.responseText?p(B.responseText):B.status>=400?A(a(B.status,B.statusText)):A(i))},B.send(null)}function w(C){var p=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(C||"");if(p){var A=Number(p[1]),B=p[2],E=p[3];return B?E?[A,Number(E)]:[A,void 0]:[A,A]}}r.hooks.add("before-highlightall",function(C){C.selector+=", "+g}),r.hooks.add("before-sanity-check",function(C){var p=C.element;if(p.matches(g)){C.code="",p.setAttribute(u,f);var A=p.appendChild(document.createElement("CODE"));A.textContent=n;var B=p.getAttribute("data-src"),E=C.language;if(E==="none"){var T=(/\.(\w+)$/.exec(B)||[,"none"])[1];E=c[T]||T}r.util.setLanguage(A,E),r.util.setLanguage(p,E);var F=r.plugins.autoloader;F&&F.loadLanguages(E),v(B,function(P){p.setAttribute(u,d);var S=w(p.getAttribute("data-range"));if(S){var L=P.split(/\r\n?|\n/g),O=S[0],W=S[1]==null?L.length:S[1];O<0&&(O+=L.length),O=Math.max(0,Math.min(O-1,L.length)),W<0&&(W+=L.length),W=Math.max(0,Math.min(W,L.length)),P=L.slice(O,W).join(`
|
|
150
|
-
`),p.hasAttribute("data-start")||p.setAttribute("data-start",String(O+1))}A.textContent=P,r.highlightElement(A)},function(P){p.setAttribute(u,m),A.textContent=P})}}),r.plugins.fileHighlight={highlight:function(C){for(var p=(C||document).querySelectorAll(g),A=0,B;B=p[A++];)r.highlightElement(B)}};var x=!1;r.fileHighlight=function(){x||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),x=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Mh)),Mh.exports}var Ux=Vx();const Kl=ai(Ux),Gx=qe.span.attrs({className:"unified-rich-text-template-container"})`
|
|
151
|
-
display: inline-block;
|
|
152
|
-
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
153
|
-
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
154
|
-
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
155
|
-
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
156
|
-
border: none !important;
|
|
157
|
-
cursor: pointer;
|
|
158
|
-
transition: all 0.2s;
|
|
159
|
-
font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
|
|
160
|
-
user-select: none;
|
|
161
|
-
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
162
|
-
line-height: 2;
|
|
163
|
-
width: auto; /* 让宽度根据内容自动调整 */
|
|
164
|
-
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
165
|
-
min-height: ${e=>{var c,u,f,d;const t=((u=(c=e.$styles)==null?void 0:c.templateField)==null?void 0:u.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)),a=(n.length,n[0]),i=parseInt(r);return a*2+i*1.4+"px"}};
|
|
166
|
-
|
|
167
|
-
/* 高度自适应 */
|
|
168
|
-
height: auto; /* 允许高度根据内容自动调整 */
|
|
169
|
-
white-space: normal; /* 允许换行 */
|
|
170
|
-
box-sizing: border-box; /* 确保padding和border包含在宽度内 */
|
|
171
|
-
overflow: visible; /* 确保内容不被隐藏 */
|
|
172
|
-
word-wrap: break-word; /* 允许长单词换行 */
|
|
173
|
-
max-width: 100%; /* 限制在容器宽度内 */
|
|
174
|
-
|
|
175
|
-
/* 使用传入的样式配置 */
|
|
176
|
-
background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
|
|
177
|
-
color: #055AFF;
|
|
178
|
-
border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
179
|
-
|
|
180
|
-
${e=>{var t,r;return e.$isEditing&&`
|
|
181
|
-
background-color: white !important;
|
|
182
|
-
color: #055AFF !important;
|
|
183
|
-
border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
|
|
184
|
-
outline: none;
|
|
185
|
-
min-width: 30px;
|
|
186
|
-
`}}
|
|
187
|
-
|
|
188
|
-
&:hover {
|
|
189
|
-
opacity: 0.8;
|
|
190
|
-
}
|
|
191
|
-
`,Yx=qe.input.attrs({className:"unified-rich-text-template-input"})`
|
|
192
|
-
background: white;
|
|
193
|
-
border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
194
|
-
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
195
|
-
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
196
|
-
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
197
|
-
min-width: ${"30px"};
|
|
198
|
-
width: ${e=>{var d,m,g,v;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=((v=(g=e.$styles)==null?void 0:g.templateField)==null?void 0:v.padding)||"2px 6.2px",n=r.split(" ").map(w=>parseInt(w)),a=n.length===2?n[1]:n[0],i=12.5,c=20,u=t*i+a*2+c,f=Math.min(Math.max(u,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:a,charWidth:i,bufferSpace:c,calculatedWidth:u,maxWidth:e.$maxWidth,finalWidth:f,inputValue:e.$value}),f+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
|
|
199
|
-
height: ${e=>{var c,u,f,d;const t=((u=(c=e.$styles)==null?void 0:c.templateField)==null?void 0:u.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)),a=(n.length,n[0]),i=parseInt(r);return a*2+i*1.4+"px"}};
|
|
200
|
-
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
201
|
-
font-family: inherit;
|
|
202
|
-
outline: none;
|
|
203
|
-
color: #055AFF;
|
|
204
|
-
line-height: 2;
|
|
205
|
-
box-sizing: border-box;
|
|
206
|
-
white-space: nowrap; /* 防止内部换行 */
|
|
207
|
-
overflow: hidden; /* 隐藏超出部分 */
|
|
208
|
-
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
209
|
-
|
|
210
|
-
&:focus {
|
|
211
|
-
border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
212
|
-
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;
|
|
213
|
-
}
|
|
214
|
-
`,Dm=Jo(({element:e,attributes:t,children:r,styles:n,onTemplateChange:a},i)=>{var P,S,L,O,W,j,Y,Z,_,H,V,G;const c=zp(),[u,f]=St(!1),[d,m]=St(e.value||""),[g,v]=St(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[w,x]=St(600),C=Kt(null),p=Tt(()=>{try{const te=document.querySelector('[data-slate-editor="true"]');if(te){const K=te.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||te.parentElement;if(K){const X=K.clientWidth,ye=X-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",X,"\u53EF\u7528\u5BBD\u5EA6:",ye),Math.max(ye,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}},[]);Qt(()=>{v(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const te=p();x(te)},[e.value,e.placeholder,p]);const A=Tt(()=>{f(!0),m(e.value||""),setTimeout(()=>{C.current&&(C.current.focus(),C.current.select())},0)},[e.value]),B=Tt(te=>{const K=te.target.value;m(K)},[]),E=Tt(()=>{const te=$e.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 K=d.trim()!==""?d:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";v(K);const X=c.children[te[0]];if(X&&"children"in X){const ye=X.children[te[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",ye)}f(!1)},[c,e,d]),T=Tt(()=>{E()},[E]),F=Tt(te=>{te.key==="Enter"?(te.preventDefault(),E()):te.key==="Escape"&&(te.preventDefault(),m(e.value||""),f(!1))},[E,e.value]);return u?q.jsxs("span",{...t,children:[q.jsx("span",{contentEditable:!1,children:q.jsx(Yx,{ref:C,value:d,onChange:B,onBlur:T,onKeyDown:F,placeholder:"",$styles:n,$value:d,$maxWidth:w,style:{backgroundColor:"white",color:((P=n==null?void 0:n.templateField)==null?void 0:P.textColor)||"#055AFF",border:`2px solid ${((S=n==null?void 0:n.templateField)==null?void 0:S.borderColor)||"#84ADFF"}`,minWidth:((L=n==null?void 0:n.templateField)==null?void 0:L.minWidth)||"120px"}})}),r]}):q.jsxs("span",{...t,children:[q.jsx("span",{contentEditable:!1,children:q.jsxs(Gx,{ref:i,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:g.length,onClick:A,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(O=n==null?void 0:n.templateField)==null?void 0:O.backgroundColor,borderColor:(W=n==null?void 0:n.templateField)==null?void 0:W.borderColor,borderRadius:(j=n==null?void 0:n.templateField)==null?void 0:j.borderRadius,padding:(Y=n==null?void 0:n.templateField)==null?void 0:Y.padding,margin:(Z=n==null?void 0:n.templateField)==null?void 0:Z.margin,fontSize:(_=n==null?void 0:n.templateField)==null?void 0:_.fontSize,fontWeight:(H=n==null?void 0:n.templateField)==null?void 0:H.fontWeight,minWidth:(V=n==null?void 0:n.templateField)==null?void 0:V.minWidth,color:(G=n==null?void 0:n.templateField)==null?void 0:G.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:g,displayValueLength:g.length,contentLength:g.length}),null),g]})}),r]})});Dm.displayName="TemplateField";const Zx=({children:e,attributes:t,styles:r,extraProps:n})=>{var i;const a=!!(n!=null&&n.isCollapsed);return q.jsxs("div",{...t,className:"think-container",children:[q.jsx("div",{className:"think-indicator"}),q.jsx("div",{className:"think-content py-2",children:q.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:`${(i=r==null?void 0:r.text)==null?void 0:i.color} !important`,display:a?"none":"block"},children:e})})]})},km=We.forwardRef(({attributes:e,element:t,eventsEmit:r,dataSource:n,tagIndex:a},i)=>{var T;const[c,u]=St(null),[f,d]=St(!0),[m,g]=St(1),[v,w]=St(10);Qt(()=>{if(!c){if(!n){d(!0);try{const F=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(F)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const F=(n==null?void 0:n.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",F);let P=null,S=null,L;for(const j of F){const Y=j==null?void 0:j.reply;if(!(Y!=null&&Y.databaseReference))continue;const Z=Y.databaseReference;console.log(Z,"123123123jk123lk12j3l12jl3"),Z!=null&&Z.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",Z.retrieveSqlData.filePath),L=Z.retrieveSqlData.filePath);let _=Z;if(typeof Z=="string")try{_=JSON.parse(Z)}catch{}if(!_)continue;const H=Array.isArray(_)?_:[_],V=H.findIndex(K=>(K==null?void 0:K.id)===t.id),G=V>=0?H[V]:null;if(console.log("~~~~~~~~~~~~~~~",G),G){P=G,S=G.retrieveSqlData||G.retrieve_table_data||G.retrieveTableData;break}const te=H.find(K=>{var X,ye;return(((ye=(X=K==null?void 0:K.retrieveSqlData)==null?void 0:X.preData)==null?void 0:ye.length)||0)>0});!P&&te&&(P=te,S=te.retrieveSqlData||te.retrieve_table_data||te.retrieveTableData)}if(!P||!S){console.warn("No databaseReference with preData found for id:",t.id),d(!1);return}const O=Array.isArray(S==null?void 0:S.preData)?S.preData[0]:null;if(!O){console.warn("Matched item has no preData"),d(!1);return}const W={columns:(O.columns||[]).map(j=>({key:j.key,title:j.title})),rows:O.data||O.rows||[],total:(S==null?void 0:S.total)||0,fetchUrl:(S==null?void 0:S.fetchUrl)||"/index/knowledgeBase/file/stream",source:L||(S==null?void 0:S.source)||(P==null?void 0:P.source)};u(W),d(!1)}catch(F){console.error("Init preData parsing failed:",F),d(!1)}}},[t.id,c,n]),Qt(()=>{const F=P=>{try{const S=(P==null?void 0:P.detail)||{},L=S==null?void 0:S.id;if(!L||String(L)!==String(t.id))return;const O=S.databaseReference;if(!O)return;let W=O;if(typeof O=="string")try{W=JSON.parse(O)}catch{}if(!W)return;const j=Array.isArray(W)?W:[W],Y=j.findIndex(G=>String(G==null?void 0:G.id)===String(t.id)),Z=Y>=0?j[Y]:null;if(!Z)return;const _=(Z==null?void 0:Z.retrieveSqlData)||(Z==null?void 0:Z.retrieve_table_data)||(Z==null?void 0:Z.retrieveTableData),H=Array.isArray(_==null?void 0:_.preData)?_.preData[0]:null;if(!H)return;const V={columns:(H.columns||[]).map(G=>({key:G.key,title:G.title})),rows:H.data||H.rows||[],total:(_==null?void 0:_.total)||0,fetchUrl:(_==null?void 0:_.fetchUrl)||"/index/knowledgeBase/file/stream",source:(Z==null?void 0:Z.source)||(_==null?void 0:_.source)};u(V),d(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",F),()=>{window.removeEventListener("retrieve-sql-data:data-response",F)}},[t.id]);const x=F=>{if(!F||F.length===0)return[];const P=F.find(S=>S&&typeof S=="object")||{};return Object.keys(P).map(S=>({key:S,title:S}))},C=(F,P)=>{g(F),P&&w(P);const S=L=>{let O=null;if(L&&Array.isArray(L.columns)&&Array.isArray(L.rows))O={columns:L.columns,rows:L.rows,total:Number(L.total)||0,fetchUrl:L.fetchUrl||(c==null?void 0:c.fetchUrl)||"",source:L.source||(c==null?void 0:c.source)};else if(L&&Array.isArray(L.data)){const W=L.data;O={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:x(W),rows:W,total:Number(L.totalCount??L.total??(c==null?void 0:c.total)??W.length)||0,fetchUrl:(c==null?void 0:c.fetchUrl)||"",source:c==null?void 0:c.source},typeof L.currentPage=="number"&&g(L.currentPage),typeof L.pageSize=="number"&&w(L.pageSize)}else if(Array.isArray(L)){const W=L;O={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:x(W),rows:W,total:Number((c==null?void 0:c.total)??W.length)||0,fetchUrl:(c==null?void 0:c.fetchUrl)||"",source:c==null?void 0:c.source}}if(!O){console.warn("replacePredataFunction received unsupported data format:",L);return}console.log("Replacing table data with:",O),u(O)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:F,pageSize:P||v,fetchUrl:c==null?void 0:c.fetchUrl,total:c==null?void 0:c.total,source:c==null?void 0:c.source,replacePredataFunction:S})},p=F=>c!=null&&c.rows?Math.max(...c.rows.map(P=>{const S=P[F];return S?String(S).length:0})):0,A=(((T=c==null?void 0:c.columns)==null?void 0:T.length)||0)===1,B=(c==null?void 0:c.columns.map((F,P)=>({title:F.title||F.key,dataIndex:F.key,key:F.key,render:S=>{const L=S==null||S===""?"-":S;return A?q.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(L)}):L},...A?{width:void 0}:{}})))||[],E=(c==null?void 0:c.rows.map((F,P)=>({key:P,...F})))||[];return q.jsx("div",{...e,ref:i,className:"retrieve-sql-data-container my-4",children:f?q.jsxs("div",{className:"flex items-center justify-center py-8",children:[q.jsx(c1,{size:"large"}),q.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):c?q.jsxs("div",{className:"retrieve-sql-data-content",children:[a!==null&&(()=>{const F=String(a).length;let P="12px",S="24px",L="24px";return F===2?(P="9px",S="22px",L="24px"):F===3?(P="8px",S="24px",L="24px"):F>=4&&(P="8px",S="24px",L="30px"),q.jsxs("div",{className:"mb-2 flex items-center",children:[q.jsx("span",{className:"bg-orange-100 text-orange-600 rounded font-medium flex items-center justify-center",style:{width:S,height:S,minWidth:L,fontSize:P,lineHeight:1},children:a}),q.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]})})(),q.jsx("div",{className:"table-container max-w-full overflow-x-auto",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative",WebkitOverflowScrolling:"touch"},children:q.jsx(ra,{columns:B.map((F,P)=>({...F,...A?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:P===0?160:void 0,minWidth:120,maxWidth:P===0?180:300,fixed:P===0?"left":void 0,ellipsis:{showTitle:!0}},render:S=>{if(S==null)return"-";const L=String(S);if(A)return q.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:L,children:L});const O=p(F.key);let W="200px";return P===0?W="80px":O<=8?W="100px":O<=15?W="150px":O<=25?W="200px":O<=40?W="250px":W="300px",q.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:W,display:"inline-block",cursor:"default"},title:L,children:L})}})),dataSource:E,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>v&&q.jsx("div",{className:"flex justify-center mt-3",children:q.jsx(d1,{current:m,pageSize:v,total:c.total,onChange:C,onShowSizeChange:C,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):q.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});km.displayName="RetrieveSqlDataElement";var Hi={exports:{}},Wl={exports:{}},Vl,zh;function Xx(){if(zh)return Vl;zh=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Vl=e,Vl}var Ul,Ih;function Qx(){if(Ih)return Ul;Ih=1;var e=Xx();function t(){}function r(){}return r.resetWarningCache=t,Ul=function(){function n(c,u,f,d,m,g){if(g!==e){var v=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 v.name="Invariant Violation",v}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},Ul}var jh;function Jx(){return jh||(jh=1,Wl.exports=Qx()()),Wl.exports}var K0={exports:{}},ew=K0.exports,Lh;function tw(){return Lh||(Lh=1,(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:ew,function(){return(function(){var r={};(function(){r.d=function(s,o){for(var l in o)r.o(o,l)&&!r.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:o[l]})}})(),(function(){r.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)}})();var n={};r.d(n,{default:function(){return Cg}});class a{constructor(o,l){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let h="KaTeX parse error: "+o,b,k;const $=l&&l.loc;if($&&$.start<=$.end){const U=$.lexer.input;b=$.start,k=$.end,b===U.length?h+=" at end of input: ":h+=" at position "+(b+1)+": ";const ne=U.slice(b,k).replace(/[^]/g,"$&\u0332");let pe;b>15?pe="\u2026"+U.slice(b-15,b):pe=U.slice(0,b);let ge;k+15<U.length?ge=U.slice(k,k+15)+"\u2026":ge=U.slice(k),h+=pe+ne+ge}const z=new Error(h);return z.name="ParseError",z.__proto__=a.prototype,z.position=b,b!=null&&k!=null&&(z.length=k-b),z.rawMessage=o,z}}a.prototype.__proto__=Error.prototype;var i=a;const c=function(s,o){return s===void 0?o:s},u=/([A-Z])/g,f=function(s){return s.replace(u,"-$1").toLowerCase()},d={"&":"&",">":">","<":"<",'"':""","'":"'"},m=/[&><"']/g;function g(s){return String(s).replace(m,o=>d[o])}const v=function(s){return s.type==="ordgroup"||s.type==="color"?s.body.length===1?v(s.body[0]):s:s.type==="font"?v(s.body):s},w=function(s){const o=v(s);return o.type==="mathord"||o.type==="textord"||o.type==="atom"},x=function(s){if(!s)throw new Error("Expected non-null, but got "+String(s));return s};var C={deflt:c,escape:g,hyphenate:f,getBaseElem:v,isCharacterBox:w,protocolFromUrl:function(s){const o=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(s);return o?o[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(o[1])?null:o[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,o)=>(o.push(s),o)},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 o=s.type,l=Array.isArray(o)?o[0]:o;if(typeof l!="string")return l.enum[0];switch(l){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class B{constructor(o){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,o=o||{};for(const l in p)if(p.hasOwnProperty(l)){const h=p[l];this[l]=o[l]!==void 0?h.processor?h.processor(o[l]):o[l]:A(h)}}reportNonstrict(o,l,h){let b=this.strict;if(typeof b=="function"&&(b=b(o,l,h)),!(!b||b==="ignore")){if(b===!0||b==="error")throw new i("LaTeX-incompatible input and strict mode is set to 'error': "+(l+" ["+o+"]"),h);b==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+o+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+o+"]"))}}useStrictBehavior(o,l,h){let b=this.strict;if(typeof b=="function")try{b=b(o,l,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': "+(l+" ["+o+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+o+"]")),!1)}isTrusted(o){if(o.url&&!o.protocol){const l=C.protocolFromUrl(o.url);if(l==null)return!1;o.protocol=l}return!!(typeof this.trust=="function"?this.trust(o):this.trust)}}class E{constructor(o,l,h){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=o,this.size=l,this.cramped=h}sup(){return Y[Z[this.id]]}sub(){return Y[_[this.id]]}fracNum(){return Y[H[this.id]]}fracDen(){return Y[V[this.id]]}cramp(){return Y[G[this.id]]}text(){return Y[te[this.id]]}isTight(){return this.size>=2}}const T=0,F=1,P=2,S=3,L=4,O=5,W=6,j=7,Y=[new E(T,0,!1),new E(F,0,!0),new E(P,1,!1),new E(S,1,!0),new E(L,2,!1),new E(O,2,!0),new E(W,3,!1),new E(j,3,!0)],Z=[L,O,L,O,W,j,W,j],_=[O,O,O,O,j,j,j,j],H=[P,S,L,O,W,j,W,j],V=[S,S,O,O,j,j,j,j],G=[F,F,S,S,O,O,j,j],te=[T,F,P,S,P,S,P,S];var K={DISPLAY:Y[T],TEXT:Y[P],SCRIPT:Y[L],SCRIPTSCRIPT:Y[W]};const X=[{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 ye(s){for(let o=0;o<X.length;o++){const l=X[o];for(let h=0;h<l.blocks.length;h++){const b=l.blocks[h];if(s>=b[0]&&s<=b[1])return l.name}}return null}const xe=[];X.forEach(s=>s.blocks.forEach(o=>xe.push(...o)));function ke(s){for(let o=0;o<xe.length;o+=2)if(s>=xe[o]&&s<=xe[o+1])return!0;return!1}const Be=80,_e=function(s,o){return"M95,"+(622+s+o)+`
|
|
215
|
-
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
216
|
-
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
217
|
-
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
|
|
218
|
-
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
219
|
-
c69,-144,104.5,-217.7,106.5,-221
|
|
220
|
-
l`+s/2.075+" -"+s+`
|
|
221
|
-
c5.3,-9.3,12,-14,20,-14
|
|
222
|
-
H400000v`+(40+s)+`H845.2724
|
|
223
|
-
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
224
|
-
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
225
|
-
M`+(834+s)+" "+o+"h400000v"+(40+s)+"h-400000z"},Q=function(s,o){return"M263,"+(601+s+o)+`c0.7,0,18,39.7,52,119
|
|
226
|
-
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
227
|
-
c340,-704.7,510.7,-1060.3,512,-1067
|
|
228
|
-
l`+s/2.084+" -"+s+`
|
|
229
|
-
c4.7,-7.3,11,-11,19,-11
|
|
230
|
-
H40000v`+(40+s)+`H1012.3
|
|
231
|
-
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
232
|
-
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
|
|
233
|
-
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
234
|
-
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
235
|
-
M`+(1001+s)+" "+o+"h400000v"+(40+s)+"h-400000z"},oe=function(s,o){return"M983 "+(10+s+o)+`
|
|
236
|
-
l`+s/3.13+" -"+s+`
|
|
237
|
-
c4,-6.7,10,-10,18,-10 H400000v`+(40+s)+`
|
|
238
|
-
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
|
|
239
|
-
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
|
|
240
|
-
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
241
|
-
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
242
|
-
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
243
|
-
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
244
|
-
M`+(1001+s)+" "+o+"h400000v"+(40+s)+"h-400000z"},ue=function(s,o){return"M424,"+(2398+s+o)+`
|
|
245
|
-
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
246
|
-
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
|
|
247
|
-
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
248
|
-
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
249
|
-
l`+s/4.223+" -"+s+`c4,-6.7,10,-10,18,-10 H400000
|
|
250
|
-
v`+(40+s)+`H1014.6
|
|
251
|
-
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
252
|
-
c-2,6,-10,9,-24,9
|
|
253
|
-
c-8,0,-12,-0.7,-12,-2z M`+(1001+s)+" "+o+`
|
|
254
|
-
h400000v`+(40+s)+"h-400000z"},le=function(s,o){return"M473,"+(2713+s+o)+`
|
|
255
|
-
c339.3,-1799.3,509.3,-2700,510,-2702 l`+s/5.298+" -"+s+`
|
|
256
|
-
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+s)+`H1017.7
|
|
257
|
-
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
258
|
-
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
|
|
259
|
-
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
|
|
260
|
-
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
261
|
-
606zM`+(1001+s)+" "+o+"h400000v"+(40+s)+"H1017.7z"},Se=function(s){const o=s/2;return"M400000 "+s+" H0 L"+o+" 0 l65 45 L145 "+(s-80)+" H400000z"},Fe=function(s,o,l){const h=l-54-o-s;return"M702 "+(s+o)+"H400000"+(40+s)+`
|
|
262
|
-
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
|
|
263
|
-
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
264
|
-
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
265
|
-
219 661 l218 661zM702 `+o+"H400000v"+(40+s)+"H742z"},me=function(s,o,l){o=1e3*o;let h="";switch(s){case"sqrtMain":h=_e(o,Be);break;case"sqrtSize1":h=Q(o,Be);break;case"sqrtSize2":h=oe(o,Be);break;case"sqrtSize3":h=ue(o,Be);break;case"sqrtSize4":h=le(o,Be);break;case"sqrtTall":h=Fe(o,Be,l)}return h},we=function(s,o){switch(s){case"\u239C":return"M291 0 H417 V"+o+" H291z M291 0 H417 V"+o+" H291z";case"\u2223":return"M145 0 H188 V"+o+" H145z M145 0 H188 V"+o+" H145z";case"\u2225":return"M145 0 H188 V"+o+" H145z M145 0 H188 V"+o+" H145z"+("M367 0 H410 V"+o+" H367z M367 0 H410 V"+o+" H367z");case"\u239F":return"M457 0 H583 V"+o+" H457z M457 0 H583 V"+o+" H457z";case"\u23A2":return"M319 0 H403 V"+o+" H319z M319 0 H403 V"+o+" H319z";case"\u23A5":return"M263 0 H347 V"+o+" H263z M263 0 H347 V"+o+" H263z";case"\u23AA":return"M384 0 H504 V"+o+" H384z M384 0 H504 V"+o+" H384z";case"\u23D0":return"M312 0 H355 V"+o+" H312z M312 0 H355 V"+o+" H312z";case"\u2016":return"M257 0 H300 V"+o+" H257z M257 0 H300 V"+o+" H257z"+("M478 0 H521 V"+o+" H478z M478 0 H521 V"+o+" H478z");default:return""}},De={doubleleftarrow:`M262 157
|
|
266
|
-
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
|
|
267
|
-
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
|
|
268
|
-
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
|
|
269
|
-
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
|
|
270
|
-
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
|
|
271
|
-
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
272
|
-
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
273
|
-
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
274
|
-
-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
|
|
275
|
-
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
|
|
276
|
-
-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
|
|
277
|
-
-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
|
|
278
|
-
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
279
|
-
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
|
|
280
|
-
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
281
|
-
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
|
|
282
|
-
-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
|
|
283
|
-
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
|
|
284
|
-
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
|
|
285
|
-
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
|
|
286
|
-
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
287
|
-
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
288
|
-
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
|
|
289
|
-
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
|
|
290
|
-
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
291
|
-
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
292
|
-
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
|
|
293
|
-
435 0h399565z`,leftgroupunder:`M400000 262
|
|
294
|
-
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
|
|
295
|
-
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
296
|
-
-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
|
|
297
|
-
-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
|
|
298
|
-
-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
|
|
299
|
-
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
|
|
300
|
-
-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
|
|
301
|
-
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
302
|
-
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
303
|
-
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
304
|
-
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
|
|
305
|
-
-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
|
|
306
|
-
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
|
|
307
|
-
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
308
|
-
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
|
|
309
|
-
-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
|
|
310
|
-
-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
|
|
311
|
-
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
312
|
-
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
313
|
-
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
314
|
-
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
315
|
-
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
|
|
316
|
-
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
317
|
-
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
318
|
-
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
|
|
319
|
-
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
320
|
-
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
|
|
321
|
-
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
322
|
-
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
|
|
323
|
-
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
324
|
-
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
|
|
325
|
-
-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
|
|
326
|
-
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
327
|
-
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
|
|
328
|
-
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
|
|
329
|
-
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
330
|
-
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
331
|
-
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
|
|
332
|
-
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
333
|
-
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
|
|
334
|
-
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
|
|
335
|
-
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
336
|
-
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
337
|
-
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
|
|
338
|
-
-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
|
|
339
|
-
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
|
|
340
|
-
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
|
|
341
|
-
-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
|
|
342
|
-
-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
|
|
343
|
-
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
344
|
-
-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
|
|
345
|
-
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
|
|
346
|
-
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
|
|
347
|
-
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
348
|
-
-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
|
|
349
|
-
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
|
|
350
|
-
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
|
|
351
|
-
-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
|
|
352
|
-
-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
|
|
353
|
-
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
|
|
354
|
-
-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
|
|
355
|
-
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
|
|
356
|
-
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
|
|
357
|
-
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
|
|
358
|
-
-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
|
|
359
|
-
-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
|
|
360
|
-
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
|
|
361
|
-
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
|
|
362
|
-
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
363
|
-
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
|
|
364
|
-
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
|
|
365
|
-
-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
|
|
366
|
-
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
|
|
367
|
-
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
|
|
368
|
-
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
369
|
-
-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
|
|
370
|
-
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
371
|
-
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
|
|
372
|
-
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
373
|
-
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
374
|
-
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
375
|
-
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
|
|
376
|
-
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
|
|
377
|
-
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
|
|
378
|
-
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
379
|
-
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
380
|
-
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
|
|
381
|
-
-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
|
|
382
|
-
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
|
|
383
|
-
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
384
|
-
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
385
|
-
-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
|
|
386
|
-
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
387
|
-
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
|
|
388
|
-
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
|
|
389
|
-
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
390
|
-
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
391
|
-
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
392
|
-
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
393
|
-
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
394
|
-
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
395
|
-
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
396
|
-
-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
|
|
397
|
-
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
398
|
-
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
|
|
399
|
-
-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
|
|
400
|
-
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
401
|
-
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
402
|
-
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
|
|
403
|
-
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
|
|
404
|
-
-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
|
|
405
|
-
-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
|
|
406
|
-
-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,
|
|
407
|
-
-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,
|
|
408
|
-
-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,
|
|
409
|
-
-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,
|
|
410
|
-
-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
|
|
411
|
-
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
412
|
-
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
|
|
413
|
-
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
|
|
414
|
-
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
|
|
415
|
-
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
|
|
416
|
-
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
417
|
-
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
418
|
-
-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
|
|
419
|
-
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
|
|
420
|
-
-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
|
|
421
|
-
-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
|
|
422
|
-
-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
|
|
423
|
-
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
424
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
425
|
-
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
|
|
426
|
-
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
427
|
-
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
428
|
-
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
429
|
-
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,
|
|
430
|
-
-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
|
|
431
|
-
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
|
|
432
|
-
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
|
|
433
|
-
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,
|
|
434
|
-
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,
|
|
435
|
-
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
436
|
-
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
|
|
437
|
-
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,
|
|
438
|
-
-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
|
|
439
|
-
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
|
|
440
|
-
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Te=function(s,o){switch(s){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+o+` v1759 h347 v-84
|
|
441
|
-
H403z M403 1759 V0 H319 V1759 v`+o+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+o+` v1759 H0 v84 H347z
|
|
442
|
-
M347 1759 V0 H263 V1759 v`+o+" v1759 h84z";case"vert":return"M145 15 v585 v"+o+` v585 c2.667,10,9.667,15,21,15
|
|
443
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-o+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
444
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+o+" v585 h43z";case"doublevert":return"M145 15 v585 v"+o+` v585 c2.667,10,9.667,15,21,15
|
|
445
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-o+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
446
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+o+` v585 h43z
|
|
447
|
-
M367 15 v585 v`+o+` v585 c2.667,10,9.667,15,21,15
|
|
448
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-o+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
449
|
-
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+o+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+o+` v1715 h263 v84 H319z
|
|
450
|
-
MM319 602 V0 H403 V602 v`+o+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+o+` v1799 H0 v-84 H319z
|
|
451
|
-
MM319 602 V0 H403 V602 v`+o+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+o+` v602 h84z
|
|
452
|
-
M403 1759 V0 H319 V1759 v`+o+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+o+` v602 h84z
|
|
453
|
-
M347 1759 V0 h-84 V1759 v`+o+" 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
|
|
454
|
-
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,
|
|
455
|
-
-36,557 l0,`+(o+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
456
|
-
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
|
|
457
|
-
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,
|
|
458
|
-
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
459
|
-
l0,-`+(o+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
460
|
-
-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,
|
|
461
|
-
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
462
|
-
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(o+9)+`
|
|
463
|
-
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
|
|
464
|
-
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
|
|
465
|
-
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
|
|
466
|
-
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
467
|
-
l0,-`+(o+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
468
|
-
-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 be={"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 Ae={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]},Le={\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 ut(s,o){be[s]=o}function ot(s,o,l){if(!be[o])throw new Error("Font metrics not found for font: "+o+".");let h=s.charCodeAt(0),b=be[o][h];if(!b&&s[0]in Le&&(h=Le[s[0]].charCodeAt(0),b=be[o][h]),!b&&l==="text"&&ke(h)&&(b=be[o][77]),b)return{depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]}}const Oe={};function Ie(s){let o;if(s>=5?o=0:s>=3?o=1:o=2,!Oe[o]){const l=Oe[o]={cssEmPerMu:Ae.quad[o]/18};for(const h in Ae)Ae.hasOwnProperty(h)&&(l[h]=Ae[h][o])}return Oe[o]}const Ge=[[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]],dt=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Je=function(s,o){return o.size<2?s:Ge[s-1][o.size-1]};class at{constructor(o){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=o.style,this.color=o.color,this.size=o.size||at.BASESIZE,this.textSize=o.textSize||this.size,this.phantom=!!o.phantom,this.font=o.font||"",this.fontFamily=o.fontFamily||"",this.fontWeight=o.fontWeight||"",this.fontShape=o.fontShape||"",this.sizeMultiplier=dt[this.size-1],this.maxSize=o.maxSize,this.minRuleThickness=o.minRuleThickness,this._fontMetrics=void 0}extend(o){const l={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 o)o.hasOwnProperty(h)&&(l[h]=o[h]);return new at(l)}havingStyle(o){return this.style===o?this:this.extend({style:o,size:Je(this.textSize,o)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(o){return this.size===o&&this.textSize===o?this:this.extend({style:this.style.text(),size:o,textSize:o,sizeMultiplier:dt[o-1]})}havingBaseStyle(o){o=o||this.style.text();const l=Je(at.BASESIZE,o);return this.size===l&&this.textSize===at.BASESIZE&&this.style===o?this:this.extend({style:o,size:l})}havingBaseSizing(){let o;switch(this.style.id){case 4:case 5:o=3;break;case 6:case 7:o=1;break;default:o=6}return this.extend({style:this.style.text(),size:o})}withColor(o){return this.extend({color:o})}withPhantom(){return this.extend({phantom:!0})}withFont(o){return this.extend({font:o})}withTextFontFamily(o){return this.extend({fontFamily:o,font:""})}withTextFontWeight(o){return this.extend({fontWeight:o,font:""})}withTextFontShape(o){return this.extend({fontShape:o,font:""})}sizingClasses(o){return o.size!==this.size?["sizing","reset-size"+o.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==at.BASESIZE?["sizing","reset-size"+this.size,"size"+at.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ie(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}at.BASESIZE=6;var Lt=at;const Ct={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},At={ex:!0,em:!0,mu:!0},$t=function(s){return typeof s!="string"&&(s=s.unit),s in Ct||s in At||s==="ex"},je=function(s,o){let l;if(s.unit in Ct)l=Ct[s.unit]/o.fontMetrics().ptPerEm/o.sizeMultiplier;else if(s.unit==="mu")l=o.fontMetrics().cssEmPerMu;else{let h;if(o.style.isTight()?h=o.havingStyle(o.style.text()):h=o,s.unit==="ex")l=h.fontMetrics().xHeight;else if(s.unit==="em")l=h.fontMetrics().quad;else throw new i("Invalid unit: '"+s.unit+"'");h!==o&&(l*=h.sizeMultiplier/o.sizeMultiplier)}return Math.min(s.number*l,o.maxSize)},fe=function(s){return+s.toFixed(4)+"em"},lt=function(s){return s.filter(o=>o).join(" ")},_t=function(s,o,l){if(this.classes=s||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=l||{},o){o.style.isTight()&&this.classes.push("mtight");const h=o.getColor();h&&(this.style.color=h)}},Wt=function(s){const o=document.createElement(s);o.className=lt(this.classes);for(const l in this.style)this.style.hasOwnProperty(l)&&(o.style[l]=this.style[l]);for(const l in this.attributes)this.attributes.hasOwnProperty(l)&&o.setAttribute(l,this.attributes[l]);for(let l=0;l<this.children.length;l++)o.appendChild(this.children[l].toNode());return o},Pt=/[\s"'>/=\x00-\x1f]/,Bt=function(s){let o="<"+s;this.classes.length&&(o+=' class="'+C.escape(lt(this.classes))+'"');let l="";for(const h in this.style)this.style.hasOwnProperty(h)&&(l+=C.hyphenate(h)+":"+this.style[h]+";");l&&(o+=' style="'+C.escape(l)+'"');for(const h in this.attributes)if(this.attributes.hasOwnProperty(h)){if(Pt.test(h))throw new i("Invalid attribute name '"+h+"'");o+=" "+h+'="'+C.escape(this.attributes[h])+'"'}o+=">";for(let h=0;h<this.children.length;h++)o+=this.children[h].toMarkup();return o+="</"+s+">",o};class yt{constructor(o,l,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,_t.call(this,o,h,b),this.children=l||[]}setAttribute(o,l){this.attributes[o]=l}hasClass(o){return this.classes.includes(o)}toNode(){return Wt.call(this,"span")}toMarkup(){return Bt.call(this,"span")}}class It{constructor(o,l,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,_t.call(this,l,b),this.children=h||[],this.setAttribute("href",o)}setAttribute(o,l){this.attributes[o]=l}hasClass(o){return this.classes.includes(o)}toNode(){return Wt.call(this,"a")}toMarkup(){return Bt.call(this,"a")}}class or{constructor(o,l,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=l,this.src=o,this.classes=["mord"],this.style=h}hasClass(o){return this.classes.includes(o)}toNode(){const o=document.createElement("img");o.src=this.src,o.alt=this.alt,o.className="mord";for(const l in this.style)this.style.hasOwnProperty(l)&&(o.style[l]=this.style[l]);return o}toMarkup(){let o='<img src="'+C.escape(this.src)+'"'+(' alt="'+C.escape(this.alt)+'"'),l="";for(const h in this.style)this.style.hasOwnProperty(h)&&(l+=C.hyphenate(h)+":"+this.style[h]+";");return l&&(o+=' style="'+C.escape(l)+'"'),o+="'/>",o}}const mr={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"};class Ft{constructor(o,l,h,b,k,$,z,U){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=o,this.height=l||0,this.depth=h||0,this.italic=b||0,this.skew=k||0,this.width=$||0,this.classes=z||[],this.style=U||{},this.maxFontSize=0;const ne=ye(this.text.charCodeAt(0));ne&&this.classes.push(ne+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=mr[this.text])}hasClass(o){return this.classes.includes(o)}toNode(){const o=document.createTextNode(this.text);let l=null;this.italic>0&&(l=document.createElement("span"),l.style.marginRight=fe(this.italic)),this.classes.length>0&&(l=l||document.createElement("span"),l.className=lt(this.classes));for(const h in this.style)this.style.hasOwnProperty(h)&&(l=l||document.createElement("span"),l.style[h]=this.style[h]);return l?(l.appendChild(o),l):o}toMarkup(){let o=!1,l="<span";this.classes.length&&(o=!0,l+=' class="',l+=C.escape(lt(this.classes)),l+='"');let h="";this.italic>0&&(h+="margin-right:"+this.italic+"em;");for(const k in this.style)this.style.hasOwnProperty(k)&&(h+=C.hyphenate(k)+":"+this.style[k]+";");h&&(o=!0,l+=' style="'+C.escape(h)+'"');const b=C.escape(this.text);return o?(l+=">",l+=b,l+="</span>",l):b}}class zr{constructor(o,l){this.children=void 0,this.attributes=void 0,this.children=o||[],this.attributes=l||{}}toNode(){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&o.setAttribute(l,this.attributes[l]);for(let l=0;l<this.children.length;l++)o.appendChild(this.children[l].toNode());return o}toMarkup(){let o='<svg xmlns="http://www.w3.org/2000/svg"';for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(o+=" "+l+'="'+C.escape(this.attributes[l])+'"');o+=">";for(let l=0;l<this.children.length;l++)o+=this.children[l].toMarkup();return o+="</svg>",o}}class Fr{constructor(o,l){this.pathName=void 0,this.alternate=void 0,this.pathName=o,this.alternate=l}toNode(){const o=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?o.setAttribute("d",this.alternate):o.setAttribute("d",De[this.pathName]),o}toMarkup(){return this.alternate?'<path d="'+C.escape(this.alternate)+'"/>':'<path d="'+C.escape(De[this.pathName])+'"/>'}}class mn{constructor(o){this.attributes=void 0,this.attributes=o||{}}toNode(){const o=document.createElementNS("http://www.w3.org/2000/svg","line");for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&o.setAttribute(l,this.attributes[l]);return o}toMarkup(){let o="<line";for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(o+=" "+l+'="'+C.escape(this.attributes[l])+'"');return o+="/>",o}}function $r(s){if(s instanceof Ft)return s;throw new Error("Expected symbolNode but got "+String(s)+".")}function Lr(s){if(s instanceof yt)return s;throw new Error("Expected span<HtmlDomNode> but got "+String(s)+".")}const _r={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},lr={math:{},text:{}};var xt=lr;function y(s,o,l,h,b,k){lr[s][b]={font:o,group:l,replace:h},k&&h&&(lr[s][h]=lr[s][b])}const D="math",Pe="text",M="main",ee="ams",ur="accent-token",it="bin",gt="close",Et="inner",rt="mathord",zt="op-token",er="open",Dr="punct",J="rel",gr="spacing",se="textord";y(D,M,J,"\u2261","\\equiv",!0),y(D,M,J,"\u227A","\\prec",!0),y(D,M,J,"\u227B","\\succ",!0),y(D,M,J,"\u223C","\\sim",!0),y(D,M,J,"\u22A5","\\perp"),y(D,M,J,"\u2AAF","\\preceq",!0),y(D,M,J,"\u2AB0","\\succeq",!0),y(D,M,J,"\u2243","\\simeq",!0),y(D,M,J,"\u2223","\\mid",!0),y(D,M,J,"\u226A","\\ll",!0),y(D,M,J,"\u226B","\\gg",!0),y(D,M,J,"\u224D","\\asymp",!0),y(D,M,J,"\u2225","\\parallel"),y(D,M,J,"\u22C8","\\bowtie",!0),y(D,M,J,"\u2323","\\smile",!0),y(D,M,J,"\u2291","\\sqsubseteq",!0),y(D,M,J,"\u2292","\\sqsupseteq",!0),y(D,M,J,"\u2250","\\doteq",!0),y(D,M,J,"\u2322","\\frown",!0),y(D,M,J,"\u220B","\\ni",!0),y(D,M,J,"\u221D","\\propto",!0),y(D,M,J,"\u22A2","\\vdash",!0),y(D,M,J,"\u22A3","\\dashv",!0),y(D,M,J,"\u220B","\\owns"),y(D,M,Dr,".","\\ldotp"),y(D,M,Dr,"\u22C5","\\cdotp"),y(D,M,se,"#","\\#"),y(Pe,M,se,"#","\\#"),y(D,M,se,"&","\\&"),y(Pe,M,se,"&","\\&"),y(D,M,se,"\u2135","\\aleph",!0),y(D,M,se,"\u2200","\\forall",!0),y(D,M,se,"\u210F","\\hbar",!0),y(D,M,se,"\u2203","\\exists",!0),y(D,M,se,"\u2207","\\nabla",!0),y(D,M,se,"\u266D","\\flat",!0),y(D,M,se,"\u2113","\\ell",!0),y(D,M,se,"\u266E","\\natural",!0),y(D,M,se,"\u2663","\\clubsuit",!0),y(D,M,se,"\u2118","\\wp",!0),y(D,M,se,"\u266F","\\sharp",!0),y(D,M,se,"\u2662","\\diamondsuit",!0),y(D,M,se,"\u211C","\\Re",!0),y(D,M,se,"\u2661","\\heartsuit",!0),y(D,M,se,"\u2111","\\Im",!0),y(D,M,se,"\u2660","\\spadesuit",!0),y(D,M,se,"\xA7","\\S",!0),y(Pe,M,se,"\xA7","\\S"),y(D,M,se,"\xB6","\\P",!0),y(Pe,M,se,"\xB6","\\P"),y(D,M,se,"\u2020","\\dag"),y(Pe,M,se,"\u2020","\\dag"),y(Pe,M,se,"\u2020","\\textdagger"),y(D,M,se,"\u2021","\\ddag"),y(Pe,M,se,"\u2021","\\ddag"),y(Pe,M,se,"\u2021","\\textdaggerdbl"),y(D,M,gt,"\u23B1","\\rmoustache",!0),y(D,M,er,"\u23B0","\\lmoustache",!0),y(D,M,gt,"\u27EF","\\rgroup",!0),y(D,M,er,"\u27EE","\\lgroup",!0),y(D,M,it,"\u2213","\\mp",!0),y(D,M,it,"\u2296","\\ominus",!0),y(D,M,it,"\u228E","\\uplus",!0),y(D,M,it,"\u2293","\\sqcap",!0),y(D,M,it,"\u2217","\\ast"),y(D,M,it,"\u2294","\\sqcup",!0),y(D,M,it,"\u25EF","\\bigcirc",!0),y(D,M,it,"\u2219","\\bullet",!0),y(D,M,it,"\u2021","\\ddagger"),y(D,M,it,"\u2240","\\wr",!0),y(D,M,it,"\u2A3F","\\amalg"),y(D,M,it,"&","\\And"),y(D,M,J,"\u27F5","\\longleftarrow",!0),y(D,M,J,"\u21D0","\\Leftarrow",!0),y(D,M,J,"\u27F8","\\Longleftarrow",!0),y(D,M,J,"\u27F6","\\longrightarrow",!0),y(D,M,J,"\u21D2","\\Rightarrow",!0),y(D,M,J,"\u27F9","\\Longrightarrow",!0),y(D,M,J,"\u2194","\\leftrightarrow",!0),y(D,M,J,"\u27F7","\\longleftrightarrow",!0),y(D,M,J,"\u21D4","\\Leftrightarrow",!0),y(D,M,J,"\u27FA","\\Longleftrightarrow",!0),y(D,M,J,"\u21A6","\\mapsto",!0),y(D,M,J,"\u27FC","\\longmapsto",!0),y(D,M,J,"\u2197","\\nearrow",!0),y(D,M,J,"\u21A9","\\hookleftarrow",!0),y(D,M,J,"\u21AA","\\hookrightarrow",!0),y(D,M,J,"\u2198","\\searrow",!0),y(D,M,J,"\u21BC","\\leftharpoonup",!0),y(D,M,J,"\u21C0","\\rightharpoonup",!0),y(D,M,J,"\u2199","\\swarrow",!0),y(D,M,J,"\u21BD","\\leftharpoondown",!0),y(D,M,J,"\u21C1","\\rightharpoondown",!0),y(D,M,J,"\u2196","\\nwarrow",!0),y(D,M,J,"\u21CC","\\rightleftharpoons",!0),y(D,ee,J,"\u226E","\\nless",!0),y(D,ee,J,"\uE010","\\@nleqslant"),y(D,ee,J,"\uE011","\\@nleqq"),y(D,ee,J,"\u2A87","\\lneq",!0),y(D,ee,J,"\u2268","\\lneqq",!0),y(D,ee,J,"\uE00C","\\@lvertneqq"),y(D,ee,J,"\u22E6","\\lnsim",!0),y(D,ee,J,"\u2A89","\\lnapprox",!0),y(D,ee,J,"\u2280","\\nprec",!0),y(D,ee,J,"\u22E0","\\npreceq",!0),y(D,ee,J,"\u22E8","\\precnsim",!0),y(D,ee,J,"\u2AB9","\\precnapprox",!0),y(D,ee,J,"\u2241","\\nsim",!0),y(D,ee,J,"\uE006","\\@nshortmid"),y(D,ee,J,"\u2224","\\nmid",!0),y(D,ee,J,"\u22AC","\\nvdash",!0),y(D,ee,J,"\u22AD","\\nvDash",!0),y(D,ee,J,"\u22EA","\\ntriangleleft"),y(D,ee,J,"\u22EC","\\ntrianglelefteq",!0),y(D,ee,J,"\u228A","\\subsetneq",!0),y(D,ee,J,"\uE01A","\\@varsubsetneq"),y(D,ee,J,"\u2ACB","\\subsetneqq",!0),y(D,ee,J,"\uE017","\\@varsubsetneqq"),y(D,ee,J,"\u226F","\\ngtr",!0),y(D,ee,J,"\uE00F","\\@ngeqslant"),y(D,ee,J,"\uE00E","\\@ngeqq"),y(D,ee,J,"\u2A88","\\gneq",!0),y(D,ee,J,"\u2269","\\gneqq",!0),y(D,ee,J,"\uE00D","\\@gvertneqq"),y(D,ee,J,"\u22E7","\\gnsim",!0),y(D,ee,J,"\u2A8A","\\gnapprox",!0),y(D,ee,J,"\u2281","\\nsucc",!0),y(D,ee,J,"\u22E1","\\nsucceq",!0),y(D,ee,J,"\u22E9","\\succnsim",!0),y(D,ee,J,"\u2ABA","\\succnapprox",!0),y(D,ee,J,"\u2246","\\ncong",!0),y(D,ee,J,"\uE007","\\@nshortparallel"),y(D,ee,J,"\u2226","\\nparallel",!0),y(D,ee,J,"\u22AF","\\nVDash",!0),y(D,ee,J,"\u22EB","\\ntriangleright"),y(D,ee,J,"\u22ED","\\ntrianglerighteq",!0),y(D,ee,J,"\uE018","\\@nsupseteqq"),y(D,ee,J,"\u228B","\\supsetneq",!0),y(D,ee,J,"\uE01B","\\@varsupsetneq"),y(D,ee,J,"\u2ACC","\\supsetneqq",!0),y(D,ee,J,"\uE019","\\@varsupsetneqq"),y(D,ee,J,"\u22AE","\\nVdash",!0),y(D,ee,J,"\u2AB5","\\precneqq",!0),y(D,ee,J,"\u2AB6","\\succneqq",!0),y(D,ee,J,"\uE016","\\@nsubseteqq"),y(D,ee,it,"\u22B4","\\unlhd"),y(D,ee,it,"\u22B5","\\unrhd"),y(D,ee,J,"\u219A","\\nleftarrow",!0),y(D,ee,J,"\u219B","\\nrightarrow",!0),y(D,ee,J,"\u21CD","\\nLeftarrow",!0),y(D,ee,J,"\u21CF","\\nRightarrow",!0),y(D,ee,J,"\u21AE","\\nleftrightarrow",!0),y(D,ee,J,"\u21CE","\\nLeftrightarrow",!0),y(D,ee,J,"\u25B3","\\vartriangle"),y(D,ee,se,"\u210F","\\hslash"),y(D,ee,se,"\u25BD","\\triangledown"),y(D,ee,se,"\u25CA","\\lozenge"),y(D,ee,se,"\u24C8","\\circledS"),y(D,ee,se,"\xAE","\\circledR"),y(Pe,ee,se,"\xAE","\\circledR"),y(D,ee,se,"\u2221","\\measuredangle",!0),y(D,ee,se,"\u2204","\\nexists"),y(D,ee,se,"\u2127","\\mho"),y(D,ee,se,"\u2132","\\Finv",!0),y(D,ee,se,"\u2141","\\Game",!0),y(D,ee,se,"\u2035","\\backprime"),y(D,ee,se,"\u25B2","\\blacktriangle"),y(D,ee,se,"\u25BC","\\blacktriangledown"),y(D,ee,se,"\u25A0","\\blacksquare"),y(D,ee,se,"\u29EB","\\blacklozenge"),y(D,ee,se,"\u2605","\\bigstar"),y(D,ee,se,"\u2222","\\sphericalangle",!0),y(D,ee,se,"\u2201","\\complement",!0),y(D,ee,se,"\xF0","\\eth",!0),y(Pe,M,se,"\xF0","\xF0"),y(D,ee,se,"\u2571","\\diagup"),y(D,ee,se,"\u2572","\\diagdown"),y(D,ee,se,"\u25A1","\\square"),y(D,ee,se,"\u25A1","\\Box"),y(D,ee,se,"\u25CA","\\Diamond"),y(D,ee,se,"\xA5","\\yen",!0),y(Pe,ee,se,"\xA5","\\yen",!0),y(D,ee,se,"\u2713","\\checkmark",!0),y(Pe,ee,se,"\u2713","\\checkmark"),y(D,ee,se,"\u2136","\\beth",!0),y(D,ee,se,"\u2138","\\daleth",!0),y(D,ee,se,"\u2137","\\gimel",!0),y(D,ee,se,"\u03DD","\\digamma",!0),y(D,ee,se,"\u03F0","\\varkappa"),y(D,ee,er,"\u250C","\\@ulcorner",!0),y(D,ee,gt,"\u2510","\\@urcorner",!0),y(D,ee,er,"\u2514","\\@llcorner",!0),y(D,ee,gt,"\u2518","\\@lrcorner",!0),y(D,ee,J,"\u2266","\\leqq",!0),y(D,ee,J,"\u2A7D","\\leqslant",!0),y(D,ee,J,"\u2A95","\\eqslantless",!0),y(D,ee,J,"\u2272","\\lesssim",!0),y(D,ee,J,"\u2A85","\\lessapprox",!0),y(D,ee,J,"\u224A","\\approxeq",!0),y(D,ee,it,"\u22D6","\\lessdot"),y(D,ee,J,"\u22D8","\\lll",!0),y(D,ee,J,"\u2276","\\lessgtr",!0),y(D,ee,J,"\u22DA","\\lesseqgtr",!0),y(D,ee,J,"\u2A8B","\\lesseqqgtr",!0),y(D,ee,J,"\u2251","\\doteqdot"),y(D,ee,J,"\u2253","\\risingdotseq",!0),y(D,ee,J,"\u2252","\\fallingdotseq",!0),y(D,ee,J,"\u223D","\\backsim",!0),y(D,ee,J,"\u22CD","\\backsimeq",!0),y(D,ee,J,"\u2AC5","\\subseteqq",!0),y(D,ee,J,"\u22D0","\\Subset",!0),y(D,ee,J,"\u228F","\\sqsubset",!0),y(D,ee,J,"\u227C","\\preccurlyeq",!0),y(D,ee,J,"\u22DE","\\curlyeqprec",!0),y(D,ee,J,"\u227E","\\precsim",!0),y(D,ee,J,"\u2AB7","\\precapprox",!0),y(D,ee,J,"\u22B2","\\vartriangleleft"),y(D,ee,J,"\u22B4","\\trianglelefteq"),y(D,ee,J,"\u22A8","\\vDash",!0),y(D,ee,J,"\u22AA","\\Vvdash",!0),y(D,ee,J,"\u2323","\\smallsmile"),y(D,ee,J,"\u2322","\\smallfrown"),y(D,ee,J,"\u224F","\\bumpeq",!0),y(D,ee,J,"\u224E","\\Bumpeq",!0),y(D,ee,J,"\u2267","\\geqq",!0),y(D,ee,J,"\u2A7E","\\geqslant",!0),y(D,ee,J,"\u2A96","\\eqslantgtr",!0),y(D,ee,J,"\u2273","\\gtrsim",!0),y(D,ee,J,"\u2A86","\\gtrapprox",!0),y(D,ee,it,"\u22D7","\\gtrdot"),y(D,ee,J,"\u22D9","\\ggg",!0),y(D,ee,J,"\u2277","\\gtrless",!0),y(D,ee,J,"\u22DB","\\gtreqless",!0),y(D,ee,J,"\u2A8C","\\gtreqqless",!0),y(D,ee,J,"\u2256","\\eqcirc",!0),y(D,ee,J,"\u2257","\\circeq",!0),y(D,ee,J,"\u225C","\\triangleq",!0),y(D,ee,J,"\u223C","\\thicksim"),y(D,ee,J,"\u2248","\\thickapprox"),y(D,ee,J,"\u2AC6","\\supseteqq",!0),y(D,ee,J,"\u22D1","\\Supset",!0),y(D,ee,J,"\u2290","\\sqsupset",!0),y(D,ee,J,"\u227D","\\succcurlyeq",!0),y(D,ee,J,"\u22DF","\\curlyeqsucc",!0),y(D,ee,J,"\u227F","\\succsim",!0),y(D,ee,J,"\u2AB8","\\succapprox",!0),y(D,ee,J,"\u22B3","\\vartriangleright"),y(D,ee,J,"\u22B5","\\trianglerighteq"),y(D,ee,J,"\u22A9","\\Vdash",!0),y(D,ee,J,"\u2223","\\shortmid"),y(D,ee,J,"\u2225","\\shortparallel"),y(D,ee,J,"\u226C","\\between",!0),y(D,ee,J,"\u22D4","\\pitchfork",!0),y(D,ee,J,"\u221D","\\varpropto"),y(D,ee,J,"\u25C0","\\blacktriangleleft"),y(D,ee,J,"\u2234","\\therefore",!0),y(D,ee,J,"\u220D","\\backepsilon"),y(D,ee,J,"\u25B6","\\blacktriangleright"),y(D,ee,J,"\u2235","\\because",!0),y(D,ee,J,"\u22D8","\\llless"),y(D,ee,J,"\u22D9","\\gggtr"),y(D,ee,it,"\u22B2","\\lhd"),y(D,ee,it,"\u22B3","\\rhd"),y(D,ee,J,"\u2242","\\eqsim",!0),y(D,M,J,"\u22C8","\\Join"),y(D,ee,J,"\u2251","\\Doteq",!0),y(D,ee,it,"\u2214","\\dotplus",!0),y(D,ee,it,"\u2216","\\smallsetminus"),y(D,ee,it,"\u22D2","\\Cap",!0),y(D,ee,it,"\u22D3","\\Cup",!0),y(D,ee,it,"\u2A5E","\\doublebarwedge",!0),y(D,ee,it,"\u229F","\\boxminus",!0),y(D,ee,it,"\u229E","\\boxplus",!0),y(D,ee,it,"\u22C7","\\divideontimes",!0),y(D,ee,it,"\u22C9","\\ltimes",!0),y(D,ee,it,"\u22CA","\\rtimes",!0),y(D,ee,it,"\u22CB","\\leftthreetimes",!0),y(D,ee,it,"\u22CC","\\rightthreetimes",!0),y(D,ee,it,"\u22CF","\\curlywedge",!0),y(D,ee,it,"\u22CE","\\curlyvee",!0),y(D,ee,it,"\u229D","\\circleddash",!0),y(D,ee,it,"\u229B","\\circledast",!0),y(D,ee,it,"\u22C5","\\centerdot"),y(D,ee,it,"\u22BA","\\intercal",!0),y(D,ee,it,"\u22D2","\\doublecap"),y(D,ee,it,"\u22D3","\\doublecup"),y(D,ee,it,"\u22A0","\\boxtimes",!0),y(D,ee,J,"\u21E2","\\dashrightarrow",!0),y(D,ee,J,"\u21E0","\\dashleftarrow",!0),y(D,ee,J,"\u21C7","\\leftleftarrows",!0),y(D,ee,J,"\u21C6","\\leftrightarrows",!0),y(D,ee,J,"\u21DA","\\Lleftarrow",!0),y(D,ee,J,"\u219E","\\twoheadleftarrow",!0),y(D,ee,J,"\u21A2","\\leftarrowtail",!0),y(D,ee,J,"\u21AB","\\looparrowleft",!0),y(D,ee,J,"\u21CB","\\leftrightharpoons",!0),y(D,ee,J,"\u21B6","\\curvearrowleft",!0),y(D,ee,J,"\u21BA","\\circlearrowleft",!0),y(D,ee,J,"\u21B0","\\Lsh",!0),y(D,ee,J,"\u21C8","\\upuparrows",!0),y(D,ee,J,"\u21BF","\\upharpoonleft",!0),y(D,ee,J,"\u21C3","\\downharpoonleft",!0),y(D,M,J,"\u22B6","\\origof",!0),y(D,M,J,"\u22B7","\\imageof",!0),y(D,ee,J,"\u22B8","\\multimap",!0),y(D,ee,J,"\u21AD","\\leftrightsquigarrow",!0),y(D,ee,J,"\u21C9","\\rightrightarrows",!0),y(D,ee,J,"\u21C4","\\rightleftarrows",!0),y(D,ee,J,"\u21A0","\\twoheadrightarrow",!0),y(D,ee,J,"\u21A3","\\rightarrowtail",!0),y(D,ee,J,"\u21AC","\\looparrowright",!0),y(D,ee,J,"\u21B7","\\curvearrowright",!0),y(D,ee,J,"\u21BB","\\circlearrowright",!0),y(D,ee,J,"\u21B1","\\Rsh",!0),y(D,ee,J,"\u21CA","\\downdownarrows",!0),y(D,ee,J,"\u21BE","\\upharpoonright",!0),y(D,ee,J,"\u21C2","\\downharpoonright",!0),y(D,ee,J,"\u21DD","\\rightsquigarrow",!0),y(D,ee,J,"\u21DD","\\leadsto"),y(D,ee,J,"\u21DB","\\Rrightarrow",!0),y(D,ee,J,"\u21BE","\\restriction"),y(D,M,se,"\u2018","`"),y(D,M,se,"$","\\$"),y(Pe,M,se,"$","\\$"),y(Pe,M,se,"$","\\textdollar"),y(D,M,se,"%","\\%"),y(Pe,M,se,"%","\\%"),y(D,M,se,"_","\\_"),y(Pe,M,se,"_","\\_"),y(Pe,M,se,"_","\\textunderscore"),y(D,M,se,"\u2220","\\angle",!0),y(D,M,se,"\u221E","\\infty",!0),y(D,M,se,"\u2032","\\prime"),y(D,M,se,"\u25B3","\\triangle"),y(D,M,se,"\u0393","\\Gamma",!0),y(D,M,se,"\u0394","\\Delta",!0),y(D,M,se,"\u0398","\\Theta",!0),y(D,M,se,"\u039B","\\Lambda",!0),y(D,M,se,"\u039E","\\Xi",!0),y(D,M,se,"\u03A0","\\Pi",!0),y(D,M,se,"\u03A3","\\Sigma",!0),y(D,M,se,"\u03A5","\\Upsilon",!0),y(D,M,se,"\u03A6","\\Phi",!0),y(D,M,se,"\u03A8","\\Psi",!0),y(D,M,se,"\u03A9","\\Omega",!0),y(D,M,se,"A","\u0391"),y(D,M,se,"B","\u0392"),y(D,M,se,"E","\u0395"),y(D,M,se,"Z","\u0396"),y(D,M,se,"H","\u0397"),y(D,M,se,"I","\u0399"),y(D,M,se,"K","\u039A"),y(D,M,se,"M","\u039C"),y(D,M,se,"N","\u039D"),y(D,M,se,"O","\u039F"),y(D,M,se,"P","\u03A1"),y(D,M,se,"T","\u03A4"),y(D,M,se,"X","\u03A7"),y(D,M,se,"\xAC","\\neg",!0),y(D,M,se,"\xAC","\\lnot"),y(D,M,se,"\u22A4","\\top"),y(D,M,se,"\u22A5","\\bot"),y(D,M,se,"\u2205","\\emptyset"),y(D,ee,se,"\u2205","\\varnothing"),y(D,M,rt,"\u03B1","\\alpha",!0),y(D,M,rt,"\u03B2","\\beta",!0),y(D,M,rt,"\u03B3","\\gamma",!0),y(D,M,rt,"\u03B4","\\delta",!0),y(D,M,rt,"\u03F5","\\epsilon",!0),y(D,M,rt,"\u03B6","\\zeta",!0),y(D,M,rt,"\u03B7","\\eta",!0),y(D,M,rt,"\u03B8","\\theta",!0),y(D,M,rt,"\u03B9","\\iota",!0),y(D,M,rt,"\u03BA","\\kappa",!0),y(D,M,rt,"\u03BB","\\lambda",!0),y(D,M,rt,"\u03BC","\\mu",!0),y(D,M,rt,"\u03BD","\\nu",!0),y(D,M,rt,"\u03BE","\\xi",!0),y(D,M,rt,"\u03BF","\\omicron",!0),y(D,M,rt,"\u03C0","\\pi",!0),y(D,M,rt,"\u03C1","\\rho",!0),y(D,M,rt,"\u03C3","\\sigma",!0),y(D,M,rt,"\u03C4","\\tau",!0),y(D,M,rt,"\u03C5","\\upsilon",!0),y(D,M,rt,"\u03D5","\\phi",!0),y(D,M,rt,"\u03C7","\\chi",!0),y(D,M,rt,"\u03C8","\\psi",!0),y(D,M,rt,"\u03C9","\\omega",!0),y(D,M,rt,"\u03B5","\\varepsilon",!0),y(D,M,rt,"\u03D1","\\vartheta",!0),y(D,M,rt,"\u03D6","\\varpi",!0),y(D,M,rt,"\u03F1","\\varrho",!0),y(D,M,rt,"\u03C2","\\varsigma",!0),y(D,M,rt,"\u03C6","\\varphi",!0),y(D,M,it,"\u2217","*",!0),y(D,M,it,"+","+"),y(D,M,it,"\u2212","-",!0),y(D,M,it,"\u22C5","\\cdot",!0),y(D,M,it,"\u2218","\\circ",!0),y(D,M,it,"\xF7","\\div",!0),y(D,M,it,"\xB1","\\pm",!0),y(D,M,it,"\xD7","\\times",!0),y(D,M,it,"\u2229","\\cap",!0),y(D,M,it,"\u222A","\\cup",!0),y(D,M,it,"\u2216","\\setminus",!0),y(D,M,it,"\u2227","\\land"),y(D,M,it,"\u2228","\\lor"),y(D,M,it,"\u2227","\\wedge",!0),y(D,M,it,"\u2228","\\vee",!0),y(D,M,se,"\u221A","\\surd"),y(D,M,er,"\u27E8","\\langle",!0),y(D,M,er,"\u2223","\\lvert"),y(D,M,er,"\u2225","\\lVert"),y(D,M,gt,"?","?"),y(D,M,gt,"!","!"),y(D,M,gt,"\u27E9","\\rangle",!0),y(D,M,gt,"\u2223","\\rvert"),y(D,M,gt,"\u2225","\\rVert"),y(D,M,J,"=","="),y(D,M,J,":",":"),y(D,M,J,"\u2248","\\approx",!0),y(D,M,J,"\u2245","\\cong",!0),y(D,M,J,"\u2265","\\ge"),y(D,M,J,"\u2265","\\geq",!0),y(D,M,J,"\u2190","\\gets"),y(D,M,J,">","\\gt",!0),y(D,M,J,"\u2208","\\in",!0),y(D,M,J,"\uE020","\\@not"),y(D,M,J,"\u2282","\\subset",!0),y(D,M,J,"\u2283","\\supset",!0),y(D,M,J,"\u2286","\\subseteq",!0),y(D,M,J,"\u2287","\\supseteq",!0),y(D,ee,J,"\u2288","\\nsubseteq",!0),y(D,ee,J,"\u2289","\\nsupseteq",!0),y(D,M,J,"\u22A8","\\models"),y(D,M,J,"\u2190","\\leftarrow",!0),y(D,M,J,"\u2264","\\le"),y(D,M,J,"\u2264","\\leq",!0),y(D,M,J,"<","\\lt",!0),y(D,M,J,"\u2192","\\rightarrow",!0),y(D,M,J,"\u2192","\\to"),y(D,ee,J,"\u2271","\\ngeq",!0),y(D,ee,J,"\u2270","\\nleq",!0),y(D,M,gr,"\xA0","\\ "),y(D,M,gr,"\xA0","\\space"),y(D,M,gr,"\xA0","\\nobreakspace"),y(Pe,M,gr,"\xA0","\\ "),y(Pe,M,gr,"\xA0"," "),y(Pe,M,gr,"\xA0","\\space"),y(Pe,M,gr,"\xA0","\\nobreakspace"),y(D,M,gr,null,"\\nobreak"),y(D,M,gr,null,"\\allowbreak"),y(D,M,Dr,",",","),y(D,M,Dr,";",";"),y(D,ee,it,"\u22BC","\\barwedge",!0),y(D,ee,it,"\u22BB","\\veebar",!0),y(D,M,it,"\u2299","\\odot",!0),y(D,M,it,"\u2295","\\oplus",!0),y(D,M,it,"\u2297","\\otimes",!0),y(D,M,se,"\u2202","\\partial",!0),y(D,M,it,"\u2298","\\oslash",!0),y(D,ee,it,"\u229A","\\circledcirc",!0),y(D,ee,it,"\u22A1","\\boxdot",!0),y(D,M,it,"\u25B3","\\bigtriangleup"),y(D,M,it,"\u25BD","\\bigtriangledown"),y(D,M,it,"\u2020","\\dagger"),y(D,M,it,"\u22C4","\\diamond"),y(D,M,it,"\u22C6","\\star"),y(D,M,it,"\u25C3","\\triangleleft"),y(D,M,it,"\u25B9","\\triangleright"),y(D,M,er,"{","\\{"),y(Pe,M,se,"{","\\{"),y(Pe,M,se,"{","\\textbraceleft"),y(D,M,gt,"}","\\}"),y(Pe,M,se,"}","\\}"),y(Pe,M,se,"}","\\textbraceright"),y(D,M,er,"{","\\lbrace"),y(D,M,gt,"}","\\rbrace"),y(D,M,er,"[","\\lbrack",!0),y(Pe,M,se,"[","\\lbrack",!0),y(D,M,gt,"]","\\rbrack",!0),y(Pe,M,se,"]","\\rbrack",!0),y(D,M,er,"(","\\lparen",!0),y(D,M,gt,")","\\rparen",!0),y(Pe,M,se,"<","\\textless",!0),y(Pe,M,se,">","\\textgreater",!0),y(D,M,er,"\u230A","\\lfloor",!0),y(D,M,gt,"\u230B","\\rfloor",!0),y(D,M,er,"\u2308","\\lceil",!0),y(D,M,gt,"\u2309","\\rceil",!0),y(D,M,se,"\\","\\backslash"),y(D,M,se,"\u2223","|"),y(D,M,se,"\u2223","\\vert"),y(Pe,M,se,"|","\\textbar",!0),y(D,M,se,"\u2225","\\|"),y(D,M,se,"\u2225","\\Vert"),y(Pe,M,se,"\u2225","\\textbardbl"),y(Pe,M,se,"~","\\textasciitilde"),y(Pe,M,se,"\\","\\textbackslash"),y(Pe,M,se,"^","\\textasciicircum"),y(D,M,J,"\u2191","\\uparrow",!0),y(D,M,J,"\u21D1","\\Uparrow",!0),y(D,M,J,"\u2193","\\downarrow",!0),y(D,M,J,"\u21D3","\\Downarrow",!0),y(D,M,J,"\u2195","\\updownarrow",!0),y(D,M,J,"\u21D5","\\Updownarrow",!0),y(D,M,zt,"\u2210","\\coprod"),y(D,M,zt,"\u22C1","\\bigvee"),y(D,M,zt,"\u22C0","\\bigwedge"),y(D,M,zt,"\u2A04","\\biguplus"),y(D,M,zt,"\u22C2","\\bigcap"),y(D,M,zt,"\u22C3","\\bigcup"),y(D,M,zt,"\u222B","\\int"),y(D,M,zt,"\u222B","\\intop"),y(D,M,zt,"\u222C","\\iint"),y(D,M,zt,"\u222D","\\iiint"),y(D,M,zt,"\u220F","\\prod"),y(D,M,zt,"\u2211","\\sum"),y(D,M,zt,"\u2A02","\\bigotimes"),y(D,M,zt,"\u2A01","\\bigoplus"),y(D,M,zt,"\u2A00","\\bigodot"),y(D,M,zt,"\u222E","\\oint"),y(D,M,zt,"\u222F","\\oiint"),y(D,M,zt,"\u2230","\\oiiint"),y(D,M,zt,"\u2A06","\\bigsqcup"),y(D,M,zt,"\u222B","\\smallint"),y(Pe,M,Et,"\u2026","\\textellipsis"),y(D,M,Et,"\u2026","\\mathellipsis"),y(Pe,M,Et,"\u2026","\\ldots",!0),y(D,M,Et,"\u2026","\\ldots",!0),y(D,M,Et,"\u22EF","\\@cdots",!0),y(D,M,Et,"\u22F1","\\ddots",!0),y(D,M,se,"\u22EE","\\varvdots"),y(Pe,M,se,"\u22EE","\\varvdots"),y(D,M,ur,"\u02CA","\\acute"),y(D,M,ur,"\u02CB","\\grave"),y(D,M,ur,"\xA8","\\ddot"),y(D,M,ur,"~","\\tilde"),y(D,M,ur,"\u02C9","\\bar"),y(D,M,ur,"\u02D8","\\breve"),y(D,M,ur,"\u02C7","\\check"),y(D,M,ur,"^","\\hat"),y(D,M,ur,"\u20D7","\\vec"),y(D,M,ur,"\u02D9","\\dot"),y(D,M,ur,"\u02DA","\\mathring"),y(D,M,rt,"\uE131","\\@imath"),y(D,M,rt,"\uE237","\\@jmath"),y(D,M,se,"\u0131","\u0131"),y(D,M,se,"\u0237","\u0237"),y(Pe,M,se,"\u0131","\\i",!0),y(Pe,M,se,"\u0237","\\j",!0),y(Pe,M,se,"\xDF","\\ss",!0),y(Pe,M,se,"\xE6","\\ae",!0),y(Pe,M,se,"\u0153","\\oe",!0),y(Pe,M,se,"\xF8","\\o",!0),y(Pe,M,se,"\xC6","\\AE",!0),y(Pe,M,se,"\u0152","\\OE",!0),y(Pe,M,se,"\xD8","\\O",!0),y(Pe,M,ur,"\u02CA","\\'"),y(Pe,M,ur,"\u02CB","\\`"),y(Pe,M,ur,"\u02C6","\\^"),y(Pe,M,ur,"\u02DC","\\~"),y(Pe,M,ur,"\u02C9","\\="),y(Pe,M,ur,"\u02D8","\\u"),y(Pe,M,ur,"\u02D9","\\."),y(Pe,M,ur,"\xB8","\\c"),y(Pe,M,ur,"\u02DA","\\r"),y(Pe,M,ur,"\u02C7","\\v"),y(Pe,M,ur,"\xA8",'\\"'),y(Pe,M,ur,"\u02DD","\\H"),y(Pe,M,ur,"\u25EF","\\textcircled");const gn={"--":!0,"---":!0,"``":!0,"''":!0};y(Pe,M,se,"\u2013","--",!0),y(Pe,M,se,"\u2013","\\textendash"),y(Pe,M,se,"\u2014","---",!0),y(Pe,M,se,"\u2014","\\textemdash"),y(Pe,M,se,"\u2018","`",!0),y(Pe,M,se,"\u2018","\\textquoteleft"),y(Pe,M,se,"\u2019","'",!0),y(Pe,M,se,"\u2019","\\textquoteright"),y(Pe,M,se,"\u201C","``",!0),y(Pe,M,se,"\u201C","\\textquotedblleft"),y(Pe,M,se,"\u201D","''",!0),y(Pe,M,se,"\u201D","\\textquotedblright"),y(D,M,se,"\xB0","\\degree",!0),y(Pe,M,se,"\xB0","\\degree"),y(Pe,M,se,"\xB0","\\textdegree",!0),y(D,M,se,"\xA3","\\pounds"),y(D,M,se,"\xA3","\\mathsterling",!0),y(Pe,M,se,"\xA3","\\pounds"),y(Pe,M,se,"\xA3","\\textsterling",!0),y(D,ee,se,"\u2720","\\maltese"),y(Pe,ee,se,"\u2720","\\maltese");const Dt='0123456789/@."';for(let s=0;s<Dt.length;s++){const o=Dt.charAt(s);y(D,M,se,o,o)}const vn='0123456789!@*()-=+";:?/.,';for(let s=0;s<vn.length;s++){const o=vn.charAt(s);y(Pe,M,se,o,o)}const br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let s=0;s<br.length;s++){const o=br.charAt(s);y(D,M,rt,o,o),y(Pe,M,se,o,o)}y(D,ee,se,"C","\u2102"),y(Pe,ee,se,"C","\u2102"),y(D,ee,se,"H","\u210D"),y(Pe,ee,se,"H","\u210D"),y(D,ee,se,"N","\u2115"),y(Pe,ee,se,"N","\u2115"),y(D,ee,se,"P","\u2119"),y(Pe,ee,se,"P","\u2119"),y(D,ee,se,"Q","\u211A"),y(Pe,ee,se,"Q","\u211A"),y(D,ee,se,"R","\u211D"),y(Pe,ee,se,"R","\u211D"),y(D,ee,se,"Z","\u2124"),y(Pe,ee,se,"Z","\u2124"),y(D,M,rt,"h","\u210E"),y(Pe,M,rt,"h","\u210E");let wt="";for(let s=0;s<br.length;s++){const o=br.charAt(s);wt=String.fromCharCode(55349,56320+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,56372+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,56424+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,56580+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,56684+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,56736+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,56788+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,56840+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,56944+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),s<26&&(wt=String.fromCharCode(55349,56632+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,56476+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt))}wt="\u{1D55C}",y(D,M,rt,"k",wt),y(Pe,M,se,"k",wt);for(let s=0;s<10;s++){const o=s.toString();wt=String.fromCharCode(55349,57294+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,57314+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,57324+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt),wt=String.fromCharCode(55349,57334+s),y(D,M,rt,o,wt),y(Pe,M,se,o,wt)}const na="\xD0\xDE\xFE";for(let s=0;s<na.length;s++){const o=na.charAt(s);y(D,M,rt,o,o),y(Pe,M,se,o,o)}const aa=[["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"]],ka=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],yo=function(s,o){const l=s.charCodeAt(0),h=s.charCodeAt(1),b=(l-55296)*1024+(h-56320)+65536,k=o==="math"?0:1;if(119808<=b&&b<120484){const $=Math.floor((b-119808)/26);return[aa[$][2],aa[$][k]]}else if(120782<=b&&b<=120831){const $=Math.floor((b-120782)/10);return[ka[$][2],ka[$][k]]}else{if(b===120485||b===120486)return[aa[0][2],aa[0][k]];if(120486<b&&b<120782)return["",""];throw new i("Unsupported character: "+s)}};class $n{constructor(o){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=o,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(o){return this.classes.includes(o)}toNode(){const o=document.createDocumentFragment();for(let l=0;l<this.children.length;l++)o.appendChild(this.children[l].toNode());return o}toMarkup(){let o="";for(let l=0;l<this.children.length;l++)o+=this.children[l].toMarkup();return o}toText(){const o=l=>l.toText();return this.children.map(o).join("")}}const re=function(s,o,l){return xt[l][s]&&xt[l][s].replace&&(s=xt[l][s].replace),{value:s,metrics:ot(s,o,l)}},Ce=function(s,o,l,h,b){const k=re(s,o,l),$=k.metrics;s=k.value;let z;if($){let U=$.italic;(l==="text"||h&&h.font==="mathit")&&(U=0),z=new Ft(s,$.height,$.depth,U,$.skew,$.width,b)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+s+"' in style '"+o+"' and mode '"+l+"'")),z=new Ft(s,0,0,0,0,0,b);if(h){z.maxFontSize=h.sizeMultiplier,h.style.isTight()&&z.classes.push("mtight");const U=h.getColor();U&&(z.style.color=U)}return z},tt=function(s,o,l,h){return h===void 0&&(h=[]),l.font==="boldsymbol"&&re(s,"Main-Bold",o).metrics?Ce(s,"Main-Bold",o,l,h.concat(["mathbf"])):s==="\\"||xt[o][s].font==="main"?Ce(s,"Main-Regular",o,l,h):Ce(s,"AMS-Regular",o,l,h.concat(["amsrm"]))},Ue=function(s,o,l,h,b){return b!=="textord"&&re(s,"Math-BoldItalic",o).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},ae=function(s,o,l){const h=s.mode,b=s.text,k=["mord"],$=h==="math"||h==="text"&&o.font,z=$?o.font:o.fontFamily;let U="",ne="";if(b.charCodeAt(0)===55349&&([U,ne]=yo(b,h)),U.length>0)return Ce(b,U,h,o,k.concat(ne));if(z){let pe,ge;if(z==="boldsymbol"){const Ee=Ue(b,h,o,k,l);pe=Ee.fontName,ge=[Ee.fontClass]}else $?(pe=qr[z].fontName,ge=[z]):(pe=ir(z,o.fontWeight,o.fontShape),ge=[z,o.fontWeight,o.fontShape]);if(re(b,pe,h).metrics)return Ce(b,pe,h,o,k.concat(ge));if(gn.hasOwnProperty(b)&&pe.slice(0,10)==="Typewriter"){const Ee=[];for(let Ze=0;Ze<b.length;Ze++)Ee.push(Ce(b[Ze],pe,h,o,k.concat(ge)));return ct(Ee)}}if(l==="mathord")return Ce(b,"Math-Italic",h,o,k.concat(["mathnormal"]));if(l==="textord"){const pe=xt[h][b]&&xt[h][b].font;if(pe==="ams"){const ge=ir("amsrm",o.fontWeight,o.fontShape);return Ce(b,ge,h,o,k.concat("amsrm",o.fontWeight,o.fontShape))}else if(pe==="main"||!pe){const ge=ir("textrm",o.fontWeight,o.fontShape);return Ce(b,ge,h,o,k.concat(o.fontWeight,o.fontShape))}else{const ge=ir(pe,o.fontWeight,o.fontShape);return Ce(b,ge,h,o,k.concat(ge,o.fontWeight,o.fontShape))}}else throw new Error("unexpected type: "+l+" in makeOrd")},He=(s,o)=>{if(lt(s.classes)!==lt(o.classes)||s.skew!==o.skew||s.maxFontSize!==o.maxFontSize)return!1;if(s.classes.length===1){const l=s.classes[0];if(l==="mbin"||l==="mord")return!1}for(const l in s.style)if(s.style.hasOwnProperty(l)&&s.style[l]!==o.style[l])return!1;for(const l in o.style)if(o.style.hasOwnProperty(l)&&s.style[l]!==o.style[l])return!1;return!0},Me=s=>{for(let o=0;o<s.length-1;o++){const l=s[o],h=s[o+1];l instanceof Ft&&h instanceof Ft&&He(l,h)&&(l.text+=h.text,l.height=Math.max(l.height,h.height),l.depth=Math.max(l.depth,h.depth),l.italic=h.italic,s.splice(o+1,1),o--)}return s},st=function(s){let o=0,l=0,h=0;for(let b=0;b<s.children.length;b++){const k=s.children[b];k.height>o&&(o=k.height),k.depth>l&&(l=k.depth),k.maxFontSize>h&&(h=k.maxFontSize)}s.height=o,s.depth=l,s.maxFontSize=h},he=function(s,o,l,h){const b=new yt(s,o,l,h);return st(b),b},de=(s,o,l,h)=>new yt(s,o,l,h),ce=function(s,o,l){const h=he([s],[],o);return h.height=Math.max(l||o.fontMetrics().defaultRuleThickness,o.minRuleThickness),h.style.borderBottomWidth=fe(h.height),h.maxFontSize=1,h},Xe=function(s,o,l,h){const b=new It(s,o,l,h);return st(b),b},ct=function(s){const o=new $n(s);return st(o),o},Mt=function(s,o){return s instanceof $n?he([],[s],o):s},ft=function(s){if(s.positionType==="individualShift"){const l=s.children,h=[l[0]],b=-l[0].shift-l[0].elem.depth;let k=b;for(let $=1;$<l.length;$++){const z=-l[$].shift-k-l[$].elem.depth,U=z-(l[$-1].elem.height+l[$-1].elem.depth);k=k+z,h.push({type:"kern",size:U}),h.push(l[$])}return{children:h,depth:b}}let o;if(s.positionType==="top"){let l=s.positionData;for(let h=0;h<s.children.length;h++){const b=s.children[h];l-=b.type==="kern"?b.size:b.elem.height+b.elem.depth}o=l}else if(s.positionType==="bottom")o=-s.positionData;else{const l=s.children[0];if(l.type!=="elem")throw new Error('First child must have type "elem".');if(s.positionType==="shift")o=-l.elem.depth-s.positionData;else if(s.positionType==="firstBaseline")o=-l.elem.depth;else throw new Error("Invalid positionType "+s.positionType+".")}return{children:s.children,depth:o}},Re=function(s,o){const{children:l,depth:h}=ft(s);let b=0;for(let Ze=0;Ze<l.length;Ze++){const nt=l[Ze];if(nt.type==="elem"){const qt=nt.elem;b=Math.max(b,qt.maxFontSize,qt.height)}}b+=2;const k=he(["pstrut"],[]);k.style.height=fe(b);const $=[];let z=h,U=h,ne=h;for(let Ze=0;Ze<l.length;Ze++){const nt=l[Ze];if(nt.type==="kern")ne+=nt.size;else{const qt=nt.elem,Jt=nt.wrapperClasses||[],Yt=nt.wrapperStyle||{},nr=he(Jt,[k,qt],void 0,Yt);nr.style.top=fe(-b-ne-qt.depth),nt.marginLeft&&(nr.style.marginLeft=nt.marginLeft),nt.marginRight&&(nr.style.marginRight=nt.marginRight),$.push(nr),ne+=qt.height+qt.depth}z=Math.min(z,ne),U=Math.max(U,ne)}const pe=he(["vlist"],$);pe.style.height=fe(U);let ge;if(z<0){const Ze=he([],[]),nt=he(["vlist"],[Ze]);nt.style.height=fe(-z);const qt=he(["vlist-s"],[new Ft("\u200B")]);ge=[he(["vlist-r"],[pe,qt]),he(["vlist-r"],[nt])]}else ge=[he(["vlist-r"],[pe])];const Ee=he(["vlist-t"],ge);return ge.length===2&&Ee.classes.push("vlist-t2"),Ee.height=U,Ee.depth=-z,Ee},kt=(s,o)=>{const l=he(["mspace"],[],o),h=je(s,o);return l.style.marginRight=fe(h),l},ir=function(s,o,l){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 o==="textbf"&&l==="textit"?b="BoldItalic":o==="textbf"?b="Bold":o==="textit"?b="Italic":b="Regular",h+"-"+b},qr={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"}},bn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var ve={fontMap:qr,makeSymbol:Ce,mathsym:tt,makeSpan:he,makeSvgSpan:de,makeLineSpan:ce,makeAnchor:Xe,makeFragment:ct,wrapFragment:Mt,makeVList:Re,makeOrd:ae,makeGlue:kt,staticSvg:function(s,o){const[l,h,b]=bn[s],k=new Fr(l),$=new zr([k],{width:fe(h),height:fe(b),style:"width:"+fe(h),viewBox:"0 0 "+1e3*h+" "+1e3*b,preserveAspectRatio:"xMinYMin"}),z=de(["overlay"],[$],o);return z.height=b,z.style.height=fe(b),z.style.width=fe(h),z},svgData:bn,tryCombineChars:Me};const fr={number:3,unit:"mu"},Wn={number:4,unit:"mu"},Nt={number:5,unit:"mu"},Ut={mord:{mop:fr,mbin:Wn,mrel:Nt,minner:fr},mop:{mord:fr,mop:fr,mrel:Nt,minner:fr},mbin:{mord:Wn,mop:Wn,mopen:Wn,minner:Wn},mrel:{mord:Nt,mop:Nt,mopen:Nt,minner:Nt},mopen:{},mclose:{mop:fr,mbin:Wn,mrel:Nt,minner:fr},mpunct:{mord:fr,mop:fr,mrel:Nt,mopen:fr,mclose:fr,mpunct:fr,minner:fr},minner:{mord:fr,mop:fr,mbin:Wn,mrel:Nt,mopen:fr,mpunct:fr,minner:fr}},Ir={mord:{mop:fr},mop:{mord:fr,mop:fr},mbin:{},mrel:{},mopen:{},mclose:{mop:fr},mpunct:{},minner:{mop:fr}},Xr={},Tr={},An={};function et(s){let{type:o,names:l,props:h,handler:b,htmlBuilder:k,mathmlBuilder:$}=s;const z={type:o,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 U=0;U<l.length;++U)Xr[l[U]]=z;o&&(k&&(Tr[o]=k),$&&(An[o]=$))}function Qr(s){let{type:o,htmlBuilder:l,mathmlBuilder:h}=s;et({type:o,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:l,mathmlBuilder:h})}const Pn=function(s){return s.type==="ordgroup"&&s.body.length===1?s.body[0]:s},yr=function(s){return s.type==="ordgroup"?s.body:[s]},Vn=ve.makeSpan,Nm=["leftmost","mbin","mopen","mrel","mop","mpunct"],Tm=["rightmost","mrel","mclose","mpunct"],Om={display:K.DISPLAY,text:K.TEXT,script:K.SCRIPT,scriptscript:K.SCRIPTSCRIPT},$m={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},jr=function(s,o,l,h){h===void 0&&(h=[null,null]);const b=[];for(let ne=0;ne<s.length;ne++){const pe=tr(s[ne],o);if(pe instanceof $n){const ge=pe.children;b.push(...ge)}else b.push(pe)}if(ve.tryCombineChars(b),!l)return b;let k=o;if(s.length===1){const ne=s[0];ne.type==="sizing"?k=o.havingSize(ne.size):ne.type==="styling"&&(k=o.havingStyle(Om[ne.style]))}const $=Vn([h[0]||"leftmost"],[],o),z=Vn([h[1]||"rightmost"],[],o),U=l==="root";return Fs(b,(ne,pe)=>{const ge=pe.classes[0],Ee=ne.classes[0];ge==="mbin"&&Tm.includes(Ee)?pe.classes[0]="mord":Ee==="mbin"&&Nm.includes(ge)&&(ne.classes[0]="mord")},{node:$},z,U),Fs(b,(ne,pe)=>{const ge=Ts(pe),Ee=Ts(ne),Ze=ge&&Ee?ne.hasClass("mtight")?Ir[ge][Ee]:Ut[ge][Ee]:null;if(Ze)return ve.makeGlue(Ze,k)},{node:$},z,U),b},Fs=function(s,o,l,h,b){h&&s.push(h);let k=0;for(;k<s.length;k++){const $=s[k],z=ju($);if(z){Fs(z.children,o,l,null,b);continue}const U=!$.hasClass("mspace");if(U){const ne=o($,l.node);ne&&(l.insertAfter?l.insertAfter(ne):(s.unshift(ne),k++))}U?l.node=$:b&&$.hasClass("newline")&&(l.node=Vn(["leftmost"])),l.insertAfter=(ne=>pe=>{s.splice(ne+1,0,pe),k++})(k)}h&&s.pop()},ju=function(s){return s instanceof $n||s instanceof It||s instanceof yt&&s.hasClass("enclosing")?s:null},Ns=function(s,o){const l=ju(s);if(l){const h=l.children;if(h.length){if(o==="right")return Ns(h[h.length-1],"right");if(o==="left")return Ns(h[0],"left")}}return s},Ts=function(s,o){return s?(o&&(s=Ns(s,o)),$m[s.classes[0]]||null):null},xo=function(s,o){const l=["nulldelimiter"].concat(s.baseSizingClasses());return Vn(o.concat(l))},tr=function(s,o,l){if(!s)return Vn();if(Tr[s.type]){let h=Tr[s.type](s,o);if(l&&o.size!==l.size){h=Vn(o.sizingClasses(l),[h],o);const b=o.sizeMultiplier/l.sizeMultiplier;h.height*=b,h.depth*=b}return h}else throw new i("Got group of unknown type: '"+s.type+"'")};function li(s,o){const l=Vn(["base"],s,o),h=Vn(["strut"]);return h.style.height=fe(l.height+l.depth),l.depth&&(h.style.verticalAlign=fe(-l.depth)),l.children.unshift(h),l}function Os(s,o){let l=null;s.length===1&&s[0].type==="tag"&&(l=s[0].tag,s=s[0].body);const h=jr(s,o,"root");let b;h.length===2&&h[1].hasClass("tag")&&(b=h.pop());const k=[];let $=[];for(let ne=0;ne<h.length;ne++)if($.push(h[ne]),h[ne].hasClass("mbin")||h[ne].hasClass("mrel")||h[ne].hasClass("allowbreak")){let pe=!1;for(;ne<h.length-1&&h[ne+1].hasClass("mspace")&&!h[ne+1].hasClass("newline");)ne++,$.push(h[ne]),h[ne].hasClass("nobreak")&&(pe=!0);pe||(k.push(li($,o)),$=[])}else h[ne].hasClass("newline")&&($.pop(),$.length>0&&(k.push(li($,o)),$=[]),k.push(h[ne]));$.length>0&&k.push(li($,o));let z;l?(z=li(jr(l,o,!0)),z.classes=["tag"],k.push(z)):b&&k.push(b);const U=Vn(["katex-html"],k);if(U.setAttribute("aria-hidden","true"),z){const ne=z.children[0];ne.style.height=fe(U.height+U.depth),U.depth&&(ne.style.verticalAlign=fe(-U.depth))}return U}function Lu(s){return new $n(s)}class dn{constructor(o,l,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=o,this.attributes={},this.children=l||[],this.classes=h||[]}setAttribute(o,l){this.attributes[o]=l}getAttribute(o){return this.attributes[o]}toNode(){const o=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&o.setAttribute(l,this.attributes[l]);this.classes.length>0&&(o.className=lt(this.classes));for(let l=0;l<this.children.length;l++)if(this.children[l]instanceof Mn&&this.children[l+1]instanceof Mn){let h=this.children[l].toText()+this.children[++l].toText();for(;this.children[l+1]instanceof Mn;)h+=this.children[++l].toText();o.appendChild(new Mn(h).toNode())}else o.appendChild(this.children[l].toNode());return o}toMarkup(){let o="<"+this.type;for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(o+=" "+l+'="',o+=C.escape(this.attributes[l]),o+='"');this.classes.length>0&&(o+=' class ="'+C.escape(lt(this.classes))+'"'),o+=">";for(let l=0;l<this.children.length;l++)o+=this.children[l].toMarkup();return o+="</"+this.type+">",o}toText(){return this.children.map(o=>o.toText()).join("")}}class Mn{constructor(o){this.text=void 0,this.text=o}toNode(){return document.createTextNode(this.text)}toMarkup(){return C.escape(this.toText())}toText(){return this.text}}class Pm{constructor(o){this.width=void 0,this.character=void 0,this.width=o,o>=.05555&&o<=.05556?this.character="\u200A":o>=.1666&&o<=.1667?this.character="\u2009":o>=.2222&&o<=.2223?this.character="\u2005":o>=.2777&&o<=.2778?this.character="\u2005\u200A":o>=-.05556&&o<=-.05555?this.character="\u200A\u2063":o>=-.1667&&o<=-.1666?this.character="\u2009\u2063":o>=-.2223&&o<=-.2222?this.character="\u205F\u2063":o>=-.2778&&o<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);{const o=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return o.setAttribute("width",fe(this.width)),o}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+fe(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ye={MathNode:dn,TextNode:Mn,SpaceNode:Pm,newDocumentFragment:Lu};const yn=function(s,o,l){return xt[o][s]&&xt[o][s].replace&&s.charCodeAt(0)!==55349&&!(gn.hasOwnProperty(s)&&l&&(l.fontFamily&&l.fontFamily.slice(4,6)==="tt"||l.font&&l.font.slice(4,6)==="tt"))&&(s=xt[o][s].replace),new Ye.TextNode(s)},$s=function(s){return s.length===1?s[0]:new Ye.MathNode("mrow",s)},Ps=function(s,o){if(o.fontFamily==="texttt")return"monospace";if(o.fontFamily==="textsf")return o.fontShape==="textit"&&o.fontWeight==="textbf"?"sans-serif-bold-italic":o.fontShape==="textit"?"sans-serif-italic":o.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(o.fontShape==="textit"&&o.fontWeight==="textbf")return"bold-italic";if(o.fontShape==="textit")return"italic";if(o.fontWeight==="textbf")return"bold";const l=o.font;if(!l||l==="mathnormal")return null;const h=s.mode;if(l==="mathit")return"italic";if(l==="boldsymbol")return s.type==="textord"?"bold":"bold-italic";if(l==="mathbf")return"bold";if(l==="mathbb")return"double-struck";if(l==="mathsfit")return"sans-serif-italic";if(l==="mathfrak")return"fraktur";if(l==="mathscr"||l==="mathcal")return"script";if(l==="mathsf")return"sans-serif";if(l==="mathtt")return"monospace";let b=s.text;if(["\\imath","\\jmath"].includes(b))return null;xt[h][b]&&xt[h][b].replace&&(b=xt[h][b].replace);const k=ve.fontMap[l].fontName;return ot(b,k,h)?ve.fontMap[l].variant:null};function Ms(s){if(!s)return!1;if(s.type==="mi"&&s.children.length===1){const o=s.children[0];return o instanceof Mn&&o.text==="."}else if(s.type==="mo"&&s.children.length===1&&s.getAttribute("separator")==="true"&&s.getAttribute("lspace")==="0em"&&s.getAttribute("rspace")==="0em"){const o=s.children[0];return o instanceof Mn&&o.text===","}else return!1}const on=function(s,o,l){if(s.length===1){const k=pr(s[0],o);return l&&k instanceof dn&&k.type==="mo"&&(k.setAttribute("lspace","0em"),k.setAttribute("rspace","0em")),[k]}const h=[];let b;for(let k=0;k<s.length;k++){const $=pr(s[k],o);if($ instanceof dn&&b instanceof dn){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(Ms($)&&b.type==="mn"){b.children.push(...$.children);continue}else if($.type==="mn"&&Ms(b))$.children=[...b.children,...$.children],h.pop();else if(($.type==="msup"||$.type==="msub")&&$.children.length>=1&&(b.type==="mn"||Ms(b))){const z=$.children[0];z instanceof dn&&z.type==="mn"&&(z.children=[...b.children,...z.children],h.pop())}else if(b.type==="mi"&&b.children.length===1){const z=b.children[0];if(z instanceof Mn&&z.text==="\u0338"&&($.type==="mo"||$.type==="mi"||$.type==="mn")){const U=$.children[0];U instanceof Mn&&U.text.length>0&&(U.text=U.text.slice(0,1)+"\u0338"+U.text.slice(1),h.pop())}}}h.push($),b=$}return h},oa=function(s,o,l){return $s(on(s,o,l))},pr=function(s,o){if(!s)return new Ye.MathNode("mrow");if(An[s.type])return An[s.type](s,o);throw new i("Got group of unknown type: '"+s.type+"'")};function _u(s,o,l,h,b){const k=on(s,l);let $;k.length===1&&k[0]instanceof dn&&["mrow","mtable"].includes(k[0].type)?$=k[0]:$=new Ye.MathNode("mrow",k);const z=new Ye.MathNode("annotation",[new Ye.TextNode(o)]);z.setAttribute("encoding","application/x-tex");const U=new Ye.MathNode("semantics",[$,z]),ne=new Ye.MathNode("math",[U]);ne.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),h&&ne.setAttribute("display","block");const pe=b?"katex":"katex-mathml";return ve.makeSpan([pe],[ne])}const qu=function(s){return new Lt({style:s.displayMode?K.DISPLAY:K.TEXT,maxSize:s.maxSize,minRuleThickness:s.minRuleThickness})},Hu=function(s,o){if(o.displayMode){const l=["katex-display"];o.leqno&&l.push("leqno"),o.fleqn&&l.push("fleqn"),s=ve.makeSpan(l,[s])}return s},Mm=function(s,o,l){const h=qu(l);let b;if(l.output==="mathml")return _u(s,o,h,l.displayMode,!0);if(l.output==="html"){const k=Os(s,h);b=ve.makeSpan(["katex"],[k])}else{const k=_u(s,o,h,l.displayMode,!1),$=Os(s,h);b=ve.makeSpan(["katex"],[k,$])}return Hu(b,l)},Rm=function(s,o,l){const h=qu(l),b=Os(s,h),k=ve.makeSpan(["katex"],[b]);return Hu(k,l)},zm={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":"="},Im=function(s){const o=new Ye.MathNode("mo",[new Ye.TextNode(zm[s.replace(/^\\/,"")])]);return o.setAttribute("stretchy","true"),o},jm={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]},Lm=function(s){return s.type==="ordgroup"?s.body.length:1};var Un={encloseSpan:function(s,o,l,h,b){let k;const $=s.height+s.depth+l+h;if(/fbox|color|angl/.test(o)){if(k=ve.makeSpan(["stretchy",o],[],b),o==="fbox"){const z=b.color&&b.getColor();z&&(k.style.borderColor=z)}}else{const z=[];/^[bx]cancel$/.test(o)&&z.push(new mn({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(o)&&z.push(new mn({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const U=new zr(z,{width:"100%",height:fe($)});k=ve.makeSvgSpan([],[U],b)}return k.height=$,k.style.height=fe($),k},mathMLnode:Im,svgSpan:function(s,o){function l(){let $=4e5;const z=s.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(z)){const U=Lm(s.base);let ne,pe,ge;if(U>5)z==="widehat"||z==="widecheck"?(ne=420,$=2364,ge=.42,pe=z+"4"):(ne=312,$=2340,ge=.34,pe="tilde4");else{const nt=[1,1,2,2,3,3][U];z==="widehat"||z==="widecheck"?($=[0,1062,2364,2364,2364][nt],ne=[0,239,300,360,420][nt],ge=[0,.24,.3,.3,.36,.42][nt],pe=z+nt):($=[0,600,1033,2339,2340][nt],ne=[0,260,286,306,312][nt],ge=[0,.26,.286,.3,.306,.34][nt],pe="tilde"+nt)}const Ee=new Fr(pe),Ze=new zr([Ee],{width:"100%",height:fe(ge),viewBox:"0 0 "+$+" "+ne,preserveAspectRatio:"none"});return{span:ve.makeSvgSpan([],[Ze],o),minWidth:0,height:ge}}else{const U=[],ne=jm[z],[pe,ge,Ee]=ne,Ze=Ee/1e3,nt=pe.length;let qt,Jt;if(nt===1){const Yt=ne[3];qt=["hide-tail"],Jt=[Yt]}else if(nt===2)qt=["halfarrow-left","halfarrow-right"],Jt=["xMinYMin","xMaxYMin"];else if(nt===3)qt=["brace-left","brace-center","brace-right"],Jt=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
469
|
-
`+nt+" children.");for(let Yt=0;Yt<nt;Yt++){const nr=new Fr(pe[Yt]),rr=new zr([nr],{width:"400em",height:fe(Ze),viewBox:"0 0 "+$+" "+Ee,preserveAspectRatio:Jt[Yt]+" slice"}),xr=ve.makeSvgSpan([qt[Yt]],[rr],o);if(nt===1)return{span:xr,minWidth:ge,height:Ze};xr.style.height=fe(Ze),U.push(xr)}return{span:ve.makeSpan(["stretchy"],U,o),minWidth:ge,height:Ze}}}const{span:h,minWidth:b,height:k}=l();return h.height=k,h.style.height=fe(k),b>0&&(h.style.minWidth=fe(b)),h}};function Ht(s,o){if(!s||s.type!==o)throw new Error("Expected node of type "+o+", but got "+(s?"node of type "+s.type:String(s)));return s}function Rs(s){const o=ui(s);if(!o)throw new Error("Expected node of symbol group type, but got "+(s?"node of type "+s.type:String(s)));return o}function ui(s){return s&&(s.type==="atom"||Nr.hasOwnProperty(s.type))?s:null}const zs=(s,o)=>{let l,h,b;s&&s.type==="supsub"?(h=Ht(s.base,"accent"),l=h.base,s.base=l,b=Lr(tr(s,o)),s.base=h):(h=Ht(s,"accent"),l=h.base);const k=tr(l,o.havingCrampedStyle()),$=h.isShifty&&C.isCharacterBox(l);let z=0;if($){const Ee=C.getBaseElem(l),Ze=tr(Ee,o.havingCrampedStyle());z=$r(Ze).skew}const U=h.label==="\\c";let ne=U?k.height+k.depth:Math.min(k.height,o.fontMetrics().xHeight),pe;if(h.isStretchy)pe=Un.svgSpan(h,o),pe=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"elem",elem:pe,wrapperClasses:["svg-align"],wrapperStyle:z>0?{width:"calc(100% - "+fe(2*z)+")",marginLeft:fe(2*z)}:void 0}]},o);else{let Ee,Ze;h.label==="\\vec"?(Ee=ve.staticSvg("vec",o),Ze=ve.svgData.vec[1]):(Ee=ve.makeOrd({mode:h.mode,text:h.label},o,"textord"),Ee=$r(Ee),Ee.italic=0,Ze=Ee.width,U&&(ne+=Ee.depth)),pe=ve.makeSpan(["accent-body"],[Ee]);const nt=h.label==="\\textcircled";nt&&(pe.classes.push("accent-full"),ne=k.height);let qt=z;nt||(qt-=Ze/2),pe.style.left=fe(qt),h.label==="\\textcircled"&&(pe.style.top=".2em"),pe=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"kern",size:-ne},{type:"elem",elem:pe}]},o)}const ge=ve.makeSpan(["mord","accent"],[pe],o);return b?(b.children[0]=ge,b.height=Math.max(ge.height,b.height),b.classes[0]="mord",b):ge},Ku=(s,o)=>{const l=s.isStretchy?Un.mathMLnode(s.label):new Ye.MathNode("mo",[yn(s.label,s.mode)]),h=new Ye.MathNode("mover",[pr(s.base,o),l]);return h.setAttribute("accent","true"),h},_m=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,o)=>{const l=Pn(o[0]),h=!_m.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:l}},htmlBuilder:zs,mathmlBuilder:Ku}),et({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(s,o)=>{const l=o[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:l}},htmlBuilder:zs,mathmlBuilder:Ku}),et({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0];return{type:"accentUnder",mode:l.mode,label:h,base:b}},htmlBuilder:(s,o)=>{const l=tr(s.base,o),h=Un.svgSpan(s,o),b=s.label==="\\utilde"?.12:0,k=ve.makeVList({positionType:"top",positionData:l.height,children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:b},{type:"elem",elem:l}]},o);return ve.makeSpan(["mord","accentunder"],[k],o)},mathmlBuilder:(s,o)=>{const l=Un.mathMLnode(s.label),h=new Ye.MathNode("munder",[pr(s.base,o),l]);return h.setAttribute("accentunder","true"),h}});const ci=s=>{const o=new Ye.MathNode("mpadded",s?[s]:[]);return o.setAttribute("width","+0.6em"),o.setAttribute("lspace","0.3em"),o};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,o,l){let{parser:h,funcName:b}=s;return{type:"xArrow",mode:h.mode,label:b,body:o[0],below:l[0]}},htmlBuilder(s,o){const l=o.style;let h=o.havingStyle(l.sup());const b=ve.wrapFragment(tr(s.body,h,o),o),k=s.label.slice(0,2)==="\\x"?"x":"cd";b.classes.push(k+"-arrow-pad");let $;s.below&&(h=o.havingStyle(l.sub()),$=ve.wrapFragment(tr(s.below,h,o),o),$.classes.push(k+"-arrow-pad"));const z=Un.svgSpan(s,o),U=-o.fontMetrics().axisHeight+.5*z.height;let ne=-o.fontMetrics().axisHeight-.5*z.height-.111;(b.depth>.25||s.label==="\\xleftequilibrium")&&(ne-=b.depth);let pe;if($){const ge=-o.fontMetrics().axisHeight+$.height+.5*z.height+.111;pe=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:ne},{type:"elem",elem:z,shift:U},{type:"elem",elem:$,shift:ge}]},o)}else pe=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:ne},{type:"elem",elem:z,shift:U}]},o);return pe.children[0].children[0].children[1].classes.push("svg-align"),ve.makeSpan(["mrel","x-arrow"],[pe],o)},mathmlBuilder(s,o){const l=Un.mathMLnode(s.label);l.setAttribute("minsize",s.label.charAt(0)==="x"?"1.75em":"3.0em");let h;if(s.body){const b=ci(pr(s.body,o));if(s.below){const k=ci(pr(s.below,o));h=new Ye.MathNode("munderover",[l,k,b])}else h=new Ye.MathNode("mover",[l,b])}else if(s.below){const b=ci(pr(s.below,o));h=new Ye.MathNode("munder",[l,b])}else h=ci(),h=new Ye.MathNode("mover",[l,h]);return h}});const qm=ve.makeSpan;function Wu(s,o){const l=jr(s.body,o,!0);return qm([s.mclass],l,o)}function Vu(s,o){let l;const h=on(s.body,o);return s.mclass==="minner"?l=new Ye.MathNode("mpadded",h):s.mclass==="mord"?s.isCharacterBox?(l=h[0],l.type="mi"):l=new Ye.MathNode("mi",h):(s.isCharacterBox?(l=h[0],l.type="mo"):l=new Ye.MathNode("mo",h),s.mclass==="mbin"?(l.attributes.lspace="0.22em",l.attributes.rspace="0.22em"):s.mclass==="mpunct"?(l.attributes.lspace="0em",l.attributes.rspace="0.17em"):s.mclass==="mopen"||s.mclass==="mclose"?(l.attributes.lspace="0em",l.attributes.rspace="0em"):s.mclass==="minner"&&(l.attributes.lspace="0.0556em",l.attributes.width="+0.1111em")),l}et({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(s,o){let{parser:l,funcName:h}=s;const b=o[0];return{type:"mclass",mode:l.mode,mclass:"m"+h.slice(5),body:yr(b),isCharacterBox:C.isCharacterBox(b)}},htmlBuilder:Wu,mathmlBuilder:Vu});const di=s=>{const o=s.type==="ordgroup"&&s.body.length?s.body[0]:s;return o.type==="atom"&&(o.family==="bin"||o.family==="rel")?"m"+o.family:"mord"};et({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(s,o){let{parser:l}=s;return{type:"mclass",mode:l.mode,mclass:di(o[0]),body:yr(o[1]),isCharacterBox:C.isCharacterBox(o[1])}}}),et({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(s,o){let{parser:l,funcName:h}=s;const b=o[1],k=o[0];let $;h!=="\\stackrel"?$=di(b):$="mrel";const z={type:"op",mode:b.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:h!=="\\stackrel",body:yr(b)},U={type:"supsub",mode:k.mode,base:z,sup:h==="\\underset"?null:k,sub:h==="\\underset"?k:null};return{type:"mclass",mode:l.mode,mclass:$,body:[U],isCharacterBox:C.isCharacterBox(U)}},htmlBuilder:Wu,mathmlBuilder:Vu}),et({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(s,o){let{parser:l}=s;return{type:"pmb",mode:l.mode,mclass:di(o[0]),body:yr(o[0])}},htmlBuilder(s,o){const l=jr(s.body,o,!0),h=ve.makeSpan([s.mclass],l,o);return h.style.textShadow="0.02em 0.01em 0.04px",h},mathmlBuilder(s,o){const l=on(s.body,o),h=new Ye.MathNode("mstyle",l);return h.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),h}});const Hm={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Uu=()=>({type:"styling",body:[],mode:"math",style:"display"}),Gu=s=>s.type==="textord"&&s.text==="@",Km=(s,o)=>(s.type==="mathord"||s.type==="atom")&&s.text===o;function Wm(s,o,l){const h=Hm[s];switch(h){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return l.callFunction(h,[o[0]],[o[1]]);case"\\uparrow":case"\\downarrow":{const b=l.callFunction("\\\\cdleft",[o[0]],[]),k={type:"atom",text:h,mode:"math",family:"rel"},$=l.callFunction("\\Big",[k],[]),z=l.callFunction("\\\\cdright",[o[1]],[]),U={type:"ordgroup",mode:"math",body:[b,$,z]};return l.callFunction("\\\\cdparent",[U],[])}case"\\\\cdlongequal":return l.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const b={type:"textord",text:"\\Vert",mode:"math"};return l.callFunction("\\Big",[b],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Vm(s){const o=[];for(s.gullet.beginGroup(),s.gullet.macros.set("\\cr","\\\\\\relax"),s.gullet.beginGroup();;){o.push(s.parseExpression(!1,"\\\\")),s.gullet.endGroup(),s.gullet.beginGroup();const k=s.fetch().text;if(k==="&"||k==="\\\\")s.consume();else if(k==="\\end"){o[o.length-1].length===0&&o.pop();break}else throw new i("Expected \\\\ or \\cr or \\end",s.nextToken)}let l=[];const h=[l];for(let k=0;k<o.length;k++){const $=o[k];let z=Uu();for(let U=0;U<$.length;U++)if(!Gu($[U]))z.body.push($[U]);else{l.push(z),U+=1;const ne=Rs($[U]).text,pe=new Array(2);if(pe[0]={type:"ordgroup",mode:"math",body:[]},pe[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(ne)>-1))if("<>AV".indexOf(ne)>-1)for(let Ee=0;Ee<2;Ee++){let Ze=!0;for(let nt=U+1;nt<$.length;nt++){if(Km($[nt],ne)){Ze=!1,U=nt;break}if(Gu($[nt]))throw new i("Missing a "+ne+" character to complete a CD arrow.",$[nt]);pe[Ee].body.push($[nt])}if(Ze)throw new i("Missing a "+ne+" character to complete a CD arrow.",$[U])}else throw new i('Expected one of "<>AV=|." after @',$[U]);const ge={type:"styling",body:[Wm(ne,pe,s)],mode:"math",style:"display"};l.push(ge),z=Uu()}k%2===0?l.push(z):l.shift(),l=[],h.push(l)}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,o){let{parser:l,funcName:h}=s;return{type:"cdlabel",mode:l.mode,side:h.slice(4),label:o[0]}},htmlBuilder(s,o){const l=o.havingStyle(o.style.sup()),h=ve.wrapFragment(tr(s.label,l,o),o);return h.classes.push("cd-label-"+s.side),h.style.bottom=fe(.8-h.depth),h.height=0,h.depth=0,h},mathmlBuilder(s,o){let l=new Ye.MathNode("mrow",[pr(s.label,o)]);return l=new Ye.MathNode("mpadded",[l]),l.setAttribute("width","0"),s.side==="left"&&l.setAttribute("lspace","-1width"),l.setAttribute("voffset","0.7em"),l=new Ye.MathNode("mstyle",[l]),l.setAttribute("displaystyle","false"),l.setAttribute("scriptlevel","1"),l}}),et({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(s,o){let{parser:l}=s;return{type:"cdlabelparent",mode:l.mode,fragment:o[0]}},htmlBuilder(s,o){const l=ve.wrapFragment(tr(s.fragment,o),o);return l.classes.push("cd-vert-arrow"),l},mathmlBuilder(s,o){return new Ye.MathNode("mrow",[pr(s.fragment,o)])}}),et({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(s,o){let{parser:l}=s;const h=Ht(o[0],"ordgroup").body;let b="";for(let z=0;z<h.length;z++){const U=Ht(h[z],"textord");b+=U.text}let k=parseInt(b),$;if(isNaN(k))throw new i("\\@char has non-numeric argument "+b);if(k<0||k>=1114111)throw new i("\\@char with invalid code point "+b);return k<=65535?$=String.fromCharCode(k):(k-=65536,$=String.fromCharCode((k>>10)+55296,(k&1023)+56320)),{type:"textord",mode:l.mode,text:$}}});const Yu=(s,o)=>{const l=jr(s.body,o.withColor(s.color),!1);return ve.makeFragment(l)},Zu=(s,o)=>{const l=on(s.body,o.withColor(s.color)),h=new Ye.MathNode("mstyle",l);return h.setAttribute("mathcolor",s.color),h};et({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(s,o){let{parser:l}=s;const h=Ht(o[0],"color-token").color,b=o[1];return{type:"color",mode:l.mode,color:h,body:yr(b)}},htmlBuilder:Yu,mathmlBuilder:Zu}),et({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(s,o){let{parser:l,breakOnTokenText:h}=s;const b=Ht(o[0],"color-token").color;l.gullet.macros.set("\\current@color",b);const k=l.parseExpression(!0,h);return{type:"color",mode:l.mode,color:b,body:k}},htmlBuilder:Yu,mathmlBuilder:Zu}),et({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(s,o,l){let{parser:h}=s;const b=h.gullet.future().text==="["?h.parseSizeGroup(!0):null,k=!h.settings.displayMode||!h.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:h.mode,newLine:k,size:b&&Ht(b,"size").value}},htmlBuilder(s,o){const l=ve.makeSpan(["mspace"],[],o);return s.newLine&&(l.classes.push("newline"),s.size&&(l.style.marginTop=fe(je(s.size,o)))),l},mathmlBuilder(s,o){const l=new Ye.MathNode("mspace");return s.newLine&&(l.setAttribute("linebreak","newline"),s.size&&l.setAttribute("height",fe(je(s.size,o)))),l}});const Is={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Xu=s=>{const o=s.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new i("Expected a control sequence",s);return o},Um=s=>{let o=s.gullet.popToken();return o.text==="="&&(o=s.gullet.popToken(),o.text===" "&&(o=s.gullet.popToken())),o},Qu=(s,o,l,h)=>{let b=s.gullet.macros.get(l.text);b==null&&(l.noexpand=!0,b={tokens:[l],numArgs:0,unexpandable:!s.gullet.isExpandable(l.text)}),s.gullet.macros.set(o,b,h)};et({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(s){let{parser:o,funcName:l}=s;o.consumeSpaces();const h=o.fetch();if(Is[h.text])return(l==="\\global"||l==="\\\\globallong")&&(h.text=Is[h.text]),Ht(o.parseFunction(),"internal");throw new i("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:o,funcName:l}=s,h=o.gullet.popToken();const b=h.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(b))throw new i("Expected a control sequence",h);let k=0,$;const z=[[]];for(;o.gullet.future().text!=="{";)if(h=o.gullet.popToken(),h.text==="#"){if(o.gullet.future().text==="{"){$=o.gullet.future(),z[k].push("{");break}if(h=o.gullet.popToken(),!/^[1-9]$/.test(h.text))throw new i('Invalid argument number "'+h.text+'"');if(parseInt(h.text)!==k+1)throw new i('Argument number "'+h.text+'" out of order');k++,z.push([])}else{if(h.text==="EOF")throw new i("Expected a macro definition");z[k].push(h.text)}let{tokens:U}=o.gullet.consumeArg();return $&&U.unshift($),(l==="\\edef"||l==="\\xdef")&&(U=o.gullet.expandTokens(U),U.reverse()),o.gullet.macros.set(b,{tokens:U,numArgs:k,delimiters:z},l===Is[l]),{type:"internal",mode:o.mode}}}),et({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:o,funcName:l}=s;const h=Xu(o.gullet.popToken());o.gullet.consumeSpaces();const b=Um(o);return Qu(o,h,b,l==="\\\\globallet"),{type:"internal",mode:o.mode}}}),et({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:o,funcName:l}=s;const h=Xu(o.gullet.popToken()),b=o.gullet.popToken(),k=o.gullet.popToken();return Qu(o,h,k,l==="\\\\globalfuture"),o.gullet.pushToken(k),o.gullet.pushToken(b),{type:"internal",mode:o.mode}}});const wo=function(s,o,l){const h=xt.math[s]&&xt.math[s].replace,b=ot(h||s,o,l);if(!b)throw new Error("Unsupported symbol "+s+" and font size "+o+".");return b},js=function(s,o,l,h){const b=l.havingBaseStyle(o),k=ve.makeSpan(h.concat(b.sizingClasses(l)),[s],l),$=b.sizeMultiplier/l.sizeMultiplier;return k.height*=$,k.depth*=$,k.maxFontSize=b.sizeMultiplier,k},Ju=function(s,o,l){const h=o.havingBaseStyle(l),b=(1-o.sizeMultiplier/h.sizeMultiplier)*o.fontMetrics().axisHeight;s.classes.push("delimcenter"),s.style.top=fe(b),s.height-=b,s.depth+=b},Gm=function(s,o,l,h,b,k){const $=ve.makeSymbol(s,"Main-Regular",b,h),z=js($,o,h,k);return l&&Ju(z,h,o),z},Ym=function(s,o,l,h){return ve.makeSymbol(s,"Size"+o+"-Regular",l,h)},ec=function(s,o,l,h,b,k){const $=Ym(s,o,b,h),z=js(ve.makeSpan(["delimsizing","size"+o],[$],h),K.TEXT,h,k);return l&&Ju(z,h,K.TEXT),z},Ls=function(s,o,l){let h;return o==="Size1-Regular"?h="delim-size1":h="delim-size4",{type:"elem",elem:ve.makeSpan(["delimsizinginner",h],[ve.makeSpan([],[ve.makeSymbol(s,o,l)])])}},_s=function(s,o,l){const h=be["Size4-Regular"][s.charCodeAt(0)]?be["Size4-Regular"][s.charCodeAt(0)][4]:be["Size1-Regular"][s.charCodeAt(0)][4],b=new Fr("inner",we(s,Math.round(1e3*o))),k=new zr([b],{width:fe(h),height:fe(o),style:"width:"+fe(h),viewBox:"0 0 "+1e3*h+" "+Math.round(1e3*o),preserveAspectRatio:"xMinYMin"}),$=ve.makeSvgSpan([],[k],l);return $.height=o,$.style.height=fe(o),$.style.width=fe(h),{type:"elem",elem:$}},qs=.008,fi={type:"kern",size:-1*qs},Zm=["|","\\lvert","\\rvert","\\vert"],Xm=["\\|","\\lVert","\\rVert","\\Vert"],tc=function(s,o,l,h,b,k){let $,z,U,ne,pe="",ge=0;$=U=ne=s,z=null;let Ee="Size1-Regular";s==="\\uparrow"?U=ne="\u23D0":s==="\\Uparrow"?U=ne="\u2016":s==="\\downarrow"?$=U="\u23D0":s==="\\Downarrow"?$=U="\u2016":s==="\\updownarrow"?($="\\uparrow",U="\u23D0",ne="\\downarrow"):s==="\\Updownarrow"?($="\\Uparrow",U="\u2016",ne="\\Downarrow"):Zm.includes(s)?(U="\u2223",pe="vert",ge=333):Xm.includes(s)?(U="\u2225",pe="doublevert",ge=556):s==="["||s==="\\lbrack"?($="\u23A1",U="\u23A2",ne="\u23A3",Ee="Size4-Regular",pe="lbrack",ge=667):s==="]"||s==="\\rbrack"?($="\u23A4",U="\u23A5",ne="\u23A6",Ee="Size4-Regular",pe="rbrack",ge=667):s==="\\lfloor"||s==="\u230A"?(U=$="\u23A2",ne="\u23A3",Ee="Size4-Regular",pe="lfloor",ge=667):s==="\\lceil"||s==="\u2308"?($="\u23A1",U=ne="\u23A2",Ee="Size4-Regular",pe="lceil",ge=667):s==="\\rfloor"||s==="\u230B"?(U=$="\u23A5",ne="\u23A6",Ee="Size4-Regular",pe="rfloor",ge=667):s==="\\rceil"||s==="\u2309"?($="\u23A4",U=ne="\u23A5",Ee="Size4-Regular",pe="rceil",ge=667):s==="("||s==="\\lparen"?($="\u239B",U="\u239C",ne="\u239D",Ee="Size4-Regular",pe="lparen",ge=875):s===")"||s==="\\rparen"?($="\u239E",U="\u239F",ne="\u23A0",Ee="Size4-Regular",pe="rparen",ge=875):s==="\\{"||s==="\\lbrace"?($="\u23A7",z="\u23A8",ne="\u23A9",U="\u23AA",Ee="Size4-Regular"):s==="\\}"||s==="\\rbrace"?($="\u23AB",z="\u23AC",ne="\u23AD",U="\u23AA",Ee="Size4-Regular"):s==="\\lgroup"||s==="\u27EE"?($="\u23A7",ne="\u23A9",U="\u23AA",Ee="Size4-Regular"):s==="\\rgroup"||s==="\u27EF"?($="\u23AB",ne="\u23AD",U="\u23AA",Ee="Size4-Regular"):s==="\\lmoustache"||s==="\u23B0"?($="\u23A7",ne="\u23AD",U="\u23AA",Ee="Size4-Regular"):(s==="\\rmoustache"||s==="\u23B1")&&($="\u23AB",ne="\u23A9",U="\u23AA",Ee="Size4-Regular");const Ze=wo($,Ee,b),nt=Ze.height+Ze.depth,qt=wo(U,Ee,b),Jt=qt.height+qt.depth,Yt=wo(ne,Ee,b),nr=Yt.height+Yt.depth;let rr=0,xr=1;if(z!==null){const Or=wo(z,Ee,b);rr=Or.height+Or.depth,xr=2}const Ur=nt+nr+rr,Jr=Math.max(0,Math.ceil((o-Ur)/(xr*Jt))),xn=Ur+Jr*xr*Jt;let _a=h.fontMetrics().axisHeight;l&&(_a*=h.sizeMultiplier);const ar=xn/2-_a,hr=[];if(pe.length>0){const Or=xn-nt-nr,Ar=Math.round(xn*1e3),wn=Te(pe,Math.round(Or*1e3)),Dg=new Fr(pe,wn),Wc=(ge/1e3).toFixed(3)+"em",Vc=(Ar/1e3).toFixed(3)+"em",kg=new zr([Dg],{width:Wc,height:Vc,viewBox:"0 0 "+ge+" "+Ar}),vi=ve.makeSvgSpan([],[kg],h);vi.height=Ar/1e3,vi.style.width=Wc,vi.style.height=Vc,hr.push({type:"elem",elem:vi})}else{if(hr.push(Ls(ne,Ee,b)),hr.push(fi),z===null){const Or=xn-nt-nr+2*qs;hr.push(_s(U,Or,h))}else{const Or=(xn-nt-nr-rr)/2+2*qs;hr.push(_s(U,Or,h)),hr.push(fi),hr.push(Ls(z,Ee,b)),hr.push(fi),hr.push(_s(U,Or,h))}hr.push(fi),hr.push(Ls($,Ee,b))}const wr=h.havingBaseStyle(K.TEXT),kr=ve.makeVList({positionType:"bottom",positionData:ar,children:hr},wr);return js(ve.makeSpan(["delimsizing","mult"],[kr],wr),K.TEXT,h,k)},Hs=80,Ks=.08,Ws=function(s,o,l,h,b){const k=me(s,h,l),$=new Fr(s,k),z=new zr([$],{width:"400em",height:fe(o),viewBox:"0 0 400000 "+l,preserveAspectRatio:"xMinYMin slice"});return ve.makeSvgSpan(["hide-tail"],[z],b)},Qm=function(s,o){const l=o.havingBaseSizing(),h=oc("\\surd",s*l.sizeMultiplier,ac,l);let b=l.sizeMultiplier;const k=Math.max(0,o.minRuleThickness-o.fontMetrics().sqrtRuleThickness);let $,z=0,U=0,ne=0,pe;return h.type==="small"?(ne=1e3+1e3*k+Hs,s<1?b=1:s<1.4&&(b=.7),z=(1+k+Ks)/b,U=(1+k)/b,$=Ws("sqrtMain",z,ne,k,o),$.style.minWidth="0.853em",pe=.833/b):h.type==="large"?(ne=(1e3+Hs)*Co[h.size],U=(Co[h.size]+k)/b,z=(Co[h.size]+k+Ks)/b,$=Ws("sqrtSize"+h.size,z,ne,k,o),$.style.minWidth="1.02em",pe=1/b):(z=s+k+Ks,U=s+k,ne=Math.floor(1e3*s+k)+Hs,$=Ws("sqrtTall",z,ne,k,o),$.style.minWidth="0.742em",pe=1.056),$.height=U,$.style.height=fe(z),{span:$,advanceWidth:pe,ruleWidth:(o.fontMetrics().sqrtRuleThickness+k)*b}},rc=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Jm=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],nc=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Co=[0,1.2,1.8,2.4,3],eg=function(s,o,l,h,b){if(s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle"),rc.includes(s)||nc.includes(s))return ec(s,o,!1,l,h,b);if(Jm.includes(s))return tc(s,Co[o],!1,l,h,b);throw new i("Illegal delimiter: '"+s+"'")},tg=[{type:"small",style:K.SCRIPTSCRIPT},{type:"small",style:K.SCRIPT},{type:"small",style:K.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],rg=[{type:"small",style:K.SCRIPTSCRIPT},{type:"small",style:K.SCRIPT},{type:"small",style:K.TEXT},{type:"stack"}],ac=[{type:"small",style:K.SCRIPTSCRIPT},{type:"small",style:K.SCRIPT},{type:"small",style:K.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ng=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.")},oc=function(s,o,l,h){const b=Math.min(2,3-h.style.size);for(let k=b;k<l.length&&l[k].type!=="stack";k++){const $=wo(s,ng(l[k]),"math");let z=$.height+$.depth;if(l[k].type==="small"){const U=h.havingBaseStyle(l[k].style);z*=U.sizeMultiplier}if(z>o)return l[k]}return l[l.length-1]},ic=function(s,o,l,h,b,k){s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle");let $;nc.includes(s)?$=tg:rc.includes(s)?$=ac:$=rg;const z=oc(s,o,$,h);return z.type==="small"?Gm(s,z.style,l,h,b,k):z.type==="large"?ec(s,z.size,l,h,b,k):tc(s,o,l,h,b,k)};var Gn={sqrtImage:Qm,sizedDelim:eg,sizeToMaxHeight:Co,customSizedDelim:ic,leftRightDelim:function(s,o,l,h,b,k){const $=h.fontMetrics().axisHeight*h.sizeMultiplier,z=901,U=5/h.fontMetrics().ptPerEm,ne=Math.max(o-$,l+$),pe=Math.max(ne/500*z,2*ne-U);return ic(s,pe,!0,h,b,k)}};const sc={"\\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}},ag=["(","\\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 hi(s,o){const l=ui(s);if(l&&ag.includes(l.text))return l;throw l?new i("Invalid delimiter '"+l.text+"' after '"+o.funcName+"'",s):new i("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,o)=>{const l=hi(o[0],s);return{type:"delimsizing",mode:s.parser.mode,size:sc[s.funcName].size,mclass:sc[s.funcName].mclass,delim:l.text}},htmlBuilder:(s,o)=>s.delim==="."?ve.makeSpan([s.mclass]):Gn.sizedDelim(s.delim,s.size,o,s.mode,[s.mclass]),mathmlBuilder:s=>{const o=[];s.delim!=="."&&o.push(yn(s.delim,s.mode));const l=new Ye.MathNode("mo",o);s.mclass==="mopen"||s.mclass==="mclose"?l.setAttribute("fence","true"):l.setAttribute("fence","false"),l.setAttribute("stretchy","true");const h=fe(Gn.sizeToMaxHeight[s.size]);return l.setAttribute("minsize",h),l.setAttribute("maxsize",h),l}});function lc(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,o)=>{const l=s.parser.gullet.macros.get("\\current@color");if(l&&typeof l!="string")throw new i("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:s.parser.mode,delim:hi(o[0],s).text,color:l}}}),et({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(s,o)=>{const l=hi(o[0],s),h=s.parser;++h.leftrightDepth;const b=h.parseExpression(!1);--h.leftrightDepth,h.expect("\\right",!1);const k=Ht(h.parseFunction(),"leftright-right");return{type:"leftright",mode:h.mode,body:b,left:l.text,right:k.delim,rightColor:k.color}},htmlBuilder:(s,o)=>{lc(s);const l=jr(s.body,o,!0,["mopen","mclose"]);let h=0,b=0,k=!1;for(let U=0;U<l.length;U++)l[U].isMiddle?k=!0:(h=Math.max(l[U].height,h),b=Math.max(l[U].depth,b));h*=o.sizeMultiplier,b*=o.sizeMultiplier;let $;if(s.left==="."?$=xo(o,["mopen"]):$=Gn.leftRightDelim(s.left,h,b,o,s.mode,["mopen"]),l.unshift($),k)for(let U=1;U<l.length;U++){const ne=l[U].isMiddle;ne&&(l[U]=Gn.leftRightDelim(ne.delim,h,b,ne.options,s.mode,[]))}let z;if(s.right===".")z=xo(o,["mclose"]);else{const U=s.rightColor?o.withColor(s.rightColor):o;z=Gn.leftRightDelim(s.right,h,b,U,s.mode,["mclose"])}return l.push(z),ve.makeSpan(["minner"],l,o)},mathmlBuilder:(s,o)=>{lc(s);const l=on(s.body,o);if(s.left!=="."){const h=new Ye.MathNode("mo",[yn(s.left,s.mode)]);h.setAttribute("fence","true"),l.unshift(h)}if(s.right!=="."){const h=new Ye.MathNode("mo",[yn(s.right,s.mode)]);h.setAttribute("fence","true"),s.rightColor&&h.setAttribute("mathcolor",s.rightColor),l.push(h)}return $s(l)}}),et({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(s,o)=>{const l=hi(o[0],s);if(!s.parser.leftrightDepth)throw new i("\\middle without preceding \\left",l);return{type:"middle",mode:s.parser.mode,delim:l.text}},htmlBuilder:(s,o)=>{let l;if(s.delim===".")l=xo(o,[]);else{l=Gn.sizedDelim(s.delim,1,o,s.mode,[]);const h={delim:s.delim,options:o};l.isMiddle=h}return l},mathmlBuilder:(s,o)=>{const l=s.delim==="\\vert"||s.delim==="|"?yn("|","text"):yn(s.delim,s.mode),h=new Ye.MathNode("mo",[l]);return h.setAttribute("fence","true"),h.setAttribute("lspace","0.05em"),h.setAttribute("rspace","0.05em"),h}});const Vs=(s,o)=>{const l=ve.wrapFragment(tr(s.body,o),o),h=s.label.slice(1);let b=o.sizeMultiplier,k,$=0;const z=C.isCharacterBox(s.body);if(h==="sout")k=ve.makeSpan(["stretchy","sout"]),k.height=o.fontMetrics().defaultRuleThickness/b,$=-.5*o.fontMetrics().xHeight;else if(h==="phase"){const ne=je({number:.6,unit:"pt"},o),pe=je({number:.35,unit:"ex"},o),ge=o.havingBaseSizing();b=b/ge.sizeMultiplier;const Ee=l.height+l.depth+ne+pe;l.style.paddingLeft=fe(Ee/2+ne);const Ze=Math.floor(1e3*Ee*b),nt=Se(Ze),qt=new zr([new Fr("phase",nt)],{width:"400em",height:fe(Ze/1e3),viewBox:"0 0 400000 "+Ze,preserveAspectRatio:"xMinYMin slice"});k=ve.makeSvgSpan(["hide-tail"],[qt],o),k.style.height=fe(Ee),$=l.depth+ne+pe}else{/cancel/.test(h)?z||l.classes.push("cancel-pad"):h==="angl"?l.classes.push("anglpad"):l.classes.push("boxpad");let ne=0,pe=0,ge=0;/box/.test(h)?(ge=Math.max(o.fontMetrics().fboxrule,o.minRuleThickness),ne=o.fontMetrics().fboxsep+(h==="colorbox"?0:ge),pe=ne):h==="angl"?(ge=Math.max(o.fontMetrics().defaultRuleThickness,o.minRuleThickness),ne=4*ge,pe=Math.max(0,.25-l.depth)):(ne=z?.2:0,pe=ne),k=Un.encloseSpan(l,h,ne,pe,o),/fbox|boxed|fcolorbox/.test(h)?(k.style.borderStyle="solid",k.style.borderWidth=fe(ge)):h==="angl"&&ge!==.049&&(k.style.borderTopWidth=fe(ge),k.style.borderRightWidth=fe(ge)),$=l.depth+pe,s.backgroundColor&&(k.style.backgroundColor=s.backgroundColor,s.borderColor&&(k.style.borderColor=s.borderColor))}let U;if(s.backgroundColor)U=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:k,shift:$},{type:"elem",elem:l,shift:0}]},o);else{const ne=/cancel|phase/.test(h)?["svg-align"]:[];U=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:k,shift:$,wrapperClasses:ne}]},o)}return/cancel/.test(h)&&(U.height=l.height,U.depth=l.depth),/cancel/.test(h)&&!z?ve.makeSpan(["mord","cancel-lap"],[U],o):ve.makeSpan(["mord"],[U],o)},Us=(s,o)=>{let l=0;const h=new Ye.MathNode(s.label.indexOf("colorbox")>-1?"mpadded":"menclose",[pr(s.body,o)]);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(l=o.fontMetrics().fboxsep*o.fontMetrics().ptPerEm,h.setAttribute("width","+"+2*l+"pt"),h.setAttribute("height","+"+2*l+"pt"),h.setAttribute("lspace",l+"pt"),h.setAttribute("voffset",l+"pt"),s.label==="\\fcolorbox"){const b=Math.max(o.fontMetrics().fboxrule,o.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,o,l){let{parser:h,funcName:b}=s;const k=Ht(o[0],"color-token").color,$=o[1];return{type:"enclose",mode:h.mode,label:b,backgroundColor:k,body:$}},htmlBuilder:Vs,mathmlBuilder:Us}),et({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(s,o,l){let{parser:h,funcName:b}=s;const k=Ht(o[0],"color-token").color,$=Ht(o[1],"color-token").color,z=o[2];return{type:"enclose",mode:h.mode,label:b,backgroundColor:$,borderColor:k,body:z}},htmlBuilder:Vs,mathmlBuilder:Us}),et({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(s,o){let{parser:l}=s;return{type:"enclose",mode:l.mode,label:"\\fbox",body:o[0]}}}),et({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(s,o){let{parser:l,funcName:h}=s;const b=o[0];return{type:"enclose",mode:l.mode,label:h,body:b}},htmlBuilder:Vs,mathmlBuilder:Us}),et({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(s,o){let{parser:l}=s;return{type:"enclose",mode:l.mode,label:"\\angl",body:o[0]}}});const uc={};function Rn(s){let{type:o,names:l,props:h,handler:b,htmlBuilder:k,mathmlBuilder:$}=s;const z={type:o,numArgs:h.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:b};for(let U=0;U<l.length;++U)uc[l[U]]=z;k&&(Tr[o]=k),$&&(An[o]=$)}const cc={};function I(s,o){cc[s]=o}class sn{constructor(o,l,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=o,this.start=l,this.end=h}static range(o,l){return l?!o||!o.loc||!l.loc||o.loc.lexer!==l.loc.lexer?null:new sn(o.loc.lexer,o.loc.start,l.loc.end):o&&o.loc}}class fn{constructor(o,l){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=o,this.loc=l}range(o,l){return new fn(l,sn.range(this,o))}}function dc(s){const o=[];s.consumeSpaces();let l=s.fetch().text;for(l==="\\relax"&&(s.consume(),s.consumeSpaces(),l=s.fetch().text);l==="\\hline"||l==="\\hdashline";)s.consume(),o.push(l==="\\hdashline"),s.consumeSpaces(),l=s.fetch().text;return o}const pi=s=>{if(!s.parser.settings.displayMode)throw new i("{"+s.envName+"} can be used only in display mode.")};function Gs(s){if(s.indexOf("ed")===-1)return s.indexOf("*")===-1}function ia(s,o,l){let{hskipBeforeAndAfter:h,addJot:b,cols:k,arraystretch:$,colSeparationType:z,autoTag:U,singleRow:ne,emptySingleRow:pe,maxNumCols:ge,leqno:Ee}=o;if(s.gullet.beginGroup(),ne||s.gullet.macros.set("\\cr","\\\\\\relax"),!$){const xr=s.gullet.expandMacroAsText("\\arraystretch");if(xr==null)$=1;else if($=parseFloat(xr),!$||$<0)throw new i("Invalid \\arraystretch: "+xr)}s.gullet.beginGroup();let Ze=[];const nt=[Ze],qt=[],Jt=[],Yt=U!=null?[]:void 0;function nr(){U&&s.gullet.macros.set("\\@eqnsw","1",!0)}function rr(){Yt&&(s.gullet.macros.get("\\df@tag")?(Yt.push(s.subparse([new fn("\\df@tag")])),s.gullet.macros.set("\\df@tag",void 0,!0)):Yt.push(!!U&&s.gullet.macros.get("\\@eqnsw")==="1"))}for(nr(),Jt.push(dc(s));;){let xr=s.parseExpression(!1,ne?"\\end":"\\\\");s.gullet.endGroup(),s.gullet.beginGroup(),xr={type:"ordgroup",mode:s.mode,body:xr},l&&(xr={type:"styling",mode:s.mode,style:l,body:[xr]}),Ze.push(xr);const Ur=s.fetch().text;if(Ur==="&"){if(ge&&Ze.length===ge){if(ne||z)throw new i("Too many tab characters: &",s.nextToken);s.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}s.consume()}else if(Ur==="\\end"){rr(),Ze.length===1&&xr.type==="styling"&&xr.body[0].body.length===0&&(nt.length>1||!pe)&&nt.pop(),Jt.length<nt.length+1&&Jt.push([]);break}else if(Ur==="\\\\"){s.consume();let Jr;s.gullet.future().text!==" "&&(Jr=s.parseSizeGroup(!0)),qt.push(Jr?Jr.value:null),rr(),Jt.push(dc(s)),Ze=[],nt.push(Ze),nr()}else throw new i("Expected & or \\\\ or \\cr or \\end",s.nextToken)}return s.gullet.endGroup(),s.gullet.endGroup(),{type:"array",mode:s.mode,addJot:b,arraystretch:$,body:nt,cols:k,rowGaps:qt,hskipBeforeAndAfter:h,hLinesBeforeRow:Jt,colSeparationType:z,tags:Yt,leqno:Ee}}function Ys(s){return s.slice(0,1)==="d"?"display":"text"}const zn=function(s,o){let l,h;const b=s.body.length,k=s.hLinesBeforeRow;let $=0,z=new Array(b);const U=[],ne=Math.max(o.fontMetrics().arrayRuleWidth,o.minRuleThickness),pe=1/o.fontMetrics().ptPerEm;let ge=5*pe;s.colSeparationType&&s.colSeparationType==="small"&&(ge=.2778*(o.havingStyle(K.SCRIPT).sizeMultiplier/o.sizeMultiplier));const Ee=s.colSeparationType==="CD"?je({number:3,unit:"ex"},o):12*pe,Ze=3*pe,nt=s.arraystretch*Ee,qt=.7*nt,Jt=.3*nt;let Yt=0;function nr(ar){for(let hr=0;hr<ar.length;++hr)hr>0&&(Yt+=.25),U.push({pos:Yt,isDashed:ar[hr]})}for(nr(k[0]),l=0;l<s.body.length;++l){const ar=s.body[l];let hr=qt,wr=Jt;$<ar.length&&($=ar.length);const kr=new Array(ar.length);for(h=0;h<ar.length;++h){const wn=tr(ar[h],o);wr<wn.depth&&(wr=wn.depth),hr<wn.height&&(hr=wn.height),kr[h]=wn}const Or=s.rowGaps[l];let Ar=0;Or&&(Ar=je(Or,o),Ar>0&&(Ar+=Jt,wr<Ar&&(wr=Ar),Ar=0)),s.addJot&&(wr+=Ze),kr.height=hr,kr.depth=wr,Yt+=hr,kr.pos=Yt,Yt+=wr+Ar,z[l]=kr,nr(k[l+1])}const rr=Yt/2+o.fontMetrics().axisHeight,xr=s.cols||[],Ur=[];let Jr,xn;const _a=[];if(s.tags&&s.tags.some(ar=>ar))for(l=0;l<b;++l){const ar=z[l],hr=ar.pos-rr,wr=s.tags[l];let kr;wr===!0?kr=ve.makeSpan(["eqn-num"],[],o):wr===!1?kr=ve.makeSpan([],[],o):kr=ve.makeSpan([],jr(wr,o,!0),o),kr.depth=ar.depth,kr.height=ar.height,_a.push({type:"elem",elem:kr,shift:hr})}for(h=0,xn=0;h<$||xn<xr.length;++h,++xn){let ar=xr[xn]||{},hr=!0;for(;ar.type==="separator";){if(hr||(Jr=ve.makeSpan(["arraycolsep"],[]),Jr.style.width=fe(o.fontMetrics().doubleRuleSep),Ur.push(Jr)),ar.separator==="|"||ar.separator===":"){const Or=ar.separator==="|"?"solid":"dashed",Ar=ve.makeSpan(["vertical-separator"],[],o);Ar.style.height=fe(Yt),Ar.style.borderRightWidth=fe(ne),Ar.style.borderRightStyle=Or,Ar.style.margin="0 "+fe(-ne/2);const wn=Yt-rr;wn&&(Ar.style.verticalAlign=fe(-wn)),Ur.push(Ar)}else throw new i("Invalid separator type: "+ar.separator);xn++,ar=xr[xn]||{},hr=!1}if(h>=$)continue;let wr;(h>0||s.hskipBeforeAndAfter)&&(wr=C.deflt(ar.pregap,ge),wr!==0&&(Jr=ve.makeSpan(["arraycolsep"],[]),Jr.style.width=fe(wr),Ur.push(Jr)));let kr=[];for(l=0;l<b;++l){const Or=z[l],Ar=Or[h];if(!Ar)continue;const wn=Or.pos-rr;Ar.depth=Or.depth,Ar.height=Or.height,kr.push({type:"elem",elem:Ar,shift:wn})}kr=ve.makeVList({positionType:"individualShift",children:kr},o),kr=ve.makeSpan(["col-align-"+(ar.align||"c")],[kr]),Ur.push(kr),(h<$-1||s.hskipBeforeAndAfter)&&(wr=C.deflt(ar.postgap,ge),wr!==0&&(Jr=ve.makeSpan(["arraycolsep"],[]),Jr.style.width=fe(wr),Ur.push(Jr)))}if(z=ve.makeSpan(["mtable"],Ur),U.length>0){const ar=ve.makeLineSpan("hline",o,ne),hr=ve.makeLineSpan("hdashline",o,ne),wr=[{type:"elem",elem:z,shift:0}];for(;U.length>0;){const kr=U.pop(),Or=kr.pos-rr;kr.isDashed?wr.push({type:"elem",elem:hr,shift:Or}):wr.push({type:"elem",elem:ar,shift:Or})}z=ve.makeVList({positionType:"individualShift",children:wr},o)}if(_a.length===0)return ve.makeSpan(["mord"],[z],o);{let ar=ve.makeVList({positionType:"individualShift",children:_a},o);return ar=ve.makeSpan(["tag"],[ar],o),ve.makeFragment([z,ar])}},og={c:"center ",l:"left ",r:"right "},In=function(s,o){const l=[],h=new Ye.MathNode("mtd",[],["mtr-glue"]),b=new Ye.MathNode("mtd",[],["mml-eqn-num"]);for(let ge=0;ge<s.body.length;ge++){const Ee=s.body[ge],Ze=[];for(let nt=0;nt<Ee.length;nt++)Ze.push(new Ye.MathNode("mtd",[pr(Ee[nt],o)]));s.tags&&s.tags[ge]&&(Ze.unshift(h),Ze.push(h),s.leqno?Ze.unshift(b):Ze.push(b)),l.push(new Ye.MathNode("mtr",Ze))}let k=new Ye.MathNode("mtable",l);const $=s.arraystretch===.5?.1:.16+s.arraystretch-1+(s.addJot?.09:0);k.setAttribute("rowspacing",fe($));let z="",U="";if(s.cols&&s.cols.length>0){const ge=s.cols;let Ee="",Ze=!1,nt=0,qt=ge.length;ge[0].type==="separator"&&(z+="top ",nt=1),ge[ge.length-1].type==="separator"&&(z+="bottom ",qt-=1);for(let Jt=nt;Jt<qt;Jt++)ge[Jt].type==="align"?(U+=og[ge[Jt].align],Ze&&(Ee+="none "),Ze=!0):ge[Jt].type==="separator"&&Ze&&(Ee+=ge[Jt].separator==="|"?"solid ":"dashed ",Ze=!1);k.setAttribute("columnalign",U.trim()),/[sd]/.test(Ee)&&k.setAttribute("columnlines",Ee.trim())}if(s.colSeparationType==="align"){const ge=s.cols||[];let Ee="";for(let Ze=1;Ze<ge.length;Ze++)Ee+=Ze%2?"0em ":"1em ";k.setAttribute("columnspacing",Ee.trim())}else s.colSeparationType==="alignat"||s.colSeparationType==="gather"?k.setAttribute("columnspacing","0em"):s.colSeparationType==="small"?k.setAttribute("columnspacing","0.2778em"):s.colSeparationType==="CD"?k.setAttribute("columnspacing","0.5em"):k.setAttribute("columnspacing","1em");let ne="";const pe=s.hLinesBeforeRow;z+=pe[0].length>0?"left ":"",z+=pe[pe.length-1].length>0?"right ":"";for(let ge=1;ge<pe.length-1;ge++)ne+=pe[ge].length===0?"none ":pe[ge][0]?"dashed ":"solid ";return/[sd]/.test(ne)&&k.setAttribute("rowlines",ne.trim()),z!==""&&(k=new Ye.MathNode("menclose",[k]),k.setAttribute("notation",z.trim())),s.arraystretch&&s.arraystretch<1&&(k=new Ye.MathNode("mstyle",[k]),k.setAttribute("scriptlevel","1")),k},fc=function(s,o){s.envName.indexOf("ed")===-1&&pi(s);const l=[],h=s.envName.indexOf("at")>-1?"alignat":"align",b=s.envName==="split",k=ia(s.parser,{cols:l,addJot:!0,autoTag:b?void 0:Gs(s.envName),emptySingleRow:!0,colSeparationType:h,maxNumCols:b?2:void 0,leqno:s.parser.settings.leqno},"display");let $,z=0;const U={type:"ordgroup",mode:s.mode,body:[]};if(o[0]&&o[0].type==="ordgroup"){let pe="";for(let ge=0;ge<o[0].body.length;ge++){const Ee=Ht(o[0].body[ge],"textord");pe+=Ee.text}$=Number(pe),z=$*2}const ne=!z;k.body.forEach(function(pe){for(let ge=1;ge<pe.length;ge+=2){const Ee=Ht(pe[ge],"styling");Ht(Ee.body[0],"ordgroup").body.unshift(U)}if(ne)z<pe.length&&(z=pe.length);else{const ge=pe.length/2;if($<ge)throw new i("Too many math in a row: "+("expected "+$+", but got "+ge),pe[0])}});for(let pe=0;pe<z;++pe){let ge="r",Ee=0;pe%2===1?ge="l":pe>0&&ne&&(Ee=1),l[pe]={type:"align",align:ge,pregap:Ee,postgap:0}}return k.colSeparationType=ne?"align":"alignat",k};Rn({type:"array",names:["array","darray"],props:{numArgs:1},handler(s,o){const l=(ui(o[0])?[o[0]]:Ht(o[0],"ordgroup").body).map(function(b){const k=Rs(b).text;if("lcr".indexOf(k)!==-1)return{type:"align",align:k};if(k==="|")return{type:"separator",separator:"|"};if(k===":")return{type:"separator",separator:":"};throw new i("Unknown column alignment: "+k,b)}),h={cols:l,hskipBeforeAndAfter:!0,maxNumCols:l.length};return ia(s.parser,h,Ys(s.envName))},htmlBuilder:zn,mathmlBuilder:In}),Rn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(s){const o={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[s.envName.replace("*","")];let l="c";const h={hskipBeforeAndAfter:!1,cols:[{type:"align",align:l}]};if(s.envName.charAt(s.envName.length-1)==="*"){const $=s.parser;if($.consumeSpaces(),$.fetch().text==="["){if($.consume(),$.consumeSpaces(),l=$.fetch().text,"lcr".indexOf(l)===-1)throw new i("Expected l or c or r",$.nextToken);$.consume(),$.consumeSpaces(),$.expect("]"),$.consume(),h.cols=[{type:"align",align:l}]}}const b=ia(s.parser,h,Ys(s.envName)),k=Math.max(0,...b.body.map($=>$.length));return b.cols=new Array(k).fill({type:"align",align:l}),o?{type:"leftright",mode:s.mode,body:[b],left:o[0],right:o[1],rightColor:void 0}:b},htmlBuilder:zn,mathmlBuilder:In}),Rn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(s){const o={arraystretch:.5},l=ia(s.parser,o,"script");return l.colSeparationType="small",l},htmlBuilder:zn,mathmlBuilder:In}),Rn({type:"array",names:["subarray"],props:{numArgs:1},handler(s,o){const l=(ui(o[0])?[o[0]]:Ht(o[0],"ordgroup").body).map(function(b){const k=Rs(b).text;if("lc".indexOf(k)!==-1)return{type:"align",align:k};throw new i("Unknown column alignment: "+k,b)});if(l.length>1)throw new i("{subarray} can contain only one column");let h={cols:l,hskipBeforeAndAfter:!1,arraystretch:.5};if(h=ia(s.parser,h,"script"),h.body.length>0&&h.body[0].length>1)throw new i("{subarray} can contain only one column");return h},htmlBuilder:zn,mathmlBuilder:In}),Rn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(s){const o={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},l=ia(s.parser,o,Ys(s.envName));return{type:"leftright",mode:s.mode,body:[l],left:s.envName.indexOf("r")>-1?".":"\\{",right:s.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:zn,mathmlBuilder:In}),Rn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:fc,htmlBuilder:zn,mathmlBuilder:In}),Rn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(s){["gather","gather*"].includes(s.envName)&&pi(s);const o={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Gs(s.envName),emptySingleRow:!0,leqno:s.parser.settings.leqno};return ia(s.parser,o,"display")},htmlBuilder:zn,mathmlBuilder:In}),Rn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:fc,htmlBuilder:zn,mathmlBuilder:In}),Rn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(s){pi(s);const o={autoTag:Gs(s.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:s.parser.settings.leqno};return ia(s.parser,o,"display")},htmlBuilder:zn,mathmlBuilder:In}),Rn({type:"array",names:["CD"],props:{numArgs:0},handler(s){return pi(s),Vm(s.parser)},htmlBuilder:zn,mathmlBuilder:In}),I("\\nonumber","\\gdef\\@eqnsw{0}"),I("\\notag","\\nonumber"),et({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(s,o){throw new i(s.funcName+" valid only within array environment")}});var hc=uc;et({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(s,o){let{parser:l,funcName:h}=s;const b=o[0];if(b.type!=="ordgroup")throw new i("Invalid environment name",b);let k="";for(let $=0;$<b.body.length;++$)k+=Ht(b.body[$],"textord").text;if(h==="\\begin"){if(!hc.hasOwnProperty(k))throw new i("No such environment: "+k,b);const $=hc[k],{args:z,optArgs:U}=l.parseArguments("\\begin{"+k+"}",$),ne={mode:l.mode,envName:k,parser:l},pe=$.handler(ne,z,U);l.expect("\\end",!1);const ge=l.nextToken,Ee=Ht(l.parseFunction(),"environment");if(Ee.name!==k)throw new i("Mismatch: \\begin{"+k+"} matched by \\end{"+Ee.name+"}",ge);return pe}return{type:"environment",mode:l.mode,name:k,nameGroup:b}}});const pc=(s,o)=>{const l=s.font,h=o.withFont(l);return tr(s.body,h)},mc=(s,o)=>{const l=s.font,h=o.withFont(l);return pr(s.body,h)},gc={"\\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,o)=>{let{parser:l,funcName:h}=s;const b=Pn(o[0]);let k=h;return k in gc&&(k=gc[k]),{type:"font",mode:l.mode,font:k.slice(1),body:b}},htmlBuilder:pc,mathmlBuilder:mc}),et({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(s,o)=>{let{parser:l}=s;const h=o[0],b=C.isCharacterBox(h);return{type:"mclass",mode:l.mode,mclass:di(h),body:[{type:"font",mode:l.mode,font:"boldsymbol",body:h}],isCharacterBox:b}}}),et({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(s,o)=>{let{parser:l,funcName:h,breakOnTokenText:b}=s;const{mode:k}=l,$=l.parseExpression(!0,b),z="math"+h.slice(1);return{type:"font",mode:k,font:z,body:{type:"ordgroup",mode:l.mode,body:$}}},htmlBuilder:pc,mathmlBuilder:mc});const vc=(s,o)=>{let l=o;return s==="display"?l=l.id>=K.SCRIPT.id?l.text():K.DISPLAY:s==="text"&&l.size===K.DISPLAY.size?l=K.TEXT:s==="script"?l=K.SCRIPT:s==="scriptscript"&&(l=K.SCRIPTSCRIPT),l},Zs=(s,o)=>{const l=vc(s.size,o.style),h=l.fracNum(),b=l.fracDen();let k;k=o.havingStyle(h);const $=tr(s.numer,k,o);if(s.continued){const nr=8.5/o.fontMetrics().ptPerEm,rr=3.5/o.fontMetrics().ptPerEm;$.height=$.height<nr?nr:$.height,$.depth=$.depth<rr?rr:$.depth}k=o.havingStyle(b);const z=tr(s.denom,k,o);let U,ne,pe;s.hasBarLine?(s.barSize?(ne=je(s.barSize,o),U=ve.makeLineSpan("frac-line",o,ne)):U=ve.makeLineSpan("frac-line",o),ne=U.height,pe=U.height):(U=null,ne=0,pe=o.fontMetrics().defaultRuleThickness);let ge,Ee,Ze;l.size===K.DISPLAY.size||s.size==="display"?(ge=o.fontMetrics().num1,ne>0?Ee=3*pe:Ee=7*pe,Ze=o.fontMetrics().denom1):(ne>0?(ge=o.fontMetrics().num2,Ee=pe):(ge=o.fontMetrics().num3,Ee=3*pe),Ze=o.fontMetrics().denom2);let nt;if(U){const nr=o.fontMetrics().axisHeight;ge-$.depth-(nr+.5*ne)<Ee&&(ge+=Ee-(ge-$.depth-(nr+.5*ne))),nr-.5*ne-(z.height-Ze)<Ee&&(Ze+=Ee-(nr-.5*ne-(z.height-Ze)));const rr=-(nr-.5*ne);nt=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:z,shift:Ze},{type:"elem",elem:U,shift:rr},{type:"elem",elem:$,shift:-ge}]},o)}else{const nr=ge-$.depth-(z.height-Ze);nr<Ee&&(ge+=.5*(Ee-nr),Ze+=.5*(Ee-nr)),nt=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:z,shift:Ze},{type:"elem",elem:$,shift:-ge}]},o)}k=o.havingStyle(l),nt.height*=k.sizeMultiplier/o.sizeMultiplier,nt.depth*=k.sizeMultiplier/o.sizeMultiplier;let qt;l.size===K.DISPLAY.size?qt=o.fontMetrics().delim1:l.size===K.SCRIPTSCRIPT.size?qt=o.havingStyle(K.SCRIPT).fontMetrics().delim2:qt=o.fontMetrics().delim2;let Jt,Yt;return s.leftDelim==null?Jt=xo(o,["mopen"]):Jt=Gn.customSizedDelim(s.leftDelim,qt,!0,o.havingStyle(l),s.mode,["mopen"]),s.continued?Yt=ve.makeSpan([]):s.rightDelim==null?Yt=xo(o,["mclose"]):Yt=Gn.customSizedDelim(s.rightDelim,qt,!0,o.havingStyle(l),s.mode,["mclose"]),ve.makeSpan(["mord"].concat(k.sizingClasses(o)),[Jt,ve.makeSpan(["mfrac"],[nt]),Yt],o)},Xs=(s,o)=>{let l=new Ye.MathNode("mfrac",[pr(s.numer,o),pr(s.denom,o)]);if(!s.hasBarLine)l.setAttribute("linethickness","0px");else if(s.barSize){const b=je(s.barSize,o);l.setAttribute("linethickness",fe(b))}const h=vc(s.size,o.style);if(h.size!==o.style.size){l=new Ye.MathNode("mstyle",[l]);const b=h.size===K.DISPLAY.size?"true":"false";l.setAttribute("displaystyle",b),l.setAttribute("scriptlevel","0")}if(s.leftDelim!=null||s.rightDelim!=null){const b=[];if(s.leftDelim!=null){const k=new Ye.MathNode("mo",[new Ye.TextNode(s.leftDelim.replace("\\",""))]);k.setAttribute("fence","true"),b.push(k)}if(b.push(l),s.rightDelim!=null){const k=new Ye.MathNode("mo",[new Ye.TextNode(s.rightDelim.replace("\\",""))]);k.setAttribute("fence","true"),b.push(k)}return $s(b)}return l};et({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0],k=o[1];let $,z=null,U=null,ne="auto";switch(h){case"\\dfrac":case"\\frac":case"\\tfrac":$=!0;break;case"\\\\atopfrac":$=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":$=!1,z="(",U=")";break;case"\\\\bracefrac":$=!1,z="\\{",U="\\}";break;case"\\\\brackfrac":$=!1,z="[",U="]";break;default:throw new Error("Unrecognized genfrac command")}switch(h){case"\\dfrac":case"\\dbinom":ne="display";break;case"\\tfrac":case"\\tbinom":ne="text";break}return{type:"genfrac",mode:l.mode,continued:!1,numer:b,denom:k,hasBarLine:$,leftDelim:z,rightDelim:U,size:ne,barSize:null}},htmlBuilder:Zs,mathmlBuilder:Xs}),et({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0],k=o[1];return{type:"genfrac",mode:l.mode,continued:!0,numer:b,denom:k,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:o,funcName:l,token:h}=s,b;switch(l){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:o.mode,replaceWith:b,token:h}}});const bc=["display","text","script","scriptscript"],yc=function(s){let o=null;return s.length>0&&(o=s,o=o==="."?null:o),o};et({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(s,o){let{parser:l}=s;const h=o[4],b=o[5],k=Pn(o[0]),$=k.type==="atom"&&k.family==="open"?yc(k.text):null,z=Pn(o[1]),U=z.type==="atom"&&z.family==="close"?yc(z.text):null,ne=Ht(o[2],"size");let pe,ge=null;ne.isBlank?pe=!0:(ge=ne.value,pe=ge.number>0);let Ee="auto",Ze=o[3];if(Ze.type==="ordgroup"){if(Ze.body.length>0){const nt=Ht(Ze.body[0],"textord");Ee=bc[Number(nt.text)]}}else Ze=Ht(Ze,"textord"),Ee=bc[Number(Ze.text)];return{type:"genfrac",mode:l.mode,numer:h,denom:b,continued:!1,hasBarLine:pe,barSize:ge,leftDelim:$,rightDelim:U,size:Ee}},htmlBuilder:Zs,mathmlBuilder:Xs}),et({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(s,o){let{parser:l,funcName:h,token:b}=s;return{type:"infix",mode:l.mode,replaceWith:"\\\\abovefrac",size:Ht(o[0],"size").value,token:b}}}),et({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0],k=x(Ht(o[1],"infix").size),$=o[2],z=k.number>0;return{type:"genfrac",mode:l.mode,numer:b,denom:$,continued:!1,hasBarLine:z,barSize:k,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Zs,mathmlBuilder:Xs});const xc=(s,o)=>{const l=o.style;let h,b;s.type==="supsub"?(h=s.sup?tr(s.sup,o.havingStyle(l.sup()),o):tr(s.sub,o.havingStyle(l.sub()),o),b=Ht(s.base,"horizBrace")):b=Ht(s,"horizBrace");const k=tr(b.base,o.havingBaseStyle(K.DISPLAY)),$=Un.svgSpan(b,o);let z;if(b.isOver?(z=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"kern",size:.1},{type:"elem",elem:$}]},o),z.children[0].children[0].children[1].classes.push("svg-align")):(z=ve.makeVList({positionType:"bottom",positionData:k.depth+.1+$.height,children:[{type:"elem",elem:$},{type:"kern",size:.1},{type:"elem",elem:k}]},o),z.children[0].children[0].children[0].classes.push("svg-align")),h){const U=ve.makeSpan(["mord",b.isOver?"mover":"munder"],[z],o);b.isOver?z=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:U},{type:"kern",size:.2},{type:"elem",elem:h}]},o):z=ve.makeVList({positionType:"bottom",positionData:U.depth+.2+h.height+h.depth,children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:U}]},o)}return ve.makeSpan(["mord",b.isOver?"mover":"munder"],[z],o)};et({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(s,o){let{parser:l,funcName:h}=s;return{type:"horizBrace",mode:l.mode,label:h,isOver:/^\\over/.test(h),base:o[0]}},htmlBuilder:xc,mathmlBuilder:(s,o)=>{const l=Un.mathMLnode(s.label);return new Ye.MathNode(s.isOver?"mover":"munder",[pr(s.base,o),l])}}),et({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;const h=o[1],b=Ht(o[0],"url").url;return l.settings.isTrusted({command:"\\href",url:b})?{type:"href",mode:l.mode,href:b,body:yr(h)}:l.formatUnsupportedCmd("\\href")},htmlBuilder:(s,o)=>{const l=jr(s.body,o,!1);return ve.makeAnchor(s.href,[],l,o)},mathmlBuilder:(s,o)=>{let l=oa(s.body,o);return l instanceof dn||(l=new dn("mrow",[l])),l.setAttribute("href",s.href),l}}),et({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;const h=Ht(o[0],"url").url;if(!l.settings.isTrusted({command:"\\url",url:h}))return l.formatUnsupportedCmd("\\url");const b=[];for(let $=0;$<h.length;$++){let z=h[$];z==="~"&&(z="\\textasciitilde"),b.push({type:"textord",mode:"text",text:z})}const k={type:"text",mode:l.mode,font:"\\texttt",body:b};return{type:"href",mode:l.mode,href:h,body:yr(k)}}}),et({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(s,o){let{parser:l}=s;return{type:"hbox",mode:l.mode,body:yr(o[0])}},htmlBuilder(s,o){const l=jr(s.body,o,!1);return ve.makeFragment(l)},mathmlBuilder(s,o){return new Ye.MathNode("mrow",on(s.body,o))}}),et({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(s,o)=>{let{parser:l,funcName:h,token:b}=s;const k=Ht(o[0],"raw").string,$=o[1];l.settings.strict&&l.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");let z;const U={};switch(h){case"\\htmlClass":U.class=k,z={command:"\\htmlClass",class:k};break;case"\\htmlId":U.id=k,z={command:"\\htmlId",id:k};break;case"\\htmlStyle":U.style=k,z={command:"\\htmlStyle",style:k};break;case"\\htmlData":{const ne=k.split(",");for(let pe=0;pe<ne.length;pe++){const ge=ne[pe].split("=");if(ge.length!==2)throw new i("Error parsing key-value for \\htmlData");U["data-"+ge[0].trim()]=ge[1].trim()}z={command:"\\htmlData",attributes:U};break}default:throw new Error("Unrecognized html command")}return l.settings.isTrusted(z)?{type:"html",mode:l.mode,attributes:U,body:yr($)}:l.formatUnsupportedCmd(h)},htmlBuilder:(s,o)=>{const l=jr(s.body,o,!1),h=["enclosing"];s.attributes.class&&h.push(...s.attributes.class.trim().split(/\s+/));const b=ve.makeSpan(h,l,o);for(const k in s.attributes)k!=="class"&&s.attributes.hasOwnProperty(k)&&b.setAttribute(k,s.attributes[k]);return b},mathmlBuilder:(s,o)=>oa(s.body,o)}),et({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;return{type:"htmlmathml",mode:l.mode,html:yr(o[0]),mathml:yr(o[1])}},htmlBuilder:(s,o)=>{const l=jr(s.html,o,!1);return ve.makeFragment(l)},mathmlBuilder:(s,o)=>oa(s.mathml,o)});const Qs=function(s){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(s))return{number:+s,unit:"bp"};{const o=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(s);if(!o)throw new i("Invalid size: '"+s+"' in \\includegraphics");const l={number:+(o[1]+o[2]),unit:o[3]};if(!$t(l))throw new i("Invalid unit: '"+l.unit+"' in \\includegraphics.");return l}};et({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(s,o,l)=>{let{parser:h}=s,b={number:0,unit:"em"},k={number:.9,unit:"em"},$={number:0,unit:"em"},z="";if(l[0]){const ne=Ht(l[0],"raw").string.split(",");for(let pe=0;pe<ne.length;pe++){const ge=ne[pe].split("=");if(ge.length===2){const Ee=ge[1].trim();switch(ge[0].trim()){case"alt":z=Ee;break;case"width":b=Qs(Ee);break;case"height":k=Qs(Ee);break;case"totalheight":$=Qs(Ee);break;default:throw new i("Invalid key: '"+ge[0]+"' in \\includegraphics.")}}}}const U=Ht(o[0],"url").url;return z===""&&(z=U,z=z.replace(/^.*[\\/]/,""),z=z.substring(0,z.lastIndexOf("."))),h.settings.isTrusted({command:"\\includegraphics",url:U})?{type:"includegraphics",mode:h.mode,alt:z,width:b,height:k,totalheight:$,src:U}:h.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(s,o)=>{const l=je(s.height,o);let h=0;s.totalheight.number>0&&(h=je(s.totalheight,o)-l);let b=0;s.width.number>0&&(b=je(s.width,o));const k={height:fe(l+h)};b>0&&(k.width=fe(b)),h>0&&(k.verticalAlign=fe(-h));const $=new or(s.src,s.alt,k);return $.height=l,$.depth=h,$},mathmlBuilder:(s,o)=>{const l=new Ye.MathNode("mglyph",[]);l.setAttribute("alt",s.alt);const h=je(s.height,o);let b=0;if(s.totalheight.number>0&&(b=je(s.totalheight,o)-h,l.setAttribute("valign",fe(-b))),l.setAttribute("height",fe(h+b)),s.width.number>0){const k=je(s.width,o);l.setAttribute("width",fe(k))}return l.setAttribute("src",s.src),l}}),et({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(s,o){let{parser:l,funcName:h}=s;const b=Ht(o[0],"size");if(l.settings.strict){const k=h[1]==="m",$=b.value.unit==="mu";k?($||l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" supports only mu units, "+("not "+b.value.unit+" units")),l.mode!=="math"&&l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" works only in math mode")):$&&l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" doesn't support mu units")}return{type:"kern",mode:l.mode,dimension:b.value}},htmlBuilder(s,o){return ve.makeGlue(s.dimension,o)},mathmlBuilder(s,o){const l=je(s.dimension,o);return new Ye.SpaceNode(l)}}),et({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0];return{type:"lap",mode:l.mode,alignment:h.slice(5),body:b}},htmlBuilder:(s,o)=>{let l;s.alignment==="clap"?(l=ve.makeSpan([],[tr(s.body,o)]),l=ve.makeSpan(["inner"],[l],o)):l=ve.makeSpan(["inner"],[tr(s.body,o)]);const h=ve.makeSpan(["fix"],[]);let b=ve.makeSpan([s.alignment],[l,h],o);const k=ve.makeSpan(["strut"]);return k.style.height=fe(b.height+b.depth),b.depth&&(k.style.verticalAlign=fe(-b.depth)),b.children.unshift(k),b=ve.makeSpan(["thinbox"],[b],o),ve.makeSpan(["mord","vbox"],[b],o)},mathmlBuilder:(s,o)=>{const l=new Ye.MathNode("mpadded",[pr(s.body,o)]);if(s.alignment!=="rlap"){const h=s.alignment==="llap"?"-1":"-0.5";l.setAttribute("lspace",h+"width")}return l.setAttribute("width","0px"),l}}),et({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,o){let{funcName:l,parser:h}=s;const b=h.mode;h.switchMode("math");const k=l==="\\("?"\\)":"$",$=h.parseExpression(!1,k);return h.expect(k),h.switchMode(b),{type:"styling",mode:h.mode,style:"text",body:$}}}),et({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,o){throw new i("Mismatched "+s.funcName)}});const wc=(s,o)=>{switch(o.style.size){case K.DISPLAY.size:return s.display;case K.TEXT.size:return s.text;case K.SCRIPT.size:return s.script;case K.SCRIPTSCRIPT.size:return s.scriptscript;default:return s.text}};et({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(s,o)=>{let{parser:l}=s;return{type:"mathchoice",mode:l.mode,display:yr(o[0]),text:yr(o[1]),script:yr(o[2]),scriptscript:yr(o[3])}},htmlBuilder:(s,o)=>{const l=wc(s,o),h=jr(l,o,!1);return ve.makeFragment(h)},mathmlBuilder:(s,o)=>{const l=wc(s,o);return oa(l,o)}});const Cc=(s,o,l,h,b,k,$)=>{s=ve.makeSpan([],[s]);const z=l&&C.isCharacterBox(l);let U,ne;if(o){const Ee=tr(o,h.havingStyle(b.sup()),h);ne={elem:Ee,kern:Math.max(h.fontMetrics().bigOpSpacing1,h.fontMetrics().bigOpSpacing3-Ee.depth)}}if(l){const Ee=tr(l,h.havingStyle(b.sub()),h);U={elem:Ee,kern:Math.max(h.fontMetrics().bigOpSpacing2,h.fontMetrics().bigOpSpacing4-Ee.height)}}let pe;if(ne&&U){const Ee=h.fontMetrics().bigOpSpacing5+U.elem.height+U.elem.depth+U.kern+s.depth+$;pe=ve.makeVList({positionType:"bottom",positionData:Ee,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:U.elem,marginLeft:fe(-k)},{type:"kern",size:U.kern},{type:"elem",elem:s},{type:"kern",size:ne.kern},{type:"elem",elem:ne.elem,marginLeft:fe(k)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else if(U){const Ee=s.height-$;pe=ve.makeVList({positionType:"top",positionData:Ee,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:U.elem,marginLeft:fe(-k)},{type:"kern",size:U.kern},{type:"elem",elem:s}]},h)}else if(ne){const Ee=s.depth+$;pe=ve.makeVList({positionType:"bottom",positionData:Ee,children:[{type:"elem",elem:s},{type:"kern",size:ne.kern},{type:"elem",elem:ne.elem,marginLeft:fe(k)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else return s;const ge=[pe];if(U&&k!==0&&!z){const Ee=ve.makeSpan(["mspace"],[],h);Ee.style.marginRight=fe(k),ge.unshift(Ee)}return ve.makeSpan(["mop","op-limits"],ge,h)},Dc=["\\smallint"],La=(s,o)=>{let l,h,b=!1,k;s.type==="supsub"?(l=s.sup,h=s.sub,k=Ht(s.base,"op"),b=!0):k=Ht(s,"op");const $=o.style;let z=!1;$.size===K.DISPLAY.size&&k.symbol&&!Dc.includes(k.name)&&(z=!0);let U;if(k.symbol){const ge=z?"Size2-Regular":"Size1-Regular";let Ee="";if((k.name==="\\oiint"||k.name==="\\oiiint")&&(Ee=k.name.slice(1),k.name=Ee==="oiint"?"\\iint":"\\iiint"),U=ve.makeSymbol(k.name,ge,"math",o,["mop","op-symbol",z?"large-op":"small-op"]),Ee.length>0){const Ze=U.italic,nt=ve.staticSvg(Ee+"Size"+(z?"2":"1"),o);U=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:U,shift:0},{type:"elem",elem:nt,shift:z?.08:0}]},o),k.name="\\"+Ee,U.classes.unshift("mop"),U.italic=Ze}}else if(k.body){const ge=jr(k.body,o,!0);ge.length===1&&ge[0]instanceof Ft?(U=ge[0],U.classes[0]="mop"):U=ve.makeSpan(["mop"],ge,o)}else{const ge=[];for(let Ee=1;Ee<k.name.length;Ee++)ge.push(ve.mathsym(k.name[Ee],k.mode,o));U=ve.makeSpan(["mop"],ge,o)}let ne=0,pe=0;return(U instanceof Ft||k.name==="\\oiint"||k.name==="\\oiiint")&&!k.suppressBaseShift&&(ne=(U.height-U.depth)/2-o.fontMetrics().axisHeight,pe=U.italic),b?Cc(U,l,h,o,$,pe,ne):(ne&&(U.style.position="relative",U.style.top=fe(ne)),U)},Do=(s,o)=>{let l;if(s.symbol)l=new dn("mo",[yn(s.name,s.mode)]),Dc.includes(s.name)&&l.setAttribute("largeop","false");else if(s.body)l=new dn("mo",on(s.body,o));else{l=new dn("mi",[new Mn(s.name.slice(1))]);const h=new dn("mo",[yn("\u2061","text")]);s.parentIsSupSub?l=new dn("mrow",[l,h]):l=Lu([l,h])}return l},ig={"\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,o)=>{let{parser:l,funcName:h}=s,b=h;return b.length===1&&(b=ig[b]),{type:"op",mode:l.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:b}},htmlBuilder:La,mathmlBuilder:Do}),et({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(s,o)=>{let{parser:l}=s;const h=o[0];return{type:"op",mode:l.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:yr(h)}},htmlBuilder:La,mathmlBuilder:Do});const sg={"\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:o,funcName:l}=s;return{type:"op",mode:o.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:l}},htmlBuilder:La,mathmlBuilder:Do}),et({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(s){let{parser:o,funcName:l}=s;return{type:"op",mode:o.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:l}},htmlBuilder:La,mathmlBuilder:Do}),et({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(s){let{parser:o,funcName:l}=s,h=l;return h.length===1&&(h=sg[h]),{type:"op",mode:o.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:h}},htmlBuilder:La,mathmlBuilder:Do});const kc=(s,o)=>{let l,h,b=!1,k;s.type==="supsub"?(l=s.sup,h=s.sub,k=Ht(s.base,"operatorname"),b=!0):k=Ht(s,"operatorname");let $;if(k.body.length>0){const z=k.body.map(ne=>{const pe=ne.text;return typeof pe=="string"?{type:"textord",mode:ne.mode,text:pe}:ne}),U=jr(z,o.withFont("mathrm"),!0);for(let ne=0;ne<U.length;ne++){const pe=U[ne];pe instanceof Ft&&(pe.text=pe.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}$=ve.makeSpan(["mop"],U,o)}else $=ve.makeSpan(["mop"],[],o);return b?Cc($,l,h,o,o.style,0,0):$};et({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0];return{type:"operatorname",mode:l.mode,body:yr(b),alwaysHandleSupSub:h==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:kc,mathmlBuilder:(s,o)=>{let l=on(s.body,o.withFont("mathrm")),h=!0;for(let $=0;$<l.length;$++){const z=l[$];if(!(z instanceof Ye.SpaceNode))if(z instanceof Ye.MathNode)switch(z.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const U=z.children[0];z.children.length===1&&U instanceof Ye.TextNode?U.text=U.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):h=!1;break}default:h=!1}else h=!1}if(h){const $=l.map(z=>z.toText()).join("");l=[new Ye.TextNode($)]}const b=new Ye.MathNode("mi",l);b.setAttribute("mathvariant","normal");const k=new Ye.MathNode("mo",[yn("\u2061","text")]);return s.parentIsSupSub?new Ye.MathNode("mrow",[b,k]):Ye.newDocumentFragment([b,k])}}),I("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Qr({type:"ordgroup",htmlBuilder(s,o){return s.semisimple?ve.makeFragment(jr(s.body,o,!1)):ve.makeSpan(["mord"],jr(s.body,o,!0),o)},mathmlBuilder(s,o){return oa(s.body,o,!0)}}),et({type:"overline",names:["\\overline"],props:{numArgs:1},handler(s,o){let{parser:l}=s;const h=o[0];return{type:"overline",mode:l.mode,body:h}},htmlBuilder(s,o){const l=tr(s.body,o.havingCrampedStyle()),h=ve.makeLineSpan("overline-line",o),b=o.fontMetrics().defaultRuleThickness,k=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:3*b},{type:"elem",elem:h},{type:"kern",size:b}]},o);return ve.makeSpan(["mord","overline"],[k],o)},mathmlBuilder(s,o){const l=new Ye.MathNode("mo",[new Ye.TextNode("\u203E")]);l.setAttribute("stretchy","true");const h=new Ye.MathNode("mover",[pr(s.body,o),l]);return h.setAttribute("accent","true"),h}}),et({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;const h=o[0];return{type:"phantom",mode:l.mode,body:yr(h)}},htmlBuilder:(s,o)=>{const l=jr(s.body,o.withPhantom(),!1);return ve.makeFragment(l)},mathmlBuilder:(s,o)=>{const l=on(s.body,o);return new Ye.MathNode("mphantom",l)}}),et({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;const h=o[0];return{type:"hphantom",mode:l.mode,body:h}},htmlBuilder:(s,o)=>{let l=ve.makeSpan([],[tr(s.body,o.withPhantom())]);if(l.height=0,l.depth=0,l.children)for(let h=0;h<l.children.length;h++)l.children[h].height=0,l.children[h].depth=0;return l=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l}]},o),ve.makeSpan(["mord"],[l],o)},mathmlBuilder:(s,o)=>{const l=on(yr(s.body),o),h=new Ye.MathNode("mphantom",l),b=new Ye.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,o)=>{let{parser:l}=s;const h=o[0];return{type:"vphantom",mode:l.mode,body:h}},htmlBuilder:(s,o)=>{const l=ve.makeSpan(["inner"],[tr(s.body,o.withPhantom())]),h=ve.makeSpan(["fix"],[]);return ve.makeSpan(["mord","rlap"],[l,h],o)},mathmlBuilder:(s,o)=>{const l=on(yr(s.body),o),h=new Ye.MathNode("mphantom",l),b=new Ye.MathNode("mpadded",[h]);return b.setAttribute("width","0px"),b}}),et({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(s,o){let{parser:l}=s;const h=Ht(o[0],"size").value,b=o[1];return{type:"raisebox",mode:l.mode,dy:h,body:b}},htmlBuilder(s,o){const l=tr(s.body,o),h=je(s.dy,o);return ve.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:l}]},o)},mathmlBuilder(s,o){const l=new Ye.MathNode("mpadded",[pr(s.body,o)]),h=s.dy.number+s.dy.unit;return l.setAttribute("voffset",h),l}}),et({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(s){let{parser:o}=s;return{type:"internal",mode:o.mode}}}),et({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(s,o,l){let{parser:h}=s;const b=l[0],k=Ht(o[0],"size"),$=Ht(o[1],"size");return{type:"rule",mode:h.mode,shift:b&&Ht(b,"size").value,width:k.value,height:$.value}},htmlBuilder(s,o){const l=ve.makeSpan(["mord","rule"],[],o),h=je(s.width,o),b=je(s.height,o),k=s.shift?je(s.shift,o):0;return l.style.borderRightWidth=fe(h),l.style.borderTopWidth=fe(b),l.style.bottom=fe(k),l.width=h,l.height=b+k,l.depth=-k,l.maxFontSize=b*1.125*o.sizeMultiplier,l},mathmlBuilder(s,o){const l=je(s.width,o),h=je(s.height,o),b=s.shift?je(s.shift,o):0,k=o.color&&o.getColor()||"black",$=new Ye.MathNode("mspace");$.setAttribute("mathbackground",k),$.setAttribute("width",fe(l)),$.setAttribute("height",fe(h));const z=new Ye.MathNode("mpadded",[$]);return b>=0?z.setAttribute("height",fe(b)):(z.setAttribute("height",fe(b)),z.setAttribute("depth",fe(-b))),z.setAttribute("voffset",fe(b)),z}});function Ec(s,o,l){const h=jr(s,o,!1),b=o.sizeMultiplier/l.sizeMultiplier;for(let k=0;k<h.length;k++){const $=h[k].classes.indexOf("sizing");$<0?Array.prototype.push.apply(h[k].classes,o.sizingClasses(l)):h[k].classes[$+1]==="reset-size"+o.size&&(h[k].classes[$+1]="reset-size"+l.size),h[k].height*=b,h[k].depth*=b}return ve.makeFragment(h)}const Sc=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];et({type:"sizing",names:Sc,props:{numArgs:0,allowedInText:!0},handler:(s,o)=>{let{breakOnTokenText:l,funcName:h,parser:b}=s;const k=b.parseExpression(!1,l);return{type:"sizing",mode:b.mode,size:Sc.indexOf(h)+1,body:k}},htmlBuilder:(s,o)=>{const l=o.havingSize(s.size);return Ec(s.body,l,o)},mathmlBuilder:(s,o)=>{const l=o.havingSize(s.size),h=on(s.body,l),b=new Ye.MathNode("mstyle",h);return b.setAttribute("mathsize",fe(l.sizeMultiplier)),b}}),et({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(s,o,l)=>{let{parser:h}=s,b=!1,k=!1;const $=l[0]&&Ht(l[0],"ordgroup");if($){let U="";for(let ne=0;ne<$.body.length;++ne)if(U=$.body[ne].text,U==="t")b=!0;else if(U==="b")k=!0;else{b=!1,k=!1;break}}else b=!0,k=!0;const z=o[0];return{type:"smash",mode:h.mode,body:z,smashHeight:b,smashDepth:k}},htmlBuilder:(s,o)=>{const l=ve.makeSpan([],[tr(s.body,o)]);if(!s.smashHeight&&!s.smashDepth)return l;if(s.smashHeight&&(l.height=0,l.children))for(let b=0;b<l.children.length;b++)l.children[b].height=0;if(s.smashDepth&&(l.depth=0,l.children))for(let b=0;b<l.children.length;b++)l.children[b].depth=0;const h=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l}]},o);return ve.makeSpan(["mord"],[h],o)},mathmlBuilder:(s,o)=>{const l=new Ye.MathNode("mpadded",[pr(s.body,o)]);return s.smashHeight&&l.setAttribute("height","0px"),s.smashDepth&&l.setAttribute("depth","0px"),l}}),et({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(s,o,l){let{parser:h}=s;const b=l[0],k=o[0];return{type:"sqrt",mode:h.mode,body:k,index:b}},htmlBuilder(s,o){let l=tr(s.body,o.havingCrampedStyle());l.height===0&&(l.height=o.fontMetrics().xHeight),l=ve.wrapFragment(l,o);const h=o.fontMetrics().defaultRuleThickness;let b=h;o.style.id<K.TEXT.id&&(b=o.fontMetrics().xHeight);let k=h+b/4;const $=l.height+l.depth+k+h,{span:z,ruleWidth:U,advanceWidth:ne}=Gn.sqrtImage($,o),pe=z.height-U;pe>l.height+l.depth+k&&(k=(k+pe-l.height-l.depth)/2);const ge=z.height-l.height-k-U;l.style.paddingLeft=fe(ne);const Ee=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l,wrapperClasses:["svg-align"]},{type:"kern",size:-(l.height+ge)},{type:"elem",elem:z},{type:"kern",size:U}]},o);if(s.index){const Ze=o.havingStyle(K.SCRIPTSCRIPT),nt=tr(s.index,Ze,o),qt=.6*(Ee.height-Ee.depth),Jt=ve.makeVList({positionType:"shift",positionData:-qt,children:[{type:"elem",elem:nt}]},o),Yt=ve.makeSpan(["root"],[Jt]);return ve.makeSpan(["mord","sqrt"],[Yt,Ee],o)}else return ve.makeSpan(["mord","sqrt"],[Ee],o)},mathmlBuilder(s,o){const{body:l,index:h}=s;return h?new Ye.MathNode("mroot",[pr(l,o),pr(h,o)]):new Ye.MathNode("msqrt",[pr(l,o)])}});const Ac={display:K.DISPLAY,text:K.TEXT,script:K.SCRIPT,scriptscript:K.SCRIPTSCRIPT};et({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s,o){let{breakOnTokenText:l,funcName:h,parser:b}=s;const k=b.parseExpression(!0,l),$=h.slice(1,h.length-5);return{type:"styling",mode:b.mode,style:$,body:k}},htmlBuilder(s,o){const l=Ac[s.style],h=o.havingStyle(l).withFont("");return Ec(s.body,h,o)},mathmlBuilder(s,o){const l=Ac[s.style],h=o.havingStyle(l),b=on(s.body,h),k=new Ye.MathNode("mstyle",b),$={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[s.style];return k.setAttribute("scriptlevel",$[0]),k.setAttribute("displaystyle",$[1]),k}});const lg=function(s,o){const l=s.base;return l?l.type==="op"?l.limits&&(o.style.size===K.DISPLAY.size||l.alwaysHandleSupSub)?La:null:l.type==="operatorname"?l.alwaysHandleSupSub&&(o.style.size===K.DISPLAY.size||l.limits)?kc:null:l.type==="accent"?C.isCharacterBox(l.base)?zs:null:l.type==="horizBrace"&&!s.sub===l.isOver?xc:null:null};Qr({type:"supsub",htmlBuilder(s,o){const l=lg(s,o);if(l)return l(s,o);const{base:h,sup:b,sub:k}=s,$=tr(h,o);let z,U;const ne=o.fontMetrics();let pe=0,ge=0;const Ee=h&&C.isCharacterBox(h);if(b){const rr=o.havingStyle(o.style.sup());z=tr(b,rr,o),Ee||(pe=$.height-rr.fontMetrics().supDrop*rr.sizeMultiplier/o.sizeMultiplier)}if(k){const rr=o.havingStyle(o.style.sub());U=tr(k,rr,o),Ee||(ge=$.depth+rr.fontMetrics().subDrop*rr.sizeMultiplier/o.sizeMultiplier)}let Ze;o.style===K.DISPLAY?Ze=ne.sup1:o.style.cramped?Ze=ne.sup3:Ze=ne.sup2;const nt=o.sizeMultiplier,qt=fe(.5/ne.ptPerEm/nt);let Jt=null;if(U){const rr=s.base&&s.base.type==="op"&&s.base.name&&(s.base.name==="\\oiint"||s.base.name==="\\oiiint");($ instanceof Ft||rr)&&(Jt=fe(-$.italic))}let Yt;if(z&&U){pe=Math.max(pe,Ze,z.depth+.25*ne.xHeight),ge=Math.max(ge,ne.sub2);const rr=4*ne.defaultRuleThickness;if(pe-z.depth-(U.height-ge)<rr){ge=rr-(pe-z.depth)+U.height;const Ur=.8*ne.xHeight-(pe-z.depth);Ur>0&&(pe+=Ur,ge-=Ur)}const xr=[{type:"elem",elem:U,shift:ge,marginRight:qt,marginLeft:Jt},{type:"elem",elem:z,shift:-pe,marginRight:qt}];Yt=ve.makeVList({positionType:"individualShift",children:xr},o)}else if(U){ge=Math.max(ge,ne.sub1,U.height-.8*ne.xHeight);const rr=[{type:"elem",elem:U,marginLeft:Jt,marginRight:qt}];Yt=ve.makeVList({positionType:"shift",positionData:ge,children:rr},o)}else if(z)pe=Math.max(pe,Ze,z.depth+.25*ne.xHeight),Yt=ve.makeVList({positionType:"shift",positionData:-pe,children:[{type:"elem",elem:z,marginRight:qt}]},o);else throw new Error("supsub must have either sup or sub.");const nr=Ts($,"right")||"mord";return ve.makeSpan([nr],[$,ve.makeSpan(["msupsub"],[Yt])],o)},mathmlBuilder(s,o){let l=!1,h,b;s.base&&s.base.type==="horizBrace"&&(b=!!s.sup,b===s.base.isOver&&(l=!0,h=s.base.isOver)),s.base&&(s.base.type==="op"||s.base.type==="operatorname")&&(s.base.parentIsSupSub=!0);const k=[pr(s.base,o)];s.sub&&k.push(pr(s.sub,o)),s.sup&&k.push(pr(s.sup,o));let $;if(l)$=h?"mover":"munder";else if(s.sub)if(s.sup){const z=s.base;z&&z.type==="op"&&z.limits&&o.style===K.DISPLAY||z&&z.type==="operatorname"&&z.alwaysHandleSupSub&&(o.style===K.DISPLAY||z.limits)?$="munderover":$="msubsup"}else{const z=s.base;z&&z.type==="op"&&z.limits&&(o.style===K.DISPLAY||z.alwaysHandleSupSub)||z&&z.type==="operatorname"&&z.alwaysHandleSupSub&&(z.limits||o.style===K.DISPLAY)?$="munder":$="msub"}else{const z=s.base;z&&z.type==="op"&&z.limits&&(o.style===K.DISPLAY||z.alwaysHandleSupSub)||z&&z.type==="operatorname"&&z.alwaysHandleSupSub&&(z.limits||o.style===K.DISPLAY)?$="mover":$="msup"}return new Ye.MathNode($,k)}}),Qr({type:"atom",htmlBuilder(s,o){return ve.mathsym(s.text,s.mode,o,["m"+s.family])},mathmlBuilder(s,o){const l=new Ye.MathNode("mo",[yn(s.text,s.mode)]);if(s.family==="bin"){const h=Ps(s,o);h==="bold-italic"&&l.setAttribute("mathvariant",h)}else s.family==="punct"?l.setAttribute("separator","true"):(s.family==="open"||s.family==="close")&&l.setAttribute("stretchy","false");return l}});const Bc={mi:"italic",mn:"normal",mtext:"normal"};Qr({type:"mathord",htmlBuilder(s,o){return ve.makeOrd(s,o,"mathord")},mathmlBuilder(s,o){const l=new Ye.MathNode("mi",[yn(s.text,s.mode,o)]),h=Ps(s,o)||"italic";return h!==Bc[l.type]&&l.setAttribute("mathvariant",h),l}}),Qr({type:"textord",htmlBuilder(s,o){return ve.makeOrd(s,o,"textord")},mathmlBuilder(s,o){const l=yn(s.text,s.mode,o),h=Ps(s,o)||"normal";let b;return s.mode==="text"?b=new Ye.MathNode("mtext",[l]):/[0-9]/.test(s.text)?b=new Ye.MathNode("mn",[l]):s.text==="\\prime"?b=new Ye.MathNode("mo",[l]):b=new Ye.MathNode("mi",[l]),h!==Bc[b.type]&&b.setAttribute("mathvariant",h),b}});const Js={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},el={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Qr({type:"spacing",htmlBuilder(s,o){if(el.hasOwnProperty(s.text)){const l=el[s.text].className||"";if(s.mode==="text"){const h=ve.makeOrd(s,o,"textord");return h.classes.push(l),h}else return ve.makeSpan(["mspace",l],[ve.mathsym(s.text,s.mode,o)],o)}else{if(Js.hasOwnProperty(s.text))return ve.makeSpan(["mspace",Js[s.text]],[],o);throw new i('Unknown type of space "'+s.text+'"')}},mathmlBuilder(s,o){let l;if(el.hasOwnProperty(s.text))l=new Ye.MathNode("mtext",[new Ye.TextNode("\xA0")]);else{if(Js.hasOwnProperty(s.text))return new Ye.MathNode("mspace");throw new i('Unknown type of space "'+s.text+'"')}return l}});const Fc=()=>{const s=new Ye.MathNode("mtd",[]);return s.setAttribute("width","50%"),s};Qr({type:"tag",mathmlBuilder(s,o){const l=new Ye.MathNode("mtable",[new Ye.MathNode("mtr",[Fc(),new Ye.MathNode("mtd",[oa(s.body,o)]),Fc(),new Ye.MathNode("mtd",[oa(s.tag,o)])])]);return l.setAttribute("width","100%"),l}});const Nc={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tc={"\\textbf":"textbf","\\textmd":"textmd"},ug={"\\textit":"textit","\\textup":"textup"},Oc=(s,o)=>{const l=s.font;if(l){if(Nc[l])return o.withTextFontFamily(Nc[l]);if(Tc[l])return o.withTextFontWeight(Tc[l]);if(l==="\\emph")return o.fontShape==="textit"?o.withTextFontShape("textup"):o.withTextFontShape("textit")}else return o;return o.withTextFontShape(ug[l])};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,o){let{parser:l,funcName:h}=s;const b=o[0];return{type:"text",mode:l.mode,body:yr(b),font:h}},htmlBuilder(s,o){const l=Oc(s,o),h=jr(s.body,l,!0);return ve.makeSpan(["mord","text"],h,l)},mathmlBuilder(s,o){const l=Oc(s,o);return oa(s.body,l)}}),et({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(s,o){let{parser:l}=s;return{type:"underline",mode:l.mode,body:o[0]}},htmlBuilder(s,o){const l=tr(s.body,o),h=ve.makeLineSpan("underline-line",o),b=o.fontMetrics().defaultRuleThickness,k=ve.makeVList({positionType:"top",positionData:l.height,children:[{type:"kern",size:b},{type:"elem",elem:h},{type:"kern",size:3*b},{type:"elem",elem:l}]},o);return ve.makeSpan(["mord","underline"],[k],o)},mathmlBuilder(s,o){const l=new Ye.MathNode("mo",[new Ye.TextNode("\u203E")]);l.setAttribute("stretchy","true");const h=new Ye.MathNode("munder",[pr(s.body,o),l]);return h.setAttribute("accentunder","true"),h}}),et({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(s,o){let{parser:l}=s;return{type:"vcenter",mode:l.mode,body:o[0]}},htmlBuilder(s,o){const l=tr(s.body,o),h=o.fontMetrics().axisHeight,b=.5*(l.height-h-(l.depth+h));return ve.makeVList({positionType:"shift",positionData:b,children:[{type:"elem",elem:l}]},o)},mathmlBuilder(s,o){return new Ye.MathNode("mpadded",[pr(s.body,o)],["vcenter"])}}),et({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(s,o,l){throw new i("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(s,o){const l=$c(s),h=[],b=o.havingStyle(o.style.text());for(let k=0;k<l.length;k++){let $=l[k];$==="~"&&($="\\textasciitilde"),h.push(ve.makeSymbol($,"Typewriter-Regular",s.mode,b,["mord","texttt"]))}return ve.makeSpan(["mord","text"].concat(b.sizingClasses(o)),ve.tryCombineChars(h),b)},mathmlBuilder(s,o){const l=new Ye.TextNode($c(s)),h=new Ye.MathNode("mtext",[l]);return h.setAttribute("mathvariant","monospace"),h}});const $c=s=>s.body.replace(/ /g,s.star?"\u2423":"\xA0");var sa=Xr;const Pc=`[ \r
|
|
470
|
-
]`,cg="\\\\[a-zA-Z@]+",dg="\\\\[^\uD800-\uDFFF]",fg="("+cg+")"+Pc+"*",hg=`\\\\(
|
|
471
|
-
|[ \r ]+
|
|
472
|
-
?)[ \r ]*`,tl="[\u0300-\u036F]",pg=new RegExp(tl+"+$"),mg="("+Pc+"+)|"+(hg+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(tl+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(tl+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+fg)+("|"+dg+")");class Mc{constructor(o,l){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=o,this.settings=l,this.tokenRegex=new RegExp(mg,"g"),this.catcodes={"%":14,"~":13}}setCatcode(o,l){this.catcodes[o]=l}lex(){const o=this.input,l=this.tokenRegex.lastIndex;if(l===o.length)return new fn("EOF",new sn(this,l,l));const h=this.tokenRegex.exec(o);if(h===null||h.index!==l)throw new i("Unexpected character: '"+o[l]+"'",new fn(o[l],new sn(this,l,l+1)));const b=h[6]||h[3]||(h[2]?"\\ ":" ");if(this.catcodes[b]===14){const k=o.indexOf(`
|
|
473
|
-
`,this.tokenRegex.lastIndex);return k===-1?(this.tokenRegex.lastIndex=o.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=k+1,this.lex()}return new fn(b,new sn(this,l,this.tokenRegex.lastIndex))}}class gg{constructor(o,l){o===void 0&&(o={}),l===void 0&&(l={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=l,this.builtins=o,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new i("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const o=this.undefStack.pop();for(const l in o)o.hasOwnProperty(l)&&(o[l]==null?delete this.current[l]:this.current[l]=o[l])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(o){return this.current.hasOwnProperty(o)||this.builtins.hasOwnProperty(o)}get(o){return this.current.hasOwnProperty(o)?this.current[o]:this.builtins[o]}set(o,l,h){if(h===void 0&&(h=!1),h){for(let b=0;b<this.undefStack.length;b++)delete this.undefStack[b][o];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][o]=l)}else{const b=this.undefStack[this.undefStack.length-1];b&&!b.hasOwnProperty(o)&&(b[o]=this.current[o])}l==null?delete this.current[o]:this.current[o]=l}}var vg=cc;I("\\noexpand",function(s){const o=s.popToken();return s.isExpandable(o.text)&&(o.noexpand=!0,o.treatAsRelax=!0),{tokens:[o],numArgs:0}}),I("\\expandafter",function(s){const o=s.popToken();return s.expandOnce(!0),{tokens:[o],numArgs:0}}),I("\\@firstoftwo",function(s){return{tokens:s.consumeArgs(2)[0],numArgs:0}}),I("\\@secondoftwo",function(s){return{tokens:s.consumeArgs(2)[1],numArgs:0}}),I("\\@ifnextchar",function(s){const o=s.consumeArgs(3);s.consumeSpaces();const l=s.future();return o[0].length===1&&o[0][0].text===l.text?{tokens:o[1],numArgs:0}:{tokens:o[2],numArgs:0}}),I("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),I("\\TextOrMath",function(s){const o=s.consumeArgs(2);return s.mode==="text"?{tokens:o[0],numArgs:0}:{tokens:o[1],numArgs:0}});const Rc={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};I("\\char",function(s){let o=s.popToken(),l,h="";if(o.text==="'")l=8,o=s.popToken();else if(o.text==='"')l=16,o=s.popToken();else if(o.text==="`")if(o=s.popToken(),o.text[0]==="\\")h=o.text.charCodeAt(1);else{if(o.text==="EOF")throw new i("\\char` missing argument");h=o.text.charCodeAt(0)}else l=10;if(l){if(h=Rc[o.text],h==null||h>=l)throw new i("Invalid base-"+l+" digit "+o.text);let b;for(;(b=Rc[s.future().text])!=null&&b<l;)h*=l,h+=b,s.popToken()}return"\\@char{"+h+"}"});const rl=(s,o,l,h)=>{let b=s.consumeArg().tokens;if(b.length!==1)throw new i("\\newcommand's first argument must be a macro name");const k=b[0].text,$=s.isDefined(k);if($&&!o)throw new i("\\newcommand{"+k+"} attempting to redefine "+(k+"; use \\renewcommand"));if(!$&&!l)throw new i("\\renewcommand{"+k+"} when command "+k+" does not yet exist; use \\newcommand");let z=0;if(b=s.consumeArg().tokens,b.length===1&&b[0].text==="["){let U="",ne=s.expandNextToken();for(;ne.text!=="]"&&ne.text!=="EOF";)U+=ne.text,ne=s.expandNextToken();if(!U.match(/^\s*[0-9]+\s*$/))throw new i("Invalid number of arguments: "+U);z=parseInt(U),b=s.consumeArg().tokens}return $&&h||s.macros.set(k,{tokens:b,numArgs:z}),""};I("\\newcommand",s=>rl(s,!1,!0,!1)),I("\\renewcommand",s=>rl(s,!0,!1,!1)),I("\\providecommand",s=>rl(s,!0,!0,!0)),I("\\message",s=>{const o=s.consumeArgs(1)[0];return console.log(o.reverse().map(l=>l.text).join("")),""}),I("\\errmessage",s=>{const o=s.consumeArgs(1)[0];return console.error(o.reverse().map(l=>l.text).join("")),""}),I("\\show",s=>{const o=s.popToken(),l=o.text;return console.log(o,s.macros.get(l),sa[l],xt.math[l],xt.text[l]),""}),I("\\bgroup","{"),I("\\egroup","}"),I("~","\\nobreakspace"),I("\\lq","`"),I("\\rq","'"),I("\\aa","\\r a"),I("\\AA","\\r A"),I("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),I("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),I("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),I("\u212C","\\mathscr{B}"),I("\u2130","\\mathscr{E}"),I("\u2131","\\mathscr{F}"),I("\u210B","\\mathscr{H}"),I("\u2110","\\mathscr{I}"),I("\u2112","\\mathscr{L}"),I("\u2133","\\mathscr{M}"),I("\u211B","\\mathscr{R}"),I("\u212D","\\mathfrak{C}"),I("\u210C","\\mathfrak{H}"),I("\u2128","\\mathfrak{Z}"),I("\\Bbbk","\\Bbb{k}"),I("\xB7","\\cdotp"),I("\\llap","\\mathllap{\\textrm{#1}}"),I("\\rlap","\\mathrlap{\\textrm{#1}}"),I("\\clap","\\mathclap{\\textrm{#1}}"),I("\\mathstrut","\\vphantom{(}"),I("\\underbar","\\underline{\\text{#1}}"),I("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),I("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),I("\\ne","\\neq"),I("\u2260","\\neq"),I("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),I("\u2209","\\notin"),I("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),I("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),I("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),I("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),I("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),I("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),I("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),I("\u27C2","\\perp"),I("\u203C","\\mathclose{!\\mkern-0.8mu!}"),I("\u220C","\\notni"),I("\u231C","\\ulcorner"),I("\u231D","\\urcorner"),I("\u231E","\\llcorner"),I("\u231F","\\lrcorner"),I("\xA9","\\copyright"),I("\xAE","\\textregistered"),I("\uFE0F","\\textregistered"),I("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),I("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),I("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),I("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),I("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),I("\u22EE","\\vdots"),I("\\varGamma","\\mathit{\\Gamma}"),I("\\varDelta","\\mathit{\\Delta}"),I("\\varTheta","\\mathit{\\Theta}"),I("\\varLambda","\\mathit{\\Lambda}"),I("\\varXi","\\mathit{\\Xi}"),I("\\varPi","\\mathit{\\Pi}"),I("\\varSigma","\\mathit{\\Sigma}"),I("\\varUpsilon","\\mathit{\\Upsilon}"),I("\\varPhi","\\mathit{\\Phi}"),I("\\varPsi","\\mathit{\\Psi}"),I("\\varOmega","\\mathit{\\Omega}"),I("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),I("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),I("\\boxed","\\fbox{$\\displaystyle{#1}$}"),I("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),I("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),I("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),I("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),I("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const zc={",":"\\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"};I("\\dots",function(s){let o="\\dotso";const l=s.expandAfterFuture().text;return l in zc?o=zc[l]:(l.slice(0,4)==="\\not"||l in xt.math&&["bin","rel"].includes(xt.math[l].group))&&(o="\\dotsb"),o});const nl={")":!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};I("\\dotso",function(s){return s.future().text in nl?"\\ldots\\,":"\\ldots"}),I("\\dotsc",function(s){const o=s.future().text;return o in nl&&o!==","?"\\ldots\\,":"\\ldots"}),I("\\cdots",function(s){return s.future().text in nl?"\\@cdots\\,":"\\@cdots"}),I("\\dotsb","\\cdots"),I("\\dotsm","\\cdots"),I("\\dotsi","\\!\\cdots"),I("\\dotsx","\\ldots\\,"),I("\\DOTSI","\\relax"),I("\\DOTSB","\\relax"),I("\\DOTSX","\\relax"),I("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),I("\\,","\\tmspace+{3mu}{.1667em}"),I("\\thinspace","\\,"),I("\\>","\\mskip{4mu}"),I("\\:","\\tmspace+{4mu}{.2222em}"),I("\\medspace","\\:"),I("\\;","\\tmspace+{5mu}{.2777em}"),I("\\thickspace","\\;"),I("\\!","\\tmspace-{3mu}{.1667em}"),I("\\negthinspace","\\!"),I("\\negmedspace","\\tmspace-{4mu}{.2222em}"),I("\\negthickspace","\\tmspace-{5mu}{.277em}"),I("\\enspace","\\kern.5em "),I("\\enskip","\\hskip.5em\\relax"),I("\\quad","\\hskip1em\\relax"),I("\\qquad","\\hskip2em\\relax"),I("\\tag","\\@ifstar\\tag@literal\\tag@paren"),I("\\tag@paren","\\tag@literal{({#1})}"),I("\\tag@literal",s=>{if(s.macros.get("\\df@tag"))throw new i("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),I("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),I("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),I("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),I("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),I("\\newline","\\\\\\relax"),I("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const Ic=fe(be["Main-Regular"][84][1]-.7*be["Main-Regular"][65][1]);I("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Ic+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),I("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Ic+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),I("\\hspace","\\@ifstar\\@hspacer\\@hspace"),I("\\@hspace","\\hskip #1\\relax"),I("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),I("\\ordinarycolon",":"),I("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),I("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),I("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),I("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),I("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),I("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),I("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),I("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),I("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),I("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),I("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),I("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),I("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),I("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),I("\u2237","\\dblcolon"),I("\u2239","\\eqcolon"),I("\u2254","\\coloneqq"),I("\u2255","\\eqqcolon"),I("\u2A74","\\Coloneqq"),I("\\ratio","\\vcentcolon"),I("\\coloncolon","\\dblcolon"),I("\\colonequals","\\coloneqq"),I("\\coloncolonequals","\\Coloneqq"),I("\\equalscolon","\\eqqcolon"),I("\\equalscoloncolon","\\Eqqcolon"),I("\\colonminus","\\coloneq"),I("\\coloncolonminus","\\Coloneq"),I("\\minuscolon","\\eqcolon"),I("\\minuscoloncolon","\\Eqcolon"),I("\\coloncolonapprox","\\Colonapprox"),I("\\coloncolonsim","\\Colonsim"),I("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),I("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),I("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),I("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),I("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),I("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),I("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),I("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),I("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),I("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),I("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),I("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),I("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),I("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),I("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),I("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),I("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),I("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),I("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),I("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),I("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),I("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),I("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),I("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),I("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),I("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),I("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),I("\\imath","\\html@mathml{\\@imath}{\u0131}"),I("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),I("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),I("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),I("\u27E6","\\llbracket"),I("\u27E7","\\rrbracket"),I("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),I("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),I("\u2983","\\lBrace"),I("\u2984","\\rBrace"),I("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}"),I("\u29B5","\\minuso"),I("\\darr","\\downarrow"),I("\\dArr","\\Downarrow"),I("\\Darr","\\Downarrow"),I("\\lang","\\langle"),I("\\rang","\\rangle"),I("\\uarr","\\uparrow"),I("\\uArr","\\Uparrow"),I("\\Uarr","\\Uparrow"),I("\\N","\\mathbb{N}"),I("\\R","\\mathbb{R}"),I("\\Z","\\mathbb{Z}"),I("\\alef","\\aleph"),I("\\alefsym","\\aleph"),I("\\Alpha","\\mathrm{A}"),I("\\Beta","\\mathrm{B}"),I("\\bull","\\bullet"),I("\\Chi","\\mathrm{X}"),I("\\clubs","\\clubsuit"),I("\\cnums","\\mathbb{C}"),I("\\Complex","\\mathbb{C}"),I("\\Dagger","\\ddagger"),I("\\diamonds","\\diamondsuit"),I("\\empty","\\emptyset"),I("\\Epsilon","\\mathrm{E}"),I("\\Eta","\\mathrm{H}"),I("\\exist","\\exists"),I("\\harr","\\leftrightarrow"),I("\\hArr","\\Leftrightarrow"),I("\\Harr","\\Leftrightarrow"),I("\\hearts","\\heartsuit"),I("\\image","\\Im"),I("\\infin","\\infty"),I("\\Iota","\\mathrm{I}"),I("\\isin","\\in"),I("\\Kappa","\\mathrm{K}"),I("\\larr","\\leftarrow"),I("\\lArr","\\Leftarrow"),I("\\Larr","\\Leftarrow"),I("\\lrarr","\\leftrightarrow"),I("\\lrArr","\\Leftrightarrow"),I("\\Lrarr","\\Leftrightarrow"),I("\\Mu","\\mathrm{M}"),I("\\natnums","\\mathbb{N}"),I("\\Nu","\\mathrm{N}"),I("\\Omicron","\\mathrm{O}"),I("\\plusmn","\\pm"),I("\\rarr","\\rightarrow"),I("\\rArr","\\Rightarrow"),I("\\Rarr","\\Rightarrow"),I("\\real","\\Re"),I("\\reals","\\mathbb{R}"),I("\\Reals","\\mathbb{R}"),I("\\Rho","\\mathrm{P}"),I("\\sdot","\\cdot"),I("\\sect","\\S"),I("\\spades","\\spadesuit"),I("\\sub","\\subset"),I("\\sube","\\subseteq"),I("\\supe","\\supseteq"),I("\\Tau","\\mathrm{T}"),I("\\thetasym","\\vartheta"),I("\\weierp","\\wp"),I("\\Zeta","\\mathrm{Z}"),I("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),I("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),I("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),I("\\bra","\\mathinner{\\langle{#1}|}"),I("\\ket","\\mathinner{|{#1}\\rangle}"),I("\\braket","\\mathinner{\\langle{#1}\\rangle}"),I("\\Bra","\\left\\langle#1\\right|"),I("\\Ket","\\left|#1\\right\\rangle");const jc=s=>o=>{const l=o.consumeArg().tokens,h=o.consumeArg().tokens,b=o.consumeArg().tokens,k=o.consumeArg().tokens,$=o.macros.get("|"),z=o.macros.get("\\|");o.macros.beginGroup();const U=ge=>Ee=>{s&&(Ee.macros.set("|",$),b.length&&Ee.macros.set("\\|",z));let Ze=ge;return!ge&&b.length&&Ee.future().text==="|"&&(Ee.popToken(),Ze=!0),{tokens:Ze?b:h,numArgs:0}};o.macros.set("|",U(!1)),b.length&&o.macros.set("\\|",U(!0));const ne=o.consumeArg().tokens,pe=o.expandTokens([...k,...ne,...l]);return o.macros.endGroup(),{tokens:pe.reverse(),numArgs:0}};I("\\bra@ket",jc(!1)),I("\\bra@set",jc(!0)),I("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),I("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),I("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),I("\\angln","{\\angl n}"),I("\\blue","\\textcolor{##6495ed}{#1}"),I("\\orange","\\textcolor{##ffa500}{#1}"),I("\\pink","\\textcolor{##ff00af}{#1}"),I("\\red","\\textcolor{##df0030}{#1}"),I("\\green","\\textcolor{##28ae7b}{#1}"),I("\\gray","\\textcolor{gray}{#1}"),I("\\purple","\\textcolor{##9d38bd}{#1}"),I("\\blueA","\\textcolor{##ccfaff}{#1}"),I("\\blueB","\\textcolor{##80f6ff}{#1}"),I("\\blueC","\\textcolor{##63d9ea}{#1}"),I("\\blueD","\\textcolor{##11accd}{#1}"),I("\\blueE","\\textcolor{##0c7f99}{#1}"),I("\\tealA","\\textcolor{##94fff5}{#1}"),I("\\tealB","\\textcolor{##26edd5}{#1}"),I("\\tealC","\\textcolor{##01d1c1}{#1}"),I("\\tealD","\\textcolor{##01a995}{#1}"),I("\\tealE","\\textcolor{##208170}{#1}"),I("\\greenA","\\textcolor{##b6ffb0}{#1}"),I("\\greenB","\\textcolor{##8af281}{#1}"),I("\\greenC","\\textcolor{##74cf70}{#1}"),I("\\greenD","\\textcolor{##1fab54}{#1}"),I("\\greenE","\\textcolor{##0d923f}{#1}"),I("\\goldA","\\textcolor{##ffd0a9}{#1}"),I("\\goldB","\\textcolor{##ffbb71}{#1}"),I("\\goldC","\\textcolor{##ff9c39}{#1}"),I("\\goldD","\\textcolor{##e07d10}{#1}"),I("\\goldE","\\textcolor{##a75a05}{#1}"),I("\\redA","\\textcolor{##fca9a9}{#1}"),I("\\redB","\\textcolor{##ff8482}{#1}"),I("\\redC","\\textcolor{##f9685d}{#1}"),I("\\redD","\\textcolor{##e84d39}{#1}"),I("\\redE","\\textcolor{##bc2612}{#1}"),I("\\maroonA","\\textcolor{##ffbde0}{#1}"),I("\\maroonB","\\textcolor{##ff92c6}{#1}"),I("\\maroonC","\\textcolor{##ed5fa6}{#1}"),I("\\maroonD","\\textcolor{##ca337c}{#1}"),I("\\maroonE","\\textcolor{##9e034e}{#1}"),I("\\purpleA","\\textcolor{##ddd7ff}{#1}"),I("\\purpleB","\\textcolor{##c6b9fc}{#1}"),I("\\purpleC","\\textcolor{##aa87ff}{#1}"),I("\\purpleD","\\textcolor{##7854ab}{#1}"),I("\\purpleE","\\textcolor{##543b78}{#1}"),I("\\mintA","\\textcolor{##f5f9e8}{#1}"),I("\\mintB","\\textcolor{##edf2df}{#1}"),I("\\mintC","\\textcolor{##e0e5cc}{#1}"),I("\\grayA","\\textcolor{##f6f7f7}{#1}"),I("\\grayB","\\textcolor{##f0f1f2}{#1}"),I("\\grayC","\\textcolor{##e3e5e6}{#1}"),I("\\grayD","\\textcolor{##d6d8da}{#1}"),I("\\grayE","\\textcolor{##babec2}{#1}"),I("\\grayF","\\textcolor{##888d93}{#1}"),I("\\grayG","\\textcolor{##626569}{#1}"),I("\\grayH","\\textcolor{##3b3e40}{#1}"),I("\\grayI","\\textcolor{##21242c}{#1}"),I("\\kaBlue","\\textcolor{##314453}{#1}"),I("\\kaGreen","\\textcolor{##71B307}{#1}");const Lc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class bg{constructor(o,l,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=l,this.expansionCount=0,this.feed(o),this.macros=new gg(vg,l.macros),this.mode=h,this.stack=[]}feed(o){this.lexer=new Mc(o,this.settings)}switchMode(o){this.mode=o}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(o){this.stack.push(o)}pushTokens(o){this.stack.push(...o)}scanArgument(o){let l,h,b;if(o){if(this.consumeSpaces(),this.future().text!=="[")return null;l=this.popToken(),{tokens:b,end:h}=this.consumeArg(["]"])}else({tokens:b,start:l,end:h}=this.consumeArg());return this.pushToken(new fn("EOF",h.loc)),this.pushTokens(b),new fn("",sn.range(l,h))}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(o){const l=[],h=o&&o.length>0;h||this.consumeSpaces();const b=this.future();let k,$=0,z=0;do{if(k=this.popToken(),l.push(k),k.text==="{")++$;else if(k.text==="}"){if(--$,$===-1)throw new i("Extra }",k)}else if(k.text==="EOF")throw new i("Unexpected end of input in a macro argument, expected '"+(o&&h?o[z]:"}")+"'",k);if(o&&h)if(($===0||$===1&&o[z]==="{")&&k.text===o[z]){if(++z,z===o.length){l.splice(-z,z);break}}else z=0}while($!==0||h);return b.text==="{"&&l[l.length-1].text==="}"&&(l.pop(),l.shift()),l.reverse(),{tokens:l,start:b,end:k}}consumeArgs(o,l){if(l){if(l.length!==o+1)throw new i("The length of delimiters doesn't match the number of args!");const b=l[0];for(let k=0;k<b.length;k++){const $=this.popToken();if(b[k]!==$.text)throw new i("Use of the macro doesn't match its definition",$)}}const h=[];for(let b=0;b<o;b++)h.push(this.consumeArg(l&&l[b+1]).tokens);return h}countExpansion(o){if(this.expansionCount+=o,this.expansionCount>this.settings.maxExpand)throw new i("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(o){const l=this.popToken(),h=l.text,b=l.noexpand?null:this._getExpansion(h);if(b==null||o&&b.unexpandable){if(o&&b==null&&h[0]==="\\"&&!this.isDefined(h))throw new i("Undefined control sequence: "+h);return this.pushToken(l),!1}this.countExpansion(1);let k=b.tokens;const $=this.consumeArgs(b.numArgs,b.delimiters);if(b.numArgs){k=k.slice();for(let z=k.length-1;z>=0;--z){let U=k[z];if(U.text==="#"){if(z===0)throw new i("Incomplete placeholder at end of macro body",U);if(U=k[--z],U.text==="#")k.splice(z+1,1);else if(/^[1-9]$/.test(U.text))k.splice(z,2,...$[+U.text-1]);else throw new i("Not a valid argument number",U)}}}return this.pushTokens(k),k.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){const o=this.stack.pop();return o.treatAsRelax&&(o.text="\\relax"),o}throw new Error}expandMacro(o){return this.macros.has(o)?this.expandTokens([new fn(o)]):void 0}expandTokens(o){const l=[],h=this.stack.length;for(this.pushTokens(o);this.stack.length>h;)if(this.expandOnce(!0)===!1){const b=this.stack.pop();b.treatAsRelax&&(b.noexpand=!1,b.treatAsRelax=!1),l.push(b)}return this.countExpansion(l.length),l}expandMacroAsText(o){const l=this.expandMacro(o);return l&&l.map(h=>h.text).join("")}_getExpansion(o){const l=this.macros.get(o);if(l==null)return l;if(o.length===1){const b=this.lexer.catcodes[o];if(b!=null&&b!==13)return}const h=typeof l=="function"?l(this):l;if(typeof h=="string"){let b=0;if(h.indexOf("#")!==-1){const U=h.replace(/##/g,"");for(;U.indexOf("#"+(b+1))!==-1;)++b}const k=new Mc(h,this.settings),$=[];let z=k.lex();for(;z.text!=="EOF";)$.push(z),z=k.lex();return $.reverse(),{tokens:$,numArgs:b}}return h}isDefined(o){return this.macros.has(o)||sa.hasOwnProperty(o)||xt.math.hasOwnProperty(o)||xt.text.hasOwnProperty(o)||Lc.hasOwnProperty(o)}isExpandable(o){const l=this.macros.get(o);return l!=null?typeof l=="string"||typeof l=="function"||!l.unexpandable:sa.hasOwnProperty(o)&&!sa[o].primitive}}const _c=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,mi=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),al={"\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"}},qc={\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 gi{constructor(o,l){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 bg(o,l,this.mode),this.settings=l,this.leftrightDepth=0}expect(o,l){if(l===void 0&&(l=!0),this.fetch().text!==o)throw new i("Expected '"+o+"', got '"+this.fetch().text+"'",this.fetch());l&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(o){this.mode=o,this.gullet.switchMode(o)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const o=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),o}finally{this.gullet.endGroups()}}subparse(o){const l=this.nextToken;this.consume(),this.gullet.pushToken(new fn("}")),this.gullet.pushTokens(o);const h=this.parseExpression(!1);return this.expect("}"),this.nextToken=l,h}parseExpression(o,l){const h=[];for(;;){this.mode==="math"&&this.consumeSpaces();const b=this.fetch();if(gi.endOfExpression.indexOf(b.text)!==-1||l&&b.text===l||o&&sa[b.text]&&sa[b.text].infix)break;const k=this.parseAtom(l);if(k){if(k.type==="internal")continue}else break;h.push(k)}return this.mode==="text"&&this.formLigatures(h),this.handleInfixNodes(h)}handleInfixNodes(o){let l=-1,h;for(let b=0;b<o.length;b++)if(o[b].type==="infix"){if(l!==-1)throw new i("only one infix operator per group",o[b].token);l=b,h=o[b].replaceWith}if(l!==-1&&h){let b,k;const $=o.slice(0,l),z=o.slice(l+1);$.length===1&&$[0].type==="ordgroup"?b=$[0]:b={type:"ordgroup",mode:this.mode,body:$},z.length===1&&z[0].type==="ordgroup"?k=z[0]:k={type:"ordgroup",mode:this.mode,body:z};let U;return h==="\\\\abovefrac"?U=this.callFunction(h,[b,o[l],k],[]):U=this.callFunction(h,[b,k],[]),[U]}else return o}handleSupSubscript(o){const l=this.fetch(),h=l.text;this.consume(),this.consumeSpaces();let b;do{var k;b=this.parseGroup(o)}while(((k=b)==null?void 0:k.type)==="internal");if(!b)throw new i("Expected group after '"+h+"'",l);return b}formatUnsupportedCmd(o){const l=[];for(let b=0;b<o.length;b++)l.push({type:"textord",mode:"text",text:o[b]});const h={type:"text",mode:this.mode,body:l};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[h]}}parseAtom(o){const l=this.parseGroup("atom",o);if((l==null?void 0:l.type)==="internal"||this.mode==="text")return l;let h,b;for(;;){this.consumeSpaces();const k=this.fetch();if(k.text==="\\limits"||k.text==="\\nolimits"){if(l&&l.type==="op"){const $=k.text==="\\limits";l.limits=$,l.alwaysHandleSupSub=!0}else if(l&&l.type==="operatorname")l.alwaysHandleSupSub&&(l.limits=k.text==="\\limits");else throw new i("Limit controls must follow a math operator",k);this.consume()}else if(k.text==="^"){if(h)throw new i("Double superscript",k);h=this.handleSupSubscript("superscript")}else if(k.text==="_"){if(b)throw new i("Double subscript",k);b=this.handleSupSubscript("subscript")}else if(k.text==="'"){if(h)throw new i("Double superscript",k);const $={type:"textord",mode:this.mode,text:"\\prime"},z=[$];for(this.consume();this.fetch().text==="'";)z.push($),this.consume();this.fetch().text==="^"&&z.push(this.handleSupSubscript("superscript")),h={type:"ordgroup",mode:this.mode,body:z}}else if(mi[k.text]){const $=_c.test(k.text),z=[];for(z.push(new fn(mi[k.text])),this.consume();;){const ne=this.fetch().text;if(!mi[ne]||_c.test(ne)!==$)break;z.unshift(new fn(mi[ne])),this.consume()}const U=this.subparse(z);$?b={type:"ordgroup",mode:"math",body:U}:h={type:"ordgroup",mode:"math",body:U}}else break}return h||b?{type:"supsub",mode:this.mode,base:l,sup:h,sub:b}:l}parseFunction(o,l){const h=this.fetch(),b=h.text,k=sa[b];if(!k)return null;if(this.consume(),l&&l!=="atom"&&!k.allowedInArgument)throw new i("Got function '"+b+"' with no arguments"+(l?" as "+l:""),h);if(this.mode==="text"&&!k.allowedInText)throw new i("Can't use function '"+b+"' in text mode",h);if(this.mode==="math"&&k.allowedInMath===!1)throw new i("Can't use function '"+b+"' in math mode",h);const{args:$,optArgs:z}=this.parseArguments(b,k);return this.callFunction(b,$,z,h,o)}callFunction(o,l,h,b,k){const $={funcName:o,parser:this,token:b,breakOnTokenText:k},z=sa[o];if(z&&z.handler)return z.handler($,l,h);throw new i("No function handler for "+o)}parseArguments(o,l){const h=l.numArgs+l.numOptionalArgs;if(h===0)return{args:[],optArgs:[]};const b=[],k=[];for(let $=0;$<h;$++){let z=l.argTypes&&l.argTypes[$];const U=$<l.numOptionalArgs;(l.primitive&&z==null||l.type==="sqrt"&&$===1&&k[0]==null)&&(z="primitive");const ne=this.parseGroupOfType("argument to '"+o+"'",z,U);if(U)k.push(ne);else if(ne!=null)b.push(ne);else throw new i("Null argument, please report this as a bug")}return{args:b,optArgs:k}}parseGroupOfType(o,l,h){switch(l){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,l);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 i("A primitive argument cannot be optional");const b=this.parseGroup(o);if(b==null)throw new i("Expected group as "+o,this.fetch());return b}case"original":case null:case void 0:return this.parseArgumentGroup(h);default:throw new i("Unknown group type as "+o,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(o,l){const h=this.gullet.scanArgument(l);if(h==null)return null;let b="",k;for(;(k=this.fetch()).text!=="EOF";)b+=k.text,this.consume();return this.consume(),h.text=b,h}parseRegexGroup(o,l){const h=this.fetch();let b=h,k="",$;for(;($=this.fetch()).text!=="EOF"&&o.test(k+$.text);)b=$,k+=b.text,this.consume();if(k==="")throw new i("Invalid "+l+": '"+h.text+"'",h);return h.range(b,k)}parseColorGroup(o){const l=this.parseStringGroup("color",o);if(l==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(l.text);if(!h)throw new i("Invalid color: '"+l.text+"'",l);let b=h[0];return/^[0-9a-f]{6}$/i.test(b)&&(b="#"+b),{type:"color-token",mode:this.mode,color:b}}parseSizeGroup(o){let l,h=!1;if(this.gullet.consumeSpaces(),!o&&this.gullet.future().text!=="{"?l=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):l=this.parseStringGroup("size",o),!l)return null;!o&&l.text.length===0&&(l.text="0pt",h=!0);const b=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(l.text);if(!b)throw new i("Invalid size: '"+l.text+"'",l);const k={number:+(b[1]+b[2]),unit:b[3]};if(!$t(k))throw new i("Invalid unit: '"+k.unit+"'",l);return{type:"size",mode:this.mode,value:k,isBlank:h}}parseUrlGroup(o){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const l=this.parseStringGroup("url",o);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),l==null)return null;const h=l.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:h}}parseArgumentGroup(o,l){const h=this.gullet.scanArgument(o);if(h==null)return null;const b=this.mode;l&&this.switchMode(l),this.gullet.beginGroup();const k=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const $={type:"ordgroup",mode:this.mode,loc:h.loc,body:k};return l&&this.switchMode(b),$}parseGroup(o,l){const h=this.fetch(),b=h.text;let k;if(b==="{"||b==="\\begingroup"){this.consume();const $=b==="{"?"}":"\\endgroup";this.gullet.beginGroup();const z=this.parseExpression(!1,$),U=this.fetch();this.expect($),this.gullet.endGroup(),k={type:"ordgroup",mode:this.mode,loc:sn.range(h,U),body:z,semisimple:b==="\\begingroup"||void 0}}else if(k=this.parseFunction(l,o)||this.parseSymbol(),k==null&&b[0]==="\\"&&!Lc.hasOwnProperty(b)){if(this.settings.throwOnError)throw new i("Undefined control sequence: "+b,h);k=this.formatUnsupportedCmd(b),this.consume()}return k}formLigatures(o){let l=o.length-1;for(let h=0;h<l;++h){const b=o[h],k=b.text;k==="-"&&o[h+1].text==="-"&&(h+1<l&&o[h+2].text==="-"?(o.splice(h,3,{type:"textord",mode:"text",loc:sn.range(b,o[h+2]),text:"---"}),l-=2):(o.splice(h,2,{type:"textord",mode:"text",loc:sn.range(b,o[h+1]),text:"--"}),l-=1)),(k==="'"||k==="`")&&o[h+1].text===k&&(o.splice(h,2,{type:"textord",mode:"text",loc:sn.range(b,o[h+1]),text:k+k}),l-=1)}}parseSymbol(){const o=this.fetch();let l=o.text;if(/^\\verb[^a-zA-Z]/.test(l)){this.consume();let k=l.slice(5);const $=k.charAt(0)==="*";if($&&(k=k.slice(1)),k.length<2||k.charAt(0)!==k.slice(-1))throw new i(`\\verb assertion failed --
|
|
474
|
-
please report what input caused this bug`);return k=k.slice(1,-1),{type:"verb",mode:"text",body:k,star:$}}qc.hasOwnProperty(l[0])&&!xt[this.mode][l[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+l[0]+'" used in math mode',o),l=qc[l[0]]+l.slice(1));const h=pg.exec(l);h&&(l=l.substring(0,h.index),l==="i"?l="\u0131":l==="j"&&(l="\u0237"));let b;if(xt[this.mode][l]){this.settings.strict&&this.mode==="math"&&na.indexOf(l)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+l[0]+'" used in math mode',o);const k=xt[this.mode][l].group,$=sn.range(o);let z;if(_r.hasOwnProperty(k)){const U=k;z={type:"atom",mode:this.mode,family:U,loc:$,text:l}}else z={type:k,mode:this.mode,loc:$,text:l};b=z}else if(l.charCodeAt(0)>=128)this.settings.strict&&(ke(l.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+l[0]+'" used in math mode',o):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+l[0]+'"'+(" ("+l.charCodeAt(0)+")"),o)),b={type:"textord",mode:"text",loc:sn.range(o),text:l};else return null;if(this.consume(),h)for(let k=0;k<h[0].length;k++){const $=h[0][k];if(!al[$])throw new i("Unknown accent ' "+$+"'",o);const z=al[$][this.mode]||al[$].text;if(!z)throw new i("Accent "+$+" unsupported in "+this.mode+" mode",o);b={type:"accent",mode:this.mode,loc:sn.range(o),label:z,isStretchy:!1,isShifty:!0,base:b}}return b}}gi.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var ol=function(s,o){if(!(typeof s=="string"||s instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const l=new gi(s,o);delete l.gullet.macros.current["\\df@tag"];let h=l.parse();if(delete l.gullet.macros.current["\\current@color"],delete l.gullet.macros.current["\\color"],l.gullet.macros.get("\\df@tag")){if(!o.displayMode)throw new i("\\tag works only in display equations");h=[{type:"tag",mode:"text",body:h,tag:l.subparse([new fn("\\df@tag")])}]}return h};let Hc=function(s,o,l){o.textContent="";const h=il(s,l).toNode();o.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."),Hc=function(){throw new i("KaTeX doesn't work in quirks mode.")});const yg=function(s,o){return il(s,o).toMarkup()},xg=function(s,o){const l=new B(o);return ol(s,l)},Kc=function(s,o,l){if(l.throwOnError||!(s instanceof i))throw s;const h=ve.makeSpan(["katex-error"],[new Ft(o)]);return h.setAttribute("title",s.toString()),h.setAttribute("style","color:"+l.errorColor),h},il=function(s,o){const l=new B(o);try{const h=ol(s,l);return Mm(h,s,l)}catch(h){return Kc(h,s,l)}};var wg={version:"0.16.25",render:Hc,renderToString:yg,ParseError:i,SETTINGS_SCHEMA:p,__parse:xg,__renderToDomTree:il,__renderToHTMLTree:function(s,o){const l=new B(o);try{const h=ol(s,l);return Rm(h,s,l)}catch(h){return Kc(h,s,l)}},__setFontMetrics:ut,__defineSymbol:y,__defineFunction:et,__defineMacro:I,__domTree:{Span:yt,Anchor:It,SymbolNode:Ft,SvgNode:zr,PathNode:Fr,LineNode:mn}},Cg=wg;return n=n.default,n})()})})(K0)),K0.exports}var rw=Hi.exports,_h;function nw(){return _h||(_h=1,(function(e,t){(function(r,n){n(t,We,Jx(),tw())})(rw,function(r,n,a,i){Object.defineProperty(r,"__esModule",{value:!0});function c(p,A){for(var B in A)Object.defineProperty(p,B,{enumerable:!0,get:A[B]})}c(r,{BlockMath:()=>x,InlineMath:()=>C}),n=d(n),a=u(a),i=u(i);function u(p){return p&&p.__esModule?p:{default:p}}function f(p){if(typeof WeakMap!="function")return null;var A=new WeakMap,B=new WeakMap;return(f=function(E){return E?B: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 B=f(A);if(B&&B.has(p))return B.get(p);var E={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in p)if(F!=="default"&&Object.prototype.hasOwnProperty.call(p,F)){var P=T?Object.getOwnPropertyDescriptor(p,F):null;P&&(P.get||P.set)?Object.defineProperty(E,F,P):E[F]=p[F]}return E.default=p,B&&B.set(p,E),E}const m=(p,{displayMode:A})=>{const B=({children:E,errorColor:T,math:F,renderError:P})=>{const S=F??E,{html:L,error:O}=(0,n.useMemo)(()=>{try{return{html:i.default.renderToString(S,{displayMode:A,errorColor:T,throwOnError:!!P}),error:void 0}}catch(W){if(W instanceof i.default.ParseError||W instanceof TypeError)return{error:W};throw W}},[S,T,P]);return O?P?P(O):n.default.createElement(p,{html:`${O.message}`}):n.default.createElement(p,{html:L})};return B.propTypes={children:a.default.string,errorColor:a.default.string,math:a.default.string,renderError:a.default.func},B},g={html:a.default.string.isRequired},v=({html:p})=>n.default.createElement("div",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:p}});v.propTypes=g;const w=({html:p})=>n.default.createElement("span",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:p}});w.propTypes=g;const x=m(v,{displayMode:!0}),C=m(w,{displayMode:!1})})})(Hi,Hi.exports)),Hi.exports}var Em=nw();const aw=qe.span.attrs({className:"latex-inline-wrapper"})`
|
|
475
|
-
display: inline-flex;
|
|
476
|
-
align-items: baseline;
|
|
477
|
-
column-gap: 4px;
|
|
478
|
-
line-height: 1.2;
|
|
479
|
-
color: ${({$color:e})=>e||"inherit"};
|
|
480
|
-
`,ow=qe.span.attrs({className:"latex-inline-error"})`
|
|
481
|
-
display: inline-flex;
|
|
482
|
-
align-items: center;
|
|
483
|
-
column-gap: 6px;
|
|
484
|
-
padding: 2px 4px;
|
|
485
|
-
border-radius: 4px;
|
|
486
|
-
background: rgba(215, 58, 73, 0.08);
|
|
487
|
-
color: #d73a49;
|
|
488
|
-
font-size: 0.85em;
|
|
489
|
-
`,iw=qe.span.attrs({className:"latex-inline-error-message"})`
|
|
490
|
-
font-size: 0.75em;
|
|
491
|
-
color: #d73a49;
|
|
492
|
-
`,sw=({attributes:e,formula:t,styles:r})=>{var i;const n=mt(()=>(t||"").trim(),[t]),a=(i=r==null?void 0:r.text)==null?void 0:i.color;return n?q.jsx(aw,{...e,$color:a,children:q.jsx(Em.InlineMath,{math:n,errorColor:"#d73a49",renderError:c=>q.jsxs(ow,{children:[q.jsx("span",{children:n}),q.jsx(iw,{children:c==null?void 0:c.message})]})})}):null},lw=qe.div.attrs({className:"latex-block-wrapper"})`
|
|
493
|
-
width: 100%;
|
|
494
|
-
display: flex;
|
|
495
|
-
justify-content: center;
|
|
496
|
-
align-items: center;
|
|
497
|
-
margin: 1.25rem 0;
|
|
498
|
-
padding: 0.75rem;
|
|
499
|
-
border-radius: 8px;
|
|
500
|
-
background: rgba(2, 132, 199, 0.05);
|
|
501
|
-
color: ${({$textColor:e})=>e||"inherit"};
|
|
502
|
-
`,uw=qe.div.attrs({className:"latex-block-error"})`
|
|
503
|
-
display: flex;
|
|
504
|
-
flex-direction: column;
|
|
505
|
-
width: 100%;
|
|
506
|
-
gap: 6px;
|
|
507
|
-
padding: 0.75rem;
|
|
508
|
-
background: rgba(215, 58, 73, 0.08);
|
|
509
|
-
border: 1px dashed #d73a49;
|
|
510
|
-
border-radius: 8px;
|
|
511
|
-
font-size: 0.9rem;
|
|
512
|
-
color: #d73a49;
|
|
513
|
-
`,cw=qe.span.attrs({className:"latex-block-error-title"})`
|
|
514
|
-
font-weight: 600;
|
|
515
|
-
`,dw=qe.code.attrs({className:"latex-block-error-formula"})`
|
|
516
|
-
font-size: 0.85rem;
|
|
517
|
-
color: #d73a49;
|
|
518
|
-
overflow-x: auto;
|
|
519
|
-
`,fw=({attributes:e,formula:t,styles:r})=>{var i;const n=mt(()=>(t||"").trim(),[t]),a=(i=r==null?void 0:r.text)==null?void 0:i.color;return n?q.jsx(lw,{...e,$textColor:a,children:q.jsx(Em.BlockMath,{math:n,errorColor:"#d73a49",renderError:c=>q.jsxs(uw,{children:[q.jsx(cw,{children:"\u516C\u5F0F\u6E32\u67D3\u5931\u8D25"}),q.jsx(dw,{children:n}),q.jsx("span",{children:c==null?void 0:c.message})]})})}):null};/**
|
|
520
|
-
* @license lucide-react v0.456.0 - ISC
|
|
521
|
-
*
|
|
522
|
-
* This source code is licensed under the ISC license.
|
|
523
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
524
|
-
*/const hw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Sm=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
525
|
-
* @license lucide-react v0.456.0 - ISC
|
|
526
|
-
*
|
|
527
|
-
* This source code is licensed under the ISC license.
|
|
528
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
529
|
-
*/var pw={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"};/**
|
|
530
|
-
* @license lucide-react v0.456.0 - ISC
|
|
531
|
-
*
|
|
532
|
-
* This source code is licensed under the ISC license.
|
|
533
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
534
|
-
*/const mw=Jo(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:c,...u},f)=>Ki("svg",{ref:f,...pw,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Sm("lucide",a),...u},[...c.map(([d,m])=>Ki(d,m)),...Array.isArray(i)?i:[i]]));/**
|
|
535
|
-
* @license lucide-react v0.456.0 - ISC
|
|
536
|
-
*
|
|
537
|
-
* This source code is licensed under the ISC license.
|
|
538
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
539
|
-
*/const Pr=(e,t)=>{const r=Jo(({className:n,...a},i)=>Ki(mw,{ref:i,iconNode:t,className:Sm(`lucide-${hw(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
|
|
540
|
-
* @license lucide-react v0.456.0 - ISC
|
|
541
|
-
*
|
|
542
|
-
* This source code is licensed under the ISC license.
|
|
543
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
544
|
-
*/const gw=Pr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
545
|
-
* @license lucide-react v0.456.0 - ISC
|
|
546
|
-
*
|
|
547
|
-
* This source code is licensed under the ISC license.
|
|
548
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
549
|
-
*/const No=Pr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
550
|
-
* @license lucide-react v0.456.0 - ISC
|
|
551
|
-
*
|
|
552
|
-
* This source code is licensed under the ISC license.
|
|
553
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
554
|
-
*/const vw=Pr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
555
|
-
* @license lucide-react v0.456.0 - ISC
|
|
556
|
-
*
|
|
557
|
-
* This source code is licensed under the ISC license.
|
|
558
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
559
|
-
*/const To=Pr("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
560
|
-
* @license lucide-react v0.456.0 - ISC
|
|
561
|
-
*
|
|
562
|
-
* This source code is licensed under the ISC license.
|
|
563
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
564
|
-
*/Pr("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
565
|
-
* @license lucide-react v0.456.0 - ISC
|
|
566
|
-
*
|
|
567
|
-
* This source code is licensed under the ISC license.
|
|
568
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
569
|
-
*/const Am=Pr("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"}]]);/**
|
|
570
|
-
* @license lucide-react v0.456.0 - ISC
|
|
571
|
-
*
|
|
572
|
-
* This source code is licensed under the ISC license.
|
|
573
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
574
|
-
*/const bw=Pr("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"}]]);/**
|
|
575
|
-
* @license lucide-react v0.456.0 - ISC
|
|
576
|
-
*
|
|
577
|
-
* This source code is licensed under the ISC license.
|
|
578
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
579
|
-
*/const yw=Pr("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"}]]);/**
|
|
580
|
-
* @license lucide-react v0.456.0 - ISC
|
|
581
|
-
*
|
|
582
|
-
* This source code is licensed under the ISC license.
|
|
583
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
584
|
-
*/const xw=Pr("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"}]]);/**
|
|
585
|
-
* @license lucide-react v0.456.0 - ISC
|
|
586
|
-
*
|
|
587
|
-
* This source code is licensed under the ISC license.
|
|
588
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
589
|
-
*/const ww=Pr("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"}]]);/**
|
|
590
|
-
* @license lucide-react v0.456.0 - ISC
|
|
591
|
-
*
|
|
592
|
-
* This source code is licensed under the ISC license.
|
|
593
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
594
|
-
*/Pr("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
595
|
-
* @license lucide-react v0.456.0 - ISC
|
|
596
|
-
*
|
|
597
|
-
* This source code is licensed under the ISC license.
|
|
598
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
599
|
-
*/const Cw=Pr("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"}]]);/**
|
|
600
|
-
* @license lucide-react v0.456.0 - ISC
|
|
601
|
-
*
|
|
602
|
-
* This source code is licensed under the ISC license.
|
|
603
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
604
|
-
*/const Dw=Pr("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
605
|
-
* @license lucide-react v0.456.0 - ISC
|
|
606
|
-
*
|
|
607
|
-
* This source code is licensed under the ISC license.
|
|
608
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
609
|
-
*/const kw=Pr("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"}]]);/**
|
|
610
|
-
* @license lucide-react v0.456.0 - ISC
|
|
611
|
-
*
|
|
612
|
-
* This source code is licensed under the ISC license.
|
|
613
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
614
|
-
*/Pr("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
615
|
-
* @license lucide-react v0.456.0 - ISC
|
|
616
|
-
*
|
|
617
|
-
* This source code is licensed under the ISC license.
|
|
618
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
619
|
-
*/const Ew=Pr("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"}]]);/**
|
|
620
|
-
* @license lucide-react v0.456.0 - ISC
|
|
621
|
-
*
|
|
622
|
-
* This source code is licensed under the ISC license.
|
|
623
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
624
|
-
*/const Sw=Pr("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"}]]);/**
|
|
625
|
-
* @license lucide-react v0.456.0 - ISC
|
|
626
|
-
*
|
|
627
|
-
* This source code is licensed under the ISC license.
|
|
628
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
629
|
-
*/const Aw=Pr("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"}]]);/**
|
|
630
|
-
* @license lucide-react v0.456.0 - ISC
|
|
631
|
-
*
|
|
632
|
-
* This source code is licensed under the ISC license.
|
|
633
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
634
|
-
*/const Bw=Pr("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"}]]);/**
|
|
635
|
-
* @license lucide-react v0.456.0 - ISC
|
|
636
|
-
*
|
|
637
|
-
* This source code is licensed under the ISC license.
|
|
638
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
639
|
-
*/const Fw=Pr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
640
|
-
* @license lucide-react v0.456.0 - ISC
|
|
641
|
-
*
|
|
642
|
-
* This source code is licensed under the ISC license.
|
|
643
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
644
|
-
*/Pr("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);const Nw=qe.div.attrs({className:"rtext-code-block-wrapper"})`
|
|
645
|
-
position: relative;
|
|
646
|
-
margin: 20px 0;
|
|
647
|
-
border-radius: 8px;
|
|
648
|
-
overflow: hidden;
|
|
649
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e1e4e8"}};
|
|
650
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
651
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
652
|
-
transition: box-shadow 0.2s ease;
|
|
653
|
-
|
|
654
|
-
&:hover {
|
|
655
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
656
|
-
}
|
|
657
|
-
`,Tw=qe.div.attrs({className:"rtext-code-block-language"})`
|
|
658
|
-
display: flex;
|
|
659
|
-
align-items: center;
|
|
660
|
-
justify-content: space-between;
|
|
661
|
-
padding: 10px 16px;
|
|
662
|
-
background: ${e=>{var r;const t=((r=e.theme)==null?void 0:r.disabledBackground)||"#f6f8fa";return t==="#f6f8fa"||t.includes("f6f8fa")?"#f0f2f5":t==="#ffffff"||t.includes("ffffff")?"#f6f8fa":t}};
|
|
663
|
-
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e1e4e8"}};
|
|
664
|
-
font-size: 11px;
|
|
665
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#656d76"}};
|
|
666
|
-
font-weight: 600;
|
|
667
|
-
letter-spacing: 0.5px;
|
|
668
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
669
|
-
|
|
670
|
-
span:first-child {
|
|
671
|
-
opacity: 0.85;
|
|
672
|
-
font-variant: small-caps;
|
|
673
|
-
}
|
|
674
|
-
`,Ow=qe.pre.attrs({className:"rtext-simple-code-block"})`
|
|
675
|
-
margin: 16px 0;
|
|
676
|
-
padding: 12px 16px;
|
|
677
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
678
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e1e4e8"}};
|
|
679
|
-
border-radius: 6px;
|
|
680
|
-
overflow-x: auto;
|
|
681
|
-
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
|
|
682
|
-
font-size: 13px;
|
|
683
|
-
line-height: 1.6;
|
|
684
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
685
|
-
|
|
686
|
-
code {
|
|
687
|
-
background: transparent;
|
|
688
|
-
padding: 0;
|
|
689
|
-
color: inherit;
|
|
690
|
-
font-size: inherit;
|
|
691
|
-
font-family: inherit;
|
|
692
|
-
white-space: pre;
|
|
693
|
-
}
|
|
694
|
-
`,$w=qe.pre.attrs({className:"rtext-code-block-container"})`
|
|
695
|
-
margin: 0 !important;
|
|
696
|
-
border: none !important;
|
|
697
|
-
padding: 16px 20px;
|
|
698
|
-
overflow-x: auto;
|
|
699
|
-
background: ${e=>{var r;const t=((r=e.theme)==null?void 0:r.disabledBackground)||"#f6f8fa";return t==="#f6f8fa"||t.includes("f6f8fa")||t.includes("f0f2f5")||t==="#ffffff"||t.includes("ffffff")?"#ffffff":t}};
|
|
700
|
-
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
|
|
701
|
-
font-size: 13px;
|
|
702
|
-
line-height: 1.7;
|
|
703
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
704
|
-
tab-size: 2;
|
|
705
|
-
-webkit-font-smoothing: antialiased;
|
|
706
|
-
-moz-osx-font-smoothing: grayscale;
|
|
707
|
-
|
|
708
|
-
/* 美化滚动条 */
|
|
709
|
-
&::-webkit-scrollbar {
|
|
710
|
-
height: 8px;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
&::-webkit-scrollbar-track {
|
|
714
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
&::-webkit-scrollbar-thumb {
|
|
718
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#c1c7cd"}};
|
|
719
|
-
border-radius: 4px;
|
|
720
|
-
|
|
721
|
-
&:hover {
|
|
722
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#8b949e"}};
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
code {
|
|
727
|
-
background: transparent;
|
|
728
|
-
padding: 0;
|
|
729
|
-
color: inherit;
|
|
730
|
-
font-size: inherit;
|
|
731
|
-
font-family: inherit;
|
|
732
|
-
white-space: pre;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
/* 优化 PrismJS 高亮样式 - 参考 DeepSeek/飞书设计 */
|
|
736
|
-
.token.comment,
|
|
737
|
-
.token.prolog,
|
|
738
|
-
.token.doctype,
|
|
739
|
-
.token.cdata {
|
|
740
|
-
color: #6a737d;
|
|
741
|
-
font-style: italic;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
.token.punctuation {
|
|
745
|
-
color: #24292f;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
.token.property,
|
|
749
|
-
.token.tag,
|
|
750
|
-
.token.boolean,
|
|
751
|
-
.token.number,
|
|
752
|
-
.token.constant,
|
|
753
|
-
.token.symbol,
|
|
754
|
-
.token.deleted {
|
|
755
|
-
color: #005cc5;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
.token.selector,
|
|
759
|
-
.token.attr-name,
|
|
760
|
-
.token.string,
|
|
761
|
-
.token.char,
|
|
762
|
-
.token.builtin,
|
|
763
|
-
.token.inserted {
|
|
764
|
-
color: #032f62;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
.token.operator,
|
|
768
|
-
.token.entity,
|
|
769
|
-
.token.url,
|
|
770
|
-
.language-css .token.string,
|
|
771
|
-
.style .token.string {
|
|
772
|
-
color: #d73a49;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
.token.atrule,
|
|
776
|
-
.token.attr-value,
|
|
777
|
-
.token.keyword {
|
|
778
|
-
color: #d73a49;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.token.function,
|
|
782
|
-
.token.class-name {
|
|
783
|
-
color: #6f42c1;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
.token.regex,
|
|
787
|
-
.token.important,
|
|
788
|
-
.token.variable {
|
|
789
|
-
color: #e36209;
|
|
790
|
-
}
|
|
791
|
-
`,Pw=qe.button.attrs({className:"rtext-code-block-copy-btn"})`
|
|
792
|
-
display: inline-flex;
|
|
793
|
-
align-items: center;
|
|
794
|
-
justify-content: center;
|
|
795
|
-
gap: 5px;
|
|
796
|
-
padding: 5px 10px;
|
|
797
|
-
background: ${e=>e.$error?"#d73a49":e.$copied?"#2da44e":"transparent"};
|
|
798
|
-
border: 1px solid ${e=>{var t;return e.$error?"#d73a49":e.$copied?"#2da44e":((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
799
|
-
border-radius: 5px;
|
|
800
|
-
color: ${e=>{var t;return e.$error||e.$copied?"#ffffff":((t=e.theme)==null?void 0:t.textColor)||"#57606a"}};
|
|
801
|
-
cursor: pointer;
|
|
802
|
-
font-size: 12px;
|
|
803
|
-
font-weight: 500;
|
|
804
|
-
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
805
|
-
min-width: 64px;
|
|
806
|
-
height: 28px;
|
|
807
|
-
user-select: none;
|
|
808
|
-
|
|
809
|
-
&:hover {
|
|
810
|
-
background: ${e=>{var t;return e.$error?"#b6232f":e.$copied?"#28a745":((t=e.theme)==null?void 0:t.hoverBackground)||"rgba(0, 0, 0, 0.05)"}};
|
|
811
|
-
border-color: ${e=>{var t;return e.$error?"#b6232f":e.$copied?"#28a745":((t=e.theme)==null?void 0:t.textColor)||"#8b949e"}};
|
|
812
|
-
transform: translateY(-1px);
|
|
813
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
&:active {
|
|
817
|
-
transform: translateY(0);
|
|
818
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
svg {
|
|
822
|
-
width: 14px;
|
|
823
|
-
height: 14px;
|
|
824
|
-
flex-shrink: 0;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
span {
|
|
828
|
-
white-space: nowrap;
|
|
829
|
-
}
|
|
830
|
-
`,Mw=({attributes:e,language:t,children:r,styles:n,codeText:a,enablePrism:i=!1})=>{const c=Kt(null),[u,f]=St(!1),[d,m]=St(!1),g=mt(()=>{if(a)return a;const C=A=>typeof A=="string"?A:typeof A=="number"?String(A):A==null?"":Array.isArray(A)?A.map(C).join(""):typeof A=="object"&&A!==null?"text"in A?String(A.text||""):We.isValidElement(A)?A.props&&A.props.children?C(A.props.children):"":"textContent"in A?String(A.textContent||""):"":"";return C(r)},[r,a]),v=mt(()=>{if(!t)return;const C=t.toLowerCase();return C.startsWith("language-")?C.replace("language-",""):C},[t]);Qt(()=>{c.current&&g&&(c.current.textContent=g)},[g]);const w=async()=>{if(g)try{await navigator.clipboard.writeText(g),f(!0),m(!1),setTimeout(()=>{f(!1)},2e3)}catch(C){console.error("Failed to copy code:",C),m(!0),f(!1),setTimeout(()=>{m(!1)},2e3)}},x=mt(()=>(n==null?void 0:n.theme)||{},[n]);return i?q.jsxs(Nw,{...e,theme:x,children:[q.jsxs(Tw,{theme:x,children:[q.jsx("span",{children:v?v.toUpperCase():"CODE"}),q.jsx(Pw,{theme:x,$copied:u,$error:d,onClick:w,title:u?"\u5DF2\u590D\u5236":d?"\u590D\u5236\u5931\u8D25":"\u590D\u5236\u4EE3\u7801",children:d?q.jsxs(q.Fragment,{children:[q.jsx(Fw,{size:14}),q.jsx("span",{children:"\u5931\u8D25"})]}):u?q.jsxs(q.Fragment,{children:[q.jsx(gw,{size:14}),q.jsx("span",{children:"\u5DF2\u590D\u5236"})]}):q.jsxs(q.Fragment,{children:[q.jsx(Am,{size:14}),q.jsx("span",{children:"\u590D\u5236"})]})})]}),q.jsx($w,{theme:x,children:q.jsx("code",{ref:c,className:v?`language-${v}`:"",children:g})})]}):q.jsx(Ow,{...e,theme:x,children:q.jsx("code",{ref:c,children:g})})},Rw=e=>{var i,c,u,f,d,m,g,v;const{styles:t}=e,{element:r,children:n,attributes:a}=e;switch(r.type){case"paragraph":return q.jsx("div",{...a,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(i=t==null?void 0:t.text)==null?void 0:i.color} !important`,margin:"0 0 0.75rem 0"},children:n});case"heading-one":return q.jsx("h1",{...a,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 q.jsx("h2",{...a,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(u=t==null?void 0:t.text)==null?void 0:u.color} !important`},children:n});case"heading-three":return q.jsx("h3",{...a,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 q.jsx("ul",{...a,children:n});case"numbered-list":return q.jsx("ol",{...a,children:n});case"list-item":return q.jsx("li",{...a,children:n});case"table":return q.jsx("div",{className:"table-container",children:q.jsx("table",{...a,children:q.jsx("tbody",{children:n})})});case"table-row":return q.jsx("tr",{...a,children:n});case"table-cell":return r.header?q.jsx("th",{...a,children:n}):q.jsx("td",{...a,children:n});case"block-quote":return q.jsx("blockquote",{...a,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":const w=((m=r.children)==null?void 0:m.map(E=>E.text||"").join(""))||"",x=e&&typeof e.enablePrism=="boolean"?e.enablePrism:!1;return q.jsx(Mw,{attributes:a,language:r.language,styles:t,codeText:w,enablePrism:x,children:n});case"think":const C=e.extraProps||{},p=C.isCollapsed!==void 0?C.isCollapsed:Object.values(C)[1]===!0,A={...C,isCollapsed:p};return q.jsx(Zx,{attributes:a,styles:t,extraProps:A,children:n});case"template":return q.jsx(Dm,{...a,element:r,children:n,styles:t});case"latex-inline":return q.jsx(sw,{attributes:a,formula:r.formula,styles:t});case"latex-block":return q.jsx(fw,{attributes:a,formula:r.formula,styles:t});case"retrieve-sql-data":const B=(E=>{if(!E)return null;try{const T=typeof E=="string"?JSON.parse(E):E;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(T)?T[0]:T}}]}}catch(T){return console.error("Failed to parse databaseReference:",T),null}})(((g=e.extraProps)==null?void 0:g.databaseReference)||e.databaseReference);return q.jsx(km,{...a,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:B||void 0,tagIndex:1});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),q.jsx("img",{...a,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:E=>{const T=E.target;T.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}),q.jsx("iframe",{...a,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:E=>{const T=E.target;T.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return q.jsx("div",{...a,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(v=t==null?void 0:t.text)==null?void 0:v.color} !important`},children:n})}},zw=e=>{var c,u,f,d,m,g;const{attributes:t,children:r,leaf:n,styles:a}=e;(c=a==null?void 0:a.text)!=null&&c.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",a.text.color);let i=r;if(n.retrive){const v=n.fromtype==="0",w=n.fromtype==="1",x=n.fromtype==="2",C=n.fromtype==="10",p=n.text||"";let A=p,B="#e6f7ff",E="#1890ff",T="#bae7ff";return v?(A=`${p}`,B="#e6f7ff",E="#1890ff",T="#bae7ff"):w?(A=`${p}`,B="#f6ffed",E="#52c41a",T="#d9f7be"):x?(A=`${p}`,B="#E7F8FB",E="#10BBD9",T="#E7F8FB"):C&&(A=`${p}`,B="#e6f7ff",E="#1890ff",T="#bae7ff"),i=q.jsx("span",{...t,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:B,color:E,minWidth:24,height:24,borderRadius:4,padding:"0 6px",margin:"0 2px",fontWeight:600,fontSize:10,lineHeight:"20px",cursor:"pointer",verticalAlign:"middle",boxSizing:"border-box"},onClick:()=>{e.onRetriveTagClick&&e.onRetriveTagClick(n,t)},onMouseEnter:F=>F.currentTarget.style.background=T,onMouseLeave:F=>F.currentTarget.style.background=B,children:A}),i}if(n.code)i=q.jsx("code",{...t,style:{color:`${(u=a==null?void 0:a.text)==null?void 0:u.color} !important`},children:i});else{const v=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),w={color:`${(f=a==null?void 0:a.text)==null?void 0:f.color} !important`,fontSize:(d=a==null?void 0:a.text)==null?void 0:d.fontSize,lineHeight:(m=a==null?void 0:a.text)==null?void 0:m.lineHeight,letterSpacing:a==null?void 0:a.letterSpacing};i=q.jsx("span",{...t,className:v,style:w,children:i})}return n.link&&(i=q.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(g=a==null?void 0:a.text)==null?void 0:g.color} !important`},children:i})),i},Gl=qe.div.attrs({className:"unified-rich-text-container"})`
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
& > * + * {
|
|
834
|
-
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
/* 标题样式 */
|
|
838
|
-
& h1 {
|
|
839
|
-
font-size: ${e=>e.$size==="sm"?"20px":"32px"};
|
|
840
|
-
font-weight: 600;
|
|
841
|
-
margin: 24px 0 16px 0;
|
|
842
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
843
|
-
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
844
|
-
padding-bottom: 8px;
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
& h2 {
|
|
848
|
-
font-size: ${e=>e.$size==="sm"?"18px":"24px"};
|
|
849
|
-
font-weight: 600;
|
|
850
|
-
margin: 24px 0 16px 0;
|
|
851
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
852
|
-
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
853
|
-
padding-bottom: 6px;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
& h3 {
|
|
857
|
-
font-size: ${e=>e.$size==="sm"?"16px":"20px"};
|
|
858
|
-
font-weight: 600;
|
|
859
|
-
margin: 24px 0 16px 0;
|
|
860
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
/* 段落样式 */
|
|
864
|
-
& p {
|
|
865
|
-
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
866
|
-
margin: 16px 0;
|
|
867
|
-
line-height: 1.6;
|
|
868
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
/* 列表样式 - GitHub 风格简约设计 */
|
|
872
|
-
& ul, & ol {
|
|
873
|
-
margin: 16px 0;
|
|
874
|
-
padding-left: 24px;
|
|
875
|
-
line-height: 1.6;
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
& ul {
|
|
879
|
-
list-style-type: disc;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
& ol {
|
|
883
|
-
list-style-type: decimal;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
& li {
|
|
887
|
-
margin: 4px 0;
|
|
888
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
/* 嵌套列表 */
|
|
892
|
-
& ul ul, & ol ol, & ul ol, & ol ul {
|
|
893
|
-
margin: 8px 0;
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
/* 引用块样式 */
|
|
897
|
-
& blockquote {
|
|
898
|
-
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
899
|
-
border-left: 4px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
900
|
-
padding: 0 16px;
|
|
901
|
-
margin: 16px 0;
|
|
902
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
|
|
903
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
/* 行内代码样式 */
|
|
907
|
-
& code {
|
|
908
|
-
font-size: 0.875em;
|
|
909
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
910
|
-
padding: 0.125em 0.25em;
|
|
911
|
-
border-radius: 6px;
|
|
912
|
-
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
913
|
-
color: #d73a49;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
/* 代码块样式 */
|
|
917
|
-
& pre {
|
|
918
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
919
|
-
padding: 16px;
|
|
920
|
-
border-radius: 6px;
|
|
921
|
-
overflow-x: auto;
|
|
922
|
-
margin: 16px 0;
|
|
923
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
& pre code {
|
|
927
|
-
background-color: transparent;
|
|
928
|
-
padding: 0;
|
|
929
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
/* 表格容器样式 */
|
|
933
|
-
& .table-container {
|
|
934
|
-
overflow: auto;
|
|
935
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
936
|
-
border-radius: 6px;
|
|
937
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
938
|
-
margin: 16px 0;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
/* 表格样式 */
|
|
942
|
-
& .table-container table,
|
|
943
|
-
& table {
|
|
944
|
-
width: 100%;
|
|
945
|
-
border-collapse: collapse;
|
|
946
|
-
border: none;
|
|
947
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
948
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
& .table-container th,
|
|
952
|
-
& .table-container td,
|
|
953
|
-
& th, & td {
|
|
954
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
955
|
-
padding: 8px 12px;
|
|
956
|
-
text-align: left;
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
& .table-container th,
|
|
960
|
-
& th {
|
|
961
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
962
|
-
font-weight: 600;
|
|
963
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
& .table-container tr:nth-child(even) td,
|
|
967
|
-
& tr:nth-child(even) {
|
|
968
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
& .table-container td,
|
|
972
|
-
& td {
|
|
973
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
974
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
/* 图片样式 */
|
|
978
|
-
& img {
|
|
979
|
-
max-width: 100%;
|
|
980
|
-
height: auto;
|
|
981
|
-
border-radius: 6px;
|
|
982
|
-
margin: 16px 0;
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
/* 链接样式 */
|
|
986
|
-
& a {
|
|
987
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
|
|
988
|
-
text-decoration: none;
|
|
989
|
-
|
|
990
|
-
&:hover {
|
|
991
|
-
text-decoration: underline;
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
/* 文本样式 */
|
|
996
|
-
& strong {
|
|
997
|
-
font-weight: 600;
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
& em {
|
|
1001
|
-
font-style: italic;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
& u {
|
|
1005
|
-
text-decoration: underline;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
& s {
|
|
1009
|
-
text-decoration: line-through;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
/* 分割线样式 */
|
|
1013
|
-
& hr {
|
|
1014
|
-
border: none;
|
|
1015
|
-
border-top: 1px solid #d0d7de;
|
|
1016
|
-
margin: 24px 0;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
/* 思考容器样式 */
|
|
1020
|
-
& .think-container {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
& .think-header {
|
|
1026
|
-
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
& .think-icon {
|
|
1030
|
-
display: inline-flex;
|
|
1031
|
-
align-items: center;
|
|
1032
|
-
justify-content: center;
|
|
1033
|
-
|
|
1034
|
-
&.is-spinning {
|
|
1035
|
-
animation: rtext-think-spin 1s linear infinite;
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
@keyframes rtext-think-spin {
|
|
1040
|
-
from {
|
|
1041
|
-
transform: rotate(0deg);
|
|
1042
|
-
}
|
|
1043
|
-
to {
|
|
1044
|
-
transform: rotate(360deg);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
& .think-title {
|
|
1049
|
-
font-weight: 600;
|
|
1050
|
-
color: #24292f;
|
|
1051
|
-
font-size: 14px;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
& .think-text {
|
|
1055
|
-
color: #86909C;
|
|
1056
|
-
font-size: 14px;
|
|
1057
|
-
line-height: 1.6;
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
/* 召回标签样式 */
|
|
1061
|
-
& .retrive-tag {
|
|
1062
|
-
display: inline-block;
|
|
1063
|
-
background: #e6f7ff;
|
|
1064
|
-
color: #1890ff;
|
|
1065
|
-
border: 1px solid rgba(114, 187, 255, 0.3);
|
|
1066
|
-
border-radius: 6px;
|
|
1067
|
-
padding: 2px 6px;
|
|
1068
|
-
margin: 0 2px;
|
|
1069
|
-
font-weight: 500;
|
|
1070
|
-
font-size: 12px;
|
|
1071
|
-
line-height: 1.4;
|
|
1072
|
-
cursor: pointer;
|
|
1073
|
-
vertical-align: middle;
|
|
1074
|
-
transition: background-color 0.2s ease;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
& .retrive-tag:hover {
|
|
1078
|
-
background: #bae7ff;
|
|
1079
|
-
}
|
|
1080
|
-
`;function Bm(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?Bm([r])[0]:r)})}const qh="__rtext_escaped_dollar__";function cs(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return console.warn("Failed to decode LaTeX formula:",e,t),e}}function Iw(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jw(e){const t=new Map;let r=e||"";if(!r)return{content:r,placeholders:t};let n=0;r=r.replace(/\\\$/g,qh);const a=(u,f)=>{const d=`RTEXT_LATEX_PLACEHOLDER_${n++}_${u.toUpperCase()}`;return t.set(d,{type:u,formula:(f||"").trim()}),d},i=/\$\$([\s\S]+?)\$\$/g;r=r.replace(i,(u,f)=>a("block",f));const c=new RegExp("(?<!\\\\)\\$(?!\\$)([\\s\\S]+?)(?<!\\\\)\\$(?!\\$)","g");return r=r.replace(c,(u,f)=>a("inline",f)),r=r.replace(new RegExp(qh,"g"),"\\$"),{content:r,placeholders:t}}function Lw(e,t){if(!e||t.size===0)return e;let r=e;return t.forEach((n,a)=>{const i=n.type==="block"?"latex-block":"latex-inline",c=encodeURIComponent(n.formula),u=`<${i} data-formula="${c}"></${i}>`;r=r.replace(new RegExp(Iw(a),"g"),u)}),r}function Fm(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 g=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,v=d.match(g);return v?{thinkContent:v[1],content:v[2],finish:!0}:{thinkContent:"",content:d,finish:!0}}else{const g=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((m=d.match(g))==null?void 0:m[1])||"",content:""}}else return{thinkContent:"",content:d}}const{thinkContent:a,content:i,finish:c}=n(e||"");let u=[],f=0;if(!r.includes("think")&&a){const d=a.split(/\n+/).map(m=>m.trim()).filter(Boolean).flatMap(m=>{if(/<retrive-tag/i.test(m)){const g=document.createElement("div");return g.innerHTML=m,Hh(g,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:m}]}]});u.push({type:"think",id:`think-${f++}`,thinkContent:a,finish:c,children:d})}if(i){const{content:d,placeholders:m}=jw(i);let g=d;r.includes("retrive")||(g=g.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(x,C,p)=>`<retrive-tag${C?" "+C.trim():""}>${p}</retrive-tag>`)),r.includes("retrieve-sql-data")||(g=g.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(x,C)=>`<retrieve-sql-data id="${C}"></retrieve-sql-data>`)),sr.setOptions({gfm:!0,breaks:!0,pedantic:!1});const v=sr(g);let w=typeof v=="string"?v:"";if(w=Lw(w,m),console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:w.length,hasImgTags:w.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:w}),typeof v=="string"){const x=document.createElement("div");x.innerHTML=w,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:x.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(x.querySelectorAll("*")).map(p=>p.tagName),imgElements:Array.from(x.querySelectorAll("img")).map(p=>({src:p.src,alt:p.alt}))});const C=Hh(x,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:C.length,hasImageElements:C.some(p=>p.type==="image")}),C&&C.length>0&&(u=u.concat(C))}}return!u||u.length===0?[{type:"paragraph",children:[{text:""}]}]:Bm(u)}function Hh(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,a)=>(a.forEach(i=>{var c;if(i.nodeType===Node.ELEMENT_NODE){const u=i;switch(console.log("\u{1F50D} \u5904\u7406\u5143\u7D20\u8282\u70B9:",{tagName:u.tagName,isImg:u.tagName==="IMG",src:u.getAttribute("src"),basePath:t}),u.tagName.toLowerCase()){case"p":n.push({type:"paragraph",children:Hr(u,t)});break;case"h1":n.push({type:"heading-one",children:Hr(u,t)});break;case"h2":n.push({type:"heading-two",children:Hr(u,t)});break;case"h3":n.push({type:"heading-three",children:Hr(u,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(u.children).map(d=>({type:"list-item",children:Hr(d)}))});break;case"ol":const f={type:"numbered-list",children:Array.from(u.children).map(d=>({type:"list-item",children:Hr(d)}))};n.push(f);break;case"li":n.push({type:"list-item",children:Hr(u,t)});break;case"pre":{const d=u.querySelector("code");let m;if(d){const g=(d.getAttribute("class")||"").match(/language-(\w+)/);g&&(m=g[1]),n.push({type:"code-block",language:m,children:Hr(d)})}else n.push({type:"code-block",language:m,children:Hr(u,t)});break}case"code":{u.closest("pre")||n.push({type:"paragraph",children:Hr(u,t)});break}case"retrive-tag":{const d=Hr(u,t);d.length>0&&n.push({type:"paragraph",children:d});break}case"retrieve-sql-data":{const d=u.getAttribute("id")||"";n.push({type:"retrieve-sql-data",id:d,children:[{text:""}]});break}case"blockquote":n.push({type:"block-quote",children:Hr(u,t)});break;case"table":n.push(_w(u));break;case"img":{const d=u.getAttribute("src")||"",m=u.getAttribute("alt")||"";let g=d;if(t)if(d.startsWith("./"))g=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const v=t.substring(0,t.lastIndexOf("/"));g=d.replace(/^\.\.\//,v+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(g=`${t}/${d}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:g}),n.push({type:"image",url:g,alt:m,children:[{text:""}]});break}case"iframe":{const d=u.getAttribute("src")||"",m=u.getAttribute("width")||"100%",g=u.getAttribute("height")||"400",v=u.getAttribute("frameborder")||"0",w=u.getAttribute("title")||"";let x=d;if(t)if(d.startsWith("./"))x=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));x=d.replace(/^\.\.\//,C+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(x=`${t}/${d}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:x}),n.push({type:"iframe",src:x,width:m,height:g,frameborder:v,title:w,children:[{text:""}]});break}case"latex-inline":{const d=cs(u.getAttribute("data-formula"));n.push({type:"latex-inline",formula:d,children:[{text:""}]});break}case"latex-block":{const d=cs(u.getAttribute("data-formula"));n.push({type:"latex-block",formula:d,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:Hr(u)});break;default:n.push({type:"paragraph",children:Hr(u,t)});break}}else i.nodeType===Node.TEXT_NODE&&((c=i.textContent)!=null&&c.trim())&&n.push({type:"paragraph",children:[{text:i.textContent}]})}),n))(r,e.childNodes),r}function Hr(e,t){const r=[];function n(i){const c=[];let u="",f=!1,d=!1,m=0;for(;m<i.length;)i.startsWith("**",m)?(u&&(c.push({text:u,code:!0,bold:f,italic:d}),u=""),f=!f,m+=2):i.startsWith("*",m)?(u&&(c.push({text:u,code:!0,bold:f,italic:d}),u=""),d=!d,m+=1):(u+=i[m],m+=1);return u&&c.push({text:u,code:!0,bold:f,italic:d}),c}function a(i,c={}){var u,f;if(i.nodeType===Node.TEXT_NODE){const d=(u=i.textContent)==null?void 0:u.trim();return d?c.code?n(d):[{text:d,...c}]:[]}if(i.nodeType===Node.ELEMENT_NODE){const d=i,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"br":return[{text:`
|
|
1081
|
-
`,...m}];case"retrive-tag":{const v={};for(const{name:C,value:p}of Array.from(d.attributes))v[C]=p;const w=d.textContent||""||"[0]",x=v.fromtype||v.fromType||"";return[{text:w,retrive:!0,...v,fromtype:x}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:d.getAttribute("id")||"",children:[{text:""}]}];case"img":{const v=d.getAttribute("src")||"",w=d.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:v,alt:w,basePath:t});let x=v;if(t)if(v.startsWith("./"))x=v.replace(/^\.\//,t+"/");else if(v.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));x=v.replace(/^\.\.\//,C+"/")}else!v.startsWith("/")&&!v.startsWith("http")&&(x=`${t}/${v}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:v,processedSrc:x}),[{type:"image",url:x,alt:w,children:[{text:""}]}]}case"iframe":{const v=d.getAttribute("src")||"",w=d.getAttribute("width")||"100%",x=d.getAttribute("height")||"400",C=d.getAttribute("frameborder")||"0",p=d.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:v,width:w,height:x,basePath:t});let A=v;if(t)if(v.startsWith("./"))A=v.replace(/^\.\//,t+"/");else if(v.startsWith("../")){const B=t.substring(0,t.lastIndexOf("/"));A=v.replace(/^\.\.\//,B+"/")}else!v.startsWith("/")&&!v.startsWith("http")&&(A=`${t}/${v}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:v,processedSrc:A}),[{type:"iframe",src:A,width:w,height:x,frameborder:C,title:p,children:[{text:""}]}]}case"latex-inline":return[{type:"latex-inline",formula:cs(d.getAttribute("data-formula")),children:[{text:""}]}];case"latex-block":return[{type:"latex-block",formula:cs(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 g=[];for(const v of Array.from(d.childNodes))g=g.concat(a(v,m));return g}return[]}for(const i of Array.from(e.childNodes))r.push(...a(i));return r}function _w(e){const t=[],r=e.querySelector("thead"),n=e.querySelector("tbody");if(!r&&!n){const a=Array.from(e.querySelectorAll("tr"));a.length>0&&(t.push({type:"table-row",children:Array.from(a[0].children).map(i=>({type:"table-cell",header:!0,children:Hr(i)}))}),a.slice(1).forEach(i=>{t.push({type:"table-row",children:Array.from(i.children).map(c=>({type:"table-cell",header:!1,children:Hr(c)}))})}))}else{if(r){const a=r.querySelector("tr");a&&t.push({type:"table-row",children:Array.from(a.querySelectorAll("th")).map(i=>({type:"table-cell",header:!0,children:Hr(i)}))})}n&&Array.from(n.querySelectorAll("tr")).forEach(a=>{t.push({type:"table-row",children:Array.from(a.querySelectorAll("td")).map(i=>({type:"table-cell",header:!1,children:Hr(i)}))})})}return{type:"table",children:t}}const qw=qe.div.attrs({className:"unified-rich-text-container"})`
|
|
1082
|
-
border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
|
|
1083
|
-
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
|
|
1084
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1085
|
-
min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
|
|
1086
|
-
overflow: hidden;
|
|
1087
|
-
transition: all 0.2s ease-in-out;
|
|
1088
|
-
padding-top: 14px;
|
|
1089
|
-
${e=>{var t,r;return e.$isEditing&&`
|
|
1090
|
-
&:focus-within {
|
|
1091
|
-
border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
|
|
1092
|
-
box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
|
|
1093
|
-
}
|
|
1094
|
-
`}}
|
|
1095
|
-
`,Yl=qe.div.attrs({className:"unified-rich-text-editable-container"})`
|
|
1096
|
-
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
|
|
1097
|
-
min-height: inherit;
|
|
1098
|
-
outline: none;
|
|
1099
|
-
|
|
1100
|
-
& > * + * {
|
|
1101
|
-
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
1102
|
-
}
|
|
1103
|
-
`,Kh=(e,t)=>t<0?e:`${e.slice(0,t)}\\${e.slice(t)}`,Wh=(e,t)=>{if(!e)return-1;const r=t.length;let n=-1;for(let a=0;a<e.length;a++){if(e[a]==="\\"){a+=1;continue}if(r===2){if(e.startsWith("$$",a)){n===-1?n=a:n=-1,a+=1;continue}}else if(r===1&&e[a]==="$"){if(e[a+1]==="$"){a+=1;continue}n===-1?n=a:n=-1}}return n},Hw=e=>{const t=e||"";if(!t)return{content:"",hasPendingLatex:!1};let r=t,n=!1;const a=[],i=Wh(t,"$$");i!==-1&&(r=Kh(r,i),a.push(i),n=!0);const c=Wh(t,"$");if(c!==-1){const u=a.filter(f=>f<=c).length;r=Kh(r,c+u),n=!0}return{content:r,hasPendingLatex:n}};var Qo=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(Qo||{});const Bs=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:a="sm",theme:i={},onChange:c,onFocus:u,onBlur:f,renderElement:d,renderLeaf:m,onRetriveTagClick:g,eventsEmit:v,onEditorReady:w,extraProps:x={},className:C,style:p,styles:A,enableTemplateInput:B=!1,disabledTags:E=[],enablePrism:T=!1,enableTemplateAutocomplete:F=!1})=>{const P=ds(),S=mt(()=>{var oe,ue,le,Se,Fe,me,we,De,Te;return{primaryColor:((oe=P==null?void 0:P.colors)==null?void 0:oe.primary)||(i==null?void 0:i.primaryColor)||"#007bff",secondaryColor:((ue=P==null?void 0:P.colors)==null?void 0:ue.secondary)||(i==null?void 0:i.secondaryColor)||"#6c757d",backgroundColor:((le=P==null?void 0:P.colors)==null?void 0:le.background)||(i==null?void 0:i.backgroundColor)||"transparent",textColor:((Se=P==null?void 0:P.colors)==null?void 0:Se.text)||(i==null?void 0:i.textColor)||"#24292f",borderColor:((Fe=P==null?void 0:P.colors)==null?void 0:Fe.border)||(i==null?void 0:i.borderColor)||"#dee2e6",disabledBackground:((me=P==null?void 0:P.colors)==null?void 0:me.disabledBackground)||(i==null?void 0:i.disabledBackground)||"#f8f9fa",hoverBackground:(i==null?void 0:i.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((we=P==null?void 0:P.space)==null?void 0:we.radius)||(i==null?void 0:i.borderRadius)||"4px",padding:((De=P==null?void 0:P.space)==null?void 0:De.padding)||(i==null?void 0:i.padding)||"0rem 1rem",margin:((Te=P==null?void 0:P.space)==null?void 0:Te.margin)||(i==null?void 0:i.margin)||"0.5rem",minHeight:(i==null?void 0:i.minHeight)||"200px",baseFontSize:(i==null?void 0:i.baseFontSize)||(a==="md"?14:12),...i}},[P,i,a]),L=Kt();if(!L.current){const oe=Z7(),ue=cy(oe),{isInline:le}=ue;ue.isInline=me=>!E.includes("template")&&me.type==="template"?!0:le(me);const{isVoid:Se}=ue;ue.isVoid=me=>!E.includes("template")&&me.type==="template"?!0:Se(me);const Fe=me=>{if(!(B&&!E.includes("template")))return me;const{insertText:we,insertData:De}=me,Te=()=>{const be=/<template\b[^>]*>([\s\S]*?)<\/template>/g,Ae=Array.from(R.nodes(me,{match:Le=>ht.isText(Le)&&be.test(Le.text)}));if(Ae.length!==0)for(const Le of Ae){const[ut,ot]=Le,Oe=ut.text||"",Ie=[];let Ge=0,dt;for(be.lastIndex=0;(dt=be.exec(Oe))!==null;){if(dt.index>Ge){const Je=Oe.slice(Ge,dt.index);Je&&Ie.push({text:Je})}Ie.push({type:"template",placeholder:(dt[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),Ge=dt.index+dt[0].length}if(Ge<Oe.length){const Je=Oe.slice(Ge);Je&&Ie.push({text:Je})}Ke.removeNodes(me,{at:ot}),Ke.insertNodes(me,Ie,{at:ot})}};return me.insertText=be=>{we(be),Te()},me.insertData=be=>{const Ae=be.getData("text/plain");if(Ae&&/<template\b[\s\S]*?<\/template>/.test(Ae)){we(Ae),Te();return}return De(be)},me};L.current=Fe(ue)}const O=L.current;Qt(()=>{O&&w&&t&&w(O)},[O,w,t]);const[W,j]=St(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]);Kt(null);const[Y,Z]=St(0);Qt(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const oe=e.content||[{type:"paragraph",children:[{text:""}]}];if(console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",oe),oe===W)return;j(oe),Z(ue=>ue+1)}},[e.type,e.content,W]);const _=Kt(void 0),H=mt(()=>{if(e.type!=="markdown")return{content:"",hasPendingLatex:!1};const oe=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");return Hw(oe)},[e.type,e.content]);Qt(()=>{if(e.type!=="markdown")return;const oe=H.content;_.current!==oe&&(_.current=oe,Z(ue=>ue+1))},[e.type,H.content]);const V=mt(()=>e.type!=="markdown"?x:{...x||{},hasPendingLatex:H.hasPendingLatex},[x,e.type,H.hasPendingLatex]),G=Kt("");Qt(()=>{if(e.type!=="markdown")return;const oe=JSON.stringify(V||{});oe!==G.current&&(G.current=oe,Z(ue=>ue+1))},[V,e.type]);const te=Tt(oe=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",oe),oe&&Array.isArray(oe)?(j(oe),c==null||c(oe,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",oe)},[c]),K=mt(()=>{const oe=S==null?void 0:S.baseFontSize;return typeof oe=="number"&&!Number.isNaN(oe)?oe:a==="md"?14:12},[S,a]),X=typeof T=="boolean"?T:!1,ye=Tt(oe=>{const ue={...oe,size:a,styles:A,eventsEmit:v,extraProps:V,enablePrism:X};return d?d(ue):Rw(ue)},[d,a,A,v,V,X]),xe=Tt(oe=>{const ue={...oe,styles:A,onRetriveTagClick:g};return m?m(ue):zw(ue)},[m,A,g]);Qt(()=>(window.copyCodeFromData=oe=>{const ue=oe.getAttribute("data-code");if(!ue){console.error("No code content found");return}const le=ue.replace(/\\n/g,`
|
|
1104
|
-
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(le).then(()=>{const Se=oe.innerHTML;oe.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>',oe.classList.add("copied"),setTimeout(()=>{oe.innerHTML=Se,oe.classList.remove("copied")},2e3)}).catch(Se=>{console.error("\u590D\u5236\u5931\u8D25:",Se);const Fe=oe.innerHTML;oe.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>',oe.style.background="#d73a49",oe.style.borderColor="#d73a49",oe.style.color="white",setTimeout(()=>{oe.innerHTML=Fe,oe.style.background="",oe.style.borderColor="",oe.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const ke=mt(()=>{var oe,ue;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(oe=H.content)==null?void 0:oe.length,basePath:n,hasImages:(ue=H.content)==null?void 0:ue.includes("![")});const le=Fm(H.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:le.length,hasImageElements:le.some(Te=>Te.type==="image"),imageElements:le.filter(Te=>Te.type==="image")}),le&&le.length>0)return q.jsx(Gl,{theme:S,$size:a,children:q.jsx(Il,{editor:O,initialValue:le,onChange:()=>{},children:q.jsx(Yl,{theme:S,children:q.jsx(zl,{renderElement:ye,renderLeaf:xe,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${K}px`}})})},Y)});const Se={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let Fe=sr(H.content||"",Se);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,(Te,be,Ae)=>{let Le;const ut=be.match(/class=["']([^"']+)["']/);if(ut){const Ie=ut[1].match(/language-(\w+)/);Ie&&(Le=Ie[1])}let ot=Ae;if(Le&&Kl.languages[Le])try{ot=Kl.highlight(Ae,Kl.languages[Le],Le)}catch(Ie){console.warn("Failed to highlight code:",Ie),ot=Ae}const Oe=Ae.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<div class="code-block-wrapper">${Le?`<div class="code-block-language">${Le}</div>`:""}<pre><code${be}>${ot}</code><button class="code-copy-btn" data-code="${Oe}" 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></div>`});const me=(S==null?void 0:S.disabledBackground)||(S==null?void 0:S.backgroundColor)||"#ffffff",we=(Te,be)=>Te.startsWith("#")?`${Te}${Math.round(be*255).toString(16).padStart(2,"0")}`:Te,De=`
|
|
1105
|
-
<style>
|
|
1106
|
-
.table-container{ overflow:auto; border:1px solid ${(S==null?void 0:S.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(S==null?void 0:S.backgroundColor)||"transparent"} !important; }
|
|
1107
|
-
.table-container table{ background:${(S==null?void 0:S.backgroundColor)||"transparent"} !important; color:${(S==null?void 0:S.textColor)||"#24292f"} !important; }
|
|
1108
|
-
.table-container th{ background:${(S==null?void 0:S.disabledBackground)||"#f6f8fa"} !important; color:${(S==null?void 0:S.textColor)||"#24292f"} !important; }
|
|
1109
|
-
.table-container td{ color:${(S==null?void 0:S.textColor)||"#24292f"} !important; background:${(S==null?void 0:S.backgroundColor)||"transparent"} !important; }
|
|
1110
|
-
.table-container tr:nth-child(even) td{ background:${(S==null?void 0:S.disabledBackground)||"#f6f8fa"} !important; }
|
|
1111
|
-
.code-block-wrapper{ position:relative; margin:16px 0; border-radius:6px; overflow:hidden; border:1px solid ${(S==null?void 0:S.borderColor)||"#d0d7de"}; background:${me}; }
|
|
1112
|
-
.code-block-language{ display:flex; align-items:center; justify-content:space-between; padding:8px 12px; background:${(S==null?void 0:S.disabledBackground)||"#f6f8fa"}; border-bottom:1px solid ${(S==null?void 0:S.borderColor)||"#d0d7de"}; font-size:12px; color:${(S==null?void 0:S.textColor)||"#656d76"}; font-weight:500; }
|
|
1113
|
-
.code-block-wrapper pre{ position:relative; margin:0; padding:16px; overflow-x:auto; background:${me}; border:none; border-radius:0; color:${(S==null?void 0:S.textColor)||"#24292f"}; font-family:'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size:13px; line-height:1.6; }
|
|
1114
|
-
.code-block-wrapper pre code{ background:transparent; padding:0; color:inherit; font-size:inherit; font-family:inherit; }
|
|
1115
|
-
.code-block-wrapper pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(S==null?void 0:S.borderColor)||"#e5e7eb"}; color:${(S==null?void 0:S.textColor)||"#24292f"}; border-radius:4px; padding:4px 8px; cursor:pointer; font-size:12px; transition:all 0.2s ease; }
|
|
1116
|
-
.code-block-wrapper pre .code-copy-btn:hover{ background:${(S==null?void 0:S.hoverBackground)||"rgba(0,0,0,0.06)"}; }
|
|
1117
|
-
.code-block-wrapper pre .code-copy-btn.copied{ background:#2da44e; border-color:#2da44e; color:#ffffff; }
|
|
1118
|
-
</style>
|
|
1119
|
-
`;return q.jsx("div",{style:{padding:(S==null?void 0:S.padding)||"1rem",fontSize:`${K}px`,lineHeight:1.6,color:(S==null?void 0:S.textColor)||"#24292f"},"data-pending-latex":H.hasPendingLatex||void 0,dangerouslySetInnerHTML:{__html:De+Fe}})}catch(le){return console.error("Markdown parsing error:",le),q.jsx("div",{children:e.content})}},[e,S,O,Y,ye,xe,K,H]),Be=mt(()=>e.type!=="html"?null:q.jsx("div",{style:{padding:(S==null?void 0:S.padding)||"1rem",fontSize:`${K}px`,lineHeight:1.6,color:(S==null?void 0:S.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,S,K]),_e=mt(()=>e.type!=="text"?null:q.jsx("div",{style:{padding:(S==null?void 0:S.padding)||"1rem",fontSize:`${K}px`,lineHeight:1.6,color:(S==null?void 0:S.textColor)||"#24292f"},children:q.jsx("span",{children:e.content||""})}),[e,S,K]),Q=()=>{switch(e.type){case"markdown":return ke;case"html":return Be;case"text":return _e;case"slate":default:return t?q.jsx(Gl,{theme:S,$size:a,children:q.jsx(Il,{editor:O,initialValue:W,onChange:te,children:q.jsx(Yl,{theme:S,children:q.jsx(zl,{renderElement:ye,renderLeaf:xe,placeholder:r,readOnly:!1,onFocus:u,onBlur:f,onKeyDown:oe=>{if(!F||oe.key!=="Tab"||!O.selection||!Ne.isCollapsed(O.selection))return;const{focus:ue}=O.selection,le=R.before(O,ue,{unit:"character",distance:2});if(!le)return;const Se=R.range(O,le,ue);R.string(O,Se)==="<t"&&(oe.preventDefault(),Ke.delete(O,{at:Se}),Ke.insertText(O,"<template "))},style:{minHeight:"inherit",outline:"none",fontSize:`${K}px`}})})},Y)}):q.jsx(Gl,{theme:S,$size:a,children:q.jsx(Il,{editor:O,initialValue:W,onChange:()=>{},children:q.jsx(Yl,{theme:S,children:q.jsx(zl,{renderElement:ye,renderLeaf:xe,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${K}px`}})})},Y)})}};return q.jsx(qw,{theme:S,$isEditing:t,className:C,style:p,children:Q()})};var W0={exports:{}},Kw=W0.exports,Vh;function Ww(){return Vh||(Vh=1,(function(e,t){(function(r,n){e.exports=n()})(Kw,(function(){var r=1e3,n=6e4,a=36e5,i="millisecond",c="second",u="minute",f="hour",d="day",m="week",g="month",v="quarter",w="year",x="date",C="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,B={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(_){var H=["th","st","nd","rd"],V=_%100;return"["+_+(H[(V-20)%10]||H[V]||H[0])+"]"}},E=function(_,H,V){var G=String(_);return!G||G.length>=H?_:""+Array(H+1-G.length).join(V)+_},T={s:E,z:function(_){var H=-_.utcOffset(),V=Math.abs(H),G=Math.floor(V/60),te=V%60;return(H<=0?"+":"-")+E(G,2,"0")+":"+E(te,2,"0")},m:function _(H,V){if(H.date()<V.date())return-_(V,H);var G=12*(V.year()-H.year())+(V.month()-H.month()),te=H.clone().add(G,g),K=V-te<0,X=H.clone().add(G+(K?-1:1),g);return+(-(G+(V-te)/(K?te-X:X-te))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:g,y:w,w:m,d,D:x,h:f,m:u,s:c,ms:i,Q:v}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},F="en",P={};P[F]=B;var S="$isDayjsObject",L=function(_){return _ instanceof Y||!(!_||!_[S])},O=function _(H,V,G){var te;if(!H)return F;if(typeof H=="string"){var K=H.toLowerCase();P[K]&&(te=K),V&&(P[K]=V,te=K);var X=H.split("-");if(!te&&X.length>1)return _(X[0])}else{var ye=H.name;P[ye]=H,te=ye}return!G&&te&&(F=te),te||!G&&F},W=function(_,H){if(L(_))return _.clone();var V=typeof H=="object"?H:{};return V.date=_,V.args=arguments,new Y(V)},j=T;j.l=O,j.i=L,j.w=function(_,H){return W(_,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var Y=(function(){function _(V){this.$L=O(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[S]=!0}var H=_.prototype;return H.parse=function(V){this.$d=(function(G){var te=G.date,K=G.utc;if(te===null)return new Date(NaN);if(j.u(te))return new Date;if(te instanceof Date)return new Date(te);if(typeof te=="string"&&!/Z$/i.test(te)){var X=te.match(p);if(X){var ye=X[2]-1||0,xe=(X[7]||"0").substring(0,3);return K?new Date(Date.UTC(X[1],ye,X[3]||1,X[4]||0,X[5]||0,X[6]||0,xe)):new Date(X[1],ye,X[3]||1,X[4]||0,X[5]||0,X[6]||0,xe)}}return new Date(te)})(V),this.init()},H.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},H.$utils=function(){return j},H.isValid=function(){return this.$d.toString()!==C},H.isSame=function(V,G){var te=W(V);return this.startOf(G)<=te&&te<=this.endOf(G)},H.isAfter=function(V,G){return W(V)<this.startOf(G)},H.isBefore=function(V,G){return this.endOf(G)<W(V)},H.$g=function(V,G,te){return j.u(V)?this[G]:this.set(te,V)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(V,G){var te=this,K=!!j.u(G)||G,X=j.p(V),ye=function(le,Se){var Fe=j.w(te.$u?Date.UTC(te.$y,Se,le):new Date(te.$y,Se,le),te);return K?Fe:Fe.endOf(d)},xe=function(le,Se){return j.w(te.toDate()[le].apply(te.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(Se)),te)},ke=this.$W,Be=this.$M,_e=this.$D,Q="set"+(this.$u?"UTC":"");switch(X){case w:return K?ye(1,0):ye(31,11);case g:return K?ye(1,Be):ye(0,Be+1);case m:var oe=this.$locale().weekStart||0,ue=(ke<oe?ke+7:ke)-oe;return ye(K?_e-ue:_e+(6-ue),Be);case d:case x:return xe(Q+"Hours",0);case f:return xe(Q+"Minutes",1);case u:return xe(Q+"Seconds",2);case c:return xe(Q+"Milliseconds",3);default:return this.clone()}},H.endOf=function(V){return this.startOf(V,!1)},H.$set=function(V,G){var te,K=j.p(V),X="set"+(this.$u?"UTC":""),ye=(te={},te[d]=X+"Date",te[x]=X+"Date",te[g]=X+"Month",te[w]=X+"FullYear",te[f]=X+"Hours",te[u]=X+"Minutes",te[c]=X+"Seconds",te[i]=X+"Milliseconds",te)[K],xe=K===d?this.$D+(G-this.$W):G;if(K===g||K===w){var ke=this.clone().set(x,1);ke.$d[ye](xe),ke.init(),this.$d=ke.set(x,Math.min(this.$D,ke.daysInMonth())).$d}else ye&&this.$d[ye](xe);return this.init(),this},H.set=function(V,G){return this.clone().$set(V,G)},H.get=function(V){return this[j.p(V)]()},H.add=function(V,G){var te,K=this;V=Number(V);var X=j.p(G),ye=function(Be){var _e=W(K);return j.w(_e.date(_e.date()+Math.round(Be*V)),K)};if(X===g)return this.set(g,this.$M+V);if(X===w)return this.set(w,this.$y+V);if(X===d)return ye(1);if(X===m)return ye(7);var xe=(te={},te[u]=n,te[f]=a,te[c]=r,te)[X]||1,ke=this.$d.getTime()+V*xe;return j.w(ke,this)},H.subtract=function(V,G){return this.add(-1*V,G)},H.format=function(V){var G=this,te=this.$locale();if(!this.isValid())return te.invalidDate||C;var K=V||"YYYY-MM-DDTHH:mm:ssZ",X=j.z(this),ye=this.$H,xe=this.$m,ke=this.$M,Be=te.weekdays,_e=te.months,Q=te.meridiem,oe=function(Se,Fe,me,we){return Se&&(Se[Fe]||Se(G,K))||me[Fe].slice(0,we)},ue=function(Se){return j.s(ye%12||12,Se,"0")},le=Q||function(Se,Fe,me){var we=Se<12?"AM":"PM";return me?we.toLowerCase():we};return K.replace(A,(function(Se,Fe){return Fe||(function(me){switch(me){case"YY":return String(G.$y).slice(-2);case"YYYY":return j.s(G.$y,4,"0");case"M":return ke+1;case"MM":return j.s(ke+1,2,"0");case"MMM":return oe(te.monthsShort,ke,_e,3);case"MMMM":return oe(_e,ke);case"D":return G.$D;case"DD":return j.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return oe(te.weekdaysMin,G.$W,Be,2);case"ddd":return oe(te.weekdaysShort,G.$W,Be,3);case"dddd":return Be[G.$W];case"H":return String(ye);case"HH":return j.s(ye,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return le(ye,xe,!0);case"A":return le(ye,xe,!1);case"m":return String(xe);case"mm":return j.s(xe,2,"0");case"s":return String(G.$s);case"ss":return j.s(G.$s,2,"0");case"SSS":return j.s(G.$ms,3,"0");case"Z":return X}return null})(Se)||X.replace(":","")}))},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(V,G,te){var K,X=this,ye=j.p(G),xe=W(V),ke=(xe.utcOffset()-this.utcOffset())*n,Be=this-xe,_e=function(){return j.m(X,xe)};switch(ye){case w:K=_e()/12;break;case g:K=_e();break;case v:K=_e()/3;break;case m:K=(Be-ke)/6048e5;break;case d:K=(Be-ke)/864e5;break;case f:K=Be/a;break;case u:K=Be/n;break;case c:K=Be/r;break;default:K=Be}return te?K:j.a(K)},H.daysInMonth=function(){return this.endOf(g).$D},H.$locale=function(){return P[this.$L]},H.locale=function(V,G){if(!V)return this.$L;var te=this.clone(),K=O(V,G,!0);return K&&(te.$L=K),te},H.clone=function(){return j.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},_})(),Z=Y.prototype;return W.prototype=Z,[["$ms",i],["$s",c],["$m",u],["$H",f],["$W",d],["$M",g],["$y",w],["$D",x]].forEach((function(_){Z[_[1]]=function(H){return this.$g(H,_[0],_[1])}})),W.extend=function(_,H){return _.$i||(_(H,Y,W),_.$i=!0),W},W.locale=O,W.isDayjs=L,W.unix=function(_){return W(1e3*_)},W.en=P[F],W.Ls=P,W.p={},W}))})(W0)),W0.exports}var Vw=Ww();const Uw=ai(Vw),Zl=({src:e,index:t,token:r,url:n,eventsEmit:a,...i})=>{const[c,u]=St(""),f=async g=>{try{const v=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify({convertedFilePath:g})});if(!v.ok)throw new Error(`Fetch failed: ${v.status}`);return{data:await v.arrayBuffer()}}catch{return null}},d=async g=>{const v=await f(g);if(!v)return;const w=new Blob([v.data]);return window.URL.createObjectURL(w)},m=async g=>{const v=await d(g);u(v||"")};return Qt(()=>{try{if(!r||!n){u(e);return}m(e)}catch{u(e)}},[e]),q.jsx(q.Fragment,{children:c&&q.jsx(D1,{src:c,...i,preview:!1,onClick:()=>a&&a("imageClick",c)},t||1)})},Gw=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("g",{clipPath:"url(#clip0_5260_38039)"},N.createElement("path",{d:"M8.00004 14.6668C11.6819 14.6668 14.6667 11.6821 14.6667 8.00016C14.6667 4.31826 11.6819 1.3335 8.00004 1.3335C4.31814 1.3335 1.33337 4.31826 1.33337 8.00016C1.33337 11.6821 4.31814 14.6668 8.00004 14.6668Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M6 7.99984L7.33333 9.33317L10 6.6665",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),N.createElement("defs",null,N.createElement("clipPath",{id:"clip0_5260_38039"},N.createElement("rect",{width:16,height:16,fill:"white"})))),Yw=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M14.4867 12L9.15333 2.66665C9.03704 2.46146 8.8684 2.29078 8.66462 2.17203C8.46083 2.05329 8.22919 1.99072 7.99333 1.99072C7.75747 1.99072 7.52584 2.05329 7.32205 2.17203C7.11826 2.29078 6.94962 2.46146 6.83333 2.66665L1.5 12C1.38245 12.2036 1.32082 12.4346 1.32134 12.6697C1.32186 12.9047 1.38452 13.1355 1.50296 13.3385C1.62141 13.5416 1.79143 13.7097 1.9958 13.8259C2.20016 13.942 2.4316 14.0021 2.66667 14H13.3333C13.5673 13.9997 13.797 13.938 13.9995 13.8208C14.202 13.7037 14.3701 13.5354 14.487 13.3327C14.6039 13.1301 14.6654 12.9002 14.6653 12.6663C14.6652 12.4324 14.6036 12.2026 14.4867 12Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M8 6V8.66667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M8 11.3335H8.00667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),Uh=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("path",{d:"M14 7.99981C13.9999 9.26686 13.5988 10.5014 12.854 11.5264C12.1092 12.5515 11.059 13.3144 9.85392 13.7059C8.64886 14.0974 7.3508 14.0974 6.14576 13.7058C4.94073 13.3142 3.89059 12.5512 3.14584 11.5261C2.4011 10.5011 1.99999 9.26653 2 7.99947C2.00001 6.73241 2.40114 5.49788 3.14589 4.47281C3.89065 3.44773 4.9408 2.68474 6.14584 2.29319C7.35088 1.90164 8.64895 1.90162 9.854 2.29314",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),Zw=e=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},N.createElement("g",{clipPath:"url(#clip0_5260_38091)"},N.createElement("path",{d:"M7.99998 14.6668C11.6819 14.6668 14.6666 11.6821 14.6666 8.00016C14.6666 4.31826 11.6819 1.3335 7.99998 1.3335C4.31808 1.3335 1.33331 4.31826 1.33331 8.00016C1.33331 11.6821 4.31808 14.6668 7.99998 14.6668Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M10 6L6 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("path",{d:"M6 6L10 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),N.createElement("defs",null,N.createElement("clipPath",{id:"clip0_5260_38091"},N.createElement("rect",{width:16,height:16,fill:"white"})))),Xw=qe.div.attrs({className:"thought-chain-section-wrapper"})`
|
|
1120
|
-
padding: 12px 0 8px 0;
|
|
1121
|
-
`,Qw=qe.div.attrs({className:"thought-chain-section-title-row"})`
|
|
1122
|
-
display: flex;
|
|
1123
|
-
align-items: center;
|
|
1124
|
-
gap: 8px;
|
|
1125
|
-
margin-bottom: 8px;
|
|
1126
|
-
padding-left: 20px;
|
|
1127
|
-
`,Jw=Cm`
|
|
1128
|
-
from {
|
|
1129
|
-
transform: rotate(0deg);
|
|
1130
|
-
}
|
|
1131
|
-
to {
|
|
1132
|
-
transform: rotate(360deg);
|
|
1133
|
-
}
|
|
1134
|
-
`,eC=qe.div.attrs({className:"thought-chain-section-icon"})`
|
|
1135
|
-
width: 16px;
|
|
1136
|
-
height: 16px;
|
|
1137
|
-
flex-shrink: 0;
|
|
1138
|
-
display: flex;
|
|
1139
|
-
align-items: center;
|
|
1140
|
-
justify-content: center;
|
|
1141
|
-
|
|
1142
|
-
svg {
|
|
1143
|
-
width: 100%;
|
|
1144
|
-
height: 100%;
|
|
1145
|
-
${({$isRotating:e})=>e?As`
|
|
1146
|
-
animation: ${Jw} 2s linear infinite;
|
|
1147
|
-
`:""}
|
|
1148
|
-
}
|
|
1149
|
-
`,tC=qe.div.attrs({className:"thought-chain-section-title"})`
|
|
1150
|
-
font-size: 14px;
|
|
1151
|
-
font-weight: 600;
|
|
1152
|
-
color: #111827;
|
|
1153
|
-
display: flex;
|
|
1154
|
-
align-items: center;
|
|
1155
|
-
gap: 6px;
|
|
1156
|
-
`,rC=qe.span.attrs({className:"thought-chain-section-time"})`
|
|
1157
|
-
font-size: 12px;
|
|
1158
|
-
font-weight: 400;
|
|
1159
|
-
color: #6b7280;
|
|
1160
|
-
`,nC=qe.span.attrs({className:"thought-chain-node-step-time"})`
|
|
1161
|
-
font-size: 12px;
|
|
1162
|
-
font-weight: 400;
|
|
1163
|
-
color: #6b7280;
|
|
1164
|
-
flex-shrink: 0;
|
|
1165
|
-
align-self: flex-start;
|
|
1166
|
-
padding-top: 2px;
|
|
1167
|
-
`,aC=qe.div.attrs({className:"thought-chain-vertical-line"})`
|
|
1168
|
-
position: absolute;
|
|
1169
|
-
left: 10px;
|
|
1170
|
-
top: 0;
|
|
1171
|
-
bottom: 0;
|
|
1172
|
-
width: 2px;
|
|
1173
|
-
background: #e5e7eb;
|
|
1174
|
-
z-index: 0;
|
|
1175
|
-
`,oC=qe.div.attrs({className:"thought-chain-content-container"})`
|
|
1176
|
-
position: relative;
|
|
1177
|
-
padding-left: 0px;
|
|
1178
|
-
margin-left:18px
|
|
1179
|
-
`,iC=qe.div.attrs({className:"thought-chain-node-item"})`
|
|
1180
|
-
display: flex;
|
|
1181
|
-
align-items: flex-start;
|
|
1182
|
-
gap: 12px;
|
|
1183
|
-
padding: 8px 0;
|
|
1184
|
-
position: relative;
|
|
1185
|
-
`,sC=qe.div.attrs({className:"thought-chain-node-content-area"})`
|
|
1186
|
-
flex: 1;
|
|
1187
|
-
margin-left: 20px;
|
|
1188
|
-
display: flex;
|
|
1189
|
-
flex-direction: column;
|
|
1190
|
-
gap: 4px;
|
|
1191
|
-
`,Gh=qe.div.attrs({className:"thought-chain-content-text-wrapper"})`
|
|
1192
|
-
font-size: 13px;
|
|
1193
|
-
line-height: 1.6;
|
|
1194
|
-
color: #374151;
|
|
1195
|
-
opacity: 0.7;
|
|
1196
|
-
`,lC=qe.div.attrs({className:"thought-chain-loading-text"})`
|
|
1197
|
-
font-size: 13px;
|
|
1198
|
-
line-height: 1.6;
|
|
1199
|
-
color: #9ca3af;
|
|
1200
|
-
font-style: italic;
|
|
1201
|
-
padding-left: 15px;
|
|
1202
|
-
`;function uC(e){switch(e){case 1:return{label:"\u8FD0\u884C\u4E2D",color:"#2563eb",icon:Uh,isRotating:!0};case 2:return{label:"\u6267\u884C\u5B8C\u6210",color:"#16a34a",icon:Gw,isRotating:!1};case 3:return{label:"\u6267\u884C\u5931\u8D25",color:"#dc2626",icon:Zw,isRotating:!1};case 4:return{label:"\u5F02\u5E38",color:"#f97316",icon:Yw,isRotating:!1};default:return{label:"\u672A\u77E5",color:"#9ca3af",icon:Uh,isRotating:!1}}}const Xl=({title:e,content:t,nodes:r,mode:n="history"})=>{var m;if(!r||r.length===0)return null;const a=r.reduce((g,v)=>{const w=v.respTime;return g+(typeof w=="number"&&w>0?w:0)},0),i=a>0?`\xB7 ${(a/1e3).toFixed(2)} \u79D2`:"",c=g=>typeof g!="number"||g<=0?"":`${(g/1e3).toFixed(2)} \u79D2`,u=((m=r[0])==null?void 0:m.nodeStatus)??3,f=uC(u),d=f.icon;return q.jsxs(Xw,{children:[q.jsxs(Qw,{children:[q.jsx(eC,{$isRotating:f.isRotating,children:q.jsx(d,{})}),q.jsxs(tC,{children:[e,i&&q.jsx(rC,{children:i})]})]}),q.jsxs(oC,{children:[q.jsx(aC,{}),r.map(g=>{var x,C,p,A,B,E;const v=((x=g==null?void 0:g.rawContent)==null?void 0:x.type)==="markdown"||((p=(C=g==null?void 0:g.rawContent)==null?void 0:C.reply)==null?void 0:p.type)==="markdown"||(g==null?void 0:g.format)==="markdown"||((A=g.content)==null?void 0:A.includes("```"))||((B=g.content)==null?void 0:B.includes("**"))||((E=g.content)==null?void 0:E.includes("##")),w=g.nodeStatus===1&&!g.content;return q.jsx(iC,{children:q.jsxs(sC,{children:[r.length>1&&c(g.respTime)&&q.jsxs(nC,{children:["\u7528\u65F6 ",c(g.respTime)]}),w?q.jsx(lC,{children:"\u601D\u8003\u4E2D..."}):g.content&&(v?q.jsx(Gh,{children:q.jsx(Bs,{dataSource:{type:Qo.MARKDOWN,content:g.content},styles:{text:{fontSize:"14px",lineHeight:"1.6",color:"#374151"}},theme:{baseFontSize:14,minHeight:"auto"}})}):q.jsx(Gh,{className:"px-[15px]",children:g.content}))]})},g.id)})]})]})};function ro(e,t){const r={plan:{inProgress:"\u7406\u89E3\u89C4\u5212\u4E2D",completed:"\u7406\u89E3\u89C4\u5212\u5B8C\u6210"},retrieve:{inProgress:"\u53EC\u56DE\u4E2D",completed:"\u53EC\u56DE\u6210\u529F"},think:{inProgress:"\u6A21\u578B\u601D\u8003\u4E2D",completed:"\u6A21\u578B\u601D\u8003\u5B8C\u6210"},reason:{inProgress:"\u63A8\u7406\u4E2D",completed:"\u63A8\u7406\u5B8C\u6210"}}[e]||{inProgress:"",completed:""};switch(t){case 1:return r.inProgress;case 2:return r.completed;case 3:return`${r.completed}\uFF08\u5931\u8D25\uFF09`;case 4:return`${r.completed}\uFF08\u5F02\u5E38\uFF09`;default:return r.completed}}function cC(e){return!Array.isArray(e)||e.length===0?[]:e.map((t,r)=>{var u,f;const n=t.businessType||"plan",a=t.nodeStatus||1,i=t.content||((u=t==null?void 0:t.reply)==null?void 0:u.content)||"",c=(t==null?void 0:t.type)||((f=t==null?void 0:t.reply)==null?void 0:f.type);return{id:`${n}-${r}`,businessType:n,nodeStatus:a,title:ro(n,a),content:i,...c?{format:c}:{},rawContent:t,respTime:t.respTime??t.chainRespTime??void 0}})}function a9(e,t){var f,d,m;const r=t.businessType;if(!r)return e;const n=[...e],a=n.findIndex(g=>g.businessType===r),i=((f=t.reply)==null?void 0:f.content)??"",c=t.nodeStatus!==void 0&&t.nodeStatus!==null?t.nodeStatus:a!==-1?(d=n[a])==null?void 0:d.nodeStatus:1,u=t.respTime??t.chainRespTime??((m=n[a])==null?void 0:m.respTime);if(a===-1)n.push({id:`${r}-0`,businessType:r,nodeStatus:c,title:ro(r,c),content:i,rawContent:t,respTime:u});else{const g=n[a];n[a]={...g,nodeStatus:c,title:ro(r,c),content:g.content+i,respTime:u??g.respTime,rawContent:{...g.rawContent,lastChunk:t}}}return n}const dC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAABCcAAAQnAEmzTo0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANzSURBVHgBlVbtUeMwEN2Vk5m7HwemgjMVwFVwUAAQKiAUcBAqwKmArwIIFRCgAKACoALcASEwcz/A2ntrSY5InB+nGU9sabX79PT0FKaodXrjjght4TXFM7KW7pOkfTc8/l5QQ+v0JC3LcdcYXtE5QlyIlaebs4VBiGEX+Dez8nlJIqtNiZhpwNzuh0IaL/JxCDBdam6FMe11ja8KbO2PLxHcYZLCGu4nQEIkqbXSQfodP2kkIv2EE7Fkc0WM+BGqDy1jpW4OCgsKcwZQd1cnC+vc6b2vWmsfNDkbi6pLxVcaXjJrTR4V8k1OjLE54kdT8anY5FkAANStGyrLtSqc6Go6uTbtuz5d7CqiiLIh+nrTyX38SEgu9L0sJTPR2ExwaJt7b8r3mlLCFVXU2fjz2qP5beSAoECZsP/gn02RuqFYX17FCB9YQwc+/kjpbZqDMVUVgaJHk1A51A9FpfxNB0Mt5+Edm3nOls4nY/aoqQDo9oXLR6OceX6hGtObIH9bg7pulZoJNCmqpy5Aa5t742e3Stc2euMuKlQq0v3jkAySvMXryJhymWx7B1I8rvNWCjO7w+Mfdy7+BXI0tyrHiJjcmNaFlY9bLaAK0ngOw+EskNug1CXGhnq5heTxCj2ouBV4FP0AZ2BXO2oVMZe7HCXXpMJBWZ+PNNPqvkJj/XumAJGrH6LqAiUlHfHJHb+yz1J/p7MF2lkcGw0gtpV9KaCbhGSHPrwP/RZKVyhopbU/nR70bAXUwWb0dPuxy6DIluv4VBvw3C3mGBwQJee1gkR62KMUMr2qUMFxgbobiqlimO3uFVSDuBWd5xWZV5u8uT9+djtfLsd2AfvuwtmOpJEiry7h/jCy51iR16cLSxw6QMsj0P+aTrK595oj1aFHqodyNLFp6cOT8uk54fxUZlfCYh0LdN+EUhNocf8J2XprAfqm5C6XPOmvml0rKeH7XDE11+zA7zZJ8uCQCwVrp/mt0ex+z4//RsJ6oXiE1fn4RvMBTcyO4wsCSzu4OVusLULvXGvfIVFRRaSVFFkp4Myh5GO1h/jO3t573ynJDsIqnRfB20GTc0bwzeAZl0YKqJEduxuMnCnmX264yZyMvD8FsDxBC0n6+7SehwsGK7swxgxnvchdpUiwhV1J4zlWqB+Y4Gn+3CUietyLeX9X/mfOP1bpFRs68mWiAAAAAElFTkSuQmCC",fC=qe.div.attrs({className:"thought-chain-card-wrapper"})`
|
|
1203
|
-
width: 100%;
|
|
1204
|
-
border-radius: 8px;
|
|
1205
|
-
background-color: #f9fafb;
|
|
1206
|
-
padding: 12px 16px;
|
|
1207
|
-
box-sizing: border-box;
|
|
1208
|
-
`,hC=qe.div.attrs({className:"thought-chain-card-header"})`
|
|
1209
|
-
display: flex;
|
|
1210
|
-
align-items: center;
|
|
1211
|
-
justify-content: space-between;
|
|
1212
|
-
cursor: pointer;
|
|
1213
|
-
padding: 4px 0;
|
|
1214
|
-
`,pC=qe.div.attrs({className:"thought-chain-card-header-left"})`
|
|
1215
|
-
display: flex;
|
|
1216
|
-
align-items: center;
|
|
1217
|
-
gap: 8px;
|
|
1218
|
-
flex: 1;
|
|
1219
|
-
`,mC=Cm`
|
|
1220
|
-
from {
|
|
1221
|
-
transform: rotate(0deg);
|
|
1222
|
-
}
|
|
1223
|
-
to {
|
|
1224
|
-
transform: rotate(360deg);
|
|
1225
|
-
}
|
|
1226
|
-
`,gC=qe.div.attrs({className:"thought-chain-card-avatar"})`
|
|
1227
|
-
width: 25px;
|
|
1228
|
-
height: 25px;
|
|
1229
|
-
border-radius: 9999px;
|
|
1230
|
-
display: flex;
|
|
1231
|
-
align-items: center;
|
|
1232
|
-
justify-content: center;
|
|
1233
|
-
flex-shrink: 0;
|
|
1234
|
-
overflow: hidden;
|
|
1235
|
-
|
|
1236
|
-
img {
|
|
1237
|
-
width: 80%;
|
|
1238
|
-
height: 80%;
|
|
1239
|
-
object-fit: contain;
|
|
1240
|
-
${({$isRotating:e})=>e?As`
|
|
1241
|
-
animation: ${mC} 2s linear infinite;
|
|
1242
|
-
`:""}
|
|
1243
|
-
}
|
|
1244
|
-
`,vC=qe.div.attrs({className:"thought-chain-card-header-title"})`
|
|
1245
|
-
display: flex;
|
|
1246
|
-
align-items: center;
|
|
1247
|
-
gap: 6px;
|
|
1248
|
-
`,bC=qe.span.attrs({className:"thought-chain-card-header-main-text"})`
|
|
1249
|
-
font-size: 14px;
|
|
1250
|
-
font-weight: 600;
|
|
1251
|
-
color: #111827;
|
|
1252
|
-
`,Yh=qe.span.attrs({className:"thought-chain-card-header-sub-text"})`
|
|
1253
|
-
font-size: 14px;
|
|
1254
|
-
color: #6b7280;
|
|
1255
|
-
`,yC=qe.div.attrs({className:"thought-chain-card-header-right"})`
|
|
1256
|
-
display: flex;
|
|
1257
|
-
align-items: center;
|
|
1258
|
-
flex-shrink: 0;
|
|
1259
|
-
`,xC=qe.div.attrs({className:"thought-chain-card-body"})`
|
|
1260
|
-
margin-top: 12px;
|
|
1261
|
-
display: flex;
|
|
1262
|
-
flex-direction: column;
|
|
1263
|
-
gap: 0;
|
|
1264
|
-
`,wC=qe.div.attrs({className:"thought-chain-card-empty-text"})`
|
|
1265
|
-
font-size: 12px;
|
|
1266
|
-
color: #9ca3af;
|
|
1267
|
-
`,CC=({nodes:e,mode:t="history",status:r,simpleThinkOnly:n=!1,chainRespTime:a})=>{const[i,c]=St(!1),u=mt(()=>{const x={};return(e||[]).forEach(C=>{x[C.businessType]||(x[C.businessType]=[]),x[C.businessType].push(C)}),x},[e]),f=mt(()=>typeof r=="number"?r===4:t==="live"?e.some(x=>x.nodeStatus===1):!1,[t,r,e]),d=mt(()=>!e||e.length===0?!1:t==="history"?e.every(x=>x.nodeStatus===2):e.every(x=>x.nodeStatus===2),[e,t]),m=mt(()=>f?"\u6B63\u5728\u601D\u8003\u4E2D":d?"\u601D\u8003\u5B8C\u6210":e&&e.length>0&&!d?"\u6B63\u5728\u601D\u8003\u4E2D":"",[f,d,e]),g=mt(()=>f?"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406":d?"":"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406",[f,d]),v=e&&e.length>0,w=mt(()=>!a||a<=0?"":`\xB7 ${(a/1e3).toFixed(2)} \u79D2`,[a]);return q.jsxs(fC,{"data-mode":t,children:[q.jsxs(hC,{onClick:()=>c(x=>!x),children:[q.jsxs(pC,{children:[q.jsx(gC,{$isRotating:f,children:q.jsx("img",{src:dC,alt:"thinking"})}),q.jsxs(vC,{children:[q.jsx(bC,{children:m}),w&&d&&q.jsxs(Yh,{children:["\u603B\u8BA1\u7528\u65F6",w]}),g&&q.jsxs(Yh,{children:["\xB7 ",g]})]})]}),q.jsx(yC,{children:i?q.jsx(No,{size:18,color:"#6b7280"}):q.jsx(To,{size:18,color:"#6b7280"})})]}),!i&&q.jsxs(xC,{children:[!v&&q.jsx(wC,{children:"\u5F53\u524D\u4F1A\u8BDD\u672A\u8FD4\u56DE\u7ED3\u6784\u5316\u601D\u7EF4\u94FE\u6570\u636E\u3002"}),u.plan&&u.plan.length>0&&q.jsx(Xl,{title:ro("plan",u.plan[0].nodeStatus),nodes:u.plan,mode:t}),u.retrieve&&u.retrieve.length>0&&q.jsx(Xl,{title:ro("retrieve",u.retrieve[0].nodeStatus),nodes:u.retrieve,mode:t}),u.think&&u.think.length>0&&q.jsx(Xl,{title:ro("think",u.think[0].nodeStatus),nodes:u.think,mode:t})]})]})},DC=({data:e,styles:t,onCategoryClick:r,onViewAllClick:n,className:a,style:i,showCategoryIcon:c=!0,renderCategoryIcon:u})=>{const f=(t==null?void 0:t.theme)||{},d=x=>{r==null||r(x)},m=()=>{e.viewAllPath&&(typeof e.viewAllPath=="function"?e.viewAllPath():window.open(e.viewAllPath,"_blank")),n==null||n()},g=x=>{const C=(x||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(C)?"rag/pic":C==="pdf"?"rag/pdf":C==="ofd"?"rag/ofd":["doc","docx"].includes(C)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(C)?"rag/excel":["ppt","pptx"].includes(C)?"rag/ppt":C==="txt"||C==="md"?"rag/txt":C==="csv"?"rag/csv":["zip","rar","7z"].includes(C)?"rag/zip":["odt","ods","odp","odf"].includes(C)?"rag/odf":C==="json"?"rag/json":"rag/file"},v=x=>{if(u)return u(x);if(c){if(x.itemType==="dir")return q.jsx(Kn,{type:"rag/folder",size:16});if(x.itemType==="file"&&x.fileType){const C=g(x.fileType);return q.jsx(Kn,{type:C,size:16})}return q.jsx(Kn,{type:"rag/folder",size:16})}return null},w=e.categories.filter(x=>x.visible!==!1);return!w||w.length===0?null:q.jsxs(kC,{className:`knowledge-base-document-list ${a||""}`,style:i,$theme:f,children:[q.jsx(EC,{children:e.title}),e.subtitle&&q.jsxs(SC,{children:[e.subtitle," (\u5171",e.totalCount,"\u4E2A):"]}),q.jsx(AC,{children:w.map((x,C)=>q.jsxs(BC,{onClick:()=>d(x),$theme:f,children:[v(x),q.jsx(FC,{children:x.name}),x.itemType==="dir"&&q.jsxs(NC,{children:["(",x.documentCount,")"]})]},x.id||C))}),e.showViewAll!==!1&&q.jsx(TC,{onClick:m,$theme:f,children:e.viewAllText||"\u67E5\u770B\u5168\u90E8>>"})]})},kC=qe.div.attrs({className:"knowledge-base-document-list-container"})`
|
|
1268
|
-
margin-bottom: 16px;
|
|
1269
|
-
padding: 16px;
|
|
1270
|
-
margin-left:25px;
|
|
1271
|
-
|
|
1272
|
-
background: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1273
|
-
border-radius: 8px;
|
|
1274
|
-
`,EC=qe.h3.attrs({className:"knowledge-base-document-list-title"})`
|
|
1275
|
-
font-size: 18px;
|
|
1276
|
-
font-weight: 600;
|
|
1277
|
-
color: #1f2937;
|
|
1278
|
-
margin: 0 0 8px 0;
|
|
1279
|
-
`,SC=qe.div.attrs({className:"knowledge-base-document-list-subtitle"})`
|
|
1280
|
-
font-size: 14px;
|
|
1281
|
-
color: #6b7280;
|
|
1282
|
-
margin-bottom: 12px;
|
|
1283
|
-
`,AC=qe.div.attrs({className:"knowledge-base-document-list-category-list"})`
|
|
1284
|
-
display: flex;
|
|
1285
|
-
flex-direction: column;
|
|
1286
|
-
gap: 8px;
|
|
1287
|
-
margin-bottom: 12px;
|
|
1288
|
-
`,BC=qe.div.attrs({className:"knowledge-base-document-list-category-item"})`
|
|
1289
|
-
display: flex;
|
|
1290
|
-
align-items: center;
|
|
1291
|
-
gap: 8px;
|
|
1292
|
-
padding: 8px 0;
|
|
1293
|
-
cursor: pointer;
|
|
1294
|
-
transition: all 0.2s ease;
|
|
1295
|
-
|
|
1296
|
-
&:hover {
|
|
1297
|
-
opacity: 0.8;
|
|
1298
|
-
}
|
|
1299
|
-
`,FC=qe.span.attrs({className:"knowledge-base-document-list-category-name"})`
|
|
1300
|
-
font-size: 14px;
|
|
1301
|
-
color: #1f2937;
|
|
1302
|
-
`,NC=qe.span.attrs({className:"knowledge-base-document-list-category-count"})`
|
|
1303
|
-
font-size: 14px;
|
|
1304
|
-
color: #6b7280;
|
|
1305
|
-
`,TC=qe.a.attrs({className:"knowledge-base-document-list-view-all"})`
|
|
1306
|
-
display: inline-block;
|
|
1307
|
-
font-size: 14px;
|
|
1308
|
-
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1309
|
-
text-decoration: none;
|
|
1310
|
-
cursor: pointer;
|
|
1311
|
-
transition: color 0.2s ease;
|
|
1312
|
-
|
|
1313
|
-
&:hover {
|
|
1314
|
-
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#2563eb"}};
|
|
1315
|
-
text-decoration: underline;
|
|
1316
|
-
}
|
|
1317
|
-
`;function OC(e,t){const[r,n]=St(()=>$C(e,t));return Qt(()=>{if(e==="desktop"){n(!1);return}if(e==="mobile"){n(!0);return}if(typeof window>"u")return;const a=window.matchMedia(`(max-width: ${Math.max(0,t-1)}px)`),i=()=>n(a.matches);return i(),a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[e,t]),r}function $C(e,t){return e==="desktop"?!1:e==="mobile"?!0:typeof window>"u"?!1:window.matchMedia(`(max-width: ${Math.max(0,t-1)}px)`).matches}function Ql(e,t,r=18){var c;const n=(e||"").toLowerCase(),a=((c=t==null?void 0:t.theme)==null?void 0:c.icons)||{},i=(u,f,d)=>{const m=[u,...d||[]];for(const g of m){const v=a[g];if(v){if(We.isValidElement(v))return v;if(typeof v=="string")return q.jsx("img",{src:v,alt:g,style:{width:r,height:r}})}}return q.jsx(Kn,{type:f,size:r})};return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(n)?i("image","rag/pic",["png","jpg","jpeg"]):n==="pdf"?i("pdf","rag/pdf"):n==="ofd"?i("ofd","rag/ofd"):["doc","docx"].includes(n)?i("docx","rag/word",["doc"]):["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(n)?i("sheets","rag/excel",["excel","xls","xlsx"]):n==="csv"?i("csv","rag/csv",["sheets","excel"]):["ppt","pptx"].includes(n)?i("pptx","rag/ppt",["ppt"]):n==="txt"||n==="md"?i("txt","rag/txt",["md"]):["zip","rar","7z"].includes(n)?i("archive","rag/zip",["zip","rar"]):["odt","ods","odp","odf"].includes(n)?i("odt","rag/odf"):["html","htm","url"].includes(n)?i("html","rag/url",["htm","url"]):n==="json"?i("json","rag/json"):q.jsx(Kn,{type:"rag/file",size:r})}function Zh(e){const t=e.replace(/"pk":\s*(\d+)/g,'"pk":"$1"').replace(/"order_num":\s*(\d+)/g,'"order_num":"$1"').replace(/"related_pk":\s*(\d+)/g,'"related_pk":"$1"');return JSON.parse(t)}function Wa(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(Wa(r.children)));return t}function PC(e){const t=[],r=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g;let n;for(;n=r.exec(e);){const i=n[1].split(";").map(c=>c.trim()).filter(Boolean);t.push(...i)}const a=/\[retrive-tag[^\]]*image_urls=['"]([^'"]+)['"][^\]]*\]\[[^\]]+\]\[\/retrive-tag\]/g;for(;n=a.exec(e);){const i=n[1].split(";").map(c=>c.trim()).filter(Boolean);t.push(...i)}return Array.from(new Set(t))}function Ka(e){if(e==null)return null;const t=Number(e);return Number.isNaN(t)?null:t}function MC(e){const t=[];let r=1;const n=a=>{a.forEach(i=>{(i==null?void 0:i.type)==="retrieve-sql-data"&&(i!=null&&i.id)&&t.push({id:String(i.id),index:r++}),Array.isArray(i==null?void 0:i.children)&&i.children.length&&n(i.children)})};return Array.isArray(e)&&e.length&&n(e),t}const RC=qe.div.attrs({className:"chat-message-container"})`
|
|
1318
|
-
display: flex;
|
|
1319
|
-
flex-direction: column;
|
|
1320
|
-
margin-bottom: 0.5rem;
|
|
1321
|
-
animation: fadeIn 0.3s ease-in-out;
|
|
1322
|
-
width: 100%;
|
|
1323
|
-
text-wrap: wrap;
|
|
1324
|
-
|
|
1325
|
-
${e=>e.$isMobile&&`
|
|
1326
|
-
word-break: break-word;
|
|
1327
|
-
overflow-wrap: anywhere;
|
|
1328
|
-
& pre,
|
|
1329
|
-
& code,
|
|
1330
|
-
& table {
|
|
1331
|
-
max-width: 100%;
|
|
1332
|
-
overflow-x: auto;
|
|
1333
|
-
}
|
|
1334
|
-
`}
|
|
1335
|
-
|
|
1336
|
-
${e=>e.$align==="right"&&`
|
|
1337
|
-
align-items: flex-end;
|
|
1338
|
-
`}
|
|
1339
|
-
|
|
1340
|
-
${e=>e.$align==="center"&&`
|
|
1341
|
-
align-items: center;
|
|
1342
|
-
`}
|
|
1343
|
-
|
|
1344
|
-
@keyframes fadeIn {
|
|
1345
|
-
from {
|
|
1346
|
-
opacity: 0;
|
|
1347
|
-
transform: translateY(10px);
|
|
1348
|
-
}
|
|
1349
|
-
to {
|
|
1350
|
-
opacity: 1;
|
|
1351
|
-
transform: translateY(0);
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
`,zC=qe.div.attrs({className:"chat-message-header"})`
|
|
1355
|
-
display: flex;
|
|
1356
|
-
align-items: center;
|
|
1357
|
-
gap: 0.25rem;
|
|
1358
|
-
margin-bottom: 0.5rem;
|
|
1359
|
-
width: 100%;
|
|
1360
|
-
|
|
1361
|
-
${e=>e.$isUser&&`
|
|
1362
|
-
flex-direction: row-reverse;
|
|
1363
|
-
justify-content: end;
|
|
1364
|
-
`}
|
|
1365
|
-
`,IC=qe.div.attrs({className:"chat-message-avatar"})`
|
|
1366
|
-
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
1367
|
-
border-radius: 50%;
|
|
1368
|
-
width: 2rem;
|
|
1369
|
-
height: 2rem;
|
|
1370
|
-
flex-shrink: 0;
|
|
1371
|
-
display: flex;
|
|
1372
|
-
align-items: center;
|
|
1373
|
-
justify-content: center;
|
|
1374
|
-
font-size: 1rem;
|
|
1375
|
-
`,jC=qe.div.attrs({className:"chat-message-content"})`
|
|
1376
|
-
width: 100%;
|
|
1377
|
-
.message-time {
|
|
1378
|
-
font-size: 0.75rem;
|
|
1379
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
.message-card {
|
|
1383
|
-
background: ${e=>e.$isUser?"linear-gradient(180deg, #E3ECFF 0%, #EEEBFF 100%)":"#ffffff"};
|
|
1384
|
-
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
1385
|
-
border-radius: 0.5rem;
|
|
1386
|
-
padding-top: 12px;
|
|
1387
|
-
padding-bottom: 12px;
|
|
1388
|
-
overflow: hidden;
|
|
1389
|
-
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
1390
|
-
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
1391
|
-
margin-right: ${e=>e.$isUser?e.$compact?"10px":"40px":"0"};
|
|
1392
|
-
padding: ${e=>e.$compact?"0.25rem 0.75rem":"0.25rem 1.8rem"};
|
|
1393
|
-
.message-text {
|
|
1394
|
-
width: 100%;
|
|
1395
|
-
line-height: 1.6;
|
|
1396
|
-
white-space: pre-wrap !important; /* 保留换行和空格格式,使用 !important 确保优先级 */
|
|
1397
|
-
border-radius: 0.5rem;
|
|
1398
|
-
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
1399
|
-
font-size: 0.875rem;
|
|
1400
|
-
|
|
1401
|
-
/* 确保子元素也继承 white-space 属性 */
|
|
1402
|
-
& > * {
|
|
1403
|
-
white-space: pre-wrap !important;
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
}
|
|
1407
|
-
`,LC=qe.div.attrs({className:"chat-message-actions-container"})`
|
|
1408
|
-
margin-top: 0.5rem;
|
|
1409
|
-
display: flex;
|
|
1410
|
-
padding: 0.5rem;
|
|
1411
|
-
align-items: center;
|
|
1412
|
-
flex-wrap: ${e=>e.$touchFriendly?"wrap":"nowrap"};
|
|
1413
|
-
|
|
1414
|
-
gap: 0.75rem;
|
|
1415
|
-
|
|
1416
|
-
button {
|
|
1417
|
-
display: flex;
|
|
1418
|
-
align-items: center;
|
|
1419
|
-
gap: 0.25rem;
|
|
1420
|
-
font-size: 0.875rem;
|
|
1421
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1422
|
-
background: none;
|
|
1423
|
-
border: none;
|
|
1424
|
-
cursor: pointer;
|
|
1425
|
-
transition: color 0.2s;
|
|
1426
|
-
${e=>e.$touchFriendly&&`
|
|
1427
|
-
min-width: 44px;
|
|
1428
|
-
min-height: 44px;
|
|
1429
|
-
justify-content: center;
|
|
1430
|
-
`}
|
|
1431
|
-
|
|
1432
|
-
&:hover {
|
|
1433
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
&.active {
|
|
1437
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
`,_C=qe.div.attrs({className:"chat-message-follow-up-container"})`
|
|
1441
|
-
margin-top: 1rem;
|
|
1442
|
-
padding: ${e=>e.$compact?"0 0.5rem":"0 2.9rem"};
|
|
1443
|
-
|
|
1444
|
-
border-radius: 0.5rem;
|
|
1445
|
-
|
|
1446
|
-
@keyframes followUpIn {
|
|
1447
|
-
from {
|
|
1448
|
-
opacity: 0;
|
|
1449
|
-
transform: translateY(6px);
|
|
1450
|
-
}
|
|
1451
|
-
to {
|
|
1452
|
-
opacity: 1;
|
|
1453
|
-
transform: translateY(0);
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
.follow-up-title {
|
|
1458
|
-
font-size: 0.875rem;
|
|
1459
|
-
font-weight: 600;
|
|
1460
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1461
|
-
margin-bottom: 0.75rem;
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
.follow-up-list {
|
|
1465
|
-
display: flex;
|
|
1466
|
-
flex-direction: column;
|
|
1467
|
-
gap: 0.5rem;
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
.follow-up-item {
|
|
1471
|
-
width: fit-content;
|
|
1472
|
-
background: #ffffff;
|
|
1473
|
-
border: 1px solid #e5e7eb;
|
|
1474
|
-
border-radius: 0.375rem;
|
|
1475
|
-
padding: 0.75rem 1rem;
|
|
1476
|
-
cursor: pointer;
|
|
1477
|
-
transition: all 0.2s ease;
|
|
1478
|
-
text-align: left;
|
|
1479
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1480
|
-
font-size: 0.875rem;
|
|
1481
|
-
line-height: 1.4;
|
|
1482
|
-
opacity: 0;
|
|
1483
|
-
transform: translateY(6px);
|
|
1484
|
-
animation: followUpIn 280ms ease forwards;
|
|
1485
|
-
animation-play-state: running;
|
|
1486
|
-
|
|
1487
|
-
&:hover {
|
|
1488
|
-
background: #e5e7eb;
|
|
1489
|
-
border-color: #d1d5db;
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
&:active {
|
|
1493
|
-
transform: translateY(1px);
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
`,Ti=qe.div.attrs({className:"chat-message-reference-container"})`
|
|
1497
|
-
padding: 1rem;
|
|
1498
|
-
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1499
|
-
|
|
1500
|
-
border-radius: 0.5rem;
|
|
1501
|
-
|
|
1502
|
-
.reference-title {
|
|
1503
|
-
font-size: 0.875rem;
|
|
1504
|
-
font-weight: 600;
|
|
1505
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1506
|
-
margin-bottom: 0.75rem;
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
.reference-list {
|
|
1510
|
-
display: flex;
|
|
1511
|
-
flex-direction: column;
|
|
1512
|
-
gap: 0.5rem;
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
.reference-item {
|
|
1516
|
-
background: #ffffff;
|
|
1517
|
-
|
|
1518
|
-
border-radius: 0.375rem;
|
|
1519
|
-
padding: 0.75rem 0;
|
|
1520
|
-
display: flex;
|
|
1521
|
-
align-items: center;
|
|
1522
|
-
gap: 0.5rem;
|
|
1523
|
-
|
|
1524
|
-
.file-icon {
|
|
1525
|
-
width: 2rem;
|
|
1526
|
-
height: 2rem;
|
|
1527
|
-
background: #e2e8f0;
|
|
1528
|
-
border-radius: 0.25rem;
|
|
1529
|
-
display: flex;
|
|
1530
|
-
align-items: center;
|
|
1531
|
-
justify-content: center;
|
|
1532
|
-
font-size: 0.75rem;
|
|
1533
|
-
color: #64748b;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
.file-info {
|
|
1537
|
-
flex: 1;
|
|
1538
|
-
|
|
1539
|
-
.file-name {
|
|
1540
|
-
font-size: 0.875rem;
|
|
1541
|
-
font-weight: 500;
|
|
1542
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1543
|
-
margin-bottom: 0.25rem;
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
.file-meta {
|
|
1547
|
-
font-size: 0.75rem;
|
|
1548
|
-
color: #64748b;
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
.file-score {
|
|
1553
|
-
font-size: 0.75rem;
|
|
1554
|
-
color: #059669;
|
|
1555
|
-
font-weight: 500;
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
`,qC=qe.div.attrs({className:"chat-message-image-preview-modal"})`
|
|
1559
|
-
position: fixed;
|
|
1560
|
-
top: 0;
|
|
1561
|
-
left: 0;
|
|
1562
|
-
right: 0;
|
|
1563
|
-
bottom: 0;
|
|
1564
|
-
background: rgba(0, 0, 0, 0.8);
|
|
1565
|
-
display: ${e=>e.$show?"flex":"none"};
|
|
1566
|
-
align-items: center;
|
|
1567
|
-
justify-content: center;
|
|
1568
|
-
z-index: 1000;
|
|
1569
|
-
cursor: pointer;
|
|
1570
|
-
|
|
1571
|
-
.modal-content {
|
|
1572
|
-
max-width: 90vw;
|
|
1573
|
-
max-height: 90vh;
|
|
1574
|
-
position: relative;
|
|
1575
|
-
cursor: default;
|
|
1576
|
-
display: flex;
|
|
1577
|
-
flex-direction: column;
|
|
1578
|
-
align-items: center;
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
.modal-image {
|
|
1582
|
-
max-width: 100%;
|
|
1583
|
-
max-height: calc(90vh - 60px);
|
|
1584
|
-
object-fit: contain;
|
|
1585
|
-
border-radius: 8px;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
.modal-close {
|
|
1589
|
-
margin-top: 16px;
|
|
1590
|
-
background: rgba(255, 255, 255, 0.3);
|
|
1591
|
-
border: none;
|
|
1592
|
-
border-radius: 20px;
|
|
1593
|
-
padding: 8px 20px;
|
|
1594
|
-
display: flex;
|
|
1595
|
-
align-items: center;
|
|
1596
|
-
justify-content: center;
|
|
1597
|
-
cursor: pointer;
|
|
1598
|
-
font-size: 14px;
|
|
1599
|
-
color: #333;
|
|
1600
|
-
font-weight: 500;
|
|
1601
|
-
transition: all 0.2s ease;
|
|
1602
|
-
|
|
1603
|
-
&:hover {
|
|
1604
|
-
background: rgba(255, 255, 255, 1);
|
|
1605
|
-
transform: translateY(-1px);
|
|
1606
|
-
}
|
|
1607
|
-
}
|
|
1608
|
-
`,Jl=qe.div.attrs({className:"chat-message-image-gallery-container"})`
|
|
1609
|
-
padding: 0rem 0.5rem;
|
|
1610
|
-
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1611
|
-
|
|
1612
|
-
.gallery-grid {
|
|
1613
|
-
display: grid;
|
|
1614
|
-
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
1615
|
-
gap: 0.75rem;
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
.gallery-item {
|
|
1619
|
-
position: relative;
|
|
1620
|
-
aspect-ratio: 1;
|
|
1621
|
-
border-radius: 0.375rem;
|
|
1622
|
-
overflow: hidden;
|
|
1623
|
-
cursor: pointer;
|
|
1624
|
-
transition:
|
|
1625
|
-
transform 0.2s ease,
|
|
1626
|
-
box-shadow 0.2s ease;
|
|
1627
|
-
border: 2px solid transparent;
|
|
1628
|
-
|
|
1629
|
-
&:hover {
|
|
1630
|
-
transform: translateY(-2px);
|
|
1631
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1632
|
-
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
|
-
.gallery-image {
|
|
1636
|
-
width: 100%;
|
|
1637
|
-
height: 100%;
|
|
1638
|
-
object-fit: cover;
|
|
1639
|
-
background: #f3f4f6;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
.gallery-overlay {
|
|
1643
|
-
position: absolute;
|
|
1644
|
-
bottom: 0;
|
|
1645
|
-
left: 0;
|
|
1646
|
-
right: 0;
|
|
1647
|
-
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
1648
|
-
color: white;
|
|
1649
|
-
padding: 0.5rem;
|
|
1650
|
-
font-size: 0.75rem;
|
|
1651
|
-
text-align: center;
|
|
1652
|
-
opacity: 0;
|
|
1653
|
-
transition: opacity 0.2s ease;
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
&:hover .gallery-overlay {
|
|
1657
|
-
opacity: 1;
|
|
1658
|
-
}
|
|
1659
|
-
}
|
|
1660
|
-
`,o9=({token:e,streamUrl:t,is_download:r,content:n,contentType:a="plainText",align:i="left",displayStatus:c="ready",avatar:u,isUser:f=!1,userAvatar:d,aiAvatar:m,date:g,time:v,timestamp:w,showTime:x=!0,errorMessage:C,styles:p,reference:A,webReference:B,faqReference:E,databaseReference:T,graphReference:F,filePaths:P,currentFiles:S,fileManagerData:L,audioUrl:O,feedbackResult:W,queryId:j,defaultAnswer:Y,isWelcome:Z=!1,isLast:_=!1,respTime:H,tokens:V,resultType:G,followUpQuestions:te=[],tools:K={},eventsEmit:X,referenceMode:ye="list",enableThoughtChain:xe=!1,thoughtChainVersionMode:ke="auto",chain:Be,thoughtChainNodes:_e,knowledgeBases:Q,enableCot:oe,chainRespTime:ue,thoughtChainStatus:le,enablePrism:Se=!1,renderMode:Fe="desktop",breakpoint:me=768,dense:we=!1})=>{Qt(()=>{console.log("isUser",f),console.log("isLast",_)},[_,f]);const De=OC(Fe,me),Te=De||!!we,be=ds(),Ae=mt(()=>{var re,Ce,tt,Ue,ae,He,Me,st,he,de,ce;return{colors:{primary:((re=be==null?void 0:be.colors)==null?void 0:re.primary)||"#3b82f6",background:((Ce=be==null?void 0:be.colors)==null?void 0:Ce.background)||"#ffffff",userBackground:((tt=be==null?void 0:be.colors)==null?void 0:tt.primary)||"#3b82f6",border:((Ue=be==null?void 0:be.colors)==null?void 0:Ue.border)||"#e5e7eb",text:((ae=be==null?void 0:be.colors)==null?void 0:ae.text)||"#374151",disabled:((He=be==null?void 0:be.colors)==null?void 0:He.disabled)||"#6b7280",info:((Me=be==null?void 0:be.colors)==null?void 0:Me.info)||"#3b82f6",warning:((st=be==null?void 0:be.colors)==null?void 0:st.warning)||"#f59e0b",error:((he=be==null?void 0:be.colors)==null?void 0:he.error)||"#ef4444",...(de=p==null?void 0:p.theme)==null?void 0:de.colors},icons:{aiAvatar:m||"/vite.svg",userAvatar:d||"/default-user-avatar.png",...(ce=p==null?void 0:p.theme)==null?void 0:ce.icons}}},[be,p,m,d]),Le=mt(()=>{const re=v||g||w;return!re||!x?null:Uw(re).format("YY-MM-DD HH:mm:ss")},[v,g,w,x]),[ut,ot]=St([]),[Oe,Ie]=St(null),[Ge,dt]=St(!1),[Je,at]=St(!1),[Lt,Ct]=St(!1),[At,$t]=St(!1),[je,fe]=St(!1),lt=(re,Ce)=>{switch(console.log("handleImageClick",re,Ce),re){case"imageClick":Ie(Ce);break}},_t=mt(()=>{if(!xe)return[];if(ke==="v1")return[];if(Array.isArray(_e)&&_e.length)return _e;const re=Be||(n==null?void 0:n.chain),Ce=cC(re);return oe===0?Ce.filter(tt=>tt.businessType==="think"):Ce},[xe,ke,_e,Be,n,oe]),Wt=()=>{if(xe&&ke!=="v1")return null;const re={processing:{text:"AI \u6B63\u5728\u601D\u8003...",icon:q.jsx(Kn,{type:"rag/think",size:16}),spinning:!0},thinking:{text:"\u6DF1\u5EA6\u601D\u8003\u4E2D",icon:q.jsx(Kn,{type:"rag/think",size:16}),spinning:!0},uploading:{text:"\u6587\u4EF6\u4E0A\u4F20\u4E2D...",icon:"\u{1F4E4}"},analyzing:{text:"\u77E5\u8BC6\u89E3\u6790\u4E2D...",icon:"\u{1F50D}"},error:{text:C||"\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:q.jsx(Kn,{type:"rag/think",size:16}),spinning:!1}}[c]||{text:"\u5904\u7406\u4E2D...",icon:q.jsx(Kn,{type:"rag/think",size:16}),spinning:!0},Ce=H?`(\u7528\u65F6 ${Math.round(H/1e3)} \u79D2)`:"";return q.jsx("div",{className:"think-header",children:q.jsx("div",{className:"think-header-left ml-[16px]",children:q.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-full",children:[q.jsx("div",{className:`think-icon${re.spinning?" is-spinning":""}`,children:re.icon}),q.jsx("div",{className:"think-title",children:re.text}),Ce&&q.jsx("div",{className:"think-time",children:Ce}),ee&&q.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{fe(!je)},children:q.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:je?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:q.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},Pt=()=>{if(!xe||ke==="v1"||f||!_t.length)return null;const re=le!==void 0?le===4?4:2:c==="ready"?2:1,Ce=oe===0;return q.jsx("div",{className:"thought-chain-wrapper ml-[16px] mr-[16px] mt-2",children:q.jsx(CC,{mode:a==="stream"?"live":"history",nodes:_t,status:re,simpleThinkOnly:Ce,chainRespTime:ue})})},[Bt,yt]=St([]),[It,or]=St(null),mr=mt(()=>{try{if(!A)return[];let re;if(typeof A=="string")re=JSON.parse(A);else if(Array.isArray(A))re=A;else if(typeof A=="object")re=[A];else return[];return Array.isArray(re)?re:[]}catch(re){return console.warn("\u89E3\u6790 rawReferenceList \u5931\u8D25:",re,A),[]}},[A]),Ft=(re,Ce)=>{var Me,st,he;const tt=((Me=re==null?void 0:re.metadata)==null?void 0:Me.source)||(re==null?void 0:re.file_path)||(re==null?void 0:re.path)||(re==null?void 0:re.convertedFilePath)||(re==null?void 0:re.parsedFilePath)||"",Ue=((st=re==null?void 0:re.metadata)==null?void 0:st.title)||(re==null?void 0:re.file_name)||"",ae=((he=re==null?void 0:re.metadata)==null?void 0:he.id)||(re==null?void 0:re.id)||(re==null?void 0:re.file_id)||"",He=mr.find(de=>{var Mt,ft,Re;const ce=((Mt=de==null?void 0:de.metadata)==null?void 0:Mt.source)||(de==null?void 0:de.file_path)||(de==null?void 0:de.path)||(de==null?void 0:de.convertedFilePath)||(de==null?void 0:de.parsedFilePath)||"",Xe=((ft=de==null?void 0:de.metadata)==null?void 0:ft.title)||(de==null?void 0:de.file_name)||"",ct=((Re=de==null?void 0:de.metadata)==null?void 0:Re.id)||(de==null?void 0:de.id)||"";return ae&&ct&&String(ae)===String(ct)||tt&&ce&&ce===tt||Ue&&Xe&&Xe===Ue});if(He){const de=(He!=null&&He.references&&Array.isArray(He.references)?He.references:[He]).find(ce=>String(ce.order_num)===String(Ce)||String(ce.id)===String(Ce));if(de)return de}for(const de of mr){if(de!=null&&de.references&&Array.isArray(de.references)){const ce=de.references.find(Xe=>String(Xe.order_num)===String(Ce)||String(Xe.id)===String(Ce));if(ce)return ce}if(String(de.order_num)===String(Ce)||String(de.id)===String(Ce))return de}return null},zr=(re,Ce)=>{function tt(de,ce){for(const Xe of de){if(Xe.references&&Array.isArray(Xe.references)){const ct=Xe.references.find(Mt=>String(Mt.order_num)===String(ce)||String(Mt.id)===String(ce));if(ct)return ct}if(String(Xe.order_num)===String(ce)||String(Xe.id)===String(ce))return Xe}return null}let Ue=[];try{if(A){const de=JSON.parse(A);Ue=Array.isArray(de)?de:de&&Array.isArray(de.knowledgeRefs)?de.knowledgeRefs:[]}}catch(de){console.error("Failed to parse reference:",de)}let ae=tt(Ue,re.id),He=-1;if(!ae&&String(re==null?void 0:re.fromtype)==="10"&&E){let de=[];try{de=typeof E=="string"?Zh(E):E,Array.isArray(de)||(de=[de])}catch{}const ce=de.findIndex(Xe=>String((Xe==null?void 0:Xe.pk)??(Xe==null?void 0:Xe.order_num)??(Xe==null?void 0:Xe.id))===String(re==null?void 0:re.id));if(ce>=0)ae=de[ce],He=ce;else{const Xe=Number(re==null?void 0:re.id);Number.isInteger(Xe)&&Xe>=1&&Xe<=de.length&&(ae=de[Xe-1],He=Xe-1)}}const Me=de=>{if(typeof n!="string")return;const ce=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${de}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(n);if(ce&&ce[1]){const Xe=Number(ce[1]);return Number.isNaN(Xe)?void 0:Xe}};let st;if(String(re==null?void 0:re.fromtype)==="10"&&ae){const de=He>=0?He+1:Me(String(re==null?void 0:re.id))??1,ce=rt(ae,de);ce.tags=[{id:re==null?void 0:re.id,index:de,image_urls:(re==null?void 0:re.imageUrls)||(re==null?void 0:re.image_urls)||[],metadata:(ae==null?void 0:ae.metadata)||{}}],st={queryId:j,knowledgeRefs:[ce],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{faqReference:E,retriveNodes:[]}}}const he={tagInfo:{id:re==null?void 0:re.id,index:Me(String(re==null?void 0:re.id)),image_urls:(re==null?void 0:re.imageUrls)||(re==null?void 0:re.image_urls)||[]},fromtype:String((re==null?void 0:re.fromtype)??""),leaf:re,attributes:Ce,referenceDoc:ae||void 0,referencesPayloadSingle:st};if(String(re==null?void 0:re.fromtype)==="2"&&F){const de=String((re==null?void 0:re.id)??""),ce=Array.isArray(J)?J:[],Xe=ft=>(Array.isArray(ft==null?void 0:ft.traceNodes)?ft.traceNodes:[]).find(Re=>String(Re==null?void 0:Re.id)===de),ct=ft=>(Array.isArray(ft==null?void 0:ft.tags)?ft.tags:[]).find(Re=>String(Re==null?void 0:Re.id)===de);let Mt=ce.find(ft=>!!Xe(ft)||!!ct(ft));if(!Mt){const ft=String(de||"").split("_")[0];Mt=ce.find(Re=>String(Re==null?void 0:Re.id)===ft)}Mt&&(he.graph={id:Mt.id,graphName:Mt.graphName,fetchUrl:Mt.fetchUrl,cyphers:Mt.cyphers},he.traceNode=Xe(Mt),he.graphReference=Mt)}X==null||X("action_retrive_tag",he),X==null||X("retrive_tag:click",he)},Fr=re=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",re),console.log("databaseReference available:",!!T),re.id&&T){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",T);const Ce=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:re.id,databaseReference:T}});console.log("Dispatching event:",Ce),window.dispatchEvent(Ce)}else console.log("Cannot send response - missing id or databaseReference")};We.useEffect(()=>{const re=Ce=>{Fr(Ce.detail)};return window.addEventListener("retrieve-sql-data:request-data",re),()=>{window.removeEventListener("retrieve-sql-data:request-data",re)}},[T]),We.useEffect(()=>{const re=Ce=>{mn(Ce.detail)};return window.addEventListener("rtext_pagination_click",re),()=>{window.removeEventListener("rtext_pagination_click",re)}},[It]);const mn=re=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",re),re.replacePredataFunction&&It){const Ce={...It,rows:It.rows};re.replacePredataFunction(Ce)}X==null||X("rtext_pagination_click",re)},$r=Kt(new Map),Lr=Kt(1),_r=Kt(""),Nr=Kt({0:1,1:1,2:1,3:1,10:1}),lr=Kt(!1),xt=mt(()=>{if(typeof n=="string"){let re=n;const Ce=[];j&&j!==_r.current&&($r.current.clear(),Lr.current=1,Nr.current={0:1,1:1,2:1,3:1,10:1},_r.current=j,lr.current=!1);const tt=A===""||A==="[]"||Array.isArray(A)&&A.length===0||A==null;return a==="stream"&&tt?lr.current||($r.current.clear(),Lr.current=1,Nr.current={0:1,1:1,2:1,3:1,10:1},lr.current=!0):tt||(lr.current=!1),a==="stream"&&(re=re.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(Ue,ae)=>{const He=ae.match(/id=['"]([^'"]+)['"]/),Me=ae.match(/fromType=['"]([^'"]+)['"]/);if(He){const st=He[1],he=Me?Me[1]:"0";if(!$r.current.has(st)){const ce=Nr.current,Xe=he==="1"?"1":he==="2"?"2":he==="3"?"3":he==="10"?"10":"0",ct=ce[Xe]??1;$r.current.set(st,ct),ce[Xe]=ct+1,Nr.current=ce}const de=$r.current.get(st);return`[retrive-tag${ae}][${de}][/retrive-tag]`}return Ue})),re=re.replace(/\[retrive-tag[^\]]*fromType=['"](?:0|10)['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,Ue=>{const ae=Ue.match(/image_urls=['"]([^'"]+)['"]/);if(ae){const He=ae[1].split(";").map(Me=>Me.trim()).filter(Boolean);Ce.push(...He)}return Ue}),Ce.length>0&&ot(Ce),re}return n},[n,a,j,A]),y=mt(()=>{if(typeof xt=="string")try{return Fm(xt)}catch(re){return console.error("Failed to deserialize markdown:",re),[]}return[]},[xt]),D=Tt(re=>{if(!(!re||typeof xt!="string"))try{const Ce=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${re}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(xt);if(Ce&&Ce[1]){const tt=Number(Ce[1]);return Number.isNaN(tt)?Ce[1]:tt}}catch{}},[xt]),Pe=mt(()=>MC(y||[]),[y]),M=mt(()=>{const re={};return Pe.forEach(Ce=>{Ce!=null&&Ce.id&&!re[Ce.id]&&(re[Ce.id]=Ce.index)}),re},[Pe]);Qt(()=>{try{a==="stream"&&T&&(re=>{try{const Ce=typeof re=="string"?JSON.parse(re):re;return Ce?Array.isArray(Ce)?Ce:[Ce]:[]}catch{return[]}})(T).forEach(re=>{const Ce=re==null?void 0:re.id;if(!Ce)return;const tt=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Ce,databaseReference:re}});window.dispatchEvent(tt)})}catch{}},[a,T]);const ee=mt(()=>{if(!Array.isArray(y))return!1;const re=tt=>{for(const Ue of tt)if(Ue.type==="think"||Array.isArray(Ue.children)&&re(Ue.children))return!0;return!1},Ce=re(y);return console.log("Think detection:",{slateContent:y,hasThinkElement:Ce,displayStatus:c,isUser:f}),Ce},[y,c,f]),ur=mt(()=>({databaseReference:T,...ee&&{isThinkCollapsed:je}}),[T,ee,je]),it=mt(()=>u||(f?Ae.icons.userAvatar:Ae.icons.aiAvatar),[u,f,Ae.icons]),gt=mt(()=>typeof n=="string"?n:Array.isArray(n)?n.map(re=>typeof re=="string"?re:re.text||"").join(""):Y||"",[n,Y]),Et=()=>{if(Z)return null;const re=[{key:"copy",show:K.copy!==!1,icon:Am,label:"\u590D\u5236",onClick:()=>X==null?void 0:X("chatbox:copy",{content:gt})},{key:"like",show:K.like!==!1,icon:Aw,label:"\u8D5E",onClick:()=>X==null?void 0:X("chatbox:like",{result:W,queryId:j}),active:W===1},{key:"dislike",show:K.dislike!==!1,icon:Sw,label:"\u8E29",onClick:()=>X==null?void 0:X("chatbox:dislike",{result:W,queryId:j}),active:W===0},{key:"repeat",show:!f&&_,icon:kw,label:"\u91CD\u590D",onClick:()=>X==null?void 0:X("chatbox:repeat",{content:n,queryId:j,filePaths:P,audioUrl:O})},{key:"forward",show:K.forward,icon:Ew,label:"\u8F6C\u53D1",onClick:()=>X==null?void 0:X("chatbox:forward",{content:gt,queryId:j})},{key:"delete",show:K.delete,icon:Bw,label:"\u5220\u9664",onClick:()=>X==null?void 0:X("chatbox:delete",{queryId:j})},{key:"edit",show:K.edit,icon:Cw,label:"\u7F16\u8F91",onClick:()=>X==null?void 0:X("chatbox:edit",{content:gt,queryId:j})}];return q.jsxs("div",{style:{padding:"0 2.9rem"},className:"flex justify-between items-center",children:[q.jsx(LC,{$theme:Ae,$touchFriendly:De,children:re.filter(Ce=>Ce.show).map(Ce=>{const tt=Ce.icon;return q.jsx(r0,{title:Ce.label,placement:"top",children:q.jsx("button",{className:Ce.active?"active":"",onClick:Ce.onClick,children:q.jsx(tt,{size:18})})},Ce.key)})}),!f&&c=="ready"&&!Z&&q.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017 ",q.jsx("span",{style:{color:Ae.colors.primary},children:V||0})," ","tokens"]})]})},rt=Tt((re,Ce)=>{var de;const tt=re.metadata||{},Ue=re.faq_question||tt.sourceFileName||((de=tt.source)==null?void 0:de.split("/").pop())||"FAQ",ae=re.folder_path||tt.folder_path||tt.knowledge_base_name||"",He=ae?`${ae} - ${Ue}`:Ue,Me=`\u77E5\u8BC6\u5E93${Ce}\u540D\uFF1A${He}`,st=String(re.pk??re.order_num??re.id??""),he=Ka(re.score??tt.score);return{id:st,file_id:st,file_name:Me,file_type:"faq",type:"faq",path:"",score:he,rrf_score:he,tags:[],source:re.folder_path||"",order_num:st,pk:st,faq_question:re.faq_question,faq_answer:re.faq_answer,folder_path:re.folder_path,metadata:tt,faqIndex:Ce,...re}},[]),zt=mt(()=>{if(!E)return[];let re=[];try{const Ce=typeof E=="string"?Zh(E):E;re=Array.isArray(Ce)?Ce:[Ce]}catch{return[]}return re.map((Ce,tt)=>{var ce;const Ue=Ce.metadata||{},ae=Ce.faq_question||Ue.sourceFileName||((ce=Ue.source)==null?void 0:ce.split("/").pop())||"FAQ",He=Ce.folder_path||Ue.folder_path||Ue.knowledge_base_name||"",Me=He?`${He} - ${ae}`:ae,st=`\u77E5\u8BC6\u5E93${tt+1}\u540D\uFF1A${Me}`,he=String(Ce.pk??Ce.order_num??Ce.id??""),de=Ka(Ce.score??Ue.score);return{id:he,file_id:he,file_name:st,file_type:"faq",type:"faq",path:"",score:de,rrf_score:de,tags:[],source:Ce.folder_path||"",order_num:he,pk:he,faq_question:Ce.faq_question,faq_answer:Ce.faq_answer,folder_path:Ce.folder_path,metadata:Ue,faqIndex:tt+1,...Ce}})},[E]),er=mt(()=>{if(!A)return[];let re=[];try{let ae;if(typeof A=="string")ae=JSON.parse(A);else if(Array.isArray(A))ae=A;else if(typeof A=="object")ae=[A];else return[];re=Array.isArray(ae)?ae:[]}catch(ae){return console.warn("\u89E3\u6790 reference \u6570\u636E\u5931\u8D25:",ae,A),[]}let Ce=re.map(ae=>{var He;try{const Me=ae.metadata||{};let st="";Me.type==="video"&&Me.source_name&&typeof Me.source_name=="string"?st=Me.source_name:ae.name&&typeof ae.name=="string"?st=ae.name:ae.file_name&&typeof ae.file_name=="string"?st=ae.file_name:Me.title&&typeof Me.title=="string"?st=Me.title:Me.source&&typeof Me.source=="string"?st=Me.source.split("/").pop()||"":ae.order_num?st=String(ae.order_num):st="\u672A\u77E5\u6587\u6863";let he="pdf";if(Me.type&&typeof Me.type=="string")he=Me.type.toLowerCase();else if(ae.name&&typeof ae.name=="string"){const ft=ae.name.split(".").pop();ft&&(he=ft.toLowerCase())}else if(Me.source&&typeof Me.source=="string"){const ft=Me.source.split(".").pop();ft&&(he=ft.toLowerCase())}else if(ae.file_path&&typeof ae.file_path=="string"){const ft=ae.file_path.split(".").pop();ft&&(he=ft.toLowerCase())}const de=ae.parsedFilePath||Me.file_path||ae.file_path||ae.convertedFilePath||Me.link||Me.source_link||"",{metadata:ce,...Xe}=ae,ct=Me.source||"",Mt=Ka(ae.score??Me.score);return{file_id:Me.id||ae.uid||"",file_name:st,file_type:he,path:de,score:Mt,tags:[],parsedFilePath:ae.parsedFilePath,source:ct,...Xe}}catch(Me){console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Me,ae);const{metadata:st,...he}=ae,de=((He=ae.metadata)==null?void 0:He.source)||ae.file_path||ae.convertedFilePath||"",ce=Ka(ae.score);return{file_id:ae.uid||"",file_name:ae.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:ae.convertedFilePath||ae.file_path||"",score:ce,tags:[],parsedFilePath:ae.parsedFilePath,source:de,...he}}});const tt=Wa(y||[]);if(tt&&tt.length){const ae=tt.filter(Me=>Me.fromtype==="0"),He=tt.filter(Me=>Me.fromtype==="3");Ce=Ce.map(Me=>{const st=ae.map(de=>{var Mt;const ce=re.find(ft=>String(ft.order_num)===String(de.id));if(!ce||!((Mt=ce==null?void 0:ce.metadata)!=null&&Mt.source))return null;const Xe=Me.source||"",ct=ce.metadata.source||"";return Xe&&ct&&Xe!==ct?null:{id:de.id||"",index:D(String(de.id))||de.indexId||"",image_urls:de.imageUrls?Array.isArray(de.imageUrls)?de.imageUrls:[de.imageUrls]:de.image_urls?de.image_urls.split(";").map(ft=>ft.trim()).filter(Boolean):[],metadata:ce.metadata||{},order_num:ce.order_num,parsedFilePath:ce.parsedFilePath}}).filter(de=>de!==null),he=He.map(de=>{var Mt;const ce=re.find(ft=>String(ft.order_num)===String(de.id));if(!ce||!((Mt=ce==null?void 0:ce.metadata)!=null&&Mt.source))return null;const Xe=Me.source||"",ct=ce.metadata.source||"";return Xe&&ct&&Xe!==ct?null:{id:de.id||"",index:D(String(de.id))||de.indexId||"",image_urls:de.imageUrls?Array.isArray(de.imageUrls)?de.imageUrls:[de.imageUrls]:de.image_urls?de.image_urls.split(";").map(ft=>ft.trim()).filter(Boolean):[],metadata:ce.metadata||{},order_num:ce.order_num,parsedFilePath:ce.parsedFilePath}}).filter(de=>de!==null);return{...Me,tags:[...st,...he]}})}const Ue=new Map;return Ce.filter(ae=>{const He=(ae==null?void 0:ae.source)||ae.file_name;return He?Ue.has(He)?!1:(Ue.set(He,!0),!0):!0}).sort((ae,He)=>Number((He==null?void 0:He.score)??0)-Number((ae==null?void 0:ae.score)??0))},[A,y,xt,D]),Dr=mt(()=>{if(!B)return[];let re=[];try{let Ue;if(typeof B=="string")Ue=JSON.parse(B);else if(Array.isArray(B))Ue=B;else if(typeof B=="object")Ue=[B];else return[];re=Array.isArray(Ue)?Ue:[]}catch(Ue){return console.warn("\u89E3\u6790 webReference \u6570\u636E\u5931\u8D25:",Ue,B),[]}if(!(re!=null&&re.length))return[];let Ce=re.map(Ue=>{var He,Me,st;const ae=(Ue==null?void 0:Ue.score)??((He=Ue==null?void 0:Ue.metadata)==null?void 0:He.score);return{link:(Me=Ue==null?void 0:Ue.metadata)==null?void 0:Me.link,file_name:(st=Ue==null?void 0:Ue.metadata)==null?void 0:st.title,score:Ka(ae),tags:[]}});const tt=Wa(y||[]);if(tt&&tt.length){const Ue=tt.filter(ae=>ae.fromtype==="1");Ce=Ce.map(ae=>{const He=Ue.map(Me=>{var he;const st=re.find(de=>String(de.order_num)===String(Me.id));return!st||!((he=st==null?void 0:st.metadata)!=null&&he.title)||st.metadata.title!==ae.file_name?null:{id:Me.id||"",index:D(String(Me.id))||Me.indexId||"",image_urls:Me.imageUrls?Array.isArray(Me.imageUrls)?Me.imageUrls:[Me.imageUrls]:Me.image_urls?Me.image_urls.split(";").map(de=>de.trim()).filter(Boolean):[],metadata:st.metadata||{},order_num:st.order_num}}).filter(Me=>Me!==null);return{...ae,tags:He}})}return Ce.sort((Ue,ae)=>Number((ae==null?void 0:ae.score)??0)-Number((Ue==null?void 0:Ue.score)??0))},[B,y,xt,D]),J=mt(()=>{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 re=[];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 ae=JSON.parse(F);re=Array.isArray(ae)?ae:[],console.log("[ChatMessageAdapter] \u89E3\u6790\u5B57\u7B26\u4E32\u683C\u5F0F\u6210\u529F\uFF0Crefs.length:",re.length)}else if(Array.isArray(F))re=F,console.log("[ChatMessageAdapter] graphReference \u662F\u6570\u7EC4\u683C\u5F0F\uFF0Crefs.length:",re.length);else if(typeof F=="object"&&F!==null)re=[F],console.log("[ChatMessageAdapter] graphReference \u662F\u5BF9\u8C61\u683C\u5F0F\uFF0C\u8F6C\u6362\u4E3A\u6570\u7EC4\uFF0Crefs.length:",re.length);else return console.warn("[ChatMessageAdapter] graphReference \u683C\u5F0F\u4E0D\u652F\u6301:",typeof F,F),[]}catch(ae){return console.error("[ChatMessageAdapter] Failed to parse graphReference:",ae,F),[]}const Ce=(ae,He)=>{const Me=(ae==null?void 0:ae.metadata)??{},st=(ae==null?void 0:ae.graphName)??(ae==null?void 0:ae.graph_name)??(Me==null?void 0:Me.index_name)??`\u56FE\u8C31${He+1}`,he=(ae==null?void 0:ae.fetchUrl)??(ae==null?void 0:ae.fetch_url)??(Me==null?void 0:Me.fetchUrl)??(Me==null?void 0:Me.fetch_url),de=Array.isArray(ae==null?void 0:ae.cyphers)&&ae.cyphers.length?ae.cyphers:typeof(ae==null?void 0:ae.cypher)=="string"&&ae.cypher.trim()?[ae.cypher]:[];let ce=[];if(Array.isArray(ae==null?void 0:ae.traceNodes)&&ae.traceNodes.length)ce=ae.traceNodes;else if(Array.isArray(Me==null?void 0:Me.trace_nodes)&&Me.trace_nodes.length){const Mt=(ae==null?void 0:ae.order_num)??(ae==null?void 0:ae.orderNum)??(Me==null?void 0:Me.order_num);ce=Me.trace_nodes.map((ft,Re)=>({...ft,id:String(Mt??(ft==null?void 0:ft.id)??(ft==null?void 0:ft.vid)??`${(ae==null?void 0:ae.id)??`graph-${He}`}_${Re}`),metadata:(ft==null?void 0:ft.metadata)??{}}))}else(ae!=null&&ae.order_num||ae!=null&&ae.orderNum)&&(ce=[{id:String((ae==null?void 0:ae.order_num)??(ae==null?void 0:ae.orderNum)),name:(ae==null?void 0:ae.name)??st,nodeType:"graph",metadata:{}}]);const{metadata:Xe,...ct}=ae||{};return{id:(ae==null?void 0:ae.id)||`graph-${He}`,graphName:st,fetchUrl:he,cyphers:de,traceNodes:ce,tags:[],...ct}};let tt=re.map((ae,He)=>Ce(ae,He));const Ue=Wa(y||[]);if(Ue&&Ue.length){const ae=Ue.filter(He=>He.fromtype==="2");tt=tt.map(He=>{let Me=[];Array.isArray(He.traceNodes)&&He.traceNodes.length>0?Me=He.traceNodes.map((de,ce)=>({id:de.id,index:D(String(de.id))??ce+1,image_urls:[],metadata:de.metadata||{},...de})):Me=ae.filter(de=>String(de.id)===String(He.id)).map(de=>({id:de.id||"",index:D(String(de.id))||de.indexId||"",image_urls:de.imageUrls?Array.isArray(de.imageUrls)?de.imageUrls:[de.imageUrls]:de.image_urls?de.image_urls.split(";").map(ce=>ce.trim()).filter(Boolean):[],metadata:{}}));const st=new Set,he=Me.filter(de=>st.has(String(de.id))?!1:(st.add(String(de.id)),!0)).sort((de,ce)=>Number(de.index)-Number(ce.index));return{...He,tags:he}})}return tt},[F,y,xt,D]),gr=mt(()=>{const re=[...Wa(y||[]).filter(Ce=>Ce.imageUrls&&Array.isArray(Ce.imageUrls)).flatMap(Ce=>Ce.imageUrls),...ut];return Array.from(new Set(re))},[y,ut]),se=mt(()=>typeof n!="string"?[]:PC(n),[n]),gn=mt(()=>Array.from(new Set([...gr||[],...se||[]])),[gr,se]),Dt=mt(()=>{var re,Ce,tt,Ue,ae,He,Me,st;if(!T)return null;try{const he=typeof T=="string"?JSON.parse(T):T;if(Array.isArray(he)&&he.length>0){const de=he[0];if(de.retrieveSqlData)return{dataFetchUrl:de.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:de.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:de.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:de.retrieveSqlData.total||0,type:de.retrieveSqlData.type||"COLLECTION",preData:{columns:((Ce=(re=de.retrieveSqlData.preData)==null?void 0:re[0])==null?void 0:Ce.columns)||[],rows:((Ue=(tt=de.retrieveSqlData.preData)==null?void 0:tt[0])==null?void 0:Ue.data)||[]}}}return he.retrieveSqlData?{dataFetchUrl:he.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:he.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:he.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:he.retrieveSqlData.total||0,type:he.retrieveSqlData.type||"COLLECTION",preData:{columns:((He=(ae=he.retrieveSqlData.preData)==null?void 0:ae[0])==null?void 0:He.columns)||[],rows:((st=(Me=he.retrieveSqlData.preData)==null?void 0:Me[0])==null?void 0:st.data)||[]}}:{dataFetchUrl:he.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:he.databaseName||"\u6570\u636E\u5E93",tableName:he.tableName||"\u6570\u636E\u8868",total:he.total||0,type:he.type||"COLLECTION",preData:he.preData||{columns:[],rows:[]}}}catch(he){return console.error("Failed to parse databaseReference:",he),null}},[T]),vn=re=>{const{dataSourceType:Ce,databaseName:tt,businessTableName:Ue,tableName:ae}=re;return Ce==="DataTable"?`${tt||"\u6570\u636E\u5E93"} - ${Ue||"\u6570\u636E\u8868"}`:Ce==="DirectDB"?`${tt||"\u6570\u636E\u5E93"} - ${ae||"\u6570\u636E\u8868"}`:tt||Ue||ae||"\u6570\u636E\u5E93"};We.useEffect(()=>{or(null),ot([])},[j]),We.useEffect(()=>{var tt;const re=Ue=>{try{const ae=typeof Ue=="string"?JSON.parse(Ue):Ue;return ae?Array.isArray(ae)?ae:[ae]:[]}catch(ae){return console.error("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] normalizeDbReferenceList \u5931\u8D25:",ae),[]}},Ce=(Ue,ae)=>{if(!Array.isArray(Ue))return[];const He=ae!=null&&ae.id?String(ae.id):void 0,Me=He?D(He):void 0,st=He?M[He]:void 0,he=Me??st??(ae==null?void 0:ae.referenceIndex)??void 0,de=He&&he!==void 0?[{id:He,index:he}]:[];return Ue.map(ce=>{var Xe,ct,Mt,ft;return{...ce,id:ce.id||He||ce.tableName,referenceId:He,referenceIndex:he,tags:de,fetchUrl:ce.fetchUrl||((Xe=ae==null?void 0:ae.retrieveSqlData)==null?void 0:Xe.fetchUrl)||(Dt==null?void 0:Dt.dataFetchUrl)||"",databaseName:ce.databaseName||((ct=ae==null?void 0:ae.retrieveSqlData)==null?void 0:ct.databaseName)||(Dt==null?void 0:Dt.databaseName)||"",tableName:ce.tableName||((Mt=ae==null?void 0:ae.retrieveSqlData)==null?void 0:Mt.tableName)||(Dt==null?void 0:Dt.tableName)||"",dataSourceType:ce.dataSourceType||((ft=ae==null?void 0:ae.retrieveSqlData)==null?void 0:ft.type)||(Dt==null?void 0:Dt.type)||"DataTable"}})};if(T){const Ue=re(T),ae=[];if(Ue.forEach(He=>{var Me,st,he;if(Array.isArray(He==null?void 0:He.retrieveTableDataList)&&He.retrieveTableDataList.length)ae.push(...Ce(He.retrieveTableDataList,He));else if(Array.isArray((he=(st=(Me=He==null?void 0:He.retrieveSqlData)==null?void 0:Me.preData)==null?void 0:st[0])==null?void 0:he.data)&&He.retrieveSqlData.preData[0].data.length){const de={businessTableName:He.retrieveSqlData.tableName||"\u6570\u636E\u8868",databaseName:He.retrieveSqlData.databaseName||(Dt==null?void 0:Dt.databaseName)||"\u6570\u636E\u5E93",tableName:He.retrieveSqlData.tableName||(Dt==null?void 0:Dt.tableName)||"\u6570\u636E\u8868",fetchUrl:He.retrieveSqlData.fetchUrl||(Dt==null?void 0:Dt.dataFetchUrl)||"",dataSourceType:He.retrieveSqlData.type||"DirectDB",total:He.retrieveSqlData.total};ae.push(...Ce([de],He))}}),ae.length>0){yt(ae);return}if((tt=Dt==null?void 0:Dt.preData)!=null&&tt.rows){const He=Ce(Dt.preData.rows,{});yt(He);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");yt([])},[T,Dt,j,M,D]);const br=Tt(()=>{try{const re=Array.isArray(er)?er:[],Ce=Array.isArray(zt)?zt:[],tt=Wa(y||[]),Ue=tt.filter(Re=>Re.fromtype==="10"),ae=Ce.map(Re=>{const kt=Ue.filter(ir=>String(ir.id)===String(Re.pk||Re.order_num)).map(ir=>({id:ir.id||"",index:D(String(ir.id))??ir.indexId??"",image_urls:ir.imageUrls?Array.isArray(ir.imageUrls)?ir.imageUrls:[ir.imageUrls]:ir.image_urls?ir.image_urls.split(";").map(qr=>qr.trim()).filter(Boolean):[],metadata:Re.metadata||{}}));return{...Re,tags:kt}}),He=[...re,...ae],Me=Array.isArray(Dr)?Dr:[],st=Array.isArray(J)?J:[],he=gn,de=Re=>typeof xt!="string"?!1:new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Re}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").test(xt),ce=Re=>{const kt=new Map;return Re.forEach(ir=>{if(ir.id){const qr=String(ir.id);if(!kt.has(qr))kt.set(qr,ir);else{const bn=kt.get(qr),ve=Number(ir.index)||0,fr=Number(bn.index)||0;(ve<fr||ve===fr&&!bn.index)&&kt.set(qr,ir)}}}),Array.from(kt.values())},Xe=He.map(Re=>({...Re,tags:ce((Re.tags||[]).filter(kt=>kt.id&&de(String(kt.id))))})),ct=Me.map(Re=>({...Re,tags:ce((Re.tags||[]).filter(kt=>kt.id&&de(String(kt.id))))})),Mt=st.map(Re=>({...Re,tags:ce((Re.tags||[]).filter(kt=>kt.id&&de(String(kt.id))))})),ft=Bt&&Bt.length>0?Bt.map(Re=>({id:Re.id||Re.tableName||Re.referenceId||"",databaseName:Re.databaseName||(Dt==null?void 0:Dt.databaseName)||"",tableName:Re.tableName||(Dt==null?void 0:Dt.tableName)||"",fetchUrl:Re.fetchUrl||(Dt==null?void 0:Dt.dataFetchUrl)||"",score:Ka(Re.score),tags:Re.tags||[],referenceIndex:Re.referenceIndex,metadata:Re.metadata?{...Re.metadata,data:void 0,dataList:void 0,rows:void 0,preData:void 0}:{}})):[];return{queryId:j,knowledgeRefs:Xe,webRefs:ct,graphRefs:Mt,databaseRefs:ft,images:he,raw:{reference:A,webReference:B,faqReference:E,graphReference:F,databaseReference:T,retriveNodes:tt}}}catch{return{queryId:j,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{reference:A,webReference:B,faqReference:E,graphReference:F,databaseReference:T,retriveNodes:[]}}}},[er,zt,Dr,J,Dt,Bt,gn,y,j,A,B,E,F,T,xt,D]),wt=mt(()=>{if(!f)return[];if(Array.isArray(S))return S;if(typeof S=="string"&&S)try{return JSON.parse(S)}catch{return[]}return[]},[f,S]),na=()=>{if(!f||wt.length===0)return null;const re=he=>{if(!he)return"";if(typeof he=="string"&&(he.includes("KB")||he.includes("MB")||he.includes("GB")||he.includes("B")))return he;const de=typeof he=="string"?parseFloat(he)||0:he;return de<1024?`${de}B`:de<1024*1024?`${(de/1024).toFixed(1)}KB`:`${(de/1024/1024).toFixed(1)}MB`},Ce=he=>he!=null&&he.status&&(String(he.status).toLowerCase()==="uploading"||String(he.status).toLowerCase()==="parsing")?!1:!!(he!=null&&he.url||he!=null&&he.filePath||he!=null&&he.convertedFilePath),tt=wt.filter(he=>{const de=(he.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(de.toLowerCase())}),Ue=wt.filter(he=>{const de=(he.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(de.toLowerCase())}),ae=tt.filter(Ce),He=tt.filter(he=>!Ce(he)),Me=Ue.filter(Ce),st=Ue.filter(he=>!Ce(he));return Me.length+st.length,q.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:[(ae.length>0||He.length>0)&&q.jsx(Jl,{$theme:Ae,children:q.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[He.map((he,de)=>{var ce;return q.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:q.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((ce=Ae.colors)==null?void 0:ce.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${de}`)}),ae.map(he=>q.jsxs("div",{className:"gallery-item",onClick:()=>{X==null||X("reference_file:click",{...he,file:he.name,file_type:he.file_type||"image",url:he.url||he.filePath,parse_url:he.parseUrl||he.convertedFilePath,retrieve_tags:he.retrieveTags||[],file_id:he.uid||he.file_id,parsed_file_type:he.parsed_file_type||"image",references:he,type:he.type||"image",isUploadFile:!0,pdfPages:he.pdfPages||0})},children:[q.jsx(Zl,{src:he.url||he.filePath,alt:he.name,className:"gallery-image",token:e,url:t,eventsEmit:lt}),q.jsx("div",{className:"gallery-overlay",children:he.name})]},he.uid||he.name))]})}),(Me.length>0||st.length>0)&&q.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"6px",alignItems:f?"flex-end":"flex-start",width:"100%"},children:q.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:[st.map((he,de)=>{const ce=(he.name||"").split(".").pop()||"",Xe=Ql(ce,p,18);return q.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:[q.jsx("div",{className:"pt-0.5 flex-shrink-0",style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:q.jsx("div",{style:{transform:"scale(1.2)",transformOrigin:"center"},children:Xe})}),q.jsx("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:q.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[q.jsx("div",{style:{height:"13px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"140px"}}),q.jsx("div",{style:{height:"12px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"40px"}})]})})]},`pending-doc-${he.uid||de}`)}),Me.map(he=>{var Mt;const de=(he.name||"").split(".").pop()||"",ce=he.size??((Mt=he.file)==null?void 0:Mt.size)??he.fileSize,Xe=re(ce),ct=Ql(de,p,18);return q.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:he.name,onClick:()=>{X==null||X("reference_file:click",{...he,file:he.name,file_type:he.file_type||de,url:he.url||he.filePath,parse_url:he.parseUrl||he.convertedFilePath,retrieve_tags:he.retrieveTags||[],file_id:he.uid||he.file_id,parsed_file_type:he.parsed_file_type||de,references:he,type:he.type||"file",isUploadFile:!0,pdfPages:he.pdfPages||0})},children:[q.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:q.jsx("div",{style:{transform:"scale(1.65)",marginBottom:"4px",transformOrigin:"center"},children:ct})}),q.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[q.jsx("div",{className:"flex",children:q.jsx("div",{className:"flex items-center justify-between gap-1.5",children:q.jsx("span",{className:"text-[13px] font-medium truncate max-w-[140px]",title:he.name,children:he.name})})}),q.jsx("div",{className:" text-[12px] text-gray-400 whitespace-nowrap",children:Xe})]})]},he.uid||he.name)})]})})]})},aa=()=>{if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases:",Q),!Q||!Array.isArray(Q)||Q.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases \u4E3A\u7A7A\u6216\u4E0D\u662F\u6570\u7EC4"),null;const re=[];let Ce=0;if(Q.forEach((ce,Xe)=>{ce&&ce.treeData&&Array.isArray(ce.treeData)&&(ce.treeData.forEach(ct=>{re.push({...ct,_kbIndex:Xe,_kbName:ce.knowledgeBaseName||""})}),Ce+=ce.totalFileCount||0)}),re.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u6709\u6548\u7684 treeData"),null;console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u5408\u5E76\u540E\u7684 allTreeData \u957F\u5EA6:",re.length);const tt=re.filter(ce=>ce.type==="dir"),Ue=re.filter(ce=>ce.type==="file");console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - dirItems:",tt.length,"fileItems:",Ue.length);let ae=[],He="\u6309\u76EE\u5F55\u5206\u7C7B";if(tt.length>0){const ce=tt.map((Xe,ct)=>({id:`${Xe._kbIndex}-${Xe.name||ct}`||ct,name:Xe.name||"",documentCount:Xe.fileCount||0,visible:!0,itemType:"dir"}));ae.push(...ce)}if(Ue.length>0){const ce=Ue.map((Xe,ct)=>({id:`${Xe._kbIndex}-${Xe.name||ct}`||ct,name:Xe.name||"\u672A\u77E5\u6587\u4EF6",documentCount:0,visible:!0,itemType:"file",fileType:Xe.fileType||""}));ae.push(...ce)}if(tt.length===0&&Ue.length>0&&(He="\u77E5\u8BC6\u5E93\u6587\u6863"),console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - categories:",ae),ae.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u53EF\u7528\u7684\u5206\u7C7B"),null;const Me=Ce>0?Ce:Ue.length,st=ae.slice(0,5),he=ae.length>5,de={title:"\u77E5\u8BC6\u5E93\u6587\u6863\u5217\u8868",subtitle:He,totalCount:Me,categories:st,showViewAll:he,viewAllText:"\u67E5\u770B\u5168\u90E8>>"};return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - result:",de),de},ka=()=>{if(f)return null;const re=aa();return re?q.jsx(DC,{data:re,styles:p,onCategoryClick:Ce=>{X==null||X("knowledge_base_category:click",{category:Ce,knowledgeBase:Q==null?void 0:Q[0]})},onViewAllClick:()=>{X==null||X("knowledge_base_view_all:click",{knowledgeBases:Q})}}):null},yo=()=>{var de;if(f)return null;console.log("[ChatMessageAdapter] renderReferences \u5F00\u59CB - referenceMode:",ye),console.log("[ChatMessageAdapter] renderReferences - graphReference \u539F\u59CB\u503C:",F),console.log("[ChatMessageAdapter] renderReferences - parseGraphReferenceData:",J);const re=[...Array.isArray(er)?er:[],...Array.isArray(zt)?zt:[]],Ce=Array.isArray(Dr)?Dr:[],tt=Array.isArray(J)?J:[];console.log("[ChatMessageAdapter] renderReferences - knowledgeList:",re.length,"webList:",Ce.length,"graphList:",tt.length),console.log("[ChatMessageAdapter] renderReferences - graphList \u8BE6\u60C5:",tt);const Ue=re.length>0&&G!==5,ae=Ce.length>0,He=tt.length>0;console.log("[ChatMessageAdapter] renderReferences - hasKnowledgeRefs:",Ue,"hasWebRefs:",ae,"hasGraphRefs:",He);const Me=gn.length>0,st=Bt&&Bt.length>0,he=Ue||ae||He||Me||st;if(console.log("[ChatMessageAdapter] renderReferences - hasAny:",he),console.log("[\u5F15\u7528\u6E32\u67D3] databaseReference:",T),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData:",Bt),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData.length:",Bt==null?void 0:Bt.length),console.log("[\u5F15\u7528\u6E32\u67D3] hasDatabaseRefs:",st),ye==="button"){if(console.log("[ChatMessageAdapter] referenceMode === button, hasAny:",he),!he)return console.log("[ChatMessageAdapter] hasAny \u4E3A false\uFF0C\u4E0D\u6E32\u67D3\u5F15\u7528"),null;const ce=Ue&&(re==null?void 0:re.length)||0,Xe=ae&&(Ce==null?void 0:Ce.length)||0,ct=He&&(tt==null?void 0:tt.length)||0,Mt=st&&(Bt==null?void 0:Bt.length)||0;let ft=ce+Xe+ct+Mt;return ft===0&&Me&&(ft=1),q.jsxs(q.Fragment,{children:[Me&&q.jsx(Jl,{$theme:Ae,children:q.jsx("div",{className:"gallery-grid",children:gn.map((Re,kt)=>q.jsxs("div",{className:"gallery-item",onClick:()=>{X==null||X("reference_file:click",{file:`\u56FE${kt+1}`,file_type:"image",url:Re,parse_url:Re,retrieve_tags:[],references:{url:Re},type:"image",isUploadFile:!1})},children:[q.jsx(Zl,{src:Re,alt:`\u56FE${kt+1}`,className:"gallery-image",token:e,url:t,eventsEmit:lt}),q.jsxs("div",{className:"gallery-overlay",children:["\u56FE",kt+1]})]},Re+kt))})}),q.jsx("div",{style:{padding:"6px 2.9rem"},children:q.jsxs("button",{style:{cursor:"pointer",color:((de=Ae.colors)==null?void 0:de.textDisabled)||"#86909C"},className:"text-sm flex items-center gap-x-1 px-3 py-1 rounded border border-gray-200 hover:border-blue-300 transition-colors",onClick:()=>{const Re=br();X==null||X("references:click",Re)},onMouseEnter:Re=>{var kt;Re.currentTarget.style.color=((kt=Ae.colors)==null?void 0:kt.primary)||"#3b82f6"},onMouseLeave:Re=>{var kt;Re.currentTarget.style.color=((kt=Ae.colors)==null?void 0:kt.textDisabled)||"#86909C"},children:[q.jsx(xw,{size:16}),q.jsxs("span",{children:["\u77E5\u8BC6\u6EAF\u6E90",ft?` ${ft}`:""]}),q.jsx(vw,{size:16})]})})]})}return he?q.jsxs(q.Fragment,{children:[Me&&q.jsx(Jl,{$theme:Ae,children:q.jsx("div",{className:"gallery-grid",children:gn.map((ce,Xe)=>q.jsxs("div",{className:"gallery-item",onClick:()=>{X==null||X("reference_file:click",{file:`\u56FE${Xe+1}`,file_type:"image",url:ce,parse_url:ce,retrieve_tags:[],references:{url:ce},type:"image",isUploadFile:!1})},children:[q.jsx(Zl,{src:ce,alt:`\u56FE${Xe+1}`,className:"gallery-image",token:e,url:t,eventsEmit:lt}),q.jsxs("div",{className:"gallery-overlay",children:["\u56FE",Xe+1]})]},ce+Xe))})}),Ue&&q.jsxs(Ti,{$theme:Ae,children:[q.jsx("div",{className:"reference-title justify-between items-center flex",children:q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${re.length})`}),re.length>2&&q.jsx("div",{onClick:()=>dt(!Ge),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ge?q.jsx(To,{size:16,className:"text-[#b4b4b4]"}):q.jsx(No,{size:16,className:"text-[#b4b4b4]"})})]})}),q.jsx("div",{className:"reference-list",children:(Ge?re:re.slice(0,2)).map((ce,Xe)=>ce&&q.jsx("div",{className:"reference-item",children:q.jsxs("div",{className:"file-info flex items-end gap-2",children:[q.jsx("div",{className:"flex-shrink-0",children:(()=>{const ct=ce.file_type||(ce.file_name||"").split(".").pop()||"pdf",Mt=(ce.file_name||"").split(".").pop()||"file";return ct==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(ct)?q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:q.jsx(Dw,{size:16,className:"text-red-600"})}):q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:Ql(Mt,p,16)})})()}),q.jsx("div",{className:"flex-1 min-w-0",children:q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:ct=>{ct.stopPropagation(),X==null||X("knowledge_referenceFile_title:click",{data:{...ce,file_type:ce.file_type,file_name:ce.file_name,metadata:ce.metadata,parsedFilePath:ce.parsedFilePath}})},children:ce.file_name})}),q.jsx("div",{className:"flex items-center gap-1",children:(()=>{const ct=new Set,Mt=(ce.tags||[]).filter(Re=>ct.has(Re.id)?!1:(ct.add(Re.id),!0)).sort((Re,kt)=>Number(Re.index)-Number(kt.index)),ft=Re=>{if(typeof xt!="string")return Re;const kt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Re}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(xt);return kt?kt[1]:Re};return Mt.slice(0,10).map(Re=>q.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:kt=>{kt.stopPropagation();const ir=Ft(ce,Re.id),qr=ce.file_type==="video"?"3":"0";X==null||X("retrive_tag:click",{tagInfo:ir||ce,fromtype:qr,leaf:{id:Re.id,fromtype:qr},attributes:{}})},children:ft(Re.id)},Re.id))})()}),typeof ce.score=="number"&&q.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ce.score).toFixed(2)]}),ce.file_type!=="video"&&q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx(yw,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:r?"pointer":"not-allowed"},onClick:ct=>{r&&(ct.stopPropagation(),X==null||X("referenceFile_download",{data:{...ce,file_type:ce.file_type,file_name:ce.file_name,metadata:ce.metadata,parsedFilePath:ce.parsedFilePath}}))}}),q.jsx("div",{className:"w-px h-4 bg-gray-300"}),q.jsx(ww,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:ct=>{ct.stopPropagation(),X==null||X("referenceFile_filechat",{data:{...ce,file_type:ce.file_type,file_name:ce.file_name,metadata:ce.metadata,parsedFilePath:ce.parsedFilePath}})}})]})]})},ce.file_id||Xe))})]}),st&&q.jsxs(Ti,{$theme:Ae,children:[q.jsx("div",{className:"reference-title justify-between items-center flex",children:q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Bt.length||0})`}),Bt.length>2&&q.jsx("div",{onClick:()=>Ct(!Lt),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Lt?q.jsx(To,{size:16,className:"text-[#b4b4b4]"}):q.jsx(No,{size:16,className:"text-[#b4b4b4]"})})]})}),q.jsx("div",{className:"reference-list",children:(Lt?Bt:Bt.slice(0,2)).map((ce,Xe)=>q.jsx("div",{className:"reference-item",children:q.jsxs("div",{className:"file-info flex items-end gap-2",children:[q.jsx("div",{className:"flex-shrink-0",children:q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:q.jsx(bw,{size:20,className:"text-blue-600"})})}),q.jsx("div",{className:"flex-1 min-w-0",children:q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:ct=>{ct.stopPropagation(),X==null||X("database_referenceFile_title:click",{data:{...ce,file_type:"database",file_name:vn(ce),metadata:ce,parsedFilePath:ce.fetchUrl||(Dt==null?void 0:Dt.dataFetchUrl)||"",file:ce.databaseName||"database",url:ce.fetchUrl||(Dt==null?void 0:Dt.dataFetchUrl)||"",parse_url:ce.fetchUrl||(Dt==null?void 0:Dt.dataFetchUrl)||"",retrieve_tags:ce.tags||[],references:ce,type:"database",isUploadFile:!1}})},children:vn(ce)})}),q.jsx("div",{className:"flex items-center gap-1",children:(Array.isArray(ce.tags)&&ce.tags.length?ce.tags:[{id:ce.referenceId||`database-${Xe}`,index:ce.referenceIndex??Xe+1}]).map(ct=>q.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",children:ct.index??Xe+1},`${ct.id||"database"}-${ct.index}`))}),typeof ce.score=="number"&&q.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ce.score).toFixed(2)]})]})},ce.tableName||Xe))})]}),ae&&q.jsxs(Ti,{$theme:Ae,children:[q.jsx("div",{className:"reference-title justify-between items-center flex",children:q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Ce.length})`}),Ce.length>2&&q.jsx("div",{onClick:()=>at(!Je),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Je?q.jsx(To,{size:16,className:"text-[#b4b4b4]"}):q.jsx(No,{size:16,className:"text-[#b4b4b4]"})})]})}),q.jsx("div",{className:"reference-list",children:(Je?Ce:Ce.slice(0,2)).map((ce,Xe)=>q.jsx("div",{className:"reference-item",children:q.jsxs("div",{className:"file-info flex items-end gap-2",children:[q.jsx("div",{className:"flex-shrink-0",children:q.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:q.jsx(Kn,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),q.jsx("div",{className:"flex-1 min-w-0",children:q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:ct=>{ct.stopPropagation(),X==null||X("web_referenceFile_title:click",{data:{...ce,file_type:ce.file_type,file_name:ce.file_name,metadata:ce.metadata,parsedFilePath:ce.parsedFilePath,file:ce.file_name,url:ce.link,parse_url:ce.link,retrieve_tags:ce.tags||[],references:ce,type:"file",isUploadFile:!1}})},children:ce.file_name})}),q.jsx("div",{className:"flex items-center gap-1",children:(()=>{const ct=new Set,Mt=(ce.tags||[]).filter(Re=>ct.has(Re.id)?!1:(ct.add(Re.id),!0)).sort((Re,kt)=>Number(Re.index)-Number(kt.index)),ft=Re=>{if(typeof xt!="string")return Re;const kt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Re}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(xt);return kt?kt[1]:Re};return Mt.slice(0,1).map(Re=>q.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:kt=>{kt.stopPropagation();const ir=Ft(ce,Re.id);X==null||X("retrive_tag:click",{tagInfo:ir||ce,fromtype:"1",leaf:{id:Re.id,fromtype:"1"},attributes:{}})},children:ft(Re.id)},Re.id))})()}),typeof ce.score=="number"&&q.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ce.score).toFixed(2)]})]})},(ce.link||"")+Xe))})]}),He&&q.jsxs(Ti,{$theme:Ae,children:[q.jsx("div",{className:"reference-title justify-between items-center flex",children:q.jsxs("div",{className:"flex items-center gap-2",children:[q.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${tt.length})`}),tt.length>2&&q.jsx("div",{onClick:()=>$t(!At),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:At?q.jsx(To,{size:16,className:"text-[#b4b4b4]"}):q.jsx(No,{size:16,className:"text-[#b4b4b4]"})})]})}),q.jsx("div",{className:"reference-list",children:(At?tt:tt.slice(0,2)).map((ce,Xe)=>q.jsx("div",{className:"reference-item",children:q.jsxs("div",{className:"file-info flex items-end gap-2",children:[q.jsx("div",{className:"flex-shrink-0",children:q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:q.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"})})}),q.jsx("div",{className:"flex-1 min-w-0",children:q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate",children:ce.graphName||`\u56FE\u8C31${Xe+1}`})}),q.jsx("div",{className:"flex items-center gap-1",children:(()=>{const ct=new Set,Mt=(ce.tags||[]).filter(Re=>ct.has(Re.id)?!1:(ct.add(Re.id),!0)).sort((Re,kt)=>Number(Re.index)-Number(kt.index)),ft=Re=>{if(typeof xt!="string")return null;const kt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Re}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(xt);return kt?kt[1]??null:null};return Mt.map(Re=>({tag:Re,num:ft(Re.id)})).filter(Re=>Re.num!==null&&Re.num!==void 0&&Re.num!=="").slice(0,10).map(({tag:Re,num:kt})=>q.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:ir=>{ir.stopPropagation();const qr=Array.isArray(ce.traceNodes)?ce.traceNodes.find(bn=>String(bn==null?void 0:bn.id)===String(Re.id)):void 0;X==null||X("retrive_tag:click",{tagInfo:{id:Re.id,index:Re.index,image_urls:Re.image_urls||[]},fromtype:"2",graph:{id:ce.id,graphName:ce.graphName,fetchUrl:ce.fetchUrl,cyphers:ce.cyphers},traceNode:qr})},children:kt},Re.id))})()})]})},ce.id||Xe))})]})]}):null},$n=()=>f||!_||!te||te.length===0?null:q.jsx(_C,{$theme:Ae,$compact:Te,children:q.jsx("div",{className:"follow-up-list",children:te.map((re,Ce)=>q.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Ce*260}ms`},onClick:()=>{X==null||X("chatbox:follow_up_question_click",{question:re,queryId:j})},children:re},`${String(re)}-${Ce}`))})});return q.jsxs(RC,{$align:i,$isUser:f,$isMobile:Te,children:[q.jsxs(zC,{$isUser:f,children:[q.jsx(IC,{$src:it,$isUser:f}),Le&&q.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:Le})]}),na(),q.jsx(jC,{$isUser:f,$theme:Ae,$compact:Te,children:q.jsx("div",{className:"message-card",children:q.jsx("div",{className:"message-text",children:a==="stream"?q.jsxs(q.Fragment,{children:[!f&&Wt(),Pt(),q.jsx(Bs,{dataSource:{type:Qo.MARKDOWN,content:xt},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:zr,eventsEmit:X,extraProps:ur,enablePrism:Se},`md-${(xt||"").length}-think-${je}`)]}):q.jsx("div",{style:{whiteSpace:"pre-wrap"},children:gt})})})}),ka(),yo(),!f&&Et(),$n(),typeof document<"u"&&Tg(q.jsx(qC,{$show:Oe!==null,onClick:()=>Ie(null),children:Oe&&q.jsxs("div",{className:"modal-content",onClick:re=>re.stopPropagation(),children:[q.jsx("img",{src:Oe,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),q.jsx("button",{className:"modal-close",onClick:()=>Ie(null),children:"\u5173\u95ED"})]})}),document.body)]})};qe.div.attrs({className:"retrive-chat-message-container"})`
|
|
1661
|
-
display: flex;
|
|
1662
|
-
flex-direction: column;
|
|
1663
|
-
width: 100%;
|
|
1664
|
-
margin-bottom: 16px;
|
|
1665
|
-
`;qe.div.attrs({className:"retrive-chat-message-header"})`
|
|
1666
|
-
display: flex;
|
|
1667
|
-
align-items: flex-start;
|
|
1668
|
-
gap: 12px;
|
|
1669
|
-
margin-bottom: 12px;
|
|
1670
|
-
`;qe.div.attrs({className:"retrive-chat-avatar-wrapper"})`
|
|
1671
|
-
width: 40px;
|
|
1672
|
-
height: 40px;
|
|
1673
|
-
border-radius: 50%;
|
|
1674
|
-
overflow: hidden;
|
|
1675
|
-
flex-shrink: 0;
|
|
1676
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1677
|
-
|
|
1678
|
-
img {
|
|
1679
|
-
width: 100%;
|
|
1680
|
-
height: 100%;
|
|
1681
|
-
object-fit: cover;
|
|
1682
|
-
}
|
|
1683
|
-
`;qe.div.attrs({className:"retrive-chat-content-wrapper"})`
|
|
1684
|
-
flex: 1;
|
|
1685
|
-
display: flex;
|
|
1686
|
-
flex-direction: column;
|
|
1687
|
-
align-items: ${({isUser:e})=>e?"flex-end":"flex-start"};
|
|
1688
|
-
`;qe.div.attrs({className:"retrive-chat-timestamp"})`
|
|
1689
|
-
font-size: 12px;
|
|
1690
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1691
|
-
margin-bottom: 8px;
|
|
1692
|
-
`;qe.div.attrs({className:"retrive-chat-user-bubble"})`
|
|
1693
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.userBackground)||"#3b82f6"}};
|
|
1694
|
-
color: white;
|
|
1695
|
-
padding: 12px 16px;
|
|
1696
|
-
border-radius: 12px;
|
|
1697
|
-
max-width: 80%;
|
|
1698
|
-
word-wrap: break-word;
|
|
1699
|
-
`;qe.div.attrs({className:"retrive-chat-ai-message-card"})`
|
|
1700
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1701
|
-
border-radius: 12px;
|
|
1702
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
1703
|
-
padding: 0;
|
|
1704
|
-
width: 100%;
|
|
1705
|
-
max-width: 100%;
|
|
1706
|
-
overflow: hidden;
|
|
1707
|
-
`;qe.div.attrs({className:"retrive-chat-tabs-container"})`
|
|
1708
|
-
display: flex;
|
|
1709
|
-
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1710
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1711
|
-
`;qe.button.attrs({className:"retrive-chat-tab-button"})`
|
|
1712
|
-
display: flex;
|
|
1713
|
-
position: relative;
|
|
1714
|
-
align-items: center;
|
|
1715
|
-
gap: 6px;
|
|
1716
|
-
padding: 12px 20px;
|
|
1717
|
-
background: transparent;
|
|
1718
|
-
border: none;
|
|
1719
|
-
border-bottom: 2px solid ${({active:e,theme:t})=>{var r;return e?((r=t.colors)==null?void 0:r.primary)||"#3b82f6":"transparent"}};
|
|
1720
|
-
color: ${({active:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.text)||"#374151":((n=t.colors)==null?void 0:n.disabled)||"#9ca3af"}};
|
|
1721
|
-
font-size: 14px;
|
|
1722
|
-
font-weight: ${({active:e})=>e?500:400};
|
|
1723
|
-
cursor: pointer;
|
|
1724
|
-
transition: all 0.2s ease;
|
|
1725
|
-
|
|
1726
|
-
&:hover {
|
|
1727
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1728
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
svg {
|
|
1732
|
-
width: 16px;
|
|
1733
|
-
height: 16px;
|
|
1734
|
-
}
|
|
1735
|
-
`;qe.span.attrs({className:"retrive-chat-tab-badge"})`
|
|
1736
|
-
position: absolute;
|
|
1737
|
-
top: 4px;
|
|
1738
|
-
right: 10px;
|
|
1739
|
-
display: inline-flex;
|
|
1740
|
-
align-items: center;
|
|
1741
|
-
justify-content: center;
|
|
1742
|
-
min-width: 16px;
|
|
1743
|
-
height: 16px;
|
|
1744
|
-
padding: 0 4px;
|
|
1745
|
-
border-radius: 999px;
|
|
1746
|
-
font-size: 11px;
|
|
1747
|
-
font-weight: 500;
|
|
1748
|
-
background: #ef4444;
|
|
1749
|
-
color: #ffffff;
|
|
1750
|
-
line-height: 1;
|
|
1751
|
-
`;qe.div.attrs({className:"retrive-chat-tab-content"})`
|
|
1752
|
-
padding: 20px;
|
|
1753
|
-
`;qe.div.attrs({className:"retrive-chat-llm-config-container"})`
|
|
1754
|
-
margin-bottom: 20px;
|
|
1755
|
-
`;qe.div.attrs({className:"retrive-chat-llm-config-title"})`
|
|
1756
|
-
display: flex;
|
|
1757
|
-
align-items: center;
|
|
1758
|
-
gap: 8px;
|
|
1759
|
-
font-size: 14px;
|
|
1760
|
-
font-weight: 500;
|
|
1761
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1762
|
-
margin-bottom: 12px;
|
|
1763
|
-
|
|
1764
|
-
.dot {
|
|
1765
|
-
width: 8px;
|
|
1766
|
-
height: 8px;
|
|
1767
|
-
border-radius: 50%;
|
|
1768
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1769
|
-
}
|
|
1770
|
-
`;qe.div.attrs({className:"retrive-chat-llm-config-grid"})`
|
|
1771
|
-
display: grid;
|
|
1772
|
-
grid-template-columns: repeat(2, 1fr);
|
|
1773
|
-
gap: 12px;
|
|
1774
|
-
`;qe.div.attrs({className:"retrive-chat-llm-config-item"})`
|
|
1775
|
-
display: flex;
|
|
1776
|
-
align-items: center;
|
|
1777
|
-
gap: 8px;
|
|
1778
|
-
font-size: 13px;
|
|
1779
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1780
|
-
|
|
1781
|
-
.dot {
|
|
1782
|
-
width: 6px;
|
|
1783
|
-
height: 6px;
|
|
1784
|
-
border-radius: 50%;
|
|
1785
|
-
flex-shrink: 0;
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
.dot-green {
|
|
1789
|
-
background: #10b981;
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
.dot-blue {
|
|
1793
|
-
background: #3b82f6;
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
.dot-purple {
|
|
1797
|
-
background: #8b5cf6;
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
.dot-yellow {
|
|
1801
|
-
background: #f59e0b;
|
|
1802
|
-
}
|
|
1803
|
-
`;qe.div.attrs({className:"retrive-chat-semantic-content"})`
|
|
1804
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1805
|
-
line-height: 1.6;
|
|
1806
|
-
font-size: 14px;
|
|
1807
|
-
`;qe.div.attrs({className:"retrive-chat-stats-container"})`
|
|
1808
|
-
display: flex;
|
|
1809
|
-
gap: 16px;
|
|
1810
|
-
padding: 12px 20px;
|
|
1811
|
-
border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1812
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1813
|
-
font-size: 12px;
|
|
1814
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1815
|
-
`;qe.div.attrs({className:"retrive-chat-empty-state"})`
|
|
1816
|
-
padding: 24px 16px;
|
|
1817
|
-
text-align: center;
|
|
1818
|
-
font-size: 13px;
|
|
1819
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1820
|
-
`;qe.div.attrs({className:"retrive-chat-tools-container"})`
|
|
1821
|
-
display: flex;
|
|
1822
|
-
gap: 8px;
|
|
1823
|
-
padding: 12px 20px;
|
|
1824
|
-
border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1825
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1826
|
-
`;qe.button.attrs({className:"retrive-chat-tool-button"})`
|
|
1827
|
-
display: flex;
|
|
1828
|
-
align-items: center;
|
|
1829
|
-
justify-content: center;
|
|
1830
|
-
width: 32px;
|
|
1831
|
-
height: 32px;
|
|
1832
|
-
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1833
|
-
border-radius: 6px;
|
|
1834
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1835
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1836
|
-
cursor: pointer;
|
|
1837
|
-
transition: all 0.2s ease;
|
|
1838
|
-
|
|
1839
|
-
&:hover {
|
|
1840
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1841
|
-
border-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
svg {
|
|
1845
|
-
width: 16px;
|
|
1846
|
-
height: 16px;
|
|
1847
|
-
}
|
|
1848
|
-
`;qe.div.attrs({className:"retrive-chat-prompt-content"})`
|
|
1849
|
-
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
1850
|
-
font-size: 13px;
|
|
1851
|
-
line-height: 1.6;
|
|
1852
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1853
|
-
white-space: pre-wrap;
|
|
1854
|
-
word-break: break-word;
|
|
1855
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1856
|
-
padding: 16px;
|
|
1857
|
-
border-radius: 8px;
|
|
1858
|
-
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1859
|
-
`;qe.div.attrs({className:"retrive-chat-config-container"})`
|
|
1860
|
-
display: grid;
|
|
1861
|
-
grid-template-columns: 1fr 1fr;
|
|
1862
|
-
gap: 24px;
|
|
1863
|
-
`;qe.div.attrs({className:"retrive-chat-config-section"})`
|
|
1864
|
-
display: flex;
|
|
1865
|
-
flex-direction: column;
|
|
1866
|
-
`;qe.div.attrs({className:"retrive-chat-config-section-title"})`
|
|
1867
|
-
display: flex;
|
|
1868
|
-
align-items: center;
|
|
1869
|
-
gap: 8px;
|
|
1870
|
-
font-size: 14px;
|
|
1871
|
-
font-weight: 500;
|
|
1872
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1873
|
-
margin-bottom: 16px;
|
|
1874
|
-
|
|
1875
|
-
.dot {
|
|
1876
|
-
width: 8px;
|
|
1877
|
-
height: 8px;
|
|
1878
|
-
border-radius: 50%;
|
|
1879
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1880
|
-
}
|
|
1881
|
-
`;qe.div.attrs({className:"retrive-chat-config-item-list"})`
|
|
1882
|
-
display: flex;
|
|
1883
|
-
flex-direction: column;
|
|
1884
|
-
gap: 12px;
|
|
1885
|
-
`;qe.div.attrs({className:"retrive-chat-config-item"})`
|
|
1886
|
-
display: flex;
|
|
1887
|
-
justify-content: space-between;
|
|
1888
|
-
align-items: center;
|
|
1889
|
-
padding: 8px 0;
|
|
1890
|
-
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1891
|
-
|
|
1892
|
-
&:last-child {
|
|
1893
|
-
border-bottom: none;
|
|
1894
|
-
}
|
|
1895
|
-
`;qe.span.attrs({className:"retrive-chat-config-item-label"})`
|
|
1896
|
-
font-size: 13px;
|
|
1897
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1898
|
-
`;qe.span.attrs({className:"retrive-chat-config-item-value"})`
|
|
1899
|
-
font-size: 13px;
|
|
1900
|
-
font-weight: 500;
|
|
1901
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1902
|
-
`;qe.span.attrs({className:"retrive-chat-switch-status"})`
|
|
1903
|
-
font-size: 13px;
|
|
1904
|
-
font-weight: 500;
|
|
1905
|
-
color: ${({enabled:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.success)||"#10b981":((n=t.colors)==null?void 0:n.disabled)||"#9ca3af"}};
|
|
1906
|
-
`;qe.div.attrs({className:"retrive-chat-retrieve-container"})`
|
|
1907
|
-
display: flex;
|
|
1908
|
-
flex-direction: column;
|
|
1909
|
-
gap: 4px;
|
|
1910
|
-
`;qe.div.attrs({className:"retrive-chat-retrieve-chunk"})`
|
|
1911
|
-
display: flex;
|
|
1912
|
-
flex-direction: column;
|
|
1913
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1914
|
-
border-radius: 12px;
|
|
1915
|
-
border: 1px solid #f7f7f7;
|
|
1916
|
-
overflow: hidden;
|
|
1917
|
-
transition: all 0.3s ease;
|
|
1918
|
-
|
|
1919
|
-
&:hover {
|
|
1920
|
-
|
|
1921
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
|
|
1922
|
-
|
|
1923
|
-
}
|
|
1924
|
-
`;qe.div.attrs({className:"retrive-chat-retrieve-chunk-header"})`
|
|
1925
|
-
display: flex;
|
|
1926
|
-
align-items: center;
|
|
1927
|
-
justify-content: space-between;
|
|
1928
|
-
padding: 5px 10px;
|
|
1929
|
-
cursor: pointer;
|
|
1930
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#fafafa"}};
|
|
1931
|
-
border-bottom: 1px solid #f7f7f7;
|
|
1932
|
-
transition: background-color 0.2s ease;
|
|
1933
|
-
|
|
1934
|
-
&:hover {
|
|
1935
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f5f5f5"}};
|
|
1936
|
-
}
|
|
1937
|
-
`;qe.div.attrs({className:"retrive-chat-retrieve-chunk-title"})`
|
|
1938
|
-
display: flex;
|
|
1939
|
-
align-items: center;
|
|
1940
|
-
gap: 10px;
|
|
1941
|
-
font-size: 15px;
|
|
1942
|
-
font-weight: 600;
|
|
1943
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1944
|
-
|
|
1945
|
-
.dot {
|
|
1946
|
-
width: 10px;
|
|
1947
|
-
height: 10px;
|
|
1948
|
-
border-radius: 50%;
|
|
1949
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1950
|
-
flex-shrink: 0;
|
|
1951
|
-
}
|
|
1952
|
-
`;qe.div.attrs({className:"retrive-chat-retrieve-chunk-content"})`
|
|
1953
|
-
display: ${({$isExpanded:e})=>e?"flex":"none"};
|
|
1954
|
-
flex-direction: column;
|
|
1955
|
-
gap: 20px;
|
|
1956
|
-
padding: 6px;
|
|
1957
|
-
animation: ${({$isExpanded:e})=>e?"fadeIn":"none"} 0.3s ease;
|
|
1958
|
-
`;qe.div.attrs({className:"retrive-chat-chunk-info-container"})`
|
|
1959
|
-
padding: 12px 0px;
|
|
1960
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1961
|
-
display: flex;
|
|
1962
|
-
align-items: center;
|
|
1963
|
-
flex-wrap: nowrap;
|
|
1964
|
-
gap: 4px;
|
|
1965
|
-
font-size: 13px;
|
|
1966
|
-
overflow-x: auto;
|
|
1967
|
-
`;qe.div.attrs({className:"retrive-chat-chunk-info-item"})`
|
|
1968
|
-
display: flex;
|
|
1969
|
-
align-items: center;
|
|
1970
|
-
gap: 6px;
|
|
1971
|
-
white-space: nowrap;
|
|
1972
|
-
flex-shrink: 0;
|
|
1973
|
-
`;qe.span.attrs({className:"retrive-chat-chunk-info-label"})`
|
|
1974
|
-
font-size: 13px;
|
|
1975
|
-
font-weight: 400;
|
|
1976
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#6b7280"}};
|
|
1977
|
-
`;qe.span.attrs({className:"retrive-chat-chunk-info-value"})`
|
|
1978
|
-
font-size: 13px;
|
|
1979
|
-
font-weight: 600;
|
|
1980
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1981
|
-
padding: 2px 8px;
|
|
1982
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1983
|
-
border-radius: 4px;
|
|
1984
|
-
`;qe.div.attrs({className:"retrive-chat-chunk-content-section"})`
|
|
1985
|
-
display: flex;
|
|
1986
|
-
flex-direction: column;
|
|
1987
|
-
gap: 4px;
|
|
1988
|
-
`;qe.div.attrs({className:"retrive-chat-chunk-section-title"})`
|
|
1989
|
-
font-size: 14px;
|
|
1990
|
-
font-weight: 600;
|
|
1991
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1992
|
-
margin-bottom: 4px;
|
|
1993
|
-
`;qe.div.attrs({className:"retrive-chat-chunk-content-wrapper"})`
|
|
1994
|
-
padding: 12px;
|
|
1995
|
-
background: #f5f5f5;
|
|
1996
|
-
border-radius: 8px;
|
|
1997
|
-
|
|
1998
|
-
`;qe.div.attrs({className:"retrive-chat-chunk-file-source-section"})`
|
|
1999
|
-
display: flex;
|
|
2000
|
-
flex-direction: column;
|
|
2001
|
-
gap: 5px;
|
|
2002
|
-
padding: 15px;
|
|
2003
|
-
`;qe.div.attrs({className:"retrive-chat-file-source"})`
|
|
2004
|
-
display: flex;
|
|
2005
|
-
align-items: flex-end;
|
|
2006
|
-
gap: 8px;
|
|
2007
|
-
`;const HC=qe.div`
|
|
2008
|
-
position: relative;
|
|
2009
|
-
width: 100%;
|
|
2010
|
-
height: 100%;
|
|
2011
|
-
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
2012
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
2013
|
-
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
2014
|
-
|
|
2015
|
-
/* 自定义滚动条 */
|
|
2016
|
-
&::-webkit-scrollbar {
|
|
2017
|
-
width: 8px;
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
&::-webkit-scrollbar-track {
|
|
2021
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
2022
|
-
border-radius: 4px;
|
|
2023
|
-
}
|
|
2024
|
-
|
|
2025
|
-
&::-webkit-scrollbar-thumb {
|
|
2026
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
2027
|
-
border-radius: 4px;
|
|
2028
|
-
|
|
2029
|
-
&:hover {
|
|
2030
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
2031
|
-
}
|
|
2032
|
-
}
|
|
2033
|
-
`,KC=qe.div`
|
|
2034
|
-
position: relative;
|
|
2035
|
-
width: 100%;
|
|
2036
|
-
height: 100%;
|
|
2037
|
-
overflow: auto;
|
|
2038
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
2039
|
-
|
|
2040
|
-
/* 自定义滚动条 */
|
|
2041
|
-
&::-webkit-scrollbar {
|
|
2042
|
-
width: 8px;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
&::-webkit-scrollbar-track {
|
|
2046
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
2047
|
-
border-radius: 4px;
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
|
-
&::-webkit-scrollbar-thumb {
|
|
2051
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
2052
|
-
border-radius: 4px;
|
|
2053
|
-
|
|
2054
|
-
&:hover {
|
|
2055
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2058
|
-
`,Xh=qe.div`
|
|
2059
|
-
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
2060
|
-
min-height: ${e=>e.height||"auto"};
|
|
2061
|
-
|
|
2062
|
-
/* 富文本内容样式增强 */
|
|
2063
|
-
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
2064
|
-
scroll-margin-top: 2rem;
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
& img {
|
|
2068
|
-
max-width: 100%;
|
|
2069
|
-
height: auto;
|
|
2070
|
-
border-radius: 0.5rem;
|
|
2071
|
-
margin: 1rem 0;
|
|
2072
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
2073
|
-
transition: transform 0.2s ease-in-out;
|
|
2074
|
-
|
|
2075
|
-
&:hover {
|
|
2076
|
-
transform: scale(1.02);
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
/* 表格样式 - 主题感知 */
|
|
2081
|
-
& .table-container {
|
|
2082
|
-
overflow: auto;
|
|
2083
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
2084
|
-
border-radius: 6px;
|
|
2085
|
-
margin: 1rem 0;
|
|
2086
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
2087
|
-
}
|
|
2088
|
-
|
|
2089
|
-
& .table-container table {
|
|
2090
|
-
width: 100%;
|
|
2091
|
-
border-collapse: collapse;
|
|
2092
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
2093
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
& .table-container th,
|
|
2097
|
-
& .table-container td {
|
|
2098
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
2099
|
-
padding: 8px 12px;
|
|
2100
|
-
text-align: left;
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
& .table-container th {
|
|
2104
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
2105
|
-
font-weight: 600;
|
|
2106
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
|
-
& .table-container td {
|
|
2110
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
& .table-container tr:nth-child(even) {
|
|
2114
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
& pre {
|
|
2118
|
-
position: relative;
|
|
2119
|
-
|
|
2120
|
-
&::before {
|
|
2121
|
-
content: '';
|
|
2122
|
-
position: absolute;
|
|
2123
|
-
top: 0;
|
|
2124
|
-
left: 0;
|
|
2125
|
-
right: 0;
|
|
2126
|
-
height: 2px;
|
|
2127
|
-
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
2128
|
-
border-radius: 2px 2px 0 0;
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
& blockquote {
|
|
2133
|
-
position: relative;
|
|
2134
|
-
|
|
2135
|
-
&::before {
|
|
2136
|
-
content: '"';
|
|
2137
|
-
position: absolute;
|
|
2138
|
-
top: -0.5rem;
|
|
2139
|
-
left: -1rem;
|
|
2140
|
-
font-size: 3rem;
|
|
2141
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
2142
|
-
opacity: 0.3;
|
|
2143
|
-
}
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
`,WC=qe.div`
|
|
2148
|
-
display: flex;
|
|
2149
|
-
align-items: center;
|
|
2150
|
-
justify-content: center;
|
|
2151
|
-
padding: 2rem;
|
|
2152
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
2153
|
-
font-size: 0.875rem;
|
|
2154
|
-
|
|
2155
|
-
&::before {
|
|
2156
|
-
content: '';
|
|
2157
|
-
width: 20px;
|
|
2158
|
-
height: 20px;
|
|
2159
|
-
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
2160
|
-
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
2161
|
-
border-radius: 50%;
|
|
2162
|
-
animation: spin 1s linear infinite;
|
|
2163
|
-
margin-right: 0.5rem;
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
@keyframes spin {
|
|
2167
|
-
0% { transform: rotate(0deg); }
|
|
2168
|
-
100% { transform: rotate(360deg); }
|
|
2169
|
-
}
|
|
2170
|
-
`,VC=qe.div`
|
|
2171
|
-
display: flex;
|
|
2172
|
-
flex-direction: column;
|
|
2173
|
-
align-items: center;
|
|
2174
|
-
justify-content: center;
|
|
2175
|
-
padding: 3rem;
|
|
2176
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
2177
|
-
text-align: center;
|
|
2178
|
-
|
|
2179
|
-
&::before {
|
|
2180
|
-
content: '📄';
|
|
2181
|
-
font-size: 3rem;
|
|
2182
|
-
margin-bottom: 1rem;
|
|
2183
|
-
}
|
|
2184
|
-
`,UC=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:a=!1,onLoadMore:i,isLoadingMore:c=!1,size:u="sm",basePath:f,theme:d={},onChange:m,onScroll:g,onScrollToTop:v,onScrollToBottom:w,onSegmentClick:x,className:C,style:p,height:A="100%",enablePrism:B=!1})=>{const E=typeof B=="boolean"?B:!1,T=ds(),F=mt(()=>{var me,we,De,Te,be,Ae,Le,ut,ot;return{primaryColor:(d==null?void 0:d.primaryColor)||((me=T==null?void 0:T.colors)==null?void 0:me.primary)||"#007bff",secondaryColor:(d==null?void 0:d.secondaryColor)||((we=T==null?void 0:T.colors)==null?void 0:we.secondary)||"#6c757d",backgroundColor:(d==null?void 0:d.backgroundColor)||((De=T==null?void 0:T.colors)==null?void 0:De.background)||"#ffffff",textColor:(d==null?void 0:d.textColor)||((Te=T==null?void 0:T.colors)==null?void 0:Te.text)||"#24292f",borderColor:(d==null?void 0:d.borderColor)||((be=T==null?void 0:T.colors)==null?void 0:be.border)||"#dee2e6",disabledBackground:(d==null?void 0:d.disabledBackground)||((Ae=T==null?void 0:T.colors)==null?void 0:Ae.disabledBackground)||"#f8f9fa",hoverBackground:(d==null?void 0:d.hoverBackground)||((Le=T==null?void 0:T.colors)==null?void 0:Le.hoverBackground)||"#e9ecef",borderRadius:(d==null?void 0:d.borderRadius)||((ut=T==null?void 0:T.space)==null?void 0:ut.radius)||"8px",padding:(d==null?void 0:d.padding)||((ot=T==null?void 0:T.space)==null?void 0:ot.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}},[T,d]),P=Kt(0);P.current+=1,console.log("[Markdownit] render count:",P.current);const[S,L]=St([]),[O,W]=St({start:0,end:10}),[j,Y]=St(0),[Z,_]=St(0),[H,V]=St(!1),[G,te]=St(!1),[K,X]=St(!1),ye=Kt(null),xe=Kt(null),ke=Kt(null),Be=mt(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);Qt(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(Be)?Be.length:"n/a"),L(Be)},[Be]);const _e=mt(()=>t?`${S.length*r}px`:"auto",[S.length,r,t]),Q=mt(()=>{if(!t)return S;const me=Math.max(0,O.start-n),we=Math.min(S.length,O.end+n);return S.slice(me,we).map((De,Te)=>({...De,virtualIndex:me+Te}))},[S,O,t,n]),oe=Tt(me=>{const{scrollTop:we,scrollHeight:De,clientHeight:Te}=me.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:we,scrollHeight:De,clientHeight:Te});const be=!t&&!g&&!v&&!w&&!a;if(console.log("[Markdownit] passiveOnly:",be),be||Y(Ae=>Ae!==we?(console.log("[Markdownit] setScrollTop:",we),we):Ae),t&&!be){const Ae=Math.floor(we/r),Le=Math.min(S.length,Ae+Math.ceil(Z/r)+1);W(ut=>ut.start!==Ae||ut.end!==Le?(console.log("[Markdownit] setVisibleRange:",{start:Ae,end:Le}),{start:Ae,end:Le}):ut)}if(!be){const Ae=we<=10;Ae!==G&&(console.log("[Markdownit] isAtTop ->",Ae),te(Ae),Ae&&v&&(console.log("[Markdownit] onScrollToTop callback"),v()))}if(!be){const Ae=we+Te>=De-10;Ae!==K&&(console.log("[Markdownit] isAtBottom ->",Ae),X(Ae),Ae&&w&&(console.log("[Markdownit] onScrollToBottom callback"),w()))}g&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:we,scrollHeight:De}),g(we,De)),a&&i&&!H&&!c&&De-we-Z<100&&ue()},[t,r,S.length,Z,a,i,H,c,G,K,v,w,g]),ue=Tt(async()=>{if(!(!i||H||c)){V(!0);try{const me=S[S.length-1],we=await i(me.id);L(De=>[...De,...we])}catch(me){console.error("Failed to load more segments:",me)}finally{V(!1)}}},[i,S,H,c]);Qt(()=>{const me=()=>{ye.current&&_(ye.current.clientHeight)};return me(),window.addEventListener("resize",me),()=>window.removeEventListener("resize",me)},[]);const le=Tt((me,we)=>{const De={type:me.type,content:me.content},Te=t?{position:"absolute",top:`${(me.virtualIndex||we)*r}px`,left:0,right:0,height:`${r}px`}:{};return q.jsx("div",{style:Te,onClick:()=>x==null?void 0:x(me.id,me),className:x?"cursor-pointer hover:bg-gray-50":"",children:q.jsx(Bs,{dataSource:De,isEditing:!1,size:u,basePath:f,theme:F,onChange:m,enablePrism:E,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},me.id)},[t,r,F,m,x,E]),Se=()=>(console.log("[Markdownit] renderContent segments.len:",S.length,"enableVirtualScroll:",t),S.length===0?q.jsxs(VC,{theme:F,children:[q.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),q.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?q.jsx("div",{ref:ke,style:{height:_e,position:"relative"},children:Q.map(le)}):q.jsx("div",{ref:ke,children:S.map(le)})),Fe=()=>!H&&!c?null:q.jsx(WC,{theme:F,children:c?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return q.jsx(HC,{ref:ye,theme:F,$isVirtualized:t,className:C,style:{height:A,...p},children:t?q.jsx(KC,{ref:xe,theme:F,onScroll:oe,children:q.jsx(Xh,{theme:F,height:_e,children:Se()})}):q.jsxs(Xh,{theme:F,onScroll:oe,children:[Se(),Fe()]})})},i9=e=>{const{onRendered:t}=e;return Qt(()=>{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]),q.jsx("div",{"data-markdownit-root":"1",children:q.jsx(UC,{...e})})};qe.div.attrs({className:"prompt-temp-designer-editor-wrapper"})`
|
|
2185
|
-
position: relative;
|
|
2186
|
-
`;qe.div.attrs({className:"prompt-temp-designer-template-suggest-hint"})`
|
|
2187
|
-
position: absolute;
|
|
2188
|
-
right: 12px;
|
|
2189
|
-
bottom: 8px;
|
|
2190
|
-
padding: 2px 8px;
|
|
2191
|
-
border-radius: 12px;
|
|
2192
|
-
background: rgba(5, 90, 255, 0.06);
|
|
2193
|
-
color: #055aff;
|
|
2194
|
-
font-size: 12px;
|
|
2195
|
-
display: flex;
|
|
2196
|
-
align-items: center;
|
|
2197
|
-
gap: 4px;
|
|
2198
|
-
pointer-events: none;
|
|
2199
|
-
user-select: none;
|
|
2200
|
-
`;const Qh=e=>{if(!e||e.trim()==="")return[{type:"paragraph",children:[{text:""}]}];const t=/<template\b([^>]*)>([\s\S]*?)<\/template>/g,r=[];let n=0,a,i=0;for(console.log("\u5F00\u59CB\u89E3\u6790\u6A21\u677F\u5B57\u7B26\u4E32:",e);(a=t.exec(e))!==null;){const c=a[0],u=a[1]||"",f=(a[2]||"").trim(),d=a.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 g=A=>{const B=new RegExp(`${A}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
2201
|
-
])*?)\\1`,"i"),E=u.match(B);return E?E[2]:void 0},v=/\S/.test(u),w=g("key"),x=g("placeholder"),C=w||`template-${Date.now()}-${i++}`,p={type:"template",key:C,placeholder:v?x||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":f||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:v?f:"",style:"blue",fieldId:C,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)},e0=e=>{if(!e||e.length===0)return"";const t=n=>{let a="",i="";return n.forEach(c=>{if(console.log("\u5904\u7406\u5B50\u5143\u7D20:",c),(c==null?void 0:c.type)==="template"){const f=c.key||c.fieldId||"",d=c.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",m=c.value||"",g=` key="${String(f)}" placeholder="${String(d)}"`;a+=`<template${g}>${m}</template>`,i=m||d;return}if((c==null?void 0:c.text)!==void 0){const f=c.text||"";if(f.trim()===""){console.log("\u8DF3\u8FC7\u7A7A\u6587\u672C\u5143\u7D20");return}if(f===i){console.log("\u8DF3\u8FC7\u91CD\u590D\u6587\u672C\u5143\u7D20");return}console.log(`\u627E\u5230\u6587\u672C\u5143\u7D20: ${f}`),a+=f,i=f;return}console.log("\u672A\u77E5\u5143\u7D20\u7C7B\u578B:",c);const u=(c==null?void 0:c.text)||"";u.trim()!==""&&u!==i&&(a+=u,i=u)}),a};console.log("\u8F6C\u6362Slate\u6570\u636E:",JSON.stringify(e,null,2));const r=(Array.isArray(e)?e:[]).map(n=>n?n.children?t(n.children):n.text||"":"").join(`
|
|
2202
|
-
`);return console.log("\u8F6C\u6362\u7ED3\u679C:",r),r},GC=e=>!e||e.length===0?"":(Array.isArray(e)?e:[]).map(t=>{if(!t)return"";if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{(n==null?void 0:n.text)!==void 0?r+=n.text:(n==null?void 0:n.type)==="template"&&(r+=n.value||n.placeholder||"")}),r}).join(`
|
|
2203
|
-
`),YC=e=>!e||e.length===0?"":(Array.isArray(e)?e:[]).map(t=>{if(!t)return"";if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{(n==null?void 0:n.text)!==void 0?r+=n.text:(n==null?void 0:n.type)==="template"&&(r+=`\`\`\`template\`\`\`
|
|
2204
|
-
${n.value||n.placeholder}\`\`\`
|
|
2205
|
-
\`\`\`
|
|
2206
|
-
`)}),r}).join(`
|
|
2207
|
-
`),ZC=e=>!e||e.length===0?"":(Array.isArray(e)?e:[]).map(t=>{if(!t)return"";if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{if((n==null?void 0:n.text)!==void 0)r+=n.text;else if((n==null?void 0:n.type)==="template"){const a=n.key||n.fieldId||"",i=n.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",c=n.value||"",u=` key="${String(a)}" placeholder="${String(i)}"`;r+=`<template${u}>${c}</template>`}}),r}).join(`
|
|
2208
|
-
`),s9=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:a,enablePrism:i=!1})=>{var A,B,E,T,F,P,S,L,O,W,j,Y,Z,_,H,V,G,te,K,X,ye,xe,ke,Be,_e,Q,oe,ue,le,Se,Fe,me,we,De,Te,be,Ae,Le,ut,ot,Oe,Ie,Ge,dt,Je,at,Lt,Ct,At,$t,je,fe;const c=ds(),u={theme:{colors:{primary:((A=c==null?void 0:c.colors)==null?void 0:A.primary)||"#055AFF",secondary:((B=c==null?void 0:c.colors)==null?void 0:B.secondary)||"#84ADFF",background:((E=c==null?void 0:c.colors)==null?void 0:E.background)||"#E5EEFF",text:((T=c==null?void 0:c.colors)==null?void 0:T.text)||"#055AFF",border:((F=c==null?void 0:c.colors)==null?void 0:F.border)||"#84ADFF",success:((P=c==null?void 0:c.colors)==null?void 0:P.success)||"#008000",warning:((S=c==null?void 0:c.colors)==null?void 0:S.warning)||"#FFA500",error:((L=c==null?void 0:c.colors)==null?void 0:L.error)||"#FF0000",info:((O=c==null?void 0:c.colors)==null?void 0:O.info)||"#0000FF",disabled:((W=c==null?void 0:c.colors)==null?void 0:W.disabled)||"#808080",disabledBackground:((j=c==null?void 0:c.colors)==null?void 0:j.disabledBackground)||"#F5F5F5",disabledText:((Y=c==null?void 0:c.colors)==null?void 0:Y.disabledText)||"#808080",shadow:((Z=c==null?void 0:c.colors)==null?void 0:Z.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((_=c==null?void 0:c.colors)==null?void 0:_.appBackground)||"transparent",listBackground:((H=c==null?void 0:c.colors)==null?void 0:H.listBackground)||"#f9f9f9",dashboardBackground:((V=c==null?void 0:c.colors)==null?void 0:V.dashboardBackground)||"#ffffff",textSecondary:((G=c==null?void 0:c.colors)==null?void 0:G.textSecondary)||"#6b7280"},space:{sidebar:((te=c==null?void 0:c.space)==null?void 0:te.sidebar)||"260px",size:((K=c==null?void 0:c.space)==null?void 0:K.size)||"12px",radius:((X=c==null?void 0:c.space)==null?void 0:X.radius)||"6px",padding:((ye=c==null?void 0:c.space)==null?void 0:ye.padding)||"16px",margin:((xe=c==null?void 0:c.space)==null?void 0:xe.margin)||"20px",shadow:((ke=c==null?void 0:c.space)==null?void 0:ke.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((Be=c==null?void 0:c.space)==null?void 0:Be.lineHeight)||"1.6"},icons:(c==null?void 0:c.icons)||{},fonts:{body:{size:((Q=(_e=c==null?void 0:c.fonts)==null?void 0:_e.body)==null?void 0:Q.size)||"14px",weight:((ue=(oe=c==null?void 0:c.fonts)==null?void 0:oe.body)==null?void 0:ue.weight)||"normal",family:((Se=(le=c==null?void 0:c.fonts)==null?void 0:le.body)==null?void 0:Se.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((me=(Fe=c==null?void 0:c.fonts)==null?void 0:Fe.heading)==null?void 0:me.size)||"16px",weight:((De=(we=c==null?void 0:c.fonts)==null?void 0:we.heading)==null?void 0:De.weight)||"600",family:((be=(Te=c==null?void 0:c.fonts)==null?void 0:Te.heading)==null?void 0:be.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((Ae=c==null?void 0:c.others)==null?void 0:Ae.baseFontWeight)||"normal"}},mode:(c==null?void 0:c.mode)||"light"},f={backgroundColor:((Le=c==null?void 0:c.colors)==null?void 0:Le.background)||"#E5EEFF",borderColor:((ut=c==null?void 0:c.colors)==null?void 0:ut.border)||"#84ADFF",borderRadius:((ot=c==null?void 0:c.space)==null?void 0:ot.radius)||"6px",padding:((Oe=c==null?void 0:c.space)==null?void 0:Oe.padding)||"8px 12px",margin:"2px",fontSize:((Ge=(Ie=c==null?void 0:c.fonts)==null?void 0:Ie.body)==null?void 0:Ge.size)||"14px",fontWeight:((Je=(dt=c==null?void 0:c.fonts)==null?void 0:dt.body)==null?void 0:Je.weight)||"500",minWidth:"30px",textColor:((at=c==null?void 0:c.colors)==null?void 0:at.text)||"#84ADFF"},d={...u,...n,theme:{...u.theme,...n==null?void 0:n.theme,colors:{...(Lt=u.theme)==null?void 0:Lt.colors,...(Ct=n==null?void 0:n.theme)==null?void 0:Ct.colors},space:{...(At=u.theme)==null?void 0:At.space,...($t=n==null?void 0:n.theme)==null?void 0:$t.space},fonts:{...(je=u.theme)==null?void 0:je.fonts,...(fe=n==null?void 0:n.theme)==null?void 0:fe.fonts}},templateField:{...f,...n==null?void 0:n.templateField}},[m,g]=St(()=>Qh(e)),[v,w]=St(!1),x=Kt(e);Qt(()=>{if(e===x.current)return;console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const lt=Qh(e);console.log("\u65B0\u7684Slate\u6570\u636E:",lt),g(lt)},[e]),Qt(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",m)},[m]);const C=Tt((lt,_t)=>{if(_t===Qo.SLATE&<){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",lt),g(lt);try{const Pt=Array.isArray(lt)&<.length>0?lt[lt.length-1]:null,Bt=Pt&&Array.isArray(Pt.children)?Pt.children:[],yt=Bt.length>0?Bt[Bt.length-1]:null,It=(yt&&typeof yt.text=="string"?yt.text:"").endsWith("<t");w(It)}catch(Pt){console.warn("PromptTempDesigner: \u65E0\u6CD5\u5224\u65AD\u6A21\u677F\u63D0\u793A\u89E6\u53D1\u72B6\u6001:",Pt),w(!1)}const Wt=e0(lt);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",Wt),x.current=Wt,t==null||t(Wt)}},[t]),p=Tt(lt=>{if(!m||m.length===0)return"";switch(lt){case"pure_string":return GC(m);case"string":return e0(m);case"markdown":return YC(m);case"html":return ZC(m);default:return e0(m)}},[m]);return Qt(()=>{a==null||a(p)},[p,a]),q.jsx(Bs,{dataSource:{type:Qo.SLATE,content:m},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:C,size:"md",styles:d,enableTemplateInput:!0,enablePrism:i,enableTemplateAutocomplete:!0})};export{ra as F,o9 as G,i9 as K,cu as T,s9 as X,a9 as a,Qo as u};
|