@platox/pivot-table 0.0.9 → 0.0.10
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/lib/index.js +181 -181
- package/lib/index.umd.cjs +10 -10
- package/package.json +1 -1
package/lib/index.umd.cjs
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
`+X+H}}var G=!1,J;{var K=typeof WeakMap=="function"?WeakMap:Map;J=new K}function Y(H,se){if(!H||G)return"";{var de=J.get(H);if(de!==void 0)return de}var Te;G=!0;var ot=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ht;ht=L.current,L.current=null,ne();try{if(se){var Ye=function(){throw Error()};if(Object.defineProperty(Ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ye,[])}catch(_r){Te=_r}Reflect.construct(H,[],Ye)}else{try{Ye.call()}catch(_r){Te=_r}H.call(Ye.prototype)}}else{try{throw Error()}catch(_r){Te=_r}H()}}catch(_r){if(_r&&Te&&typeof _r.stack=="string"){for(var We=_r.stack.split(`
|
|
19
19
|
`),ur=Te.stack.split(`
|
|
20
20
|
`),At=We.length-1,Pt=ur.length-1;At>=1&&Pt>=0&&We[At]!==ur[Pt];)Pt--;for(;At>=1&&Pt>=0;At--,Pt--)if(We[At]!==ur[Pt]){if(At!==1||Pt!==1)do if(At--,Pt--,Pt<0||We[At]!==ur[Pt]){var tn=`
|
|
21
|
-
`+We[At].replace(" at new "," at ");return H.displayName&&tn.includes("<anonymous>")&&(tn=tn.replace("<anonymous>",H.displayName)),typeof H=="function"&&J.set(H,tn),tn}while(At>=1&&Pt>=0);break}}}finally{G=!1,L.current=ht,q(),Error.prepareStackTrace=ot}var Ps=H?H.displayName||H.name:"",uo=Ps?V(Ps):"";return typeof H=="function"&&J.set(H,uo),uo}function fe(H,se,de){return Y(H,!1)}function ue(H){var se=H.prototype;return!!(se&&se.isReactComponent)}function Ce(H,se,de){if(H==null)return"";if(typeof H=="function")return Y(H,ue(H));if(typeof H=="string")return V(H);switch(H){case l:return V("Suspense");case f:return V("SuspenseList")}if(typeof H=="object")switch(H.$$typeof){case u:return fe(H.render);case c:return Ce(H.type,se,de);case h:{var Te=H,ot=Te._payload,ht=Te._init;try{return Ce(ht(ot),se,de)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,Fe={},
|
|
21
|
+
`+We[At].replace(" at new "," at ");return H.displayName&&tn.includes("<anonymous>")&&(tn=tn.replace("<anonymous>",H.displayName)),typeof H=="function"&&J.set(H,tn),tn}while(At>=1&&Pt>=0);break}}}finally{G=!1,L.current=ht,q(),Error.prepareStackTrace=ot}var Ps=H?H.displayName||H.name:"",uo=Ps?V(Ps):"";return typeof H=="function"&&J.set(H,uo),uo}function fe(H,se,de){return Y(H,!1)}function ue(H){var se=H.prototype;return!!(se&&se.isReactComponent)}function Ce(H,se,de){if(H==null)return"";if(typeof H=="function")return Y(H,ue(H));if(typeof H=="string")return V(H);switch(H){case l:return V("Suspense");case f:return V("SuspenseList")}if(typeof H=="object")switch(H.$$typeof){case u:return fe(H.render);case c:return Ce(H.type,se,de);case h:{var Te=H,ot=Te._payload,ht=Te._init;try{return Ce(ht(ot),se,de)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,Fe={},ie=m.ReactDebugCurrentFrame;function ve(H){if(H){var se=H._owner,de=Ce(H.type,H._source,se?se.type:null);ie.setExtraStackFrame(de)}else ie.setExtraStackFrame(null)}function Le(H,se,de,Te,ot){{var ht=Function.call.bind(me);for(var Ye in H)if(ht(H,Ye)){var We=void 0;try{if(typeof H[Ye]!="function"){var ur=Error((Te||"React class")+": "+de+" type `"+Ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof H[Ye]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ur.name="Invariant Violation",ur}We=H[Ye](se,Ye,Te,de,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(At){We=At}We&&!(We instanceof Error)&&(ve(ot),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Te||"React class",de,Ye,typeof We),ve(null)),We instanceof Error&&!(We.message in Fe)&&(Fe[We.message]=!0,ve(ot),y("Failed %s type: %s",de,We.message),ve(null))}}}var ft=Array.isArray;function Ie(H){return ft(H)}function at(H){{var se=typeof Symbol=="function"&&Symbol.toStringTag,de=se&&H[Symbol.toStringTag]||H.constructor.name||"Object";return de}}function Fr(H){try{return et(H),!1}catch{return!0}}function et(H){return""+H}function ct(H){if(Fr(H))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",at(H)),et(H)}var Lr=m.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},Ir,$n,wr;wr={};function gl(H){if(me.call(H,"ref")){var se=Object.getOwnPropertyDescriptor(H,"ref").get;if(se&&se.isReactWarning)return!1}return H.ref!==void 0}function so(H){if(me.call(H,"key")){var se=Object.getOwnPropertyDescriptor(H,"key").get;if(se&&se.isReactWarning)return!1}return H.key!==void 0}function Zi(H,se){if(typeof H.ref=="string"&&Lr.current&&se&&Lr.current.stateNode!==se){var de=F(Lr.current.type);wr[de]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(Lr.current.type),H.ref),wr[de]=!0)}}function ay(H,se){{var de=function(){Ir||(Ir=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",se))};de.isReactWarning=!0,Object.defineProperty(H,"key",{get:de,configurable:!0})}}function oy(H,se){{var de=function(){$n||($n=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",se))};de.isReactWarning=!0,Object.defineProperty(H,"ref",{get:de,configurable:!0})}}var sy=function(H,se,de,Te,ot,ht,Ye){var We={$$typeof:e,type:H,key:se,ref:de,props:Ye,_owner:ht};return We._store={},Object.defineProperty(We._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(We,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Te}),Object.defineProperty(We,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ot}),Object.freeze&&(Object.freeze(We.props),Object.freeze(We)),We};function uy(H,se,de,Te,ot){{var ht,Ye={},We=null,ur=null;de!==void 0&&(ct(de),We=""+de),so(se)&&(ct(se.key),We=""+se.key),gl(se)&&(ur=se.ref,Zi(se,ot));for(ht in se)me.call(se,ht)&&!Zt.hasOwnProperty(ht)&&(Ye[ht]=se[ht]);if(H&&H.defaultProps){var At=H.defaultProps;for(ht in At)Ye[ht]===void 0&&(Ye[ht]=At[ht])}if(We||ur){var Pt=typeof H=="function"?H.displayName||H.name||"Unknown":H;We&&ay(Ye,Pt),ur&&oy(Ye,Pt)}return sy(H,We,ur,ot,Te,Lr.current,Ye)}}var ml=m.ReactCurrentOwner,Yh=m.ReactDebugCurrentFrame;function Os(H){if(H){var se=H._owner,de=Ce(H.type,H._source,se?se.type:null);Yh.setExtraStackFrame(de)}else Yh.setExtraStackFrame(null)}var ly;ly=!1;function fy(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function oP(){{if(ml.current){var H=F(ml.current.type);if(H)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+H+"`."}return""}}function zY(H){return""}var sP={};function jY(H){{var se=oP();if(!se){var de=typeof H=="string"?H:H.displayName||H.name;de&&(se=`
|
|
24
24
|
|
|
@@ -27,7 +27,7 @@ Check the top-level render call using <`+de+">.")}return se}}function uP(H,se){{
|
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,cy,uo,qY,uo),fP[uo+cy]=!0}}return H===n?HY(Pt):VY(Pt),Pt}}function WY(H,se,de){return cP(H,se,de,!0)}function $Y(H,se,de){return cP(H,se,de,!1)}var GY=$Y,UY=WY;Ms.Fragment=n,Ms.jsx=GY,Ms.jsxs=UY}()),Ms}process.env.NODE_ENV==="production"?Xh.exports=dP():Xh.exports=vP();var A=Xh.exports,py={exports:{}},Fs={},Kh={exports:{}};(function(t,e){(function(r,n){n(e)})(Ji,function(r){function n(V){return function(J,K,Y,fe,ue,Ce,me){return V(J,K,me)}}function i(V){return function(J,K,Y,fe){if(!J||!K||typeof J!="object"||typeof K!="object")return V(J,K,Y,fe);var ue=fe.get(J),Ce=fe.get(K);if(ue&&Ce)return ue===K&&Ce===J;fe.set(J,K),fe.set(K,J);var me=V(J,K,Y,fe);return fe.delete(J),fe.delete(K),me}}function a(V,G){var J={};for(var K in V)J[K]=V[K];for(var K in G)J[K]=G[K];return J}function o(V){return V.constructor===Object||V.constructor==null}function s(V){return typeof V.then=="function"}function u(V,G){return V===G||V!==V&&G!==G}var l="[object Arguments]",f="[object Boolean]",c="[object Date]",h="[object RegExp]",d="[object Map]",p="[object Number]",g="[object Object]",v="[object Set]",m="[object String]",y=Object.prototype.toString;function b(V){var G=V.areArraysEqual,J=V.areDatesEqual,K=V.areMapsEqual,Y=V.areObjectsEqual,fe=V.areRegExpsEqual,ue=V.areSetsEqual,Ce=V.createIsNestedEqual,me=Ce(Fe);function Fe(ae,ve,Le){if(ae===ve)return!0;if(!ae||!ve||typeof ae!="object"||typeof ve!="object")return ae!==ae&&ve!==ve;if(o(ae)&&o(ve))return Y(ae,ve,me,Le);var ft=Array.isArray(ae),Ie=Array.isArray(ve);if(ft||Ie)return ft===Ie&&G(ae,ve,me,Le);var at=y.call(ae);return at!==y.call(ve)?!1:at===c?J(ae,ve,me,Le):at===h?fe(ae,ve,me,Le):at===d?K(ae,ve,me,Le):at===v?ue(ae,ve,me,Le):at===g||at===l?s(ae)||s(ve)?!1:Y(ae,ve,me,Le):at===f||at===p||at===m?u(ae.valueOf(),ve.valueOf()):!1}return Fe}function w(V,G,J,K){var Y=V.length;if(G.length!==Y)return!1;for(;Y-- >0;)if(!J(V[Y],G[Y],Y,Y,V,G,K))return!1;return!0}var C=i(w);function _(V,G){return u(V.valueOf(),G.valueOf())}function D(V,G,J,K){var Y=V.size===G.size;if(!Y)return!1;if(!V.size)return!0;var fe={},ue=0;return V.forEach(function(Ce,me){if(Y){var Fe=!1,ae=0;G.forEach(function(ve,Le){!Fe&&!fe[ae]&&(Fe=J(me,Le,ue,ae,V,G,K)&&J(Ce,ve,me,Le,V,G,K))&&(fe[ae]=!0),ae++}),ue++,Y=Fe}}),Y}var x=i(D),S="_owner",O=Object.prototype.hasOwnProperty;function E(V,G,J,K){var Y=Object.keys(V),fe=Y.length;if(Object.keys(G).length!==fe)return!1;for(var ue;fe-- >0;){if(ue=Y[fe],ue===S){var Ce=!!V.$$typeof,me=!!G.$$typeof;if((Ce||me)&&Ce!==me)return!1}if(!O.call(G,ue)||!J(V[ue],G[ue],ue,ue,V,G,K))return!1}return!0}var P=i(E);function F(V,G){return V.source===G.source&&V.flags===G.flags}function B(V,G,J,K){var Y=V.size===G.size;if(!Y)return!1;if(!V.size)return!0;var fe={};return V.forEach(function(ue,Ce){if(Y){var me=!1,Fe=0;G.forEach(function(ae,ve){!me&&!fe[Fe]&&(me=J(ue,ae,Ce,ve,V,G,K))&&(fe[Fe]=!0),Fe++}),Y=me}}),Y}var M=i(B),I=Object.freeze({areArraysEqual:w,areDatesEqual:_,areMapsEqual:D,areObjectsEqual:E,areRegExpsEqual:F,areSetsEqual:B,createIsNestedEqual:n}),j=Object.freeze({areArraysEqual:C,areDatesEqual:_,areMapsEqual:x,areObjectsEqual:P,areRegExpsEqual:F,areSetsEqual:M,createIsNestedEqual:n}),z=b(I);function W(V,G){return z(V,G,void 0)}var R=b(a(I,{createIsNestedEqual:function(){return u}}));function U(V,G){return R(V,G,void 0)}var Z=b(j);function ee(V,G){return Z(V,G,new WeakMap)}var ne=b(a(j,{createIsNestedEqual:function(){return u}}));function q(V,G){return ne(V,G,new WeakMap)}function L(V){return b(a(I,V(I)))}function X(V){var G=b(a(j,V(j)));return function(J,K,Y){return Y===void 0&&(Y=new WeakMap),G(J,K,Y)}}r.circularDeepEqual=ee,r.circularShallowEqual=q,r.createCustomCircularEqual=X,r.createCustomEqual=L,r.deepEqual=W,r.sameValueZeroEqual=u,r.shallowEqual=U,Object.defineProperty(r,"__esModule",{value:!0})})})(Kh,Kh.exports);var Zh=Kh.exports,Jh={exports:{}};function gy(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=gy(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function my(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=gy(t))&&(n&&(n+=" "),n+=e);return n}Jh.exports=my,Jh.exports.clsx=my;var Qh=Jh.exports,ze={},pP=function(e,r,n){return e===r?!0:e.className===r.className&&n(e.style,r.style)&&e.width===r.width&&e.autoSize===r.autoSize&&e.cols===r.cols&&e.draggableCancel===r.draggableCancel&&e.draggableHandle===r.draggableHandle&&n(e.verticalCompact,r.verticalCompact)&&n(e.compactType,r.compactType)&&n(e.layout,r.layout)&&n(e.margin,r.margin)&&n(e.containerPadding,r.containerPadding)&&e.rowHeight===r.rowHeight&&e.maxRows===r.maxRows&&e.isBounded===r.isBounded&&e.isDraggable===r.isDraggable&&e.isResizable===r.isResizable&&e.allowOverlap===r.allowOverlap&&e.preventCollision===r.preventCollision&&e.useCSSTransforms===r.useCSSTransforms&&e.transformScale===r.transformScale&&e.isDroppable===r.isDroppable&&n(e.resizeHandles,r.resizeHandles)&&n(e.resizeHandle,r.resizeHandle)&&e.onLayoutChange===r.onLayoutChange&&e.onDragStart===r.onDragStart&&e.onDrag===r.onDrag&&e.onDragStop===r.onDragStop&&e.onResizeStart===r.onResizeStart&&e.onResize===r.onResize&&e.onResizeStop===r.onResizeStop&&e.onDrop===r.onDrop&&n(e.droppingItem,r.droppingItem)&&n(e.innerRef,r.innerRef)};Object.defineProperty(ze,"__esModule",{value:!0}),ze.bottom=ed,ze.childrenEqual=bP,ze.cloneLayout=by,ze.cloneLayoutItem=Qi,ze.collides=bl,ze.compact=wy,ze.compactItem=_y,ze.compactType=TP,ze.correctBounds=Dy,ze.fastPositionEqual=CP,ze.fastRGLPropsEqual=void 0,ze.getAllCollisions=xy,ze.getFirstCollision=ea,ze.getLayoutItem=rd,ze.getStatics=nd,ze.modifyLayout=Cy,ze.moveElement=Is,ze.moveElementAwayFromCollision=id,ze.noop=void 0,ze.perc=_P,ze.resizeItemInDirection=xP,ze.setTopLeft=EP,ze.setTransform=SP,ze.sortLayoutItems=fd,ze.sortLayoutItemsByColRow=Oy,ze.sortLayoutItemsByRowCol=Ty,ze.synchronizeLayoutWithChildren=AP,ze.validateLayout=Py,ze.withLayoutItem=yP;var yy=Zh,Ls=gP(k);function gP(t){return t&&t.__esModule?t:{default:t}}const mP=process.env.NODE_ENV==="production";function ed(t){let e=0,r;for(let n=0,i=t.length;n<i;n++)r=t[n].y+t[n].h,r>e&&(e=r);return e}function by(t){const e=Array(t.length);for(let r=0,n=t.length;r<n;r++)e[r]=Qi(t[r]);return e}function Cy(t,e){const r=Array(t.length);for(let n=0,i=t.length;n<i;n++)e.i===t[n].i?r[n]=e:r[n]=t[n];return r}function yP(t,e,r){let n=rd(t,e);return n?(n=r(Qi(n)),t=Cy(t,n),[t,n]):[t,null]}function Qi(t){return{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,minW:t.minW,maxW:t.maxW,minH:t.minH,maxH:t.maxH,moved:!!t.moved,static:!!t.static,isDraggable:t.isDraggable,isResizable:t.isResizable,resizeHandles:t.resizeHandles,isBounded:t.isBounded}}function bP(t,e){return(0,yy.deepEqual)(Ls.default.Children.map(t,r=>r==null?void 0:r.key),Ls.default.Children.map(e,r=>r==null?void 0:r.key))&&(0,yy.deepEqual)(Ls.default.Children.map(t,r=>r==null?void 0:r.props["data-grid"]),Ls.default.Children.map(e,r=>r==null?void 0:r.props["data-grid"]))}ze.fastRGLPropsEqual=pP;function CP(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.width&&t.height===e.height}function bl(t,e){return!(t.i===e.i||t.x+t.w<=e.x||t.x>=e.x+e.w||t.y+t.h<=e.y||t.y>=e.y+e.h)}function wy(t,e,r,n){const i=nd(t),a=fd(t,e),o=Array(t.length);for(let s=0,u=a.length;s<u;s++){let l=Qi(a[s]);l.static||(l=_y(i,l,e,r,a,n),i.push(l)),o[t.indexOf(a[s])]=l,l.moved=!1}return o}const wP={x:"w",y:"h"};function td(t,e,r,n){const i=wP[n];e[n]+=1;const a=t.map(o=>o.i).indexOf(e.i);for(let o=a+1;o<t.length;o++){const s=t[o];if(!s.static){if(s.y>e.y+e.h)break;bl(e,s)&&td(t,s,r+e[i],n)}}e[n]=r}function _y(t,e,r,n,i,a){const o=r==="vertical",s=r==="horizontal";if(o)for(e.y=Math.min(ed(t),e.y);e.y>0&&!ea(t,e);)e.y--;else if(s)for(;e.x>0&&!ea(t,e);)e.x--;let u;for(;(u=ea(t,e))&&!(r===null&&a);)if(s?td(i,e,u.x+u.w,"x"):td(i,e,u.y+u.h,"y"),s&&e.x+e.w>n)for(e.x=n-e.w,e.y++;e.x>0&&!ea(t,e);)e.x--;return e.y=Math.max(e.y,0),e.x=Math.max(e.x,0),e}function Dy(t,e){const r=nd(t);for(let n=0,i=t.length;n<i;n++){const a=t[n];if(a.x+a.w>e.cols&&(a.x=e.cols-a.w),a.x<0&&(a.x=0,a.w=e.cols),!a.static)r.push(a);else for(;ea(r,a);)a.y++}return t}function rd(t,e){for(let r=0,n=t.length;r<n;r++)if(t[r].i===e)return t[r]}function ea(t,e){for(let r=0,n=t.length;r<n;r++)if(bl(t[r],e))return t[r]}function xy(t,e){return t.filter(r=>bl(r,e))}function nd(t){return t.filter(e=>e.static)}function Is(t,e,r,n,i,a,o,s,u){if(e.static&&e.isDraggable!==!0||e.y===n&&e.x===r)return t;`${e.i}${String(r)}${String(n)}${e.x}${e.y}`;const l=e.x,f=e.y;typeof r=="number"&&(e.x=r),typeof n=="number"&&(e.y=n),e.moved=!0;let c=fd(t,o);(o==="vertical"&&typeof n=="number"?f>=n:o==="horizontal"&&typeof r=="number"?l>=r:!1)&&(c=c.reverse());const d=xy(c,e),p=d.length>0;if(p&&u)return by(t);if(p&&a)return`${e.i}`,e.x=l,e.y=f,e.moved=!1,t;for(let g=0,v=d.length;g<v;g++){const m=d[g];`${e.i}${e.x}${e.y}${m.i}${m.x}${m.y}`,!m.moved&&(m.static?t=id(t,m,e,i,o):t=id(t,e,m,i,o))}return t}function id(t,e,r,n,i,a){const o=i==="horizontal",s=i==="vertical",u=e.static;if(n){n=!1;const c={x:o?Math.max(e.x-r.w,0):r.x,y:s?Math.max(e.y-r.h,0):r.y,w:r.w,h:r.h,i:"-1"},h=ea(t,c),d=h&&h.y+h.h>e.y,p=h&&e.x+e.w>h.x;if(h){if(d&&s)return Is(t,r,void 0,e.y+1,n,u,i);if(d&&i==null)return e.y=r.y,r.y=r.y+r.h,t;if(p&&o)return Is(t,e,r.x,void 0,n,u,i)}else return`${r.i}${c.x}${c.y}`,Is(t,r,o?c.x:void 0,s?c.y:void 0,n,u,i)}const l=o?r.x+1:void 0,f=s?r.y+1:void 0;return l==null&&f==null?t:Is(t,r,o?r.x+1:void 0,s?r.y+1:void 0,n,u,i)}function _P(t){return t*100+"%"}const Sy=(t,e,r,n)=>t+r>n?e:r,Ey=(t,e,r)=>t<0?e:r,Ay=t=>Math.max(0,t),ad=t=>Math.max(0,t),od=(t,e,r)=>{let{left:n,height:i,width:a}=e;const o=t.top-(i-t.height);return{left:n,width:a,height:Ey(o,t.height,i),top:ad(o)}},sd=(t,e,r)=>{let{top:n,left:i,height:a,width:o}=e;return{top:n,height:a,width:Sy(t.left,t.width,o,r),left:Ay(i)}},ud=(t,e,r)=>{let{top:n,height:i,width:a}=e;const o=t.left-(a-t.width);return{height:i,width:o<0?t.width:Sy(t.left,t.width,a,r),top:ad(n),left:Ay(o)}},ld=(t,e,r)=>{let{top:n,left:i,height:a,width:o}=e;return{width:o,left:i,height:Ey(n,t.height,a),top:ad(n)}},DP={n:od,ne:function(){return od(arguments.length<=0?void 0:arguments[0],sd(...arguments))},e:sd,se:function(){return ld(arguments.length<=0?void 0:arguments[0],sd(...arguments))},s:ld,sw:function(){return ld(arguments.length<=0?void 0:arguments[0],ud(...arguments))},w:ud,nw:function(){return od(arguments.length<=0?void 0:arguments[0],ud(...arguments))}};function xP(t,e,r,n){const i=DP[t];return i?i(e,{...e,...r},n):r}function SP(t){let{top:e,left:r,width:n,height:i}=t;const a=`translate(${r}px,${e}px)`;return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:`${n}px`,height:`${i}px`,position:"absolute"}}function EP(t){let{top:e,left:r,width:n,height:i}=t;return{top:`${e}px`,left:`${r}px`,width:`${n}px`,height:`${i}px`,position:"absolute"}}function fd(t,e){return e==="horizontal"?Oy(t):e==="vertical"?Ty(t):t}function Ty(t){return t.slice(0).sort(function(e,r){return e.y>r.y||e.y===r.y&&e.x>r.x?1:e.y===r.y&&e.x===r.x?0:-1})}function Oy(t){return t.slice(0).sort(function(e,r){return e.x>r.x||e.x===r.x&&e.y>r.y?1:-1})}function AP(t,e,r,n,i){t=t||[];const a=[];Ls.default.Children.forEach(e,s=>{if((s==null?void 0:s.key)==null)return;const u=rd(t,String(s.key)),l=s.props["data-grid"];u&&l==null?a.push(Qi(u)):l?(mP||Py([l],"ReactGridLayout.children"),a.push(Qi({...l,i:s.key}))):a.push(Qi({w:1,h:1,x:0,y:ed(a),i:String(s.key)}))});const o=Dy(a,{cols:r});return i?o:wy(o,n,r)}function Py(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const r=["x","y","w","h"];if(!Array.isArray(t))throw new Error(e+" must be an array!");for(let n=0,i=t.length;n<i;n++){const a=t[n];for(let o=0;o<r.length;o++){const s=r[o],u=a[s];if(typeof u!="number"||Number.isNaN(u))throw new Error(`ReactGridLayout: ${e}[${n}].${s} must be a number! Received: ${u} (${typeof u})`)}if(typeof a.i<"u"&&typeof a.i!="string")throw new Error(`ReactGridLayout: ${e}[${n}].i must be a string! Received: ${a.i} (${typeof a.i})`)}}function TP(t){const{verticalCompact:e,compactType:r}=t||{};return e===!1?null:r}function QY(){}const OP=()=>{};ze.noop=OP;var pn={};Object.defineProperty(pn,"__esModule",{value:!0}),pn.calcGridColWidth=Cl,pn.calcGridItemPosition=PP,pn.calcGridItemWHPx=cd,pn.calcWH=MP,pn.calcXY=BP,pn.clamp=ta;function Cl(t){const{margin:e,containerPadding:r,containerWidth:n,cols:i}=t;return(n-e[0]*(i-1)-r[0]*2)/i}function cd(t,e,r){return Number.isFinite(t)?Math.round(e*t+Math.max(0,t-1)*r):t}function PP(t,e,r,n,i,a){const{margin:o,containerPadding:s,rowHeight:u}=t,l=Cl(t),f={};return a&&a.resizing?(f.width=Math.round(a.resizing.width),f.height=Math.round(a.resizing.height)):(f.width=cd(n,l,o[0]),f.height=cd(i,u,o[1])),a&&a.dragging?(f.top=Math.round(a.dragging.top),f.left=Math.round(a.dragging.left)):a&&a.resizing&&typeof a.resizing.top=="number"&&typeof a.resizing.left=="number"?(f.top=Math.round(a.resizing.top),f.left=Math.round(a.resizing.left)):(f.top=Math.round((u+o[1])*r+s[1]),f.left=Math.round((l+o[0])*e+s[0])),f}function BP(t,e,r,n,i){const{margin:a,containerPadding:o,cols:s,rowHeight:u,maxRows:l}=t,f=Cl(t);let c=Math.round((r-o[0])/(f+a[0])),h=Math.round((e-o[1])/(u+a[1]));return c=ta(c,0,s-n),h=ta(h,0,l-i),{x:c,y:h}}function MP(t,e,r,n,i,a){const{margin:o,maxRows:s,cols:u,rowHeight:l}=t,f=Cl(t);let c=Math.round((e+o[0])/(f+o[0])),h=Math.round((r+o[1])/(l+o[1])),d=ta(c,0,u-n),p=ta(h,0,s-i);return["sw","w","nw"].indexOf(a)!==-1&&(d=ta(c,0,u)),["nw","n","ne"].indexOf(a)!==-1&&(p=ta(h,0,s)),{w:d,h:p}}function ta(t,e,r){return Math.max(Math.min(t,r),e)}var wl={},hd={exports:{}},_l={exports:{}},tt={};/** @license React v16.13.1
|
|
30
|
+
<%s key={someKey} {...props} />`,cy,uo,qY,uo),fP[uo+cy]=!0}}return H===n?HY(Pt):VY(Pt),Pt}}function WY(H,se,de){return cP(H,se,de,!0)}function $Y(H,se,de){return cP(H,se,de,!1)}var GY=$Y,UY=WY;Ms.Fragment=n,Ms.jsx=GY,Ms.jsxs=UY}()),Ms}process.env.NODE_ENV==="production"?Xh.exports=dP():Xh.exports=vP();var A=Xh.exports,py={exports:{}},Fs={},Kh={exports:{}};(function(t,e){(function(r,n){n(e)})(Ji,function(r){function n(V){return function(J,K,Y,fe,ue,Ce,me){return V(J,K,me)}}function i(V){return function(J,K,Y,fe){if(!J||!K||typeof J!="object"||typeof K!="object")return V(J,K,Y,fe);var ue=fe.get(J),Ce=fe.get(K);if(ue&&Ce)return ue===K&&Ce===J;fe.set(J,K),fe.set(K,J);var me=V(J,K,Y,fe);return fe.delete(J),fe.delete(K),me}}function a(V,G){var J={};for(var K in V)J[K]=V[K];for(var K in G)J[K]=G[K];return J}function o(V){return V.constructor===Object||V.constructor==null}function s(V){return typeof V.then=="function"}function u(V,G){return V===G||V!==V&&G!==G}var l="[object Arguments]",f="[object Boolean]",c="[object Date]",h="[object RegExp]",d="[object Map]",p="[object Number]",g="[object Object]",v="[object Set]",m="[object String]",y=Object.prototype.toString;function b(V){var G=V.areArraysEqual,J=V.areDatesEqual,K=V.areMapsEqual,Y=V.areObjectsEqual,fe=V.areRegExpsEqual,ue=V.areSetsEqual,Ce=V.createIsNestedEqual,me=Ce(Fe);function Fe(ie,ve,Le){if(ie===ve)return!0;if(!ie||!ve||typeof ie!="object"||typeof ve!="object")return ie!==ie&&ve!==ve;if(o(ie)&&o(ve))return Y(ie,ve,me,Le);var ft=Array.isArray(ie),Ie=Array.isArray(ve);if(ft||Ie)return ft===Ie&&G(ie,ve,me,Le);var at=y.call(ie);return at!==y.call(ve)?!1:at===c?J(ie,ve,me,Le):at===h?fe(ie,ve,me,Le):at===d?K(ie,ve,me,Le):at===v?ue(ie,ve,me,Le):at===g||at===l?s(ie)||s(ve)?!1:Y(ie,ve,me,Le):at===f||at===p||at===m?u(ie.valueOf(),ve.valueOf()):!1}return Fe}function w(V,G,J,K){var Y=V.length;if(G.length!==Y)return!1;for(;Y-- >0;)if(!J(V[Y],G[Y],Y,Y,V,G,K))return!1;return!0}var C=i(w);function _(V,G){return u(V.valueOf(),G.valueOf())}function D(V,G,J,K){var Y=V.size===G.size;if(!Y)return!1;if(!V.size)return!0;var fe={},ue=0;return V.forEach(function(Ce,me){if(Y){var Fe=!1,ie=0;G.forEach(function(ve,Le){!Fe&&!fe[ie]&&(Fe=J(me,Le,ue,ie,V,G,K)&&J(Ce,ve,me,Le,V,G,K))&&(fe[ie]=!0),ie++}),ue++,Y=Fe}}),Y}var x=i(D),S="_owner",O=Object.prototype.hasOwnProperty;function E(V,G,J,K){var Y=Object.keys(V),fe=Y.length;if(Object.keys(G).length!==fe)return!1;for(var ue;fe-- >0;){if(ue=Y[fe],ue===S){var Ce=!!V.$$typeof,me=!!G.$$typeof;if((Ce||me)&&Ce!==me)return!1}if(!O.call(G,ue)||!J(V[ue],G[ue],ue,ue,V,G,K))return!1}return!0}var P=i(E);function F(V,G){return V.source===G.source&&V.flags===G.flags}function B(V,G,J,K){var Y=V.size===G.size;if(!Y)return!1;if(!V.size)return!0;var fe={};return V.forEach(function(ue,Ce){if(Y){var me=!1,Fe=0;G.forEach(function(ie,ve){!me&&!fe[Fe]&&(me=J(ue,ie,Ce,ve,V,G,K))&&(fe[Fe]=!0),Fe++}),Y=me}}),Y}var M=i(B),I=Object.freeze({areArraysEqual:w,areDatesEqual:_,areMapsEqual:D,areObjectsEqual:E,areRegExpsEqual:F,areSetsEqual:B,createIsNestedEqual:n}),j=Object.freeze({areArraysEqual:C,areDatesEqual:_,areMapsEqual:x,areObjectsEqual:P,areRegExpsEqual:F,areSetsEqual:M,createIsNestedEqual:n}),z=b(I);function W(V,G){return z(V,G,void 0)}var R=b(a(I,{createIsNestedEqual:function(){return u}}));function U(V,G){return R(V,G,void 0)}var Z=b(j);function ee(V,G){return Z(V,G,new WeakMap)}var ne=b(a(j,{createIsNestedEqual:function(){return u}}));function q(V,G){return ne(V,G,new WeakMap)}function L(V){return b(a(I,V(I)))}function X(V){var G=b(a(j,V(j)));return function(J,K,Y){return Y===void 0&&(Y=new WeakMap),G(J,K,Y)}}r.circularDeepEqual=ee,r.circularShallowEqual=q,r.createCustomCircularEqual=X,r.createCustomEqual=L,r.deepEqual=W,r.sameValueZeroEqual=u,r.shallowEqual=U,Object.defineProperty(r,"__esModule",{value:!0})})})(Kh,Kh.exports);var Zh=Kh.exports,Jh={exports:{}};function gy(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=gy(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function my(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=gy(t))&&(n&&(n+=" "),n+=e);return n}Jh.exports=my,Jh.exports.clsx=my;var Qh=Jh.exports,ze={},pP=function(e,r,n){return e===r?!0:e.className===r.className&&n(e.style,r.style)&&e.width===r.width&&e.autoSize===r.autoSize&&e.cols===r.cols&&e.draggableCancel===r.draggableCancel&&e.draggableHandle===r.draggableHandle&&n(e.verticalCompact,r.verticalCompact)&&n(e.compactType,r.compactType)&&n(e.layout,r.layout)&&n(e.margin,r.margin)&&n(e.containerPadding,r.containerPadding)&&e.rowHeight===r.rowHeight&&e.maxRows===r.maxRows&&e.isBounded===r.isBounded&&e.isDraggable===r.isDraggable&&e.isResizable===r.isResizable&&e.allowOverlap===r.allowOverlap&&e.preventCollision===r.preventCollision&&e.useCSSTransforms===r.useCSSTransforms&&e.transformScale===r.transformScale&&e.isDroppable===r.isDroppable&&n(e.resizeHandles,r.resizeHandles)&&n(e.resizeHandle,r.resizeHandle)&&e.onLayoutChange===r.onLayoutChange&&e.onDragStart===r.onDragStart&&e.onDrag===r.onDrag&&e.onDragStop===r.onDragStop&&e.onResizeStart===r.onResizeStart&&e.onResize===r.onResize&&e.onResizeStop===r.onResizeStop&&e.onDrop===r.onDrop&&n(e.droppingItem,r.droppingItem)&&n(e.innerRef,r.innerRef)};Object.defineProperty(ze,"__esModule",{value:!0}),ze.bottom=ed,ze.childrenEqual=bP,ze.cloneLayout=by,ze.cloneLayoutItem=Qi,ze.collides=bl,ze.compact=wy,ze.compactItem=_y,ze.compactType=TP,ze.correctBounds=Dy,ze.fastPositionEqual=CP,ze.fastRGLPropsEqual=void 0,ze.getAllCollisions=xy,ze.getFirstCollision=ea,ze.getLayoutItem=rd,ze.getStatics=nd,ze.modifyLayout=Cy,ze.moveElement=Is,ze.moveElementAwayFromCollision=id,ze.noop=void 0,ze.perc=_P,ze.resizeItemInDirection=xP,ze.setTopLeft=EP,ze.setTransform=SP,ze.sortLayoutItems=fd,ze.sortLayoutItemsByColRow=Oy,ze.sortLayoutItemsByRowCol=Ty,ze.synchronizeLayoutWithChildren=AP,ze.validateLayout=Py,ze.withLayoutItem=yP;var yy=Zh,Ls=gP(k);function gP(t){return t&&t.__esModule?t:{default:t}}const mP=process.env.NODE_ENV==="production";function ed(t){let e=0,r;for(let n=0,i=t.length;n<i;n++)r=t[n].y+t[n].h,r>e&&(e=r);return e}function by(t){const e=Array(t.length);for(let r=0,n=t.length;r<n;r++)e[r]=Qi(t[r]);return e}function Cy(t,e){const r=Array(t.length);for(let n=0,i=t.length;n<i;n++)e.i===t[n].i?r[n]=e:r[n]=t[n];return r}function yP(t,e,r){let n=rd(t,e);return n?(n=r(Qi(n)),t=Cy(t,n),[t,n]):[t,null]}function Qi(t){return{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,minW:t.minW,maxW:t.maxW,minH:t.minH,maxH:t.maxH,moved:!!t.moved,static:!!t.static,isDraggable:t.isDraggable,isResizable:t.isResizable,resizeHandles:t.resizeHandles,isBounded:t.isBounded}}function bP(t,e){return(0,yy.deepEqual)(Ls.default.Children.map(t,r=>r==null?void 0:r.key),Ls.default.Children.map(e,r=>r==null?void 0:r.key))&&(0,yy.deepEqual)(Ls.default.Children.map(t,r=>r==null?void 0:r.props["data-grid"]),Ls.default.Children.map(e,r=>r==null?void 0:r.props["data-grid"]))}ze.fastRGLPropsEqual=pP;function CP(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.width&&t.height===e.height}function bl(t,e){return!(t.i===e.i||t.x+t.w<=e.x||t.x>=e.x+e.w||t.y+t.h<=e.y||t.y>=e.y+e.h)}function wy(t,e,r,n){const i=nd(t),a=fd(t,e),o=Array(t.length);for(let s=0,u=a.length;s<u;s++){let l=Qi(a[s]);l.static||(l=_y(i,l,e,r,a,n),i.push(l)),o[t.indexOf(a[s])]=l,l.moved=!1}return o}const wP={x:"w",y:"h"};function td(t,e,r,n){const i=wP[n];e[n]+=1;const a=t.map(o=>o.i).indexOf(e.i);for(let o=a+1;o<t.length;o++){const s=t[o];if(!s.static){if(s.y>e.y+e.h)break;bl(e,s)&&td(t,s,r+e[i],n)}}e[n]=r}function _y(t,e,r,n,i,a){const o=r==="vertical",s=r==="horizontal";if(o)for(e.y=Math.min(ed(t),e.y);e.y>0&&!ea(t,e);)e.y--;else if(s)for(;e.x>0&&!ea(t,e);)e.x--;let u;for(;(u=ea(t,e))&&!(r===null&&a);)if(s?td(i,e,u.x+u.w,"x"):td(i,e,u.y+u.h,"y"),s&&e.x+e.w>n)for(e.x=n-e.w,e.y++;e.x>0&&!ea(t,e);)e.x--;return e.y=Math.max(e.y,0),e.x=Math.max(e.x,0),e}function Dy(t,e){const r=nd(t);for(let n=0,i=t.length;n<i;n++){const a=t[n];if(a.x+a.w>e.cols&&(a.x=e.cols-a.w),a.x<0&&(a.x=0,a.w=e.cols),!a.static)r.push(a);else for(;ea(r,a);)a.y++}return t}function rd(t,e){for(let r=0,n=t.length;r<n;r++)if(t[r].i===e)return t[r]}function ea(t,e){for(let r=0,n=t.length;r<n;r++)if(bl(t[r],e))return t[r]}function xy(t,e){return t.filter(r=>bl(r,e))}function nd(t){return t.filter(e=>e.static)}function Is(t,e,r,n,i,a,o,s,u){if(e.static&&e.isDraggable!==!0||e.y===n&&e.x===r)return t;`${e.i}${String(r)}${String(n)}${e.x}${e.y}`;const l=e.x,f=e.y;typeof r=="number"&&(e.x=r),typeof n=="number"&&(e.y=n),e.moved=!0;let c=fd(t,o);(o==="vertical"&&typeof n=="number"?f>=n:o==="horizontal"&&typeof r=="number"?l>=r:!1)&&(c=c.reverse());const d=xy(c,e),p=d.length>0;if(p&&u)return by(t);if(p&&a)return`${e.i}`,e.x=l,e.y=f,e.moved=!1,t;for(let g=0,v=d.length;g<v;g++){const m=d[g];`${e.i}${e.x}${e.y}${m.i}${m.x}${m.y}`,!m.moved&&(m.static?t=id(t,m,e,i,o):t=id(t,e,m,i,o))}return t}function id(t,e,r,n,i,a){const o=i==="horizontal",s=i==="vertical",u=e.static;if(n){n=!1;const c={x:o?Math.max(e.x-r.w,0):r.x,y:s?Math.max(e.y-r.h,0):r.y,w:r.w,h:r.h,i:"-1"},h=ea(t,c),d=h&&h.y+h.h>e.y,p=h&&e.x+e.w>h.x;if(h){if(d&&s)return Is(t,r,void 0,e.y+1,n,u,i);if(d&&i==null)return e.y=r.y,r.y=r.y+r.h,t;if(p&&o)return Is(t,e,r.x,void 0,n,u,i)}else return`${r.i}${c.x}${c.y}`,Is(t,r,o?c.x:void 0,s?c.y:void 0,n,u,i)}const l=o?r.x+1:void 0,f=s?r.y+1:void 0;return l==null&&f==null?t:Is(t,r,o?r.x+1:void 0,s?r.y+1:void 0,n,u,i)}function _P(t){return t*100+"%"}const Sy=(t,e,r,n)=>t+r>n?e:r,Ey=(t,e,r)=>t<0?e:r,Ay=t=>Math.max(0,t),ad=t=>Math.max(0,t),od=(t,e,r)=>{let{left:n,height:i,width:a}=e;const o=t.top-(i-t.height);return{left:n,width:a,height:Ey(o,t.height,i),top:ad(o)}},sd=(t,e,r)=>{let{top:n,left:i,height:a,width:o}=e;return{top:n,height:a,width:Sy(t.left,t.width,o,r),left:Ay(i)}},ud=(t,e,r)=>{let{top:n,height:i,width:a}=e;const o=t.left-(a-t.width);return{height:i,width:o<0?t.width:Sy(t.left,t.width,a,r),top:ad(n),left:Ay(o)}},ld=(t,e,r)=>{let{top:n,left:i,height:a,width:o}=e;return{width:o,left:i,height:Ey(n,t.height,a),top:ad(n)}},DP={n:od,ne:function(){return od(arguments.length<=0?void 0:arguments[0],sd(...arguments))},e:sd,se:function(){return ld(arguments.length<=0?void 0:arguments[0],sd(...arguments))},s:ld,sw:function(){return ld(arguments.length<=0?void 0:arguments[0],ud(...arguments))},w:ud,nw:function(){return od(arguments.length<=0?void 0:arguments[0],ud(...arguments))}};function xP(t,e,r,n){const i=DP[t];return i?i(e,{...e,...r},n):r}function SP(t){let{top:e,left:r,width:n,height:i}=t;const a=`translate(${r}px,${e}px)`;return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:`${n}px`,height:`${i}px`,position:"absolute"}}function EP(t){let{top:e,left:r,width:n,height:i}=t;return{top:`${e}px`,left:`${r}px`,width:`${n}px`,height:`${i}px`,position:"absolute"}}function fd(t,e){return e==="horizontal"?Oy(t):e==="vertical"?Ty(t):t}function Ty(t){return t.slice(0).sort(function(e,r){return e.y>r.y||e.y===r.y&&e.x>r.x?1:e.y===r.y&&e.x===r.x?0:-1})}function Oy(t){return t.slice(0).sort(function(e,r){return e.x>r.x||e.x===r.x&&e.y>r.y?1:-1})}function AP(t,e,r,n,i){t=t||[];const a=[];Ls.default.Children.forEach(e,s=>{if((s==null?void 0:s.key)==null)return;const u=rd(t,String(s.key)),l=s.props["data-grid"];u&&l==null?a.push(Qi(u)):l?(mP||Py([l],"ReactGridLayout.children"),a.push(Qi({...l,i:s.key}))):a.push(Qi({w:1,h:1,x:0,y:ed(a),i:String(s.key)}))});const o=Dy(a,{cols:r});return i?o:wy(o,n,r)}function Py(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const r=["x","y","w","h"];if(!Array.isArray(t))throw new Error(e+" must be an array!");for(let n=0,i=t.length;n<i;n++){const a=t[n];for(let o=0;o<r.length;o++){const s=r[o],u=a[s];if(typeof u!="number"||Number.isNaN(u))throw new Error(`ReactGridLayout: ${e}[${n}].${s} must be a number! Received: ${u} (${typeof u})`)}if(typeof a.i<"u"&&typeof a.i!="string")throw new Error(`ReactGridLayout: ${e}[${n}].i must be a string! Received: ${a.i} (${typeof a.i})`)}}function TP(t){const{verticalCompact:e,compactType:r}=t||{};return e===!1?null:r}function QY(){}const OP=()=>{};ze.noop=OP;var pn={};Object.defineProperty(pn,"__esModule",{value:!0}),pn.calcGridColWidth=Cl,pn.calcGridItemPosition=PP,pn.calcGridItemWHPx=cd,pn.calcWH=MP,pn.calcXY=BP,pn.clamp=ta;function Cl(t){const{margin:e,containerPadding:r,containerWidth:n,cols:i}=t;return(n-e[0]*(i-1)-r[0]*2)/i}function cd(t,e,r){return Number.isFinite(t)?Math.round(e*t+Math.max(0,t-1)*r):t}function PP(t,e,r,n,i,a){const{margin:o,containerPadding:s,rowHeight:u}=t,l=Cl(t),f={};return a&&a.resizing?(f.width=Math.round(a.resizing.width),f.height=Math.round(a.resizing.height)):(f.width=cd(n,l,o[0]),f.height=cd(i,u,o[1])),a&&a.dragging?(f.top=Math.round(a.dragging.top),f.left=Math.round(a.dragging.left)):a&&a.resizing&&typeof a.resizing.top=="number"&&typeof a.resizing.left=="number"?(f.top=Math.round(a.resizing.top),f.left=Math.round(a.resizing.left)):(f.top=Math.round((u+o[1])*r+s[1]),f.left=Math.round((l+o[0])*e+s[0])),f}function BP(t,e,r,n,i){const{margin:a,containerPadding:o,cols:s,rowHeight:u,maxRows:l}=t,f=Cl(t);let c=Math.round((r-o[0])/(f+a[0])),h=Math.round((e-o[1])/(u+a[1]));return c=ta(c,0,s-n),h=ta(h,0,l-i),{x:c,y:h}}function MP(t,e,r,n,i,a){const{margin:o,maxRows:s,cols:u,rowHeight:l}=t,f=Cl(t);let c=Math.round((e+o[0])/(f+o[0])),h=Math.round((r+o[1])/(l+o[1])),d=ta(c,0,u-n),p=ta(h,0,s-i);return["sw","w","nw"].indexOf(a)!==-1&&(d=ta(c,0,u)),["nw","n","ne"].indexOf(a)!==-1&&(p=ta(h,0,s)),{w:d,h:p}}function ta(t,e,r){return Math.max(Math.min(t,r),e)}var wl={},hd={exports:{}},_l={exports:{}},tt={};/** @license React v16.13.1
|
|
31
31
|
* react-is.production.min.js
|
|
32
32
|
*
|
|
33
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -53,17 +53,17 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var Y=K(X,J,ne,q,L+"."+J
|
|
|
53
53
|
*
|
|
54
54
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
55
55
|
* Released under the MIT License.
|
|
56
|
-
*/function W1(t){return Object.prototype.toString.call(t)==="[object Object]"}function Nt(t){var e,r;return W1(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(W1(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var $1=Symbol.for("immer-nothing"),G1=Symbol.for("immer-draftable"),Sr=Symbol.for("immer-state"),aF=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function cr(t,...e){if(process.env.NODE_ENV!=="production"){const r=aF[t],n=typeof r=="function"?r.apply(null,e):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var mo=Object.getPrototypeOf;function oa(t){return!!t&&!!t[Sr]}function sa(t){var e;return t?U1(t)||Array.isArray(t)||!!t[G1]||!!((e=t.constructor)!=null&&e[G1])||Wl(t)||$l(t):!1}var oF=Object.prototype.constructor.toString();function U1(t){if(!t||typeof t!="object")return!1;const e=mo(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===oF}function Vl(t,e){Hl(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function Hl(t){const e=t[Sr];return e?e.type_:Array.isArray(t)?1:Wl(t)?2:$l(t)?3:0}function Xd(t,e){return Hl(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function q1(t,e,r){const n=Hl(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function sF(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Wl(t){return t instanceof Map}function $l(t){return t instanceof Set}function ua(t){return t.copy_||t.base_}function Kd(t,e){if(Wl(t))return new Map(t);if($l(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=U1(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[Sr];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(mo(t),n)}else{const n=mo(t);if(n!==null&&r)return{...t};const i=Object.create(n);return Object.assign(i,t)}}function Zd(t,e=!1){return Gl(t)||oa(t)||!sa(t)||(Hl(t)>1&&(t.set=t.add=t.clear=t.delete=uF),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>Zd(n,!0))),t}function uF(){cr(2)}function Gl(t){return Object.isFrozen(t)}var lF={};function la(t){const e=lF[t];return e||cr(0,t),e}var Vs;function Y1(){return Vs}function fF(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function X1(t,e){e&&(la("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Jd(t){Qd(t),t.drafts_.forEach(cF),t.drafts_=null}function Qd(t){t===Vs&&(Vs=t.parent_)}function K1(t){return Vs=fF(Vs,t)}function cF(t){const e=t[Sr];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Z1(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[Sr].modified_&&(Jd(e),cr(4)),sa(t)&&(t=Ul(e,t),e.parent_||ql(e,t)),e.patches_&&la("Patches").generateReplacementPatches_(r[Sr].base_,t,e.patches_,e.inversePatches_)):t=Ul(e,r,[]),Jd(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==$1?t:void 0}function Ul(t,e,r){if(Gl(e))return e;const n=e[Sr];if(!n)return Vl(e,(i,a)=>J1(t,n,e,i,a,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return ql(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let a=i,o=!1;n.type_===3&&(a=new Set(i),i.clear(),o=!0),Vl(a,(s,u)=>J1(t,n,i,s,u,r,o)),ql(t,i,!1),r&&t.patches_&&la("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function J1(t,e,r,n,i,a,o){if(process.env.NODE_ENV!=="production"&&i===r&&cr(5),oa(i)){const s=a&&e&&e.type_!==3&&!Xd(e.assigned_,n)?a.concat(n):void 0,u=Ul(t,i,s);if(q1(r,n,u),oa(u))t.canAutoFreeze_=!1;else return}else o&&r.add(i);if(sa(i)&&!Gl(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Ul(t,i),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&ql(t,i)}}function ql(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Zd(e,r)}function hF(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:Y1(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=ev;r&&(i=[n],a=Hs);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}var ev={get(t,e){if(e===Sr)return t;const r=ua(t);if(!Xd(r,e))return dF(t,r,e);const n=r[e];return t.finalized_||!sa(n)?n:n===tv(t.base_,e)?(nv(t),t.copy_[e]=iv(n,t)):n},has(t,e){return e in ua(t)},ownKeys(t){return Reflect.ownKeys(ua(t))},set(t,e,r){const n=Q1(ua(t),e);if(n!=null&&n.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const i=tv(ua(t),e),a=i==null?void 0:i[Sr];if(a&&a.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(sF(r,i)&&(r!==void 0||Xd(t.base_,e)))return!0;nv(t),rv(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return tv(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,nv(t),rv(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=ua(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){cr(11)},getPrototypeOf(t){return mo(t.base_)},setPrototypeOf(){cr(12)}},Hs={};Vl(ev,(t,e)=>{Hs[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Hs.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&cr(13),Hs.set.call(this,t,e,void 0)},Hs.set=function(t,e,r){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&cr(14),ev.set.call(this,t[0],e,r,t[0])};function tv(t,e){const r=t[Sr];return(r?ua(r):t)[e]}function dF(t,e,r){var i;const n=Q1(e,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(t.draft_):void 0}function Q1(t,e){if(!(e in t))return;let r=mo(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=mo(r)}}function rv(t){t.modified_||(t.modified_=!0,t.parent_&&rv(t.parent_))}function nv(t){t.copy_||(t.copy_=Kd(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var vF=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const a=r;r=e;const o=this;return function(u=a,...l){return o.produce(u,f=>r.call(this,f,...l))}}typeof r!="function"&&cr(6),n!==void 0&&typeof n!="function"&&cr(7);let i;if(sa(e)){const a=K1(this),o=iv(e,void 0);let s=!0;try{i=r(o),s=!1}finally{s?Jd(a):Qd(a)}return X1(a,n),Z1(i,a)}else if(!e||typeof e!="object"){if(i=r(e),i===void 0&&(i=e),i===$1&&(i=void 0),this.autoFreeze_&&Zd(i,!0),n){const a=[],o=[];la("Patches").generateReplacementPatches_(e,i,a,o),n(a,o)}return i}else cr(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(o,...s)=>this.produceWithPatches(o,u=>e(u,...s));let n,i;return[this.produce(e,r,(o,s)=>{n=o,i=s}),n,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){sa(t)||cr(8),oa(t)&&(t=pF(t));const e=K1(this),r=iv(t,void 0);return r[Sr].isManual_=!0,Qd(e),r}finishDraft(t,e){const r=t&&t[Sr];(!r||!r.isManual_)&&cr(9);const{scope_:n}=r;return X1(n,e),Z1(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const i=e[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(e=e.slice(r+1));const n=la("Patches").applyPatches_;return oa(t)?n(t,e):this.produce(t,i=>n(i,e))}};function iv(t,e){const r=Wl(t)?la("MapSet").proxyMap_(t,e):$l(t)?la("MapSet").proxySet_(t,e):hF(t,e);return(e?e.scope_:Y1()).drafts_.push(r),r}function pF(t){return oa(t)||cr(10,t),eb(t)}function eb(t){if(!sa(t)||Gl(t))return t;const e=t[Sr];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Kd(t,e.scope_.immer_.useStrictShallowCopy_)}else r=Kd(t,!0);return Vl(r,(n,i)=>{q1(r,n,eb(i))}),e&&(e.finalized_=!1),r}var Er=new vF,av=Er.produce;Er.produceWithPatches.bind(Er),Er.setAutoFreeze.bind(Er),Er.setUseStrictShallowCopy.bind(Er),Er.applyPatches.bind(Er);var tb=Er.createDraft.bind(Er),rb=Er.finishDraft.bind(Er),gF={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=$.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},mF={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=ke.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},yF={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=te.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},Yl=new WeakMap,Xl=new WeakMap,Ws=new WeakMap,nb=new WeakMap,ib=new WeakMap,ab=new WeakMap,ob=new WeakMap,$={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,n=$.levels(t,e);return r?n=n.slice(1):n=n.slice(0,-1),n},common(t,e){for(var r=[],n=0;n<t.length&&n<e.length;n++){var i=t[n],a=e[n];if(i!==a)break;r.push(i)}return r},compare(t,e){for(var r=Math.min(t.length,e.length),n=0;n<r;n++){if(t[n]<e[n])return-1;if(t[n]>e[n])return 1}return 0},endsAfter(t,e){var r=t.length-1,n=t.slice(0,r),i=e.slice(0,r),a=t[r],o=e[r];return $.equals(n,i)&&a>o},endsAt(t,e){var r=t.length,n=t.slice(0,r),i=e.slice(0,r);return $.equals(n,i)},endsBefore(t,e){var r=t.length-1,n=t.slice(0,r),i=e.slice(0,r),a=t[r],o=e[r];return $.equals(n,i)&&a<o},equals(t,e){return t.length===e.length&&t.every((r,n)=>r===e[n])},hasPrevious(t){return t[t.length-1]>0},isAfter(t,e){return $.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&$.compare(t,e)===0},isBefore(t,e){return $.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&$.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&$.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&$.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&$.compare(t,e)===0},isPath(t){return Array.isArray(t)&&(t.length===0||typeof t[0]=="number")},isSibling(t,e){if(t.length!==e.length)return!1;var r=t.slice(0,-1),n=e.slice(0,-1),i=t[t.length-1],a=e[e.length-1];return i!==a&&$.equals(r,n)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,n=[],i=0;i<=t.length;i++)n.push(t.slice(0,i));return r&&n.reverse(),n},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},operationCanTransformPath(t){switch(t.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!$.isAncestor(e,t)&&!$.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var n=[...t],{affinity:i="forward"}=r;if(t.length===0)return n;switch(e.type){case"insert_node":{var{path:a}=e;($.equals(a,n)||$.endsBefore(a,n)||$.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:o}=e;if($.equals(o,n)||$.isAncestor(o,n))return null;$.endsBefore(o,n)&&(n[o.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=e;$.equals(s,n)||$.endsBefore(s,n)?n[s.length-1]-=1:$.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=u);break}case"split_node":{var{path:l,position:f}=e;if($.equals(l,n)){if(i==="forward")n[n.length-1]+=1;else if(i!=="backward")return null}else $.endsBefore(l,n)?n[l.length-1]+=1:$.isAncestor(l,n)&&t[l.length]>=f&&(n[l.length-1]+=1,n[l.length]-=f);break}case"move_node":{var{path:c,newPath:h}=e;if($.equals(c,h))return n;if($.isAncestor(c,n)||$.equals(c,n)){var d=h.slice();return $.endsBefore(c,h)&&c.length<h.length&&(d[c.length-1]-=1),d.concat(n.slice(c.length))}else $.isSibling(c,h)&&($.isAncestor(h,n)||$.equals(h,n))?$.endsBefore(c,n)?n[c.length-1]-=1:n[c.length-1]+=1:$.endsBefore(h,n)||$.equals(h,n)||$.isAncestor(h,n)?($.endsBefore(c,n)&&(n[c.length-1]-=1),n[h.length-1]+=1):$.endsBefore(c,n)&&($.equals(h,n)&&(n[h.length-1]+=1),n[c.length-1]-=1);break}}return n}};function $s(t){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(t)}function bF(t,e){if($s(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if($s(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function CF(t){var e=bF(t,"string");return $s(e)==="symbol"?e:String(e)}function Qt(t,e,r){return e=CF(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Gs(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var wF=(t,e,r)=>{switch(r.type){case"insert_node":{var{path:n,node:i}=r,a=le.parent(t,n),o=n[n.length-1];if(o>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(a.children.splice(o,0,i),e)for(var[s,u]of te.points(e))e[u]=ke.transform(s,r);break}case"insert_text":{var{path:l,offset:f,text:c}=r;if(c.length===0)break;var h=le.leaf(t,l),d=h.text.slice(0,f),p=h.text.slice(f);if(h.text=d+c+p,e)for(var[g,v]of te.points(e))e[v]=ke.transform(g,r);break}case"merge_node":{var{path:m}=r,y=le.get(t,m),b=$.previous(m),w=le.get(t,b),C=le.parent(t,m),_=m[m.length-1];if(ge.isText(y)&&ge.isText(w))w.text+=y.text;else if(!ge.isText(y)&&!ge.isText(w))w.children.push(...y.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(m,"] to nodes of different interfaces: ").concat(Lt.stringify(y)," ").concat(Lt.stringify(w)));if(C.children.splice(_,1),e)for(var[D,x]of te.points(e))e[x]=ke.transform(D,r);break}case"move_node":{var{path:S,newPath:O}=r;if($.isAncestor(S,O))throw new Error("Cannot move a path [".concat(S,"] to new path [").concat(O,"] because the destination is inside itself."));var E=le.get(t,S),P=le.parent(t,S),F=S[S.length-1];P.children.splice(F,1);var B=$.transform(S,r),M=le.get(t,$.parent(B)),I=B[B.length-1];if(M.children.splice(I,0,E),e)for(var[j,z]of te.points(e))e[z]=ke.transform(j,r);break}case"remove_node":{var{path:W}=r,R=W[W.length-1],U=le.parent(t,W);if(U.children.splice(R,1),e)for(var[Z,ee]of te.points(e)){var ne=ke.transform(Z,r);if(e!=null&&ne!=null)e[ee]=ne;else{var q=void 0,L=void 0;for(var[X,V]of le.texts(t))if($.compare(V,W)===-1)q=[X,V];else{L=[X,V];break}var G=!1;q&&L&&($.equals(L[1],W)?G=!$.hasPrevious(L[1]):G=$.common(q[1],W).length<$.common(L[1],W).length),q&&!G?(Z.path=q[1],Z.offset=q[0].text.length):L?(Z.path=L[1],Z.offset=0):e=null}}break}case"remove_text":{var{path:J,offset:K,text:Y}=r;if(Y.length===0)break;var fe=le.leaf(t,J),ue=fe.text.slice(0,K),Ce=fe.text.slice(K+Y.length);if(fe.text=ue+Ce,e)for(var[me,Fe]of te.points(e))e[Fe]=ke.transform(me,r);break}case"set_node":{var{path:ae,properties:ve,newProperties:Le}=r;if(ae.length===0)throw new Error("Cannot set properties on the root node!");var ft=le.get(t,ae);for(var Ie in Le){if(Ie==="children"||Ie==="text")throw new Error('Cannot set the "'.concat(Ie,'" property of nodes!'));var at=Le[Ie];at==null?delete ft[Ie]:ft[Ie]=at}for(var Fr in ve)Le.hasOwnProperty(Fr)||delete ft[Fr];break}case"set_selection":{var{newProperties:et}=r;if(et==null)e=et;else{if(e==null){if(!te.isRange(et))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Lt.stringify(et)," when there is no current selection."));e=Gs({},et)}for(var ct in et){var Lr=et[ct];if(Lr==null){if(ct==="anchor"||ct==="focus")throw new Error('Cannot remove the "'.concat(ct,'" selection property'));delete e[ct]}else e[ct]=Lr}}break}case"split_node":{var{path:Zt,position:Ir,properties:$n}=r;if(Zt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Zt,"] because the root node cannot be split."));var wr=le.get(t,Zt),gl=le.parent(t,Zt),so=Zt[Zt.length-1],Zi;if(ge.isText(wr)){var ay=wr.text.slice(0,Ir),oy=wr.text.slice(Ir);wr.text=ay,Zi=Gs(Gs({},$n),{},{text:oy})}else{var sy=wr.children.slice(0,Ir),uy=wr.children.slice(Ir);wr.children=sy,Zi=Gs(Gs({},$n),{},{children:uy})}if(gl.children.splice(so+1,0,Zi),e)for(var[ml,Yh]of te.points(e))e[Yh]=ke.transform(ml,r);break}}return e},_F={transform(t,e){t.children=tb(t.children);var r=t.selection&&tb(t.selection);try{r=wF(t,r,e)}finally{t.children=rb(t.children),r?t.selection=oa(r)?rb(r):r:t.selection=null}}},DF={insertNodes(t,e,r){t.insertNodes(e,r)},liftNodes(t,e){t.liftNodes(e)},mergeNodes(t,e){t.mergeNodes(e)},moveNodes(t,e){t.moveNodes(e)},removeNodes(t,e){t.removeNodes(e)},setNodes(t,e,r){t.setNodes(e,r)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,r){t.unsetNodes(e,r)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,r){t.wrapNodes(e,r)}},xF={collapse(t,e){t.collapse(e)},deselect(t){t.deselect()},move(t,e){t.move(e)},select(t,e){t.select(e)},setPoint(t,e,r){t.setPoint(e,r)},setSelection(t,e){t.setSelection(e)}},ub=(t,e)=>{for(var r in t){var n=t[r],i=e[r];if(Nt(n)&&Nt(i)){if(!ub(n,i))return!1}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(n[a]!==i[a])return!1}else if(n!==i)return!1}for(var o in e)if(t[o]===void 0&&e[o]!==void 0)return!1;return!0};function SF(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Yn(t,e){if(t==null)return{};var r=SF(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var EF=["anchor","focus"];function lb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function AF(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var te={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,{anchor:n,focus:i}=t;return te.isBackward(t)===r?[n,i]:[i,n]},end(t){var[,e]=te.edges(t);return e},equals(t,e){return ke.equals(t.anchor,e.anchor)&&ke.equals(t.focus,e.focus)},surrounds(t,e){var r=te.intersection(t,e);return r?te.equals(r,e):!1},includes(t,e){if(te.isRange(e)){if(te.includes(t,e.anchor)||te.includes(t,e.focus))return!0;var[r,n]=te.edges(t),[i,a]=te.edges(e);return ke.isBefore(r,i)&&ke.isAfter(n,a)}var[o,s]=te.edges(t),u=!1,l=!1;return ke.isPoint(e)?(u=ke.compare(e,o)>=0,l=ke.compare(e,s)<=0):(u=$.compare(e,o.path)>=0,l=$.compare(e,s.path)<=0),u&&l},intersection(t,e){var r=Yn(t,EF),[n,i]=te.edges(t),[a,o]=te.edges(e),s=ke.isBefore(n,a)?a:n,u=ke.isBefore(i,o)?i:o;return ke.isBefore(u,s)?null:AF({anchor:s,focus:u},r)},isBackward(t){var{anchor:e,focus:r}=t;return ke.isAfter(e,r)},isCollapsed(t){var{anchor:e,focus:r}=t;return ke.equals(e,r)},isExpanded(t){return!te.isCollapsed(t)},isForward(t){return!te.isBackward(t)},isRange(t){return Nt(t)&&ke.isPoint(t.anchor)&&ke.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=te.edges(t);return e},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return av(t,n=>{if(n===null)return null;var{affinity:i="inward"}=r,a,o;if(i==="inward"){var s=te.isCollapsed(n);te.isForward(n)?(a="forward",o=s?a:"backward"):(a="backward",o=s?a:"forward")}else i==="outward"?te.isForward(n)?(a="backward",o="forward"):(a="forward",o="backward"):(a=i,o=i);var u=ke.transform(n.anchor,e,{affinity:a}),l=ke.transform(n.focus,e,{affinity:o});if(!u||!l)return null;n.anchor=u,n.focus=l})}},fb=t=>Nt(t)&&le.isNodeList(t.children)&&!T.isEditor(t),pe={isAncestor(t){return Nt(t)&&le.isNodeList(t.children)},isElement:fb,isElementList(t){return Array.isArray(t)&&t.every(e=>pe.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return fb(e)&&e[n]===r},matches(t,e){for(var r in e)if(r!=="children"&&t[r]!==e[r])return!1;return!0}},TF=["children"],OF=["text"],cb=new WeakMap,le={ancestor(t,e){var r=le.get(t,e);if(ge.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(Lt.stringify(r)));return r},ancestors(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of $.ancestors(e,r)){var i=le.ancestor(t,n),a=[i,n];yield a}}()},child(t,e){if(ge.isText(t))throw new Error("Cannot get the child of a text node: ".concat(Lt.stringify(t)));var r=t.children[e];if(r==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(Lt.stringify(t)));return r},children(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:n=!1}=r,i=le.ancestor(t,e),{children:a}=i,o=n?a.length-1:0;n?o>=0:o<a.length;){var s=le.child(i,o),u=e.concat(o);yield[s,u],o=n?o-1:o+1}}()},common(t,e,r){var n=$.common(e,r),i=le.get(t,n);return[i,n]},descendant(t,e){var r=le.get(t,e);if(T.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat(Lt.stringify(r)));return r},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of le.nodes(t,e))n.length!==0&&(yield[r,n])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of le.nodes(t,e))pe.isElement(r)&&(yield[r,n])}()},extractProps(t){if(pe.isAncestor(t)){var e=Yn(t,TF);return e}else{var e=Yn(t,OF);return e}},first(t,e){for(var r=e.slice(),n=le.get(t,r);n&&!(ge.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(t,e){if(ge.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Lt.stringify(t)));var r=av({children:t.children},n=>{var[i,a]=te.edges(e),o=le.nodes(n,{reverse:!0,pass:h=>{var[,d]=h;return!te.includes(e,d)}});for(var[,s]of o){if(!te.includes(e,s)){var u=le.parent(n,s),l=s[s.length-1];u.children.splice(l,1)}if($.equals(s,a.path)){var f=le.leaf(n,s);f.text=f.text.slice(0,a.offset)}if($.equals(s,i.path)){var c=le.leaf(n,s);c.text=c.text.slice(i.offset)}}T.isEditor(n)&&(n.selection=null)});return r.children},get(t,e){var r=le.getIf(t,e);if(r===void 0)throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat(Lt.stringify(t)));return r},getIf(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(ge.isText(r)||!r.children[i])return;r=r.children[i]}return r},has(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(ge.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode(t){return ge.isText(t)||pe.isElement(t)||T.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=cb.get(t);if(e!==void 0)return e;var r=t.every(n=>le.isNode(n));return cb.set(t,r),r},last(t,e){for(var r=e.slice(),n=le.get(t,r);n&&!(ge.isText(n)||n.children.length===0);){var i=n.children.length-1;n=n.children[i],r.push(i)}return[n,r]},leaf(t,e){var r=le.get(t,e);if(!ge.isText(r))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(Lt.stringify(r)));return r},levels(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of $.levels(e,r)){var i=le.get(t,n);yield[i,n]}}()},matches(t,e){return pe.isElement(t)&&pe.isElementProps(e)&&pe.matches(t,e)||ge.isText(t)&&ge.isTextProps(e)&&ge.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:r,reverse:n=!1}=e,{from:i=[],to:a}=e,o=new Set,s=[],u=t;!(a&&(n?$.isBefore(s,a):$.isAfter(s,a)));){if(o.has(u)||(yield[u,s]),!o.has(u)&&!ge.isText(u)&&u.children.length!==0&&(r==null||r([u,s])===!1)){o.add(u);var l=n?u.children.length-1:0;$.isAncestor(s,i)&&(l=i[s.length]),s=s.concat(l),u=le.get(t,s);continue}if(s.length===0)break;if(!n){var f=$.next(s);if(le.has(t,f)){s=f,u=le.get(t,s);continue}}if(n&&s[s.length-1]!==0){var c=$.previous(s);s=c,u=le.get(t,s);continue}s=$.parent(s),u=le.get(t,s),o.add(u)}}()},parent(t,e){var r=$.parent(e),n=le.get(t,r);if(ge.isText(n))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return n},string(t){return ge.isText(t)?t.text:t.children.map(le.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of le.nodes(t,e))ge.isText(r)&&(yield[r,n])}()}};function hb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var yi={isNodeOperation(t){return yi.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!Nt(t))return!1;switch(t.type){case"insert_node":return $.isPath(t.path)&&le.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&$.isPath(t.path);case"merge_node":return typeof t.position=="number"&&$.isPath(t.path)&&Nt(t.properties);case"move_node":return $.isPath(t.path)&&$.isPath(t.newPath);case"remove_node":return $.isPath(t.path)&&le.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&$.isPath(t.path);case"set_node":return $.isPath(t.path)&&Nt(t.properties)&&Nt(t.newProperties);case"set_selection":return t.properties===null&&te.isRange(t.newProperties)||t.newProperties===null&&te.isRange(t.properties)||Nt(t.properties)&&Nt(t.newProperties);case"split_node":return $.isPath(t.path)&&typeof t.position=="number"&&Nt(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>yi.isOperation(e))},isSelectionOperation(t){return yi.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return yi.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return vt(vt({},t),{},{type:"remove_node"});case"insert_text":return vt(vt({},t),{},{type:"remove_text"});case"merge_node":return vt(vt({},t),{},{type:"split_node",path:$.previous(t.path)});case"move_node":{var{newPath:e,path:r}=t;if($.equals(e,r))return t;if($.isSibling(r,e))return vt(vt({},t),{},{path:e,newPath:r});var n=$.transform(r,t),i=$.transform($.next(r),t);return vt(vt({},t),{},{path:n,newPath:i})}case"remove_node":return vt(vt({},t),{},{type:"insert_node"});case"remove_text":return vt(vt({},t),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:o}=t;return vt(vt({},t),{},{properties:o,newProperties:a})}case"set_selection":{var{properties:s,newProperties:u}=t;return s==null?vt(vt({},t),{},{properties:u,newProperties:null}):u==null?vt(vt({},t),{},{properties:null,newProperties:s}):vt(vt({},t),{},{properties:u,newProperties:s})}case"split_node":return vt(vt({},t),{},{type:"merge_node",path:$.next(t.path)})}}},db=new WeakMap,PF=t=>{var e=db.get(t);if(e!==void 0)return e;if(!Nt(t))return!1;var r=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertSoftBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isElementReadOnly=="function"&&typeof t.isInline=="function"&&typeof t.isSelectable=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&typeof t.getDirtyPaths=="function"&&(t.marks===null||Nt(t.marks))&&(t.selection===null||te.isRange(t.selection))&&le.isNodeList(t.children)&&yi.isOperationList(t.operations);return db.set(t,r),r},T={above(t,e){return t.above(e)},addMark(t,e,r){t.addMark(e,r)},after(t,e,r){return t.after(e,r)},before(t,e,r){return t.before(e,r)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=e;t.deleteBackward(r)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=e;t.deleteForward(r)},deleteFragment(t,e){t.deleteFragment(e)},edges(t,e){return t.edges(e)},elementReadOnly(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.elementReadOnly(e)},end(t,e){return t.end(e)},first(t,e){return t.first(e)},fragment(t,e){return t.fragment(e)},hasBlocks(t,e){return t.hasBlocks(e)},hasInlines(t,e){return t.hasInlines(e)},hasPath(t,e){return t.hasPath(e)},hasTexts(t,e){return t.hasTexts(e)},insertBreak(t){t.insertBreak()},insertFragment(t,e,r){t.insertFragment(e,r)},insertNode(t,e){t.insertNode(e)},insertSoftBreak(t){t.insertSoftBreak()},insertText(t,e){t.insertText(e)},isBlock(t,e){return t.isBlock(e)},isEdge(t,e,r){return t.isEdge(e,r)},isEditor(t){return PF(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,r){return t.isEnd(e,r)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,r){return t.isStart(e,r)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,r){return t.leaf(e,r)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,r){return t.node(e,r)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,r){return t.parent(e,r)},path(t,e,r){return t.path(e,r)},pathRef(t,e,r){return t.pathRef(e,r)},pathRefs(t){return t.pathRefs()},point(t,e,r){return t.point(e,r)},pointRef(t,e,r){return t.pointRef(e,r)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,r){return t.range(e,r)},rangeRef(t,e,r){return t.rangeRef(e,r)},rangeRefs(t){return t.rangeRefs()},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){t.setNormalizing(e)},start(t,e){return t.start(e)},string(t,e,r){return t.string(e,r)},unhangRange(t,e,r){return t.unhangRange(e,r)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,r)=>t.shouldMergeNodesRemovePrevNode(e,r)},BF={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every($.isPath)}};function vb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ke={compare(t,e){var r=$.compare(t.path,e.path);return r===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:r},isAfter(t,e){return ke.compare(t,e)===1},isBefore(t,e){return ke.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&$.equals(t.path,e.path)},isPoint(t){return Nt(t)&&typeof t.offset=="number"&&$.isPath(t.path)},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return av(t,n=>{if(n===null)return null;var{affinity:i="forward"}=r,{path:a,offset:o}=n;switch(e.type){case"insert_node":case"move_node":{n.path=$.transform(a,e,r);break}case"insert_text":{$.equals(e.path,a)&&(e.offset<o||e.offset===o&&i==="forward")&&(n.offset+=e.text.length);break}case"merge_node":{$.equals(e.path,a)&&(n.offset+=e.position),n.path=$.transform(a,e,r);break}case"remove_text":{$.equals(e.path,a)&&e.offset<=o&&(n.offset-=Math.min(o-e.offset,e.text.length));break}case"remove_node":{if($.equals(e.path,a)||$.isAncestor(e.path,a))return null;n.path=$.transform(a,e,r);break}case"split_node":{if($.equals(e.path,a)){if(e.position===o&&i==null)return null;(e.position<o||e.position===o&&i==="forward")&&(n.offset-=e.position,n.path=$.transform(a,e,pb(pb({},r),{},{affinity:"forward"})))}else n.path=$.transform(a,e,r);break}}})}},gb=void 0,Lt={setScrubber(t){gb=t},stringify(t){return JSON.stringify(t,gb)}},MF=["text"],FF=["anchor","focus"];function mb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Xn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ge={equals(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function i(a){var o=Yn(a,MF);return o}return ub(n?i(t):t,n?i(e):e)},isText(t){return Nt(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>ge.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var r in e)if(r!=="text"&&(!t.hasOwnProperty(r)||t[r]!==e[r]))return!1;return!0},decorations(t,e){var r=[Xn({},t)];for(var n of e){var i=Yn(n,FF),[a,o]=te.edges(n),s=[],u=0,l=a.offset,f=o.offset;for(var c of r){var{length:h}=c.text,d=u;if(u+=h,l<=d&&u<=f){Object.assign(c,i),s.push(c);continue}if(l!==f&&(l===u||f===d)||l>u||f<d||f===d&&d!==0){s.push(c);continue}var p=c,g=void 0,v=void 0;if(f<u){var m=f-d;v=Xn(Xn({},p),{},{text:p.text.slice(m)}),p=Xn(Xn({},p),{},{text:p.text.slice(0,m)})}if(l>d){var y=l-d;g=Xn(Xn({},p),{},{text:p.text.slice(0,y)}),p=Xn(Xn({},p),{},{text:p.text.slice(y)})}Object.assign(p,i),g&&s.push(g),s.push(p),v&&s.push(v)}r=s}return r}},ov=t=>t.selection?t.selection:t.children.length>0?T.end(t,[]):[0],yo=(t,e)=>{var[r]=T.node(t,e);return n=>n===r},sv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=!r,i=r?zF(e):e,a=Oe.None,o=Oe.None,s=0,u=null,l=null;for(var f of i){var c=f.codePointAt(0);if(!c)break;var h=ZF(f,c);if([a,o]=n?[o,h]:[h,a],bo(a,Oe.ZWJ)&&bo(o,Oe.ExtPict)&&(n?u=yb(e.substring(0,s)):u=yb(e.substring(0,e.length-s)),!u)||bo(a,Oe.RI)&&bo(o,Oe.RI)&&(l!==null?l=!l:n?l=!0:l=rL(e.substring(0,e.length-s)),!l)||a!==Oe.None&&o!==Oe.None&&QF(a,o))break;s+=f.length}return s||1},LF=/\s/,IF=/[\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]/,RF=/['\u2018\u2019]/,NF=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=0,i=!1;e.length>0;){var a=sv(e,r),[o,s]=uv(e,a,r);if(kF(o,s,r))i=!0,n+=a;else if(!i)n+=a;else break;e=s}return n},uv=(t,e,r)=>{if(r){var n=t.length-e;return[t.slice(n,t.length),t.slice(0,n)]}return[t.slice(0,e),t.slice(e)]},kF=function t(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(LF.test(e))return!1;if(RF.test(e)){var i=sv(r,n),[a,o]=uv(r,i,n);if(t(a,o,n))return!0}return!IF.test(e)},zF=function*(e){for(var r=e.length-1,n=0;n<e.length;n++){var i=e.charAt(r-n);if(VF(i.charCodeAt(0))){var a=e.charAt(r-n-1);if(jF(a.charCodeAt(0))){yield a+i,n++;continue}}yield i}},jF=t=>t>=55296&&t<=56319,VF=t=>t>=56320&&t<=57343,Oe;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(Oe||(Oe={}));var HF=/^(?:[\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])$/,WF=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,$F=/^(?:[\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])$/,GF=/^[\u1100-\u115F\uA960-\uA97C]$/,UF=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,qF=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,YF=/^[\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]$/,XF=/^[\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]$/,KF=/^(?:[\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])$/,ZF=(t,e)=>{var r=Oe.Any;return t.search(HF)!==-1&&(r|=Oe.Extend),e===8205&&(r|=Oe.ZWJ),e>=127462&&e<=127487&&(r|=Oe.RI),t.search(WF)!==-1&&(r|=Oe.Prepend),t.search($F)!==-1&&(r|=Oe.SpacingMark),t.search(GF)!==-1&&(r|=Oe.L),t.search(UF)!==-1&&(r|=Oe.V),t.search(qF)!==-1&&(r|=Oe.T),t.search(YF)!==-1&&(r|=Oe.LV),t.search(XF)!==-1&&(r|=Oe.LVT),t.search(KF)!==-1&&(r|=Oe.ExtPict),r};function bo(t,e){return(t&e)!==0}var JF=[[Oe.L,Oe.L|Oe.V|Oe.LV|Oe.LVT],[Oe.LV|Oe.V,Oe.V|Oe.T],[Oe.LVT|Oe.T,Oe.T],[Oe.Any,Oe.Extend|Oe.ZWJ],[Oe.Any,Oe.SpacingMark],[Oe.Prepend,Oe.Any],[Oe.ZWJ,Oe.ExtPict],[Oe.RI,Oe.RI]];function QF(t,e){return JF.findIndex(r=>bo(t,r[0])&&bo(e,r[1]))===-1}var eL=/(?:[\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$/,yb=t=>t.search(eL)!==-1,tL=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,rL=t=>{var e=t.match(tL);if(e===null)return!1;var r=e[0].length/2;return r%2===1},nL={delete(t,e){t.delete(e)},insertFragment(t,e,r){t.insertFragment(e,r)},insertText(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(t,()=>{var{voids:n=!1}=r,{at:i=ov(t)}=r;if($.isPath(i)&&(i=T.range(t,i)),te.isRange(i))if(te.isCollapsed(i))i=i.anchor;else{var a=te.end(i);if(!n&&T.void(t,{at:a}))return;var o=te.start(i),s=T.pointRef(t,o),u=T.pointRef(t,a);ie.delete(t,{at:i,voids:n});var l=s.unref(),f=u.unref();i=l||f,ie.setSelection(t,{anchor:i,focus:i})}if(!(!n&&T.void(t,{at:i})||T.elementReadOnly(t,{at:i}))){var{path:c,offset:h}=i;e.length>0&&t.apply({type:"insert_text",path:c,offset:h,text:e})}})}};function bb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Kl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ie=Kl(Kl(Kl(Kl({},_F),DF),xF),nL),Zl=new WeakMap,iL=t=>Zl.get(t)||!1,aL=(t,e,r)=>{var n=Zl.get(t)||!1;Zl.set(t,!0);try{e(),r()}finally{Zl.set(t,n)}};function Cb(t,e,r){var n=Yl.get(t)||[],i=Xl.get(t)||new Set,a,o,s=c=>{if(c){var h=c.join(",");o.has(h)||(o.add(h),a.push(c))}};if(r){a=[],o=new Set;for(var u of n){var l=r(u);s(l)}}else a=n,o=i;for(var f of e)s(f);Yl.set(t,a),Xl.set(t,o)}var oL=(t,e)=>{for(var r of T.pathRefs(t))gF.transform(r,e);for(var n of T.pointRefs(t))mF.transform(n,e);for(var i of T.rangeRefs(t))yF.transform(i,e);if(!iL(t)){var a=$.operationCanTransformPath(e)?o=>$.transform(o,e):void 0;Cb(t,t.getDirtyPaths(e),a)}ie.transform(t,e),t.operations.push(e),T.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Ws.get(t)||(Ws.set(t,!0),Promise.resolve().then(()=>{Ws.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},sL=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=e;return $.levels(r)}case"insert_node":{var{node:n,path:i}=e,a=$.levels(i),o=ge.isText(n)?[]:Array.from(le.nodes(n),O=>{var[,E]=O;return i.concat(E)});return[...a,...o]}case"merge_node":{var{path:s}=e,u=$.ancestors(s),l=$.previous(s);return[...u,l]}case"move_node":{var{path:f,newPath:c}=e;if($.equals(f,c))return[];var h=[],d=[];for(var p of $.ancestors(f)){var g=$.transform(p,e);h.push(g)}for(var v of $.ancestors(c)){var m=$.transform(v,e);d.push(m)}var y=d[d.length-1],b=c[c.length-1],w=y.concat(b);return[...h,...d,w]}case"remove_node":{var{path:C}=e,_=$.ancestors(C);return[..._]}case"split_node":{var{path:D}=e,x=$.levels(D),S=$.next(D);return[...x,S]}default:return[]}},uL=t=>{var{selection:e}=t;return e?le.fragment(t,e):[]},lL=(t,e)=>{var[r,n]=e;if(!ge.isText(r)){if(pe.isElement(r)&&r.children.length===0){var i={text:""};ie.insertNodes(t,i,{at:n.concat(0),voids:!0});return}for(var a=T.isEditor(r)?!1:pe.isElement(r)&&(t.isInline(r)||r.children.length===0||ge.isText(r.children[0])||t.isInline(r.children[0])),o=0,s=0;s<r.children.length;s++,o++){var u=le.get(t,n);if(!ge.isText(u)){var l=u.children[o],f=u.children[o-1],c=s===r.children.length-1,h=ge.isText(l)||pe.isElement(l)&&t.isInline(l);if(h!==a)ie.removeNodes(t,{at:n.concat(o),voids:!0}),o--;else if(pe.isElement(l)){if(t.isInline(l)){if(f==null||!ge.isText(f)){var d={text:""};ie.insertNodes(t,d,{at:n.concat(o),voids:!0}),o++}else if(c){var p={text:""};ie.insertNodes(t,p,{at:n.concat(o+1),voids:!0}),o++}}}else{if(!ge.isText(l)&&!("children"in l)){var g=l;g.children=[]}f!=null&&ge.isText(f)&&(ge.equals(l,f,{loose:!0})?(ie.mergeNodes(t,{at:n.concat(o),voids:!0}),o--):f.text===""?(ie.removeNodes(t,{at:n.concat(o-1),voids:!0}),o--):l.text===""&&(ie.removeNodes(t,{at:n.concat(o),voids:!0}),o--))}}}}},fL=(t,e)=>{var{iteration:r,initialDirtyPathsLength:n}=e,i=n*42;if(r>i)throw new Error("Could not completely normalize the editor after ".concat(i," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},cL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:i="lowest",at:a=e.selection,match:o}=r;if(a){var s=T.path(e,a),u=i==="lowest";for(var[l,f]of T.levels(e,{at:s,voids:n,match:o,reverse:u}))if(!ge.isText(l)){if(te.isRange(a)){if($.isAncestor(f,a.anchor.path)&&$.isAncestor(f,a.focus.path))return[l,f]}else if(!$.equals(s,f))return[l,f]}}};function wb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function _b(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var hL=(t,e,r)=>{var{selection:n}=t;if(n){var i=(c,h)=>{if(!ge.isText(c))return!1;var[d,p]=T.parent(t,h);return!t.isVoid(d)||t.markableVoid(d)},a=te.isExpanded(n),o=!1;if(!a){var[s,u]=T.node(t,n);if(s&&i(s,u)){var[l]=T.parent(t,u);o=l&&t.markableVoid(l)}}if(a||o)ie.setNodes(t,{[e]:r},{match:i,split:!0,voids:!0});else{var f=_b(_b({},T.marks(t)||{}),{},{[e]:r});t.marks=f,Ws.get(t)||t.onChange()}}};function Db(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Db(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Db(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var dL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.point(e,r,{edge:"end"}),a=T.end(e,[]),o={anchor:i,focus:a},{distance:s=1}=n,u=0,l;for(var f of T.positions(e,xb(xb({},n),{},{at:o}))){if(u>s)break;u!==0&&(l=f),u++}return l};function Sb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Eb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var vL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.start(e,[]),a=T.point(e,r,{edge:"start"}),o={anchor:i,focus:a},{distance:s=1}=n,u=0,l;for(var f of T.positions(e,Eb(Eb({},n),{},{at:o,reverse:!0}))){if(u>s)break;u!==0&&(l=f),u++}return l},pL=(t,e)=>{var{selection:r}=t;r&&te.isCollapsed(r)&&ie.delete(t,{unit:e,reverse:!0})},gL=(t,e)=>{var{selection:r}=t;r&&te.isCollapsed(r)&&ie.delete(t,{unit:e})},mL=function(e){var{direction:r="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e;n&&te.isExpanded(n)&&ie.delete(e,{reverse:r==="backward"})},yL=(t,e)=>[T.start(t,e),T.end(t,e)];function Ab(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Tb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ab(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ab(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var bL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T.above(e,Tb(Tb({},r),{},{match:n=>pe.isElement(n)&&T.isElementReadOnly(e,n)}))},CL=(t,e)=>T.point(t,e,{edge:"end"}),wL=(t,e)=>{var r=T.path(t,e,{edge:"start"});return T.node(t,r)},_L=(t,e)=>{var r=T.range(t,e);return le.fragment(t,r)};function Ob(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Pb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ob(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ob(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var DL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T.above(e,Pb(Pb({},r),{},{match:n=>pe.isElement(n)&&T.isVoid(e,n)}))},xL=(t,e)=>e.children.some(r=>pe.isElement(r)&&T.isBlock(t,r)),SL=(t,e)=>e.children.some(r=>ge.isText(r)||T.isInline(t,r)),EL=(t,e)=>le.has(t,e),AL=(t,e)=>e.children.every(r=>ge.isText(r)),TL=t=>{ie.splitNodes(t,{always:!0})},OL=(t,e,r)=>{ie.insertNodes(t,e,r)},PL=t=>{ie.splitNodes(t,{always:!0})};function Bb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function BL(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Bb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ML=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:a}=e;if(i){if(a){var o=BL({text:r},a);ie.insertNodes(e,o,{at:n.at,voids:n.voids})}else ie.insertText(e,r,n);e.marks=null}},FL=(t,e)=>!t.isInline(e),LL=(t,e,r)=>T.isStart(t,e,r)||T.isEnd(t,e,r),IL=(t,e)=>{var{children:r}=e,[n]=r;return r.length===0||r.length===1&&ge.isText(n)&&n.text===""&&!t.isVoid(e)},RL=(t,e,r)=>{var n=T.end(t,r);return ke.equals(e,n)},NL=t=>{var e=nb.get(t);return e===void 0?!0:e},kL=(t,e,r)=>{if(e.offset!==0)return!1;var n=T.start(t,r);return ke.equals(e,n)},zL=(t,e)=>{var r=T.path(t,e,{edge:"end"});return T.node(t,r)},jL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.path(e,r,n),a=le.leaf(e,i);return[a,i]};function VL(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,reverse:n=!1,voids:i=!1}=e,{match:a}=e;if(a==null&&(a=()=>!0),!!r){var o=[],s=T.path(t,r);for(var[u,l]of le.levels(t,s))if(a(u,l)&&(o.push([u,l]),!i&&pe.isElement(u)&&T.isVoid(t,u)))break;n&&o.reverse(),yield*o}}()}var HL=["text"],WL=["text"],$L=function(e){var{marks:r,selection:n}=e;if(!n)return null;var{anchor:i,focus:a}=n;if(r)return r;if(te.isExpanded(n)){var o=te.isBackward(n);o&&([a,i]=[i,a]);var s=T.isEnd(e,i,i.path);if(s){var u=T.after(e,i);u&&(i=u)}var[l]=T.nodes(e,{match:ge.isText,at:{anchor:i,focus:a}});if(l){var[f]=l,c=Yn(f,HL);return c}else return{}}var{path:h}=i,[d]=T.leaf(e,h);if(i.offset===0){var p=T.previous(e,{at:h,match:ge.isText}),g=T.above(e,{match:C=>pe.isElement(C)&&T.isVoid(e,C)&&e.markableVoid(C)});if(!g){var v=T.above(e,{match:C=>pe.isElement(C)&&T.isBlock(e,C)});if(p&&v){var[m,y]=p,[,b]=v;$.isAncestor(b,y)&&(d=m)}}}var w=Yn(d,WL);return w},GL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:a,at:o=e.selection}=r;if(o){var s=T.after(e,o,{voids:i});if(s){var[,u]=T.last(e,[]),l=[s.path,u];if($.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(a==null)if($.isPath(o)){var[f]=T.parent(e,o);a=h=>f.children.includes(h)}else a=()=>!0;var[c]=T.nodes(e,{at:l,match:a,mode:n,voids:i});return c}}},UL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.path(e,r,n),a=le.get(e,i);return[a,i]};function qL(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,mode:n="all",universal:i=!1,reverse:a=!1,voids:o=!1,ignoreNonSelectable:s=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!r){var l,f;if(BF.isSpan(r))l=r[0],f=r[1];else{var c=T.path(t,r,{edge:"start"}),h=T.path(t,r,{edge:"end"});l=a?h:c,f=a?c:h}var d=le.nodes(t,{reverse:a,from:l,to:f,pass:w=>{var[C]=w;return pe.isElement(C)?!!(!o&&(T.isVoid(t,C)||T.isElementReadOnly(t,C))||s&&!T.isSelectable(t,C)):!1}}),p=[],g;for(var[v,m]of d)if(!(s&&pe.isElement(v)&&!T.isSelectable(t,v))){var y=g&&$.compare(m,g[1])===0;if(!(n==="highest"&&y)){if(!u(v,m)){if(i&&!y&&ge.isText(v))return;continue}if(n==="lowest"&&y){g=[v,m];continue}var b=n==="lowest"?g:[v,m];b&&(i?p.push(b):yield b),g=[v,m]}}n==="lowest"&&g&&(i?p.push(g):yield g),i&&(yield*p)}}()}var YL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1,operation:i}=r,a=f=>Yl.get(f)||[],o=f=>Xl.get(f)||new Set,s=f=>{var c=a(f).pop(),h=c.join(",");return o(f).delete(h),c};if(T.isNormalizing(e)){if(n){var u=Array.from(le.nodes(e),f=>{var[,c]=f;return c}),l=new Set(u.map(f=>f.join(",")));Yl.set(e,u),Xl.set(e,l)}a(e).length!==0&&T.withoutNormalizing(e,()=>{for(var f of a(e))if(le.has(e,f)){var c=T.node(e,f),[h,d]=c;pe.isElement(h)&&h.children.length===0&&e.normalizeNode(c,{operation:i})}for(var p=a(e),g=p.length,v=0;p.length!==0;){if(!e.shouldNormalize({dirtyPaths:p,iteration:v,initialDirtyPathsLength:g,operation:i}))return;var m=s(e);if(le.has(e,m)){var y=T.node(e,m);e.normalizeNode(y,{operation:i})}v++,p=a(e)}})}},XL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.path(e,r,n),a=$.parent(i),o=T.node(e,a);return o},KL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,a={current:r,affinity:i,unref(){var{current:s}=a,u=T.pathRefs(e);return u.delete(a),a.current=null,s}},o=T.pathRefs(e);return o.add(a),a},ZL=t=>{var e=ib.get(t);return e||(e=new Set,ib.set(t,e)),e},JL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:a}=n;if($.isPath(r)){if(a==="start"){var[,o]=le.first(e,r);r=o}else if(a==="end"){var[,s]=le.last(e,r);r=s}}return te.isRange(r)&&(a==="start"?r=te.start(r):a==="end"?r=te.end(r):r=$.common(r.anchor.path,r.focus.path)),ke.isPoint(r)&&(r=r.path),i!=null&&(r=r.slice(0,i)),r},QL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,a={current:r,affinity:i,unref(){var{current:s}=a,u=T.pointRefs(e);return u.delete(a),a.current=null,s}},o=T.pointRefs(e);return o.add(a),a},eI=t=>{var e=ab.get(t);return e||(e=new Set,ab.set(t,e)),e},tI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=n;if($.isPath(r)){var a;if(i==="end"){var[,o]=le.last(e,r);a=o}else{var[,s]=le.first(e,r);a=s}var u=le.get(e,a);if(!ge.isText(u))throw new Error("Cannot get the ".concat(i," point in the node at path [").concat(r,"] because it has no ").concat(i," text node."));return{path:a,offset:i==="end"?u.text.length:0}}if(te.isRange(r)){var[l,f]=te.edges(r);return i==="start"?l:f}return r};function rI(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,unit:n="offset",reverse:i=!1,voids:a=!1,ignoreNonSelectable:o=!1}=e;if(!r)return;var s=T.range(t,r),[u,l]=te.edges(s),f=i?l:u,c=!1,h="",d=0,p=0,g=0;for(var[v,m]of T.nodes(t,{at:r,reverse:i,voids:a,ignoreNonSelectable:o})){if(pe.isElement(v)){if(!a&&(t.isVoid(v)||t.isElementReadOnly(v))){yield T.start(t,m);continue}if(t.isInline(v))continue;if(T.hasInlines(t,v)){var y=$.isAncestor(m,l.path)?l:T.end(t,m),b=$.isAncestor(m,u.path)?u:T.start(t,m);h=T.string(t,{anchor:b,focus:y},{voids:a}),c=!0}}if(ge.isText(v)){var w=$.equals(m,f.path);for(w?(p=i?f.offset:v.text.length-f.offset,g=f.offset):(p=v.text.length,g=i?p:0),(w||c||n==="offset")&&(yield{path:m,offset:g},c=!1);;){if(d===0){if(h==="")break;d=C(h,n,i),h=uv(h,d,i)[1]}if(g=i?g-d:g+d,p=p-d,p<0){d=-p;break}d=0,yield{path:m,offset:g}}}}function C(_,D,x){return D==="character"?sv(_,x):D==="word"?NF(_,x):D==="line"||D==="block"?_.length:1}}()}var nI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:a,at:o=e.selection}=r;if(o){var s=T.before(e,o,{voids:i});if(s){var[,u]=T.first(e,[]),l=[s.path,u];if($.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(a==null)if($.isPath(o)){var[f]=T.parent(e,o);a=h=>f.children.includes(h)}else a=()=>!0;var[c]=T.nodes(e,{reverse:!0,at:l,match:a,mode:n,voids:i});return c}}},iI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,a={current:r,affinity:i,unref(){var{current:s}=a,u=T.rangeRefs(e);return u.delete(a),a.current=null,s}},o=T.rangeRefs(e);return o.add(a),a},aI=t=>{var e=ob.get(t);return e||(e=new Set,ob.set(t,e)),e},oI=(t,e,r)=>{if(te.isRange(e)&&!r)return e;var n=T.start(t,e),i=T.end(t,r||e);return{anchor:n,focus:i}};function Mb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function sI(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var uI=(t,e)=>{var{selection:r}=t;if(r){var n=(f,c)=>{if(!ge.isText(f))return!1;var[h,d]=T.parent(t,c);return!t.isVoid(h)||t.markableVoid(h)},i=te.isExpanded(r),a=!1;if(!i){var[o,s]=T.node(t,r);if(o&&n(o,s)){var[u]=T.parent(t,s);a=u&&t.markableVoid(u)}}if(i||a)ie.unsetNodes(t,e,{match:n,split:!0,voids:!0});else{var l=sI({},T.marks(t)||{});delete l[e],t.marks=l,Ws.get(t)||t.onChange()}}},lI=(t,e)=>{nb.set(t,e)},fI=(t,e)=>T.point(t,e,{edge:"start"}),cI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,a=T.range(e,r),[o,s]=te.edges(a),u="";for(var[l,f]of T.nodes(e,{at:a,match:ge.isText,voids:i})){var c=l.text;$.equals(f,s.path)&&(c=c.slice(0,s.offset)),$.equals(f,o.path)&&(c=c.slice(o.offset)),u+=c}return u},hI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,[a,o]=te.edges(r);if(a.offset!==0||o.offset!==0||te.isCollapsed(r)||$.hasPrevious(o.path))return r;var s=T.above(e,{at:o,match:p=>pe.isElement(p)&&T.isBlock(e,p),voids:i}),u=s?s[1]:[],l=T.start(e,a),f={anchor:l,focus:o},c=!0;for(var[h,d]of T.nodes(e,{at:f,match:ge.isText,reverse:!0,voids:i})){if(c){c=!1;continue}if(h.text!==""||$.isBefore(d,u)){o={path:d,offset:h.text.length};break}}return{anchor:a,focus:o}},dI=(t,e)=>{var r=T.isNormalizing(t);T.setNormalizing(t,!1);try{e()}finally{T.setNormalizing(t,r)}T.normalize(t)},vI=(t,e,r)=>{var[n,i]=e;return pe.isElement(n)&&T.isEmpty(t,n)||ge.isText(n)&&n.text===""&&i[i.length-1]!==0},pI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var n,i,{reverse:a=!1,unit:o="character",distance:s=1,voids:u=!1}=r,{at:l=e.selection,hanging:f=!1}=r;if(l){var c=!1;if(te.isRange(l)&&te.isCollapsed(l)&&(c=!0,l=l.anchor),ke.isPoint(l)){var h=T.void(e,{at:l,mode:"highest"});if(!u&&h){var[,d]=h;l=d}else{var p={unit:o,distance:s},g=a?T.before(e,l,p)||T.start(e,[]):T.after(e,l,p)||T.end(e,[]);l={anchor:l,focus:g},f=!0}}if($.isPath(l)){ie.removeNodes(e,{at:l,voids:u});return}if(!te.isCollapsed(l)){if(!f){var[,v]=te.edges(l),m=T.end(e,[]);ke.equals(v,m)||(l=T.unhangRange(e,l,{voids:u}))}var[y,b]=te.edges(l),w=T.above(e,{match:ue=>pe.isElement(ue)&&T.isBlock(e,ue),at:y,voids:u}),C=T.above(e,{match:ue=>pe.isElement(ue)&&T.isBlock(e,ue),at:b,voids:u}),_=w&&C&&!$.equals(w[1],C[1]),D=$.equals(y.path,b.path),x=u?null:(n=T.void(e,{at:y,mode:"highest"}))!==null&&n!==void 0?n:T.elementReadOnly(e,{at:y,mode:"highest"}),S=u?null:(i=T.void(e,{at:b,mode:"highest"}))!==null&&i!==void 0?i:T.elementReadOnly(e,{at:b,mode:"highest"});if(x){var O=T.before(e,y);O&&w&&$.isAncestor(w[1],O.path)&&(y=O)}if(S){var E=T.after(e,b);E&&C&&$.isAncestor(C[1],E.path)&&(b=E)}var P=[],F;for(var B of T.nodes(e,{at:l,voids:u})){var[M,I]=B;F&&$.compare(I,F)===0||(!u&&pe.isElement(M)&&(T.isVoid(e,M)||T.isElementReadOnly(e,M))||!$.isCommon(I,y.path)&&!$.isCommon(I,b.path))&&(P.push(B),F=I)}var j=Array.from(P,ue=>{var[,Ce]=ue;return T.pathRef(e,Ce)}),z=T.pointRef(e,y),W=T.pointRef(e,b),R="";if(!D&&!x){var U=z.current,[Z]=T.leaf(e,U),{path:ee}=U,{offset:ne}=y,q=Z.text.slice(ne);q.length>0&&(e.apply({type:"remove_text",path:ee,offset:ne,text:q}),R=q)}if(j.reverse().map(ue=>ue.unref()).filter(ue=>ue!==null).forEach(ue=>ie.removeNodes(e,{at:ue,voids:u})),!S){var L=W.current,[X]=T.leaf(e,L),{path:V}=L,G=D?y.offset:0,J=X.text.slice(G,b.offset);J.length>0&&(e.apply({type:"remove_text",path:V,offset:G,text:J}),R=J)}!D&&_&&W.current&&z.current&&ie.mergeNodes(e,{at:W.current,hanging:!0,voids:u}),c&&a&&o==="character"&&R.length>1&&R.match(/[\u0E00-\u0E7F]+/)&&ie.insertText(e,R.slice(0,R.length-s));var K=z.unref(),Y=W.unref(),fe=a?K||Y:Y||K;r.at==null&&fe&&ie.select(e,fe)}}})},gI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1}=n,{at:o=ov(e),batchDirty:s=!0}=n;if(r.length){if(te.isRange(o))if(i||(o=T.unhangRange(e,o,{voids:a})),te.isCollapsed(o))o=o.anchor;else{var[,u]=te.edges(o);if(!a&&T.void(e,{at:u}))return;var l=T.pointRef(e,u);ie.delete(e,{at:o}),o=l.unref()}else $.isPath(o)&&(o=T.start(e,o));if(!(!a&&T.void(e,{at:o}))){var f=T.above(e,{at:o,match:q=>pe.isElement(q)&&T.isInline(e,q),mode:"highest",voids:a});if(f){var[,c]=f;if(T.isEnd(e,o,c)){var h=T.after(e,c);o=h}else if(T.isStart(e,o,c)){var d=T.before(e,c);o=d}}var p=T.above(e,{match:q=>pe.isElement(q)&&T.isBlock(e,q),at:o,voids:a}),[,g]=p,v=T.isStart(e,o,g),m=T.isEnd(e,o,g),y=v&&m,b=!v||v&&m,w=!m,[,C]=le.first({children:r},[]),[,_]=le.last({children:r},[]),D=[],x=q=>{var[L,X]=q,V=X.length===0;return V?!1:y?!0:!(b&&$.isAncestor(X,C)&&pe.isElement(L)&&!e.isVoid(L)&&!e.isInline(L)||w&&$.isAncestor(X,_)&&pe.isElement(L)&&!e.isVoid(L)&&!e.isInline(L))};for(var S of le.nodes({children:r},{pass:x}))x(S)&&D.push(S);var O=[],E=[],P=[],F=!0,B=!1;for(var[M]of D)pe.isElement(M)&&!e.isInline(M)?(F=!1,B=!0,E.push(M)):F?O.push(M):P.push(M);var[I]=T.nodes(e,{at:o,match:q=>ge.isText(q)||T.isInline(e,q),mode:"highest",voids:a}),[,j]=I,z=T.isStart(e,o,j),W=T.isEnd(e,o,j),R=T.pathRef(e,m&&!P.length?$.next(g):g),U=T.pathRef(e,W?$.next(j):j);ie.splitNodes(e,{at:o,match:q=>B?pe.isElement(q)&&T.isBlock(e,q):ge.isText(q)||T.isInline(e,q),mode:B?"lowest":"highest",always:B&&(!v||O.length>0)&&(!m||P.length>0),voids:a});var Z=T.pathRef(e,!z||z&&W?$.next(j):j);if(ie.insertNodes(e,O,{at:Z.current,match:q=>ge.isText(q)||T.isInline(e,q),mode:"highest",voids:a,batchDirty:s}),y&&!O.length&&E.length&&!P.length&&ie.delete(e,{at:g,voids:a}),ie.insertNodes(e,E,{at:R.current,match:q=>pe.isElement(q)&&T.isBlock(e,q),mode:"lowest",voids:a,batchDirty:s}),ie.insertNodes(e,P,{at:U.current,match:q=>ge.isText(q)||T.isInline(e,q),mode:"highest",voids:a,batchDirty:s}),!n.at){var ee;if(P.length>0&&U.current?ee=$.previous(U.current):E.length>0&&R.current?ee=$.previous(R.current):Z.current&&(ee=$.previous(Z.current)),ee){var ne=T.end(e,ee);ie.select(e,ne)}}Z.unref(),R.unref(),U.unref()}}})},mI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=r,{selection:i}=e;if(i){if(n==="anchor")ie.select(e,i.anchor);else if(n==="focus")ie.select(e,i.focus);else if(n==="start"){var[a]=te.edges(i);ie.select(e,a)}else if(n==="end"){var[,o]=te.edges(i);ie.select(e,o)}}else return},yI=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},bI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:i=1,unit:a="character",reverse:o=!1}=r,{edge:s=null}=r;if(n){s==="start"&&(s=te.isBackward(n)?"focus":"anchor"),s==="end"&&(s=te.isBackward(n)?"anchor":"focus");var{anchor:u,focus:l}=n,f={distance:i,unit:a,ignoreNonSelectable:!0},c={};if(s==null||s==="anchor"){var h=o?T.before(e,u,f):T.after(e,u,f);h&&(c.anchor=h)}if(s==null||s==="focus"){var d=o?T.before(e,l,f):T.after(e,l,f);d&&(c.focus=d)}ie.setSelection(e,c)}},CI=(t,e)=>{var{selection:r}=t;if(e=T.range(t,e),r){ie.setSelection(t,e);return}if(!te.isRange(e))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(Lt.stringify(e)));t.apply({type:"set_selection",properties:r,newProperties:e})};function Fb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Lb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var wI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:a="both"}=n;if(i){a==="start"&&(a=te.isBackward(i)?"focus":"anchor"),a==="end"&&(a=te.isBackward(i)?"anchor":"focus");var{anchor:o,focus:s}=i,u=a==="anchor"?o:s;ie.setSelection(e,{[a==="anchor"?"anchor":"focus"]:Lb(Lb({},u),r)})}},_I=(t,e)=>{var{selection:r}=t,n={},i={};if(r){for(var a in e)(a==="anchor"&&e.anchor!=null&&!ke.equals(e.anchor,r.anchor)||a==="focus"&&e.focus!=null&&!ke.equals(e.focus,r.focus)||a!=="anchor"&&a!=="focus"&&e[a]!==r[a])&&(n[a]=r[a],i[a]=e[a]);Object.keys(n).length>0&&t.apply({type:"set_selection",properties:n,newProperties:i})}},DI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1,mode:o="lowest",batchDirty:s=!0}=n,{at:u,match:l,select:f}=n;if(le.isNode(r)&&(r=[r]),r.length!==0){var[c]=r;if(u||(u=ov(e),f!==!1&&(f=!0)),f==null&&(f=!1),te.isRange(u))if(i||(u=T.unhangRange(e,u,{voids:a})),te.isCollapsed(u))u=u.anchor;else{var[,h]=te.edges(u),d=T.pointRef(e,h);ie.delete(e,{at:u}),u=d.unref()}if(ke.isPoint(u)){l==null&&(ge.isText(c)?l=O=>ge.isText(O):e.isInline(c)?l=O=>ge.isText(O)||T.isInline(e,O):l=O=>pe.isElement(O)&&T.isBlock(e,O));var[p]=T.nodes(e,{at:u.path,match:l,mode:o,voids:a});if(p){var[,g]=p,v=T.pathRef(e,g),m=T.isEnd(e,u,g);ie.splitNodes(e,{at:u,match:l,mode:o,voids:a});var y=v.unref();u=m?$.next(y):y}else return}var b=$.parent(u),w=u[u.length-1];if(!(!a&&T.void(e,{at:b}))){if(s){var C=[],_=$.levels(b);aL(e,()=>{var O=function(){var F=b.concat(w);w++;var B={type:"insert_node",path:F,node:E};e.apply(B),u=$.next(u),C.push(B),ge.isText?_.push(...Array.from(le.nodes(E),M=>{var[,I]=M;return F.concat(I)})):_.push(F)};for(var E of r)O()},()=>{Cb(e,_,O=>{var E=O;for(var P of C)if($.operationCanTransformPath(P)&&(E=$.transform(E,P),!E))return null;return E})})}else for(var D of r){var x=b.concat(w);w++,e.apply({type:"insert_node",path:x,node:D}),u=$.next(u)}if(u=$.previous(u),f){var S=T.end(e,u);S&&ie.select(e,S)}}}})},xI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:i="lowest",voids:a=!1}=r,{match:o}=r;if(o==null&&(o=$.isPath(n)?yo(e,n):w=>pe.isElement(w)&&T.isBlock(e,w)),!!n){var s=T.nodes(e,{at:n,match:o,mode:i,voids:a}),u=Array.from(s,w=>{var[,C]=w;return T.pathRef(e,C)});for(var l of u){var f=l.unref();if(f.length<2)throw new Error("Cannot lift node at a path [".concat(f,"] because it has a depth of less than `2`."));var c=T.node(e,$.parent(f)),[h,d]=c,p=f[f.length-1],{length:g}=h.children;if(g===1){var v=$.next(d);ie.moveNodes(e,{at:f,to:v,voids:a}),ie.removeNodes(e,{at:d,voids:a})}else if(p===0)ie.moveNodes(e,{at:f,to:d,voids:a});else if(p===g-1){var m=$.next(d);ie.moveNodes(e,{at:f,to:m,voids:a})}else{var y=$.next(f),b=$.next(d);ie.splitNodes(e,{at:y,voids:a}),ie.moveNodes(e,{at:f,to:b,voids:a})}}}})},SI=["text"],EI=["children"],Ib=(t,e)=>{if(pe.isElement(e)){var r=e;return T.isVoid(t,e)?!0:r.children.length===1?Ib(t,r.children[0]):!1}else return!T.isEditor(e)},AI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{match:n,at:i=e.selection}=r,{hanging:a=!1,voids:o=!1,mode:s="lowest"}=r;if(i){if(n==null)if($.isPath(i)){var[u]=T.parent(e,i);n=O=>u.children.includes(O)}else n=O=>pe.isElement(O)&&T.isBlock(e,O);if(!a&&te.isRange(i)&&(i=T.unhangRange(e,i,{voids:o})),te.isRange(i))if(te.isCollapsed(i))i=i.anchor;else{var[,l]=te.edges(i),f=T.pointRef(e,l);ie.delete(e,{at:i}),i=f.unref(),r.at==null&&ie.select(e,i)}var[c]=T.nodes(e,{at:i,match:n,voids:o,mode:s}),h=T.previous(e,{at:i,match:n,voids:o,mode:s});if(!(!c||!h)){var[d,p]=c,[g,v]=h;if(!(p.length===0||v.length===0)){var m=$.next(v),y=$.common(p,v),b=$.isSibling(p,v),w=Array.from(T.levels(e,{at:p}),O=>{var[E]=O;return E}).slice(y.length).slice(0,-1),C=T.above(e,{at:p,mode:"highest",match:O=>w.includes(O)&&Ib(e,O)}),_=C&&T.pathRef(e,C[1]),D,x;if(ge.isText(d)&&ge.isText(g)){var S=Yn(d,SI);x=g.text.length,D=S}else if(pe.isElement(d)&&pe.isElement(g)){var S=Yn(d,EI);x=g.children.length,D=S}else throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(Lt.stringify(d)," ").concat(Lt.stringify(g)));b||ie.moveNodes(e,{at:p,to:m,voids:o}),_&&ie.removeNodes(e,{at:_.current,voids:o}),T.shouldMergeNodesRemovePrevNode(e,h,c)?ie.removeNodes(e,{at:v,voids:o}):e.apply({type:"merge_node",path:m,position:x,properties:D}),_&&_.unref()}}}})},TI=(t,e)=>{T.withoutNormalizing(t,()=>{var{to:r,at:n=t.selection,mode:i="lowest",voids:a=!1}=e,{match:o}=e;if(n){o==null&&(o=$.isPath(n)?yo(t,n):d=>pe.isElement(d)&&T.isBlock(t,d));var s=T.pathRef(t,r),u=T.nodes(t,{at:n,match:o,mode:i,voids:a}),l=Array.from(u,d=>{var[,p]=d;return T.pathRef(t,p)});for(var f of l){var c=f.unref(),h=s.current;c.length!==0&&t.apply({type:"move_node",path:c,newPath:h}),s.current&&$.isSibling(h,c)&&$.isAfter(h,c)&&(s.current=$.next(s.current))}s.unref()}})},OI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1,mode:a="lowest"}=r,{at:o=e.selection,match:s}=r;if(o){s==null&&(s=$.isPath(o)?yo(e,o):d=>pe.isElement(d)&&T.isBlock(e,d)),!n&&te.isRange(o)&&(o=T.unhangRange(e,o,{voids:i}));var u=T.nodes(e,{at:o,match:s,mode:a,voids:i}),l=Array.from(u,d=>{var[,p]=d;return T.pathRef(e,p)});for(var f of l){var c=f.unref();if(c){var[h]=T.node(e,c);e.apply({type:"remove_node",path:c,node:h})}}}})},PI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(e,()=>{var{match:i,at:a=e.selection,compare:o,merge:s}=n,{hanging:u=!1,mode:l="lowest",split:f=!1,voids:c=!1}=n;if(a){if(i==null&&(i=$.isPath(a)?yo(e,a):x=>pe.isElement(x)&&T.isBlock(e,x)),!u&&te.isRange(a)&&(a=T.unhangRange(e,a,{voids:c})),f&&te.isRange(a)){if(te.isCollapsed(a)&&T.leaf(e,a.anchor)[0].text.length>0)return;var h=T.rangeRef(e,a,{affinity:"inward"}),[d,p]=te.edges(a),g=l==="lowest"?"lowest":"highest",v=T.isEnd(e,p,p.path);ie.splitNodes(e,{at:p,match:i,mode:g,voids:c,always:!v});var m=T.isStart(e,d,d.path);ie.splitNodes(e,{at:d,match:i,mode:g,voids:c,always:!m}),a=h.unref(),n.at==null&&ie.select(e,a)}o||(o=(x,S)=>x!==S);for(var[y,b]of T.nodes(e,{at:a,match:i,mode:l,voids:c})){var w={},C={};if(b.length!==0){var _=!1;for(var D in r)D==="children"||D==="text"||o(r[D],y[D])&&(_=!0,y.hasOwnProperty(D)&&(w[D]=y[D]),s?r[D]!=null&&(C[D]=s(y[D],r[D])):r[D]!=null&&(C[D]=r[D]));_&&e.apply({type:"set_node",path:b,properties:w,newProperties:C})}}}})},BI=(t,e)=>{if(te.isCollapsed(e))return e.anchor;var[,r]=te.edges(e),n=T.pointRef(t,r);return ie.delete(t,{at:e}),n.unref()},MI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:i=!1}=r,{match:a,at:o=e.selection,height:s=0,always:u=!1}=r;if(a==null&&(a=W=>pe.isElement(W)&&T.isBlock(e,W)),te.isRange(o)&&(o=BI(e,o)),$.isPath(o)){var l=o,f=T.point(e,l),[c]=T.parent(e,l);a=W=>W===c,s=f.path.length-l.length+1,o=f,u=!0}if(o){var h=T.pointRef(e,o,{affinity:"backward"}),d;try{var[p]=T.nodes(e,{at:o,match:a,mode:n,voids:i});if(!p)return;var g=T.void(e,{at:o,mode:"highest"}),v=0;if(!i&&g){var[m,y]=g;if(pe.isElement(m)&&e.isInline(m)){var b=T.after(e,y);if(!b){var w={text:""},C=$.next(y);ie.insertNodes(e,w,{at:C,voids:i}),b=T.point(e,C)}o=b,u=!0}var _=o.path.length-y.length;s=_+1,u=!0}d=T.pointRef(e,o);var D=o.path.length-s,[,x]=p,S=o.path.slice(0,D),O=s===0?o.offset:o.path[D]+v;for(var[E,P]of T.levels(e,{at:S,reverse:!0,voids:i})){var F=!1;if(P.length<x.length||P.length===0||!i&&pe.isElement(E)&&T.isVoid(e,E))break;var B=h.current,M=T.isEnd(e,B,P);if(u||!h||!T.isEdge(e,B,P)){F=!0;var I=le.extractProps(E);e.apply({type:"split_node",path:P,position:O,properties:I})}O=P[P.length-1]+(F||M?1:0)}if(r.at==null){var j=d.current||T.end(e,[]);ie.select(e,j)}}finally{var z;h.unref(),(z=d)===null||z===void 0||z.unref()}}})},FI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(r)||(r=[r]);var i={};for(var a of r)i[a]=null;ie.setNodes(e,i,n)},LI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{mode:n="lowest",split:i=!1,voids:a=!1}=r,{at:o=e.selection,match:s}=r;if(o){s==null&&(s=$.isPath(o)?yo(e,o):d=>pe.isElement(d)&&T.isBlock(e,d)),$.isPath(o)&&(o=T.range(e,o));var u=te.isRange(o)?T.rangeRef(e,o):null,l=T.nodes(e,{at:o,match:s,mode:n,voids:a}),f=Array.from(l,d=>{var[,p]=d;return T.pathRef(e,p)}).reverse(),c=function(){var p=h.unref(),[g]=T.node(e,p),v=T.range(e,p);i&&u&&(v=te.intersection(u.current,v)),ie.liftNodes(e,{at:v,match:m=>pe.isAncestor(g)&&g.children.includes(m),voids:a})};for(var h of f)c();u&&u.unref()}})};function Rb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Nb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var II=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(e,()=>{var{mode:i="lowest",split:a=!1,voids:o=!1}=n,{match:s,at:u=e.selection}=n;if(u){if(s==null&&($.isPath(u)?s=yo(e,u):e.isInline(r)?s=v=>pe.isElement(v)&&T.isInline(e,v)||ge.isText(v):s=v=>pe.isElement(v)&&T.isBlock(e,v)),a&&te.isRange(u)){var[l,f]=te.edges(u),c=T.rangeRef(e,u,{affinity:"inward"});ie.splitNodes(e,{at:f,match:s,voids:o}),ie.splitNodes(e,{at:l,match:s,voids:o}),u=c.unref(),n.at==null&&ie.select(e,u)}var h=Array.from(T.nodes(e,{at:u,match:e.isInline(r)?v=>pe.isElement(v)&&T.isBlock(e,v):v=>T.isEditor(v),mode:"lowest",voids:o})),d=function(){var m=te.isRange(u)?te.intersection(u,T.range(e,g)):u;if(!m)return 0;var y=Array.from(T.nodes(e,{at:m,match:s,mode:i,voids:o}));if(y.length>0){var[b]=y,w=y[y.length-1],[,C]=b,[,_]=w;if(C.length===0&&_.length===0)return 0;var D=$.equals(C,_)?$.parent(C):$.common(C,_),x=T.range(e,C,_),S=T.node(e,D),[O]=S,E=D.length+1,P=$.next(_.slice(0,E)),F=Nb(Nb({},r),{},{children:[]});ie.insertNodes(e,F,{at:P,voids:o}),ie.moveNodes(e,{at:x,match:B=>pe.isAncestor(O)&&O.children.includes(B),to:P.concat(0),voids:o})}},p;for(var[,g]of h)p=d()}})},RI=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return oL(t,...n)},addMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return hL(t,...n)},deleteBackward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return pL(t,...n)},deleteForward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return gL(t,...n)},deleteFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return mL(t,...n)},getFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return uL(t,...n)},insertBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return TL(t,...n)},insertSoftBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return PL(t,...n)},insertFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return gI(t,...n)},insertNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return OL(t,...n)},insertText:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ML(t,...n)},normalizeNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return lL(t,...n)},removeMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return uI(t,...n)},getDirtyPaths:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return sL(t,...n)},shouldNormalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return fL(t,...n)},above:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return cL(t,...n)},after:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return dL(t,...n)},before:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return vL(t,...n)},collapse:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return mI(t,...n)},delete:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return pI(t,...n)},deselect:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return yI(t,...n)},edges:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return yL(t,...n)},elementReadOnly:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return bL(t,...n)},end:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return CL(t,...n)},first:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return wL(t,...n)},fragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _L(t,...n)},getMarks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return $L(t,...n)},hasBlocks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return xL(t,...n)},hasInlines:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return SL(t,...n)},hasPath:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return EL(t,...n)},hasTexts:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return AL(t,...n)},insertNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return DI(t,...n)},isBlock:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return FL(t,...n)},isEdge:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return LL(t,...n)},isEmpty:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return IL(t,...n)},isEnd:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return RL(t,...n)},isNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return NL(t,...n)},isStart:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return kL(t,...n)},last:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return zL(t,...n)},leaf:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return jL(t,...n)},levels:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return VL(t,...n)},liftNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return xI(t,...n)},mergeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return AI(t,...n)},move:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return bI(t,...n)},moveNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return TI(t,...n)},next:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return GL(t,...n)},node:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return UL(t,...n)},nodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return qL(t,...n)},normalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return YL(t,...n)},parent:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return XL(t,...n)},path:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return JL(t,...n)},pathRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return KL(t,...n)},pathRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ZL(t,...n)},point:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return tI(t,...n)},pointRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return QL(t,...n)},pointRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return eI(t,...n)},positions:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return rI(t,...n)},previous:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return nI(t,...n)},range:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return oI(t,...n)},rangeRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return iI(t,...n)},rangeRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return aI(t,...n)},removeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return OI(t,...n)},select:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return CI(t,...n)},setNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return PI(t,...n)},setNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return lI(t,...n)},setPoint:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return wI(t,...n)},setSelection:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _I(t,...n)},splitNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return MI(t,...n)},start:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return fI(t,...n)},string:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return cI(t,...n)},unhangRange:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return hI(t,...n)},unsetNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return FI(t,...n)},unwrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return LI(t,...n)},void:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return DL(t,...n)},withoutNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return dI(t,...n)},wrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return II(t,...n)},shouldMergeNodesRemovePrevNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return vI(t,...n)}};return t},fa=[],NI=function(){return fa.some(function(t){return t.activeTargets.length>0})},kI=function(){return fa.some(function(t){return t.skippedTargets.length>0})},kb="ResizeObserver loop completed with undelivered notifications.",zI=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:kb}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=kb),window.dispatchEvent(t)},Us;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Us||(Us={}));var ca=function(t){return Object.freeze(t)},jI=function(){function t(e,r){this.inlineSize=e,this.blockSize=r,ca(this)}return t}(),zb=function(){function t(e,r,n,i){return this.x=e,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ca(this)}return t.prototype.toJSON=function(){var e=this,r=e.x,n=e.y,i=e.top,a=e.right,o=e.bottom,s=e.left,u=e.width,l=e.height;return{x:r,y:n,top:i,right:a,bottom:o,left:s,width:u,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),lv=function(t){return t instanceof SVGElement&&"getBBox"in t},jb=function(t){if(lv(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var i=t,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||t.getClientRects().length)},Vb=function(t){var e;if(t instanceof Element)return!0;var r=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},VI=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},qs=typeof window<"u"?window:{},Jl=new WeakMap,Hb=/auto|scroll/,HI=/^tb|vertical/,WI=/msie|trident/i.test(qs.navigator&&qs.navigator.userAgent),bn=function(t){return parseFloat(t||"0")},Co=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=0),r===void 0&&(r=!1),new jI((r?e:t)||0,(r?t:e)||0)},Wb=ca({devicePixelContentBoxSize:Co(),borderBoxSize:Co(),contentBoxSize:Co(),contentRect:new zb(0,0,0,0)}),$b=function(t,e){if(e===void 0&&(e=!1),Jl.has(t)&&!e)return Jl.get(t);if(jb(t))return Jl.set(t,Wb),Wb;var r=getComputedStyle(t),n=lv(t)&&t.ownerSVGElement&&t.getBBox(),i=!WI&&r.boxSizing==="border-box",a=HI.test(r.writingMode||""),o=!n&&Hb.test(r.overflowY||""),s=!n&&Hb.test(r.overflowX||""),u=n?0:bn(r.paddingTop),l=n?0:bn(r.paddingRight),f=n?0:bn(r.paddingBottom),c=n?0:bn(r.paddingLeft),h=n?0:bn(r.borderTopWidth),d=n?0:bn(r.borderRightWidth),p=n?0:bn(r.borderBottomWidth),g=n?0:bn(r.borderLeftWidth),v=c+l,m=u+f,y=g+d,b=h+p,w=s?t.offsetHeight-b-t.clientHeight:0,C=o?t.offsetWidth-y-t.clientWidth:0,_=i?v+y:0,D=i?m+b:0,x=n?n.width:bn(r.width)-_-C,S=n?n.height:bn(r.height)-D-w,O=x+v+C+y,E=S+m+w+b,P=ca({devicePixelContentBoxSize:Co(Math.round(x*devicePixelRatio),Math.round(S*devicePixelRatio),a),borderBoxSize:Co(O,E,a),contentBoxSize:Co(x,S,a),contentRect:new zb(c,u,x,S)});return Jl.set(t,P),P},Gb=function(t,e,r){var n=$b(t,r),i=n.borderBoxSize,a=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(e){case Us.DEVICE_PIXEL_CONTENT_BOX:return o;case Us.BORDER_BOX:return i;default:return a}},$I=function(){function t(e){var r=$b(e);this.target=e,this.contentRect=r.contentRect,this.borderBoxSize=ca([r.borderBoxSize]),this.contentBoxSize=ca([r.contentBoxSize]),this.devicePixelContentBoxSize=ca([r.devicePixelContentBoxSize])}return t}(),Ub=function(t){if(jb(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},GI=function(){var t=1/0,e=[];fa.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(l){var f=new $I(l.target),c=Ub(l.target);s.push(f),l.lastReportedSize=Gb(l.target,l.observedBox),c<t&&(t=c)}),e.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var r=0,n=e;r<n.length;r++){var i=n[r];i()}return t},qb=function(t){fa.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(Ub(i.target)>t?r.activeTargets.push(i):r.skippedTargets.push(i))})})},UI=function(){var t=0;for(qb(t);NI();)t=GI(),qb(t);return kI()&&zI(),t>0},fv,Yb=[],qI=function(){return Yb.splice(0).forEach(function(t){return t()})},YI=function(t){if(!fv){var e=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return qI()}).observe(r,n),fv=function(){r.textContent="".concat(e?e--:e++)}}Yb.push(t),fv()},XI=function(t){YI(function(){requestAnimationFrame(t)})},Ql=0,KI=function(){return!!Ql},ZI=250,JI={attributes:!0,characterData:!0,childList:!0,subtree:!0},Xb=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Kb=function(t){return t===void 0&&(t=0),Date.now()+t},cv=!1,QI=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var r=this;if(e===void 0&&(e=ZI),!cv){cv=!0;var n=Kb(e);XI(function(){var i=!1;try{i=UI()}finally{if(cv=!1,e=n-Kb(),!KI())return;i?r.run(1e3):e>0?r.run(e):r.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,r=function(){return e.observer&&e.observer.observe(document.body,JI)};document.body?r():qs.addEventListener("DOMContentLoaded",r)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Xb.forEach(function(r){return qs.addEventListener(r,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Xb.forEach(function(r){return qs.removeEventListener(r,e.listener,!0)}),this.stopped=!0)},t}(),hv=new QI,Zb=function(t){!Ql&&t>0&&hv.start(),Ql+=t,!Ql&&hv.stop()},e5=function(t){return!lv(t)&&!VI(t)&&getComputedStyle(t).display==="inline"},t5=function(){function t(e,r){this.target=e,this.observedBox=r||Us.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Gb(this.target,this.observedBox,!0);return e5(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),r5=function(){function t(e,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=r}return t}(),ef=new WeakMap,Jb=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},tf=function(){function t(){}return t.connect=function(e,r){var n=new r5(e,r);ef.set(e,n)},t.observe=function(e,r,n){var i=ef.get(e),a=i.observationTargets.length===0;Jb(i.observationTargets,r)<0&&(a&&fa.push(i),i.observationTargets.push(new t5(r,n&&n.box)),Zb(1),hv.schedule())},t.unobserve=function(e,r){var n=ef.get(e),i=Jb(n.observationTargets,r),a=n.observationTargets.length===1;i>=0&&(a&&fa.splice(fa.indexOf(n),1),n.observationTargets.splice(i,1),Zb(-1))},t.disconnect=function(e){var r=this,n=ef.get(e);n.observationTargets.slice().forEach(function(i){return r.unobserve(e,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},t}(),n5=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");tf.connect(this,e)}return t.prototype.observe=function(e,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Vb(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");tf.observe(this,e,r)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Vb(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");tf.unobserve(this,e)},t.prototype.disconnect=function(){tf.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});for(var i5=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),dv={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Qb={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:i5?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},vv={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},rf=1;rf<20;rf++)vv["f"+rf]=111+rf;function nf(t,e,r){e&&!("byKey"in e)&&(r=e,e=null),Array.isArray(t)||(t=[t]);var n=t.map(function(o){return eC(o,e)}),i=function(s){return n.some(function(u){return tC(u,s)})},a=r==null?i:i(r);return a}function a5(t,e){return nf(t,e)}function o5(t,e){return nf(t,{byKey:!0},e)}function eC(t,e){var r=e&&e.byKey,n={};t=t.replace("++","+add");var i=t.split("+"),a=i.length;for(var o in dv)n[dv[o]]=!1;var s=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),c;!(s=(c=f.next()).done);s=!0){var h=c.value,d=h.endsWith("?")&&h.length>1;d&&(h=h.slice(0,-1));var p=pv(h),g=dv[p];if(h.length>1&&!g&&!Qb[h]&&!vv[p])throw new TypeError('Unknown modifier: "'+h+'"');(a===1||!g)&&(r?n.key=p:n.which=rC(h)),g&&(n[g]=d?null:!0)}}catch(v){u=!0,l=v}finally{try{!s&&f.return&&f.return()}finally{if(u)throw l}}return n}function tC(t,e){for(var r in t){var n=t[r],i=void 0;if(n!=null&&(r==="key"&&e.key!=null?i=e.key.toLowerCase():r==="which"?i=n===91&&e.which===93?91:e.which:i=e[r],!(i==null&&n===!1)&&i!==n))return!1}return!0}function rC(t){t=pv(t);var e=vv[t]||t.toUpperCase().charCodeAt(0);return e}function pv(t){return t=t.toLowerCase(),t=Qb[t]||t,t}Kn.default=nf;var gv=Kn.isHotkey=nf;Kn.isCodeHotkey=a5,Kn.isKeyHotkey=o5,Kn.parseHotkey=eC,Kn.compareHotkey=tC,Kn.toKeyCode=rC,Kn.toKeyName=pv;function s5(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function wo(t,e){if(t==null)return{};var r=s5(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ys(t){"@babel/helpers - typeof";return Ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ys(t)}function u5(t,e){if(Ys(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ys(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function l5(t){var e=u5(t,"string");return Ys(e)==="symbol"?e:String(e)}function Rr(t,e,r){return e=l5(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var mv=k.createContext(null),bi=()=>{var t=k.useContext(mv);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},yv,bv,nC=parseInt(k.version.split(".")[0],10),iC=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,aC=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),er=typeof navigator<"u"&&/Android/.test(navigator.userAgent),_o=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ha=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),f5=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),oC=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),c5=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),h5=er&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),d5=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),v5=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),p5=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),af=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((yv=navigator.userAgent.match(/Version\/(\d+)/))!==null&&yv!==void 0&&yv[1]&&parseInt((bv=navigator.userAgent.match(/Version\/(\d+)/))===null||bv===void 0?void 0:bv[1],10)<17);var Ci=(!c5||!h5)&&!f5&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Do=new WeakMap,Cv=new WeakMap,wv=new WeakMap,sC=new WeakMap,of=new WeakMap,_v=new WeakMap,Xs=new WeakMap,da=new WeakMap,sf=new WeakMap,uf=new WeakMap,Dv=new WeakMap,wi=new WeakMap,va=new WeakMap,Ks=new WeakMap,xv=new WeakMap,Sv=new WeakMap,nn=new WeakMap,Zn=new WeakMap,hr=new WeakMap,_i=new WeakMap,Di=new WeakMap,uC=new WeakMap,xo=Symbol("placeholder"),lC=Symbol("mark-placeholder"),fC=globalThis.Node,g5=globalThis.Text,Ev=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,m5=t=>xi(t)&&t.nodeType===8,Nr=t=>xi(t)&&t.nodeType===1,xi=t=>{var e=Ev(t);return!!e&&t instanceof e.Node},Av=t=>{var e=t&&t.anchorNode&&Ev(t.anchorNode);return!!e&&t instanceof e.Selection},cC=t=>xi(t)&&t.nodeType===3,y5=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,b5=t=>{var[e,r]=t;if(Nr(e)&&e.childNodes.length){var n=r===e.childNodes.length,i=n?r-1:r;for([e,i]=hC(e,i,n?"backward":"forward"),n=i<r;Nr(e)&&e.childNodes.length;){var a=n?e.childNodes.length-1:0;e=w5(e,a,n?"backward":"forward")}r=n&&e.textContent!=null?e.textContent.length:0}return[e,r]},C5=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},hC=(t,e,r)=>{for(var{childNodes:n}=t,i=n[e],a=e,o=!1,s=!1;(m5(i)||Nr(i)&&i.childNodes.length===0||Nr(i)&&i.getAttribute("contenteditable")==="false")&&!(o&&s);){if(a>=n.length){o=!0,a=e-1,r="backward";continue}if(a<0){s=!0,a=e+1,r="forward";continue}i=n[a],e=a,a+=r==="forward"?1:-1}return[i,e]},w5=(t,e,r)=>{var[n]=hC(t,e,r);return n},dC=t=>{var e="";if(cC(t)&&t.nodeValue)return t.nodeValue;if(Nr(t)){for(var r of Array.from(t.childNodes))e+=dC(r);var n=getComputedStyle(t).getPropertyValue("display");(n==="block"||n==="list"||t.tagName==="BR")&&(e+=`
|
|
57
|
-
`)}return e},_5=/data-slate-fragment="(.+?)"/m,D5=t=>{var e=t.getData("text/html"),[,r]=e.match(_5)||[];return r},Zs=t=>t.getSelection!=null?t.getSelection():document.getSelection(),Tv=(t,e,r)=>{var{target:n}=e;if(Nr(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:i}=re.getWindow(t);if(i.contains(n))return re.hasDOMNode(t,n,{editable:!0});var a=r.find(o=>{var{addedNodes:s,removedNodes:u}=o;for(var l of s)if(l===n||l.contains(n))return!0;for(var f of u)if(f===n||f.contains(n))return!0});return!a||a===e?!1:Tv(t,a,r)},x5=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(r=t.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var e,r,n;t=(n=t)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return t},vC=(t,e)=>!!(t.compareDocumentPosition(e)&fC.DOCUMENT_POSITION_PRECEDING),S5=(t,e)=>!!(t.compareDocumentPosition(e)&fC.DOCUMENT_POSITION_FOLLOWING),E5=0;class A5{constructor(){Rr(this,"id",void 0),this.id="".concat(E5++)}}var re={androidPendingDiffs:t=>hr.get(t),androidScheduleFlush:t=>{var e;(e=Sv.get(t))===null||e===void 0||e()},blur:t=>{var e=re.toDOMNode(t,t),r=re.findDocumentOrShadowRoot(t);wi.set(t,!1),r.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,r=re.findDocumentOrShadowRoot(t),n=Zs(r);n&&n.rangeCount>0&&n.removeAllRanges(),e&&
|
|
56
|
+
*/function W1(t){return Object.prototype.toString.call(t)==="[object Object]"}function Nt(t){var e,r;return W1(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(W1(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var $1=Symbol.for("immer-nothing"),G1=Symbol.for("immer-draftable"),Sr=Symbol.for("immer-state"),aF=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function cr(t,...e){if(process.env.NODE_ENV!=="production"){const r=aF[t],n=typeof r=="function"?r.apply(null,e):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var mo=Object.getPrototypeOf;function oa(t){return!!t&&!!t[Sr]}function sa(t){var e;return t?U1(t)||Array.isArray(t)||!!t[G1]||!!((e=t.constructor)!=null&&e[G1])||Wl(t)||$l(t):!1}var oF=Object.prototype.constructor.toString();function U1(t){if(!t||typeof t!="object")return!1;const e=mo(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===oF}function Vl(t,e){Hl(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function Hl(t){const e=t[Sr];return e?e.type_:Array.isArray(t)?1:Wl(t)?2:$l(t)?3:0}function Xd(t,e){return Hl(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function q1(t,e,r){const n=Hl(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function sF(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Wl(t){return t instanceof Map}function $l(t){return t instanceof Set}function ua(t){return t.copy_||t.base_}function Kd(t,e){if(Wl(t))return new Map(t);if($l(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=U1(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[Sr];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(mo(t),n)}else{const n=mo(t);if(n!==null&&r)return{...t};const i=Object.create(n);return Object.assign(i,t)}}function Zd(t,e=!1){return Gl(t)||oa(t)||!sa(t)||(Hl(t)>1&&(t.set=t.add=t.clear=t.delete=uF),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>Zd(n,!0))),t}function uF(){cr(2)}function Gl(t){return Object.isFrozen(t)}var lF={};function la(t){const e=lF[t];return e||cr(0,t),e}var Vs;function Y1(){return Vs}function fF(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function X1(t,e){e&&(la("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Jd(t){Qd(t),t.drafts_.forEach(cF),t.drafts_=null}function Qd(t){t===Vs&&(Vs=t.parent_)}function K1(t){return Vs=fF(Vs,t)}function cF(t){const e=t[Sr];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Z1(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[Sr].modified_&&(Jd(e),cr(4)),sa(t)&&(t=Ul(e,t),e.parent_||ql(e,t)),e.patches_&&la("Patches").generateReplacementPatches_(r[Sr].base_,t,e.patches_,e.inversePatches_)):t=Ul(e,r,[]),Jd(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==$1?t:void 0}function Ul(t,e,r){if(Gl(e))return e;const n=e[Sr];if(!n)return Vl(e,(i,a)=>J1(t,n,e,i,a,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return ql(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let a=i,o=!1;n.type_===3&&(a=new Set(i),i.clear(),o=!0),Vl(a,(s,u)=>J1(t,n,i,s,u,r,o)),ql(t,i,!1),r&&t.patches_&&la("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function J1(t,e,r,n,i,a,o){if(process.env.NODE_ENV!=="production"&&i===r&&cr(5),oa(i)){const s=a&&e&&e.type_!==3&&!Xd(e.assigned_,n)?a.concat(n):void 0,u=Ul(t,i,s);if(q1(r,n,u),oa(u))t.canAutoFreeze_=!1;else return}else o&&r.add(i);if(sa(i)&&!Gl(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Ul(t,i),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&ql(t,i)}}function ql(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Zd(e,r)}function hF(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:Y1(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=ev;r&&(i=[n],a=Hs);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}var ev={get(t,e){if(e===Sr)return t;const r=ua(t);if(!Xd(r,e))return dF(t,r,e);const n=r[e];return t.finalized_||!sa(n)?n:n===tv(t.base_,e)?(nv(t),t.copy_[e]=iv(n,t)):n},has(t,e){return e in ua(t)},ownKeys(t){return Reflect.ownKeys(ua(t))},set(t,e,r){const n=Q1(ua(t),e);if(n!=null&&n.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const i=tv(ua(t),e),a=i==null?void 0:i[Sr];if(a&&a.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(sF(r,i)&&(r!==void 0||Xd(t.base_,e)))return!0;nv(t),rv(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return tv(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,nv(t),rv(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=ua(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){cr(11)},getPrototypeOf(t){return mo(t.base_)},setPrototypeOf(){cr(12)}},Hs={};Vl(ev,(t,e)=>{Hs[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Hs.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&cr(13),Hs.set.call(this,t,e,void 0)},Hs.set=function(t,e,r){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&cr(14),ev.set.call(this,t[0],e,r,t[0])};function tv(t,e){const r=t[Sr];return(r?ua(r):t)[e]}function dF(t,e,r){var i;const n=Q1(e,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(t.draft_):void 0}function Q1(t,e){if(!(e in t))return;let r=mo(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=mo(r)}}function rv(t){t.modified_||(t.modified_=!0,t.parent_&&rv(t.parent_))}function nv(t){t.copy_||(t.copy_=Kd(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var vF=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const a=r;r=e;const o=this;return function(u=a,...l){return o.produce(u,f=>r.call(this,f,...l))}}typeof r!="function"&&cr(6),n!==void 0&&typeof n!="function"&&cr(7);let i;if(sa(e)){const a=K1(this),o=iv(e,void 0);let s=!0;try{i=r(o),s=!1}finally{s?Jd(a):Qd(a)}return X1(a,n),Z1(i,a)}else if(!e||typeof e!="object"){if(i=r(e),i===void 0&&(i=e),i===$1&&(i=void 0),this.autoFreeze_&&Zd(i,!0),n){const a=[],o=[];la("Patches").generateReplacementPatches_(e,i,a,o),n(a,o)}return i}else cr(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(o,...s)=>this.produceWithPatches(o,u=>e(u,...s));let n,i;return[this.produce(e,r,(o,s)=>{n=o,i=s}),n,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){sa(t)||cr(8),oa(t)&&(t=pF(t));const e=K1(this),r=iv(t,void 0);return r[Sr].isManual_=!0,Qd(e),r}finishDraft(t,e){const r=t&&t[Sr];(!r||!r.isManual_)&&cr(9);const{scope_:n}=r;return X1(n,e),Z1(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const i=e[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(e=e.slice(r+1));const n=la("Patches").applyPatches_;return oa(t)?n(t,e):this.produce(t,i=>n(i,e))}};function iv(t,e){const r=Wl(t)?la("MapSet").proxyMap_(t,e):$l(t)?la("MapSet").proxySet_(t,e):hF(t,e);return(e?e.scope_:Y1()).drafts_.push(r),r}function pF(t){return oa(t)||cr(10,t),eb(t)}function eb(t){if(!sa(t)||Gl(t))return t;const e=t[Sr];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Kd(t,e.scope_.immer_.useStrictShallowCopy_)}else r=Kd(t,!0);return Vl(r,(n,i)=>{q1(r,n,eb(i))}),e&&(e.finalized_=!1),r}var Er=new vF,av=Er.produce;Er.produceWithPatches.bind(Er),Er.setAutoFreeze.bind(Er),Er.setUseStrictShallowCopy.bind(Er),Er.applyPatches.bind(Er);var tb=Er.createDraft.bind(Er),rb=Er.finishDraft.bind(Er),gF={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=$.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},mF={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=ke.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},yF={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=te.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},Yl=new WeakMap,Xl=new WeakMap,Ws=new WeakMap,nb=new WeakMap,ib=new WeakMap,ab=new WeakMap,ob=new WeakMap,$={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,n=$.levels(t,e);return r?n=n.slice(1):n=n.slice(0,-1),n},common(t,e){for(var r=[],n=0;n<t.length&&n<e.length;n++){var i=t[n],a=e[n];if(i!==a)break;r.push(i)}return r},compare(t,e){for(var r=Math.min(t.length,e.length),n=0;n<r;n++){if(t[n]<e[n])return-1;if(t[n]>e[n])return 1}return 0},endsAfter(t,e){var r=t.length-1,n=t.slice(0,r),i=e.slice(0,r),a=t[r],o=e[r];return $.equals(n,i)&&a>o},endsAt(t,e){var r=t.length,n=t.slice(0,r),i=e.slice(0,r);return $.equals(n,i)},endsBefore(t,e){var r=t.length-1,n=t.slice(0,r),i=e.slice(0,r),a=t[r],o=e[r];return $.equals(n,i)&&a<o},equals(t,e){return t.length===e.length&&t.every((r,n)=>r===e[n])},hasPrevious(t){return t[t.length-1]>0},isAfter(t,e){return $.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&$.compare(t,e)===0},isBefore(t,e){return $.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&$.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&$.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&$.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&$.compare(t,e)===0},isPath(t){return Array.isArray(t)&&(t.length===0||typeof t[0]=="number")},isSibling(t,e){if(t.length!==e.length)return!1;var r=t.slice(0,-1),n=e.slice(0,-1),i=t[t.length-1],a=e[e.length-1];return i!==a&&$.equals(r,n)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,n=[],i=0;i<=t.length;i++)n.push(t.slice(0,i));return r&&n.reverse(),n},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},operationCanTransformPath(t){switch(t.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!$.isAncestor(e,t)&&!$.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var n=[...t],{affinity:i="forward"}=r;if(t.length===0)return n;switch(e.type){case"insert_node":{var{path:a}=e;($.equals(a,n)||$.endsBefore(a,n)||$.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:o}=e;if($.equals(o,n)||$.isAncestor(o,n))return null;$.endsBefore(o,n)&&(n[o.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=e;$.equals(s,n)||$.endsBefore(s,n)?n[s.length-1]-=1:$.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=u);break}case"split_node":{var{path:l,position:f}=e;if($.equals(l,n)){if(i==="forward")n[n.length-1]+=1;else if(i!=="backward")return null}else $.endsBefore(l,n)?n[l.length-1]+=1:$.isAncestor(l,n)&&t[l.length]>=f&&(n[l.length-1]+=1,n[l.length]-=f);break}case"move_node":{var{path:c,newPath:h}=e;if($.equals(c,h))return n;if($.isAncestor(c,n)||$.equals(c,n)){var d=h.slice();return $.endsBefore(c,h)&&c.length<h.length&&(d[c.length-1]-=1),d.concat(n.slice(c.length))}else $.isSibling(c,h)&&($.isAncestor(h,n)||$.equals(h,n))?$.endsBefore(c,n)?n[c.length-1]-=1:n[c.length-1]+=1:$.endsBefore(h,n)||$.equals(h,n)||$.isAncestor(h,n)?($.endsBefore(c,n)&&(n[c.length-1]-=1),n[h.length-1]+=1):$.endsBefore(c,n)&&($.equals(h,n)&&(n[h.length-1]+=1),n[c.length-1]-=1);break}}return n}};function $s(t){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(t)}function bF(t,e){if($s(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if($s(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function CF(t){var e=bF(t,"string");return $s(e)==="symbol"?e:String(e)}function Qt(t,e,r){return e=CF(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Gs(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var wF=(t,e,r)=>{switch(r.type){case"insert_node":{var{path:n,node:i}=r,a=le.parent(t,n),o=n[n.length-1];if(o>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(a.children.splice(o,0,i),e)for(var[s,u]of te.points(e))e[u]=ke.transform(s,r);break}case"insert_text":{var{path:l,offset:f,text:c}=r;if(c.length===0)break;var h=le.leaf(t,l),d=h.text.slice(0,f),p=h.text.slice(f);if(h.text=d+c+p,e)for(var[g,v]of te.points(e))e[v]=ke.transform(g,r);break}case"merge_node":{var{path:m}=r,y=le.get(t,m),b=$.previous(m),w=le.get(t,b),C=le.parent(t,m),_=m[m.length-1];if(ge.isText(y)&&ge.isText(w))w.text+=y.text;else if(!ge.isText(y)&&!ge.isText(w))w.children.push(...y.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(m,"] to nodes of different interfaces: ").concat(Lt.stringify(y)," ").concat(Lt.stringify(w)));if(C.children.splice(_,1),e)for(var[D,x]of te.points(e))e[x]=ke.transform(D,r);break}case"move_node":{var{path:S,newPath:O}=r;if($.isAncestor(S,O))throw new Error("Cannot move a path [".concat(S,"] to new path [").concat(O,"] because the destination is inside itself."));var E=le.get(t,S),P=le.parent(t,S),F=S[S.length-1];P.children.splice(F,1);var B=$.transform(S,r),M=le.get(t,$.parent(B)),I=B[B.length-1];if(M.children.splice(I,0,E),e)for(var[j,z]of te.points(e))e[z]=ke.transform(j,r);break}case"remove_node":{var{path:W}=r,R=W[W.length-1],U=le.parent(t,W);if(U.children.splice(R,1),e)for(var[Z,ee]of te.points(e)){var ne=ke.transform(Z,r);if(e!=null&&ne!=null)e[ee]=ne;else{var q=void 0,L=void 0;for(var[X,V]of le.texts(t))if($.compare(V,W)===-1)q=[X,V];else{L=[X,V];break}var G=!1;q&&L&&($.equals(L[1],W)?G=!$.hasPrevious(L[1]):G=$.common(q[1],W).length<$.common(L[1],W).length),q&&!G?(Z.path=q[1],Z.offset=q[0].text.length):L?(Z.path=L[1],Z.offset=0):e=null}}break}case"remove_text":{var{path:J,offset:K,text:Y}=r;if(Y.length===0)break;var fe=le.leaf(t,J),ue=fe.text.slice(0,K),Ce=fe.text.slice(K+Y.length);if(fe.text=ue+Ce,e)for(var[me,Fe]of te.points(e))e[Fe]=ke.transform(me,r);break}case"set_node":{var{path:ie,properties:ve,newProperties:Le}=r;if(ie.length===0)throw new Error("Cannot set properties on the root node!");var ft=le.get(t,ie);for(var Ie in Le){if(Ie==="children"||Ie==="text")throw new Error('Cannot set the "'.concat(Ie,'" property of nodes!'));var at=Le[Ie];at==null?delete ft[Ie]:ft[Ie]=at}for(var Fr in ve)Le.hasOwnProperty(Fr)||delete ft[Fr];break}case"set_selection":{var{newProperties:et}=r;if(et==null)e=et;else{if(e==null){if(!te.isRange(et))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Lt.stringify(et)," when there is no current selection."));e=Gs({},et)}for(var ct in et){var Lr=et[ct];if(Lr==null){if(ct==="anchor"||ct==="focus")throw new Error('Cannot remove the "'.concat(ct,'" selection property'));delete e[ct]}else e[ct]=Lr}}break}case"split_node":{var{path:Zt,position:Ir,properties:$n}=r;if(Zt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Zt,"] because the root node cannot be split."));var wr=le.get(t,Zt),gl=le.parent(t,Zt),so=Zt[Zt.length-1],Zi;if(ge.isText(wr)){var ay=wr.text.slice(0,Ir),oy=wr.text.slice(Ir);wr.text=ay,Zi=Gs(Gs({},$n),{},{text:oy})}else{var sy=wr.children.slice(0,Ir),uy=wr.children.slice(Ir);wr.children=sy,Zi=Gs(Gs({},$n),{},{children:uy})}if(gl.children.splice(so+1,0,Zi),e)for(var[ml,Yh]of te.points(e))e[Yh]=ke.transform(ml,r);break}}return e},_F={transform(t,e){t.children=tb(t.children);var r=t.selection&&tb(t.selection);try{r=wF(t,r,e)}finally{t.children=rb(t.children),r?t.selection=oa(r)?rb(r):r:t.selection=null}}},DF={insertNodes(t,e,r){t.insertNodes(e,r)},liftNodes(t,e){t.liftNodes(e)},mergeNodes(t,e){t.mergeNodes(e)},moveNodes(t,e){t.moveNodes(e)},removeNodes(t,e){t.removeNodes(e)},setNodes(t,e,r){t.setNodes(e,r)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,r){t.unsetNodes(e,r)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,r){t.wrapNodes(e,r)}},xF={collapse(t,e){t.collapse(e)},deselect(t){t.deselect()},move(t,e){t.move(e)},select(t,e){t.select(e)},setPoint(t,e,r){t.setPoint(e,r)},setSelection(t,e){t.setSelection(e)}},ub=(t,e)=>{for(var r in t){var n=t[r],i=e[r];if(Nt(n)&&Nt(i)){if(!ub(n,i))return!1}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(n[a]!==i[a])return!1}else if(n!==i)return!1}for(var o in e)if(t[o]===void 0&&e[o]!==void 0)return!1;return!0};function SF(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Yn(t,e){if(t==null)return{};var r=SF(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var EF=["anchor","focus"];function lb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function AF(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var te={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,{anchor:n,focus:i}=t;return te.isBackward(t)===r?[n,i]:[i,n]},end(t){var[,e]=te.edges(t);return e},equals(t,e){return ke.equals(t.anchor,e.anchor)&&ke.equals(t.focus,e.focus)},surrounds(t,e){var r=te.intersection(t,e);return r?te.equals(r,e):!1},includes(t,e){if(te.isRange(e)){if(te.includes(t,e.anchor)||te.includes(t,e.focus))return!0;var[r,n]=te.edges(t),[i,a]=te.edges(e);return ke.isBefore(r,i)&&ke.isAfter(n,a)}var[o,s]=te.edges(t),u=!1,l=!1;return ke.isPoint(e)?(u=ke.compare(e,o)>=0,l=ke.compare(e,s)<=0):(u=$.compare(e,o.path)>=0,l=$.compare(e,s.path)<=0),u&&l},intersection(t,e){var r=Yn(t,EF),[n,i]=te.edges(t),[a,o]=te.edges(e),s=ke.isBefore(n,a)?a:n,u=ke.isBefore(i,o)?i:o;return ke.isBefore(u,s)?null:AF({anchor:s,focus:u},r)},isBackward(t){var{anchor:e,focus:r}=t;return ke.isAfter(e,r)},isCollapsed(t){var{anchor:e,focus:r}=t;return ke.equals(e,r)},isExpanded(t){return!te.isCollapsed(t)},isForward(t){return!te.isBackward(t)},isRange(t){return Nt(t)&&ke.isPoint(t.anchor)&&ke.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=te.edges(t);return e},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return av(t,n=>{if(n===null)return null;var{affinity:i="inward"}=r,a,o;if(i==="inward"){var s=te.isCollapsed(n);te.isForward(n)?(a="forward",o=s?a:"backward"):(a="backward",o=s?a:"forward")}else i==="outward"?te.isForward(n)?(a="backward",o="forward"):(a="forward",o="backward"):(a=i,o=i);var u=ke.transform(n.anchor,e,{affinity:a}),l=ke.transform(n.focus,e,{affinity:o});if(!u||!l)return null;n.anchor=u,n.focus=l})}},fb=t=>Nt(t)&&le.isNodeList(t.children)&&!T.isEditor(t),pe={isAncestor(t){return Nt(t)&&le.isNodeList(t.children)},isElement:fb,isElementList(t){return Array.isArray(t)&&t.every(e=>pe.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return fb(e)&&e[n]===r},matches(t,e){for(var r in e)if(r!=="children"&&t[r]!==e[r])return!1;return!0}},TF=["children"],OF=["text"],cb=new WeakMap,le={ancestor(t,e){var r=le.get(t,e);if(ge.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(Lt.stringify(r)));return r},ancestors(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of $.ancestors(e,r)){var i=le.ancestor(t,n),a=[i,n];yield a}}()},child(t,e){if(ge.isText(t))throw new Error("Cannot get the child of a text node: ".concat(Lt.stringify(t)));var r=t.children[e];if(r==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(Lt.stringify(t)));return r},children(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:n=!1}=r,i=le.ancestor(t,e),{children:a}=i,o=n?a.length-1:0;n?o>=0:o<a.length;){var s=le.child(i,o),u=e.concat(o);yield[s,u],o=n?o-1:o+1}}()},common(t,e,r){var n=$.common(e,r),i=le.get(t,n);return[i,n]},descendant(t,e){var r=le.get(t,e);if(T.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat(Lt.stringify(r)));return r},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of le.nodes(t,e))n.length!==0&&(yield[r,n])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of le.nodes(t,e))pe.isElement(r)&&(yield[r,n])}()},extractProps(t){if(pe.isAncestor(t)){var e=Yn(t,TF);return e}else{var e=Yn(t,OF);return e}},first(t,e){for(var r=e.slice(),n=le.get(t,r);n&&!(ge.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(t,e){if(ge.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Lt.stringify(t)));var r=av({children:t.children},n=>{var[i,a]=te.edges(e),o=le.nodes(n,{reverse:!0,pass:h=>{var[,d]=h;return!te.includes(e,d)}});for(var[,s]of o){if(!te.includes(e,s)){var u=le.parent(n,s),l=s[s.length-1];u.children.splice(l,1)}if($.equals(s,a.path)){var f=le.leaf(n,s);f.text=f.text.slice(0,a.offset)}if($.equals(s,i.path)){var c=le.leaf(n,s);c.text=c.text.slice(i.offset)}}T.isEditor(n)&&(n.selection=null)});return r.children},get(t,e){var r=le.getIf(t,e);if(r===void 0)throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat(Lt.stringify(t)));return r},getIf(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(ge.isText(r)||!r.children[i])return;r=r.children[i]}return r},has(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(ge.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode(t){return ge.isText(t)||pe.isElement(t)||T.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=cb.get(t);if(e!==void 0)return e;var r=t.every(n=>le.isNode(n));return cb.set(t,r),r},last(t,e){for(var r=e.slice(),n=le.get(t,r);n&&!(ge.isText(n)||n.children.length===0);){var i=n.children.length-1;n=n.children[i],r.push(i)}return[n,r]},leaf(t,e){var r=le.get(t,e);if(!ge.isText(r))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(Lt.stringify(r)));return r},levels(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of $.levels(e,r)){var i=le.get(t,n);yield[i,n]}}()},matches(t,e){return pe.isElement(t)&&pe.isElementProps(e)&&pe.matches(t,e)||ge.isText(t)&&ge.isTextProps(e)&&ge.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:r,reverse:n=!1}=e,{from:i=[],to:a}=e,o=new Set,s=[],u=t;!(a&&(n?$.isBefore(s,a):$.isAfter(s,a)));){if(o.has(u)||(yield[u,s]),!o.has(u)&&!ge.isText(u)&&u.children.length!==0&&(r==null||r([u,s])===!1)){o.add(u);var l=n?u.children.length-1:0;$.isAncestor(s,i)&&(l=i[s.length]),s=s.concat(l),u=le.get(t,s);continue}if(s.length===0)break;if(!n){var f=$.next(s);if(le.has(t,f)){s=f,u=le.get(t,s);continue}}if(n&&s[s.length-1]!==0){var c=$.previous(s);s=c,u=le.get(t,s);continue}s=$.parent(s),u=le.get(t,s),o.add(u)}}()},parent(t,e){var r=$.parent(e),n=le.get(t,r);if(ge.isText(n))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return n},string(t){return ge.isText(t)?t.text:t.children.map(le.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of le.nodes(t,e))ge.isText(r)&&(yield[r,n])}()}};function hb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var yi={isNodeOperation(t){return yi.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!Nt(t))return!1;switch(t.type){case"insert_node":return $.isPath(t.path)&&le.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&$.isPath(t.path);case"merge_node":return typeof t.position=="number"&&$.isPath(t.path)&&Nt(t.properties);case"move_node":return $.isPath(t.path)&&$.isPath(t.newPath);case"remove_node":return $.isPath(t.path)&&le.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&$.isPath(t.path);case"set_node":return $.isPath(t.path)&&Nt(t.properties)&&Nt(t.newProperties);case"set_selection":return t.properties===null&&te.isRange(t.newProperties)||t.newProperties===null&&te.isRange(t.properties)||Nt(t.properties)&&Nt(t.newProperties);case"split_node":return $.isPath(t.path)&&typeof t.position=="number"&&Nt(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>yi.isOperation(e))},isSelectionOperation(t){return yi.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return yi.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return vt(vt({},t),{},{type:"remove_node"});case"insert_text":return vt(vt({},t),{},{type:"remove_text"});case"merge_node":return vt(vt({},t),{},{type:"split_node",path:$.previous(t.path)});case"move_node":{var{newPath:e,path:r}=t;if($.equals(e,r))return t;if($.isSibling(r,e))return vt(vt({},t),{},{path:e,newPath:r});var n=$.transform(r,t),i=$.transform($.next(r),t);return vt(vt({},t),{},{path:n,newPath:i})}case"remove_node":return vt(vt({},t),{},{type:"insert_node"});case"remove_text":return vt(vt({},t),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:o}=t;return vt(vt({},t),{},{properties:o,newProperties:a})}case"set_selection":{var{properties:s,newProperties:u}=t;return s==null?vt(vt({},t),{},{properties:u,newProperties:null}):u==null?vt(vt({},t),{},{properties:null,newProperties:s}):vt(vt({},t),{},{properties:u,newProperties:s})}case"split_node":return vt(vt({},t),{},{type:"merge_node",path:$.next(t.path)})}}},db=new WeakMap,PF=t=>{var e=db.get(t);if(e!==void 0)return e;if(!Nt(t))return!1;var r=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertSoftBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isElementReadOnly=="function"&&typeof t.isInline=="function"&&typeof t.isSelectable=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&typeof t.getDirtyPaths=="function"&&(t.marks===null||Nt(t.marks))&&(t.selection===null||te.isRange(t.selection))&&le.isNodeList(t.children)&&yi.isOperationList(t.operations);return db.set(t,r),r},T={above(t,e){return t.above(e)},addMark(t,e,r){t.addMark(e,r)},after(t,e,r){return t.after(e,r)},before(t,e,r){return t.before(e,r)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=e;t.deleteBackward(r)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=e;t.deleteForward(r)},deleteFragment(t,e){t.deleteFragment(e)},edges(t,e){return t.edges(e)},elementReadOnly(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.elementReadOnly(e)},end(t,e){return t.end(e)},first(t,e){return t.first(e)},fragment(t,e){return t.fragment(e)},hasBlocks(t,e){return t.hasBlocks(e)},hasInlines(t,e){return t.hasInlines(e)},hasPath(t,e){return t.hasPath(e)},hasTexts(t,e){return t.hasTexts(e)},insertBreak(t){t.insertBreak()},insertFragment(t,e,r){t.insertFragment(e,r)},insertNode(t,e){t.insertNode(e)},insertSoftBreak(t){t.insertSoftBreak()},insertText(t,e){t.insertText(e)},isBlock(t,e){return t.isBlock(e)},isEdge(t,e,r){return t.isEdge(e,r)},isEditor(t){return PF(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,r){return t.isEnd(e,r)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,r){return t.isStart(e,r)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,r){return t.leaf(e,r)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,r){return t.node(e,r)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,r){return t.parent(e,r)},path(t,e,r){return t.path(e,r)},pathRef(t,e,r){return t.pathRef(e,r)},pathRefs(t){return t.pathRefs()},point(t,e,r){return t.point(e,r)},pointRef(t,e,r){return t.pointRef(e,r)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,r){return t.range(e,r)},rangeRef(t,e,r){return t.rangeRef(e,r)},rangeRefs(t){return t.rangeRefs()},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){t.setNormalizing(e)},start(t,e){return t.start(e)},string(t,e,r){return t.string(e,r)},unhangRange(t,e,r){return t.unhangRange(e,r)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,r)=>t.shouldMergeNodesRemovePrevNode(e,r)},BF={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every($.isPath)}};function vb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ke={compare(t,e){var r=$.compare(t.path,e.path);return r===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:r},isAfter(t,e){return ke.compare(t,e)===1},isBefore(t,e){return ke.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&$.equals(t.path,e.path)},isPoint(t){return Nt(t)&&typeof t.offset=="number"&&$.isPath(t.path)},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return av(t,n=>{if(n===null)return null;var{affinity:i="forward"}=r,{path:a,offset:o}=n;switch(e.type){case"insert_node":case"move_node":{n.path=$.transform(a,e,r);break}case"insert_text":{$.equals(e.path,a)&&(e.offset<o||e.offset===o&&i==="forward")&&(n.offset+=e.text.length);break}case"merge_node":{$.equals(e.path,a)&&(n.offset+=e.position),n.path=$.transform(a,e,r);break}case"remove_text":{$.equals(e.path,a)&&e.offset<=o&&(n.offset-=Math.min(o-e.offset,e.text.length));break}case"remove_node":{if($.equals(e.path,a)||$.isAncestor(e.path,a))return null;n.path=$.transform(a,e,r);break}case"split_node":{if($.equals(e.path,a)){if(e.position===o&&i==null)return null;(e.position<o||e.position===o&&i==="forward")&&(n.offset-=e.position,n.path=$.transform(a,e,pb(pb({},r),{},{affinity:"forward"})))}else n.path=$.transform(a,e,r);break}}})}},gb=void 0,Lt={setScrubber(t){gb=t},stringify(t){return JSON.stringify(t,gb)}},MF=["text"],FF=["anchor","focus"];function mb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Xn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ge={equals(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function i(a){var o=Yn(a,MF);return o}return ub(n?i(t):t,n?i(e):e)},isText(t){return Nt(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>ge.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var r in e)if(r!=="text"&&(!t.hasOwnProperty(r)||t[r]!==e[r]))return!1;return!0},decorations(t,e){var r=[Xn({},t)];for(var n of e){var i=Yn(n,FF),[a,o]=te.edges(n),s=[],u=0,l=a.offset,f=o.offset;for(var c of r){var{length:h}=c.text,d=u;if(u+=h,l<=d&&u<=f){Object.assign(c,i),s.push(c);continue}if(l!==f&&(l===u||f===d)||l>u||f<d||f===d&&d!==0){s.push(c);continue}var p=c,g=void 0,v=void 0;if(f<u){var m=f-d;v=Xn(Xn({},p),{},{text:p.text.slice(m)}),p=Xn(Xn({},p),{},{text:p.text.slice(0,m)})}if(l>d){var y=l-d;g=Xn(Xn({},p),{},{text:p.text.slice(0,y)}),p=Xn(Xn({},p),{},{text:p.text.slice(y)})}Object.assign(p,i),g&&s.push(g),s.push(p),v&&s.push(v)}r=s}return r}},ov=t=>t.selection?t.selection:t.children.length>0?T.end(t,[]):[0],yo=(t,e)=>{var[r]=T.node(t,e);return n=>n===r},sv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=!r,i=r?zF(e):e,a=Oe.None,o=Oe.None,s=0,u=null,l=null;for(var f of i){var c=f.codePointAt(0);if(!c)break;var h=ZF(f,c);if([a,o]=n?[o,h]:[h,a],bo(a,Oe.ZWJ)&&bo(o,Oe.ExtPict)&&(n?u=yb(e.substring(0,s)):u=yb(e.substring(0,e.length-s)),!u)||bo(a,Oe.RI)&&bo(o,Oe.RI)&&(l!==null?l=!l:n?l=!0:l=rL(e.substring(0,e.length-s)),!l)||a!==Oe.None&&o!==Oe.None&&QF(a,o))break;s+=f.length}return s||1},LF=/\s/,IF=/[\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]/,RF=/['\u2018\u2019]/,NF=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=0,i=!1;e.length>0;){var a=sv(e,r),[o,s]=uv(e,a,r);if(kF(o,s,r))i=!0,n+=a;else if(!i)n+=a;else break;e=s}return n},uv=(t,e,r)=>{if(r){var n=t.length-e;return[t.slice(n,t.length),t.slice(0,n)]}return[t.slice(0,e),t.slice(e)]},kF=function t(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(LF.test(e))return!1;if(RF.test(e)){var i=sv(r,n),[a,o]=uv(r,i,n);if(t(a,o,n))return!0}return!IF.test(e)},zF=function*(e){for(var r=e.length-1,n=0;n<e.length;n++){var i=e.charAt(r-n);if(VF(i.charCodeAt(0))){var a=e.charAt(r-n-1);if(jF(a.charCodeAt(0))){yield a+i,n++;continue}}yield i}},jF=t=>t>=55296&&t<=56319,VF=t=>t>=56320&&t<=57343,Oe;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(Oe||(Oe={}));var HF=/^(?:[\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])$/,WF=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,$F=/^(?:[\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])$/,GF=/^[\u1100-\u115F\uA960-\uA97C]$/,UF=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,qF=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,YF=/^[\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]$/,XF=/^[\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]$/,KF=/^(?:[\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])$/,ZF=(t,e)=>{var r=Oe.Any;return t.search(HF)!==-1&&(r|=Oe.Extend),e===8205&&(r|=Oe.ZWJ),e>=127462&&e<=127487&&(r|=Oe.RI),t.search(WF)!==-1&&(r|=Oe.Prepend),t.search($F)!==-1&&(r|=Oe.SpacingMark),t.search(GF)!==-1&&(r|=Oe.L),t.search(UF)!==-1&&(r|=Oe.V),t.search(qF)!==-1&&(r|=Oe.T),t.search(YF)!==-1&&(r|=Oe.LV),t.search(XF)!==-1&&(r|=Oe.LVT),t.search(KF)!==-1&&(r|=Oe.ExtPict),r};function bo(t,e){return(t&e)!==0}var JF=[[Oe.L,Oe.L|Oe.V|Oe.LV|Oe.LVT],[Oe.LV|Oe.V,Oe.V|Oe.T],[Oe.LVT|Oe.T,Oe.T],[Oe.Any,Oe.Extend|Oe.ZWJ],[Oe.Any,Oe.SpacingMark],[Oe.Prepend,Oe.Any],[Oe.ZWJ,Oe.ExtPict],[Oe.RI,Oe.RI]];function QF(t,e){return JF.findIndex(r=>bo(t,r[0])&&bo(e,r[1]))===-1}var eL=/(?:[\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$/,yb=t=>t.search(eL)!==-1,tL=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,rL=t=>{var e=t.match(tL);if(e===null)return!1;var r=e[0].length/2;return r%2===1},nL={delete(t,e){t.delete(e)},insertFragment(t,e,r){t.insertFragment(e,r)},insertText(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(t,()=>{var{voids:n=!1}=r,{at:i=ov(t)}=r;if($.isPath(i)&&(i=T.range(t,i)),te.isRange(i))if(te.isCollapsed(i))i=i.anchor;else{var a=te.end(i);if(!n&&T.void(t,{at:a}))return;var o=te.start(i),s=T.pointRef(t,o),u=T.pointRef(t,a);ae.delete(t,{at:i,voids:n});var l=s.unref(),f=u.unref();i=l||f,ae.setSelection(t,{anchor:i,focus:i})}if(!(!n&&T.void(t,{at:i})||T.elementReadOnly(t,{at:i}))){var{path:c,offset:h}=i;e.length>0&&t.apply({type:"insert_text",path:c,offset:h,text:e})}})}};function bb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Kl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ae=Kl(Kl(Kl(Kl({},_F),DF),xF),nL),Zl=new WeakMap,iL=t=>Zl.get(t)||!1,aL=(t,e,r)=>{var n=Zl.get(t)||!1;Zl.set(t,!0);try{e(),r()}finally{Zl.set(t,n)}};function Cb(t,e,r){var n=Yl.get(t)||[],i=Xl.get(t)||new Set,a,o,s=c=>{if(c){var h=c.join(",");o.has(h)||(o.add(h),a.push(c))}};if(r){a=[],o=new Set;for(var u of n){var l=r(u);s(l)}}else a=n,o=i;for(var f of e)s(f);Yl.set(t,a),Xl.set(t,o)}var oL=(t,e)=>{for(var r of T.pathRefs(t))gF.transform(r,e);for(var n of T.pointRefs(t))mF.transform(n,e);for(var i of T.rangeRefs(t))yF.transform(i,e);if(!iL(t)){var a=$.operationCanTransformPath(e)?o=>$.transform(o,e):void 0;Cb(t,t.getDirtyPaths(e),a)}ae.transform(t,e),t.operations.push(e),T.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Ws.get(t)||(Ws.set(t,!0),Promise.resolve().then(()=>{Ws.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},sL=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=e;return $.levels(r)}case"insert_node":{var{node:n,path:i}=e,a=$.levels(i),o=ge.isText(n)?[]:Array.from(le.nodes(n),O=>{var[,E]=O;return i.concat(E)});return[...a,...o]}case"merge_node":{var{path:s}=e,u=$.ancestors(s),l=$.previous(s);return[...u,l]}case"move_node":{var{path:f,newPath:c}=e;if($.equals(f,c))return[];var h=[],d=[];for(var p of $.ancestors(f)){var g=$.transform(p,e);h.push(g)}for(var v of $.ancestors(c)){var m=$.transform(v,e);d.push(m)}var y=d[d.length-1],b=c[c.length-1],w=y.concat(b);return[...h,...d,w]}case"remove_node":{var{path:C}=e,_=$.ancestors(C);return[..._]}case"split_node":{var{path:D}=e,x=$.levels(D),S=$.next(D);return[...x,S]}default:return[]}},uL=t=>{var{selection:e}=t;return e?le.fragment(t,e):[]},lL=(t,e)=>{var[r,n]=e;if(!ge.isText(r)){if(pe.isElement(r)&&r.children.length===0){var i={text:""};ae.insertNodes(t,i,{at:n.concat(0),voids:!0});return}for(var a=T.isEditor(r)?!1:pe.isElement(r)&&(t.isInline(r)||r.children.length===0||ge.isText(r.children[0])||t.isInline(r.children[0])),o=0,s=0;s<r.children.length;s++,o++){var u=le.get(t,n);if(!ge.isText(u)){var l=u.children[o],f=u.children[o-1],c=s===r.children.length-1,h=ge.isText(l)||pe.isElement(l)&&t.isInline(l);if(h!==a)ae.removeNodes(t,{at:n.concat(o),voids:!0}),o--;else if(pe.isElement(l)){if(t.isInline(l)){if(f==null||!ge.isText(f)){var d={text:""};ae.insertNodes(t,d,{at:n.concat(o),voids:!0}),o++}else if(c){var p={text:""};ae.insertNodes(t,p,{at:n.concat(o+1),voids:!0}),o++}}}else{if(!ge.isText(l)&&!("children"in l)){var g=l;g.children=[]}f!=null&&ge.isText(f)&&(ge.equals(l,f,{loose:!0})?(ae.mergeNodes(t,{at:n.concat(o),voids:!0}),o--):f.text===""?(ae.removeNodes(t,{at:n.concat(o-1),voids:!0}),o--):l.text===""&&(ae.removeNodes(t,{at:n.concat(o),voids:!0}),o--))}}}}},fL=(t,e)=>{var{iteration:r,initialDirtyPathsLength:n}=e,i=n*42;if(r>i)throw new Error("Could not completely normalize the editor after ".concat(i," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},cL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:i="lowest",at:a=e.selection,match:o}=r;if(a){var s=T.path(e,a),u=i==="lowest";for(var[l,f]of T.levels(e,{at:s,voids:n,match:o,reverse:u}))if(!ge.isText(l)){if(te.isRange(a)){if($.isAncestor(f,a.anchor.path)&&$.isAncestor(f,a.focus.path))return[l,f]}else if(!$.equals(s,f))return[l,f]}}};function wb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function _b(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var hL=(t,e,r)=>{var{selection:n}=t;if(n){var i=(c,h)=>{if(!ge.isText(c))return!1;var[d,p]=T.parent(t,h);return!t.isVoid(d)||t.markableVoid(d)},a=te.isExpanded(n),o=!1;if(!a){var[s,u]=T.node(t,n);if(s&&i(s,u)){var[l]=T.parent(t,u);o=l&&t.markableVoid(l)}}if(a||o)ae.setNodes(t,{[e]:r},{match:i,split:!0,voids:!0});else{var f=_b(_b({},T.marks(t)||{}),{},{[e]:r});t.marks=f,Ws.get(t)||t.onChange()}}};function Db(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Db(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Db(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var dL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.point(e,r,{edge:"end"}),a=T.end(e,[]),o={anchor:i,focus:a},{distance:s=1}=n,u=0,l;for(var f of T.positions(e,xb(xb({},n),{},{at:o}))){if(u>s)break;u!==0&&(l=f),u++}return l};function Sb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Eb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var vL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.start(e,[]),a=T.point(e,r,{edge:"start"}),o={anchor:i,focus:a},{distance:s=1}=n,u=0,l;for(var f of T.positions(e,Eb(Eb({},n),{},{at:o,reverse:!0}))){if(u>s)break;u!==0&&(l=f),u++}return l},pL=(t,e)=>{var{selection:r}=t;r&&te.isCollapsed(r)&&ae.delete(t,{unit:e,reverse:!0})},gL=(t,e)=>{var{selection:r}=t;r&&te.isCollapsed(r)&&ae.delete(t,{unit:e})},mL=function(e){var{direction:r="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e;n&&te.isExpanded(n)&&ae.delete(e,{reverse:r==="backward"})},yL=(t,e)=>[T.start(t,e),T.end(t,e)];function Ab(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Tb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ab(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ab(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var bL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T.above(e,Tb(Tb({},r),{},{match:n=>pe.isElement(n)&&T.isElementReadOnly(e,n)}))},CL=(t,e)=>T.point(t,e,{edge:"end"}),wL=(t,e)=>{var r=T.path(t,e,{edge:"start"});return T.node(t,r)},_L=(t,e)=>{var r=T.range(t,e);return le.fragment(t,r)};function Ob(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Pb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ob(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ob(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var DL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T.above(e,Pb(Pb({},r),{},{match:n=>pe.isElement(n)&&T.isVoid(e,n)}))},xL=(t,e)=>e.children.some(r=>pe.isElement(r)&&T.isBlock(t,r)),SL=(t,e)=>e.children.some(r=>ge.isText(r)||T.isInline(t,r)),EL=(t,e)=>le.has(t,e),AL=(t,e)=>e.children.every(r=>ge.isText(r)),TL=t=>{ae.splitNodes(t,{always:!0})},OL=(t,e,r)=>{ae.insertNodes(t,e,r)},PL=t=>{ae.splitNodes(t,{always:!0})};function Bb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function BL(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Bb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ML=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:a}=e;if(i){if(a){var o=BL({text:r},a);ae.insertNodes(e,o,{at:n.at,voids:n.voids})}else ae.insertText(e,r,n);e.marks=null}},FL=(t,e)=>!t.isInline(e),LL=(t,e,r)=>T.isStart(t,e,r)||T.isEnd(t,e,r),IL=(t,e)=>{var{children:r}=e,[n]=r;return r.length===0||r.length===1&&ge.isText(n)&&n.text===""&&!t.isVoid(e)},RL=(t,e,r)=>{var n=T.end(t,r);return ke.equals(e,n)},NL=t=>{var e=nb.get(t);return e===void 0?!0:e},kL=(t,e,r)=>{if(e.offset!==0)return!1;var n=T.start(t,r);return ke.equals(e,n)},zL=(t,e)=>{var r=T.path(t,e,{edge:"end"});return T.node(t,r)},jL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.path(e,r,n),a=le.leaf(e,i);return[a,i]};function VL(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,reverse:n=!1,voids:i=!1}=e,{match:a}=e;if(a==null&&(a=()=>!0),!!r){var o=[],s=T.path(t,r);for(var[u,l]of le.levels(t,s))if(a(u,l)&&(o.push([u,l]),!i&&pe.isElement(u)&&T.isVoid(t,u)))break;n&&o.reverse(),yield*o}}()}var HL=["text"],WL=["text"],$L=function(e){var{marks:r,selection:n}=e;if(!n)return null;var{anchor:i,focus:a}=n;if(r)return r;if(te.isExpanded(n)){var o=te.isBackward(n);o&&([a,i]=[i,a]);var s=T.isEnd(e,i,i.path);if(s){var u=T.after(e,i);u&&(i=u)}var[l]=T.nodes(e,{match:ge.isText,at:{anchor:i,focus:a}});if(l){var[f]=l,c=Yn(f,HL);return c}else return{}}var{path:h}=i,[d]=T.leaf(e,h);if(i.offset===0){var p=T.previous(e,{at:h,match:ge.isText}),g=T.above(e,{match:C=>pe.isElement(C)&&T.isVoid(e,C)&&e.markableVoid(C)});if(!g){var v=T.above(e,{match:C=>pe.isElement(C)&&T.isBlock(e,C)});if(p&&v){var[m,y]=p,[,b]=v;$.isAncestor(b,y)&&(d=m)}}}var w=Yn(d,WL);return w},GL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:a,at:o=e.selection}=r;if(o){var s=T.after(e,o,{voids:i});if(s){var[,u]=T.last(e,[]),l=[s.path,u];if($.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(a==null)if($.isPath(o)){var[f]=T.parent(e,o);a=h=>f.children.includes(h)}else a=()=>!0;var[c]=T.nodes(e,{at:l,match:a,mode:n,voids:i});return c}}},UL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.path(e,r,n),a=le.get(e,i);return[a,i]};function qL(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,mode:n="all",universal:i=!1,reverse:a=!1,voids:o=!1,ignoreNonSelectable:s=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!r){var l,f;if(BF.isSpan(r))l=r[0],f=r[1];else{var c=T.path(t,r,{edge:"start"}),h=T.path(t,r,{edge:"end"});l=a?h:c,f=a?c:h}var d=le.nodes(t,{reverse:a,from:l,to:f,pass:w=>{var[C]=w;return pe.isElement(C)?!!(!o&&(T.isVoid(t,C)||T.isElementReadOnly(t,C))||s&&!T.isSelectable(t,C)):!1}}),p=[],g;for(var[v,m]of d)if(!(s&&pe.isElement(v)&&!T.isSelectable(t,v))){var y=g&&$.compare(m,g[1])===0;if(!(n==="highest"&&y)){if(!u(v,m)){if(i&&!y&&ge.isText(v))return;continue}if(n==="lowest"&&y){g=[v,m];continue}var b=n==="lowest"?g:[v,m];b&&(i?p.push(b):yield b),g=[v,m]}}n==="lowest"&&g&&(i?p.push(g):yield g),i&&(yield*p)}}()}var YL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1,operation:i}=r,a=f=>Yl.get(f)||[],o=f=>Xl.get(f)||new Set,s=f=>{var c=a(f).pop(),h=c.join(",");return o(f).delete(h),c};if(T.isNormalizing(e)){if(n){var u=Array.from(le.nodes(e),f=>{var[,c]=f;return c}),l=new Set(u.map(f=>f.join(",")));Yl.set(e,u),Xl.set(e,l)}a(e).length!==0&&T.withoutNormalizing(e,()=>{for(var f of a(e))if(le.has(e,f)){var c=T.node(e,f),[h,d]=c;pe.isElement(h)&&h.children.length===0&&e.normalizeNode(c,{operation:i})}for(var p=a(e),g=p.length,v=0;p.length!==0;){if(!e.shouldNormalize({dirtyPaths:p,iteration:v,initialDirtyPathsLength:g,operation:i}))return;var m=s(e);if(le.has(e,m)){var y=T.node(e,m);e.normalizeNode(y,{operation:i})}v++,p=a(e)}})}},XL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T.path(e,r,n),a=$.parent(i),o=T.node(e,a);return o},KL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,a={current:r,affinity:i,unref(){var{current:s}=a,u=T.pathRefs(e);return u.delete(a),a.current=null,s}},o=T.pathRefs(e);return o.add(a),a},ZL=t=>{var e=ib.get(t);return e||(e=new Set,ib.set(t,e)),e},JL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:a}=n;if($.isPath(r)){if(a==="start"){var[,o]=le.first(e,r);r=o}else if(a==="end"){var[,s]=le.last(e,r);r=s}}return te.isRange(r)&&(a==="start"?r=te.start(r):a==="end"?r=te.end(r):r=$.common(r.anchor.path,r.focus.path)),ke.isPoint(r)&&(r=r.path),i!=null&&(r=r.slice(0,i)),r},QL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,a={current:r,affinity:i,unref(){var{current:s}=a,u=T.pointRefs(e);return u.delete(a),a.current=null,s}},o=T.pointRefs(e);return o.add(a),a},eI=t=>{var e=ab.get(t);return e||(e=new Set,ab.set(t,e)),e},tI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=n;if($.isPath(r)){var a;if(i==="end"){var[,o]=le.last(e,r);a=o}else{var[,s]=le.first(e,r);a=s}var u=le.get(e,a);if(!ge.isText(u))throw new Error("Cannot get the ".concat(i," point in the node at path [").concat(r,"] because it has no ").concat(i," text node."));return{path:a,offset:i==="end"?u.text.length:0}}if(te.isRange(r)){var[l,f]=te.edges(r);return i==="start"?l:f}return r};function rI(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,unit:n="offset",reverse:i=!1,voids:a=!1,ignoreNonSelectable:o=!1}=e;if(!r)return;var s=T.range(t,r),[u,l]=te.edges(s),f=i?l:u,c=!1,h="",d=0,p=0,g=0;for(var[v,m]of T.nodes(t,{at:r,reverse:i,voids:a,ignoreNonSelectable:o})){if(pe.isElement(v)){if(!a&&(t.isVoid(v)||t.isElementReadOnly(v))){yield T.start(t,m);continue}if(t.isInline(v))continue;if(T.hasInlines(t,v)){var y=$.isAncestor(m,l.path)?l:T.end(t,m),b=$.isAncestor(m,u.path)?u:T.start(t,m);h=T.string(t,{anchor:b,focus:y},{voids:a}),c=!0}}if(ge.isText(v)){var w=$.equals(m,f.path);for(w?(p=i?f.offset:v.text.length-f.offset,g=f.offset):(p=v.text.length,g=i?p:0),(w||c||n==="offset")&&(yield{path:m,offset:g},c=!1);;){if(d===0){if(h==="")break;d=C(h,n,i),h=uv(h,d,i)[1]}if(g=i?g-d:g+d,p=p-d,p<0){d=-p;break}d=0,yield{path:m,offset:g}}}}function C(_,D,x){return D==="character"?sv(_,x):D==="word"?NF(_,x):D==="line"||D==="block"?_.length:1}}()}var nI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:a,at:o=e.selection}=r;if(o){var s=T.before(e,o,{voids:i});if(s){var[,u]=T.first(e,[]),l=[s.path,u];if($.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(a==null)if($.isPath(o)){var[f]=T.parent(e,o);a=h=>f.children.includes(h)}else a=()=>!0;var[c]=T.nodes(e,{reverse:!0,at:l,match:a,mode:n,voids:i});return c}}},iI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,a={current:r,affinity:i,unref(){var{current:s}=a,u=T.rangeRefs(e);return u.delete(a),a.current=null,s}},o=T.rangeRefs(e);return o.add(a),a},aI=t=>{var e=ob.get(t);return e||(e=new Set,ob.set(t,e)),e},oI=(t,e,r)=>{if(te.isRange(e)&&!r)return e;var n=T.start(t,e),i=T.end(t,r||e);return{anchor:n,focus:i}};function Mb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function sI(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var uI=(t,e)=>{var{selection:r}=t;if(r){var n=(f,c)=>{if(!ge.isText(f))return!1;var[h,d]=T.parent(t,c);return!t.isVoid(h)||t.markableVoid(h)},i=te.isExpanded(r),a=!1;if(!i){var[o,s]=T.node(t,r);if(o&&n(o,s)){var[u]=T.parent(t,s);a=u&&t.markableVoid(u)}}if(i||a)ae.unsetNodes(t,e,{match:n,split:!0,voids:!0});else{var l=sI({},T.marks(t)||{});delete l[e],t.marks=l,Ws.get(t)||t.onChange()}}},lI=(t,e)=>{nb.set(t,e)},fI=(t,e)=>T.point(t,e,{edge:"start"}),cI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,a=T.range(e,r),[o,s]=te.edges(a),u="";for(var[l,f]of T.nodes(e,{at:a,match:ge.isText,voids:i})){var c=l.text;$.equals(f,s.path)&&(c=c.slice(0,s.offset)),$.equals(f,o.path)&&(c=c.slice(o.offset)),u+=c}return u},hI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,[a,o]=te.edges(r);if(a.offset!==0||o.offset!==0||te.isCollapsed(r)||$.hasPrevious(o.path))return r;var s=T.above(e,{at:o,match:p=>pe.isElement(p)&&T.isBlock(e,p),voids:i}),u=s?s[1]:[],l=T.start(e,a),f={anchor:l,focus:o},c=!0;for(var[h,d]of T.nodes(e,{at:f,match:ge.isText,reverse:!0,voids:i})){if(c){c=!1;continue}if(h.text!==""||$.isBefore(d,u)){o={path:d,offset:h.text.length};break}}return{anchor:a,focus:o}},dI=(t,e)=>{var r=T.isNormalizing(t);T.setNormalizing(t,!1);try{e()}finally{T.setNormalizing(t,r)}T.normalize(t)},vI=(t,e,r)=>{var[n,i]=e;return pe.isElement(n)&&T.isEmpty(t,n)||ge.isText(n)&&n.text===""&&i[i.length-1]!==0},pI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var n,i,{reverse:a=!1,unit:o="character",distance:s=1,voids:u=!1}=r,{at:l=e.selection,hanging:f=!1}=r;if(l){var c=!1;if(te.isRange(l)&&te.isCollapsed(l)&&(c=!0,l=l.anchor),ke.isPoint(l)){var h=T.void(e,{at:l,mode:"highest"});if(!u&&h){var[,d]=h;l=d}else{var p={unit:o,distance:s},g=a?T.before(e,l,p)||T.start(e,[]):T.after(e,l,p)||T.end(e,[]);l={anchor:l,focus:g},f=!0}}if($.isPath(l)){ae.removeNodes(e,{at:l,voids:u});return}if(!te.isCollapsed(l)){if(!f){var[,v]=te.edges(l),m=T.end(e,[]);ke.equals(v,m)||(l=T.unhangRange(e,l,{voids:u}))}var[y,b]=te.edges(l),w=T.above(e,{match:ue=>pe.isElement(ue)&&T.isBlock(e,ue),at:y,voids:u}),C=T.above(e,{match:ue=>pe.isElement(ue)&&T.isBlock(e,ue),at:b,voids:u}),_=w&&C&&!$.equals(w[1],C[1]),D=$.equals(y.path,b.path),x=u?null:(n=T.void(e,{at:y,mode:"highest"}))!==null&&n!==void 0?n:T.elementReadOnly(e,{at:y,mode:"highest"}),S=u?null:(i=T.void(e,{at:b,mode:"highest"}))!==null&&i!==void 0?i:T.elementReadOnly(e,{at:b,mode:"highest"});if(x){var O=T.before(e,y);O&&w&&$.isAncestor(w[1],O.path)&&(y=O)}if(S){var E=T.after(e,b);E&&C&&$.isAncestor(C[1],E.path)&&(b=E)}var P=[],F;for(var B of T.nodes(e,{at:l,voids:u})){var[M,I]=B;F&&$.compare(I,F)===0||(!u&&pe.isElement(M)&&(T.isVoid(e,M)||T.isElementReadOnly(e,M))||!$.isCommon(I,y.path)&&!$.isCommon(I,b.path))&&(P.push(B),F=I)}var j=Array.from(P,ue=>{var[,Ce]=ue;return T.pathRef(e,Ce)}),z=T.pointRef(e,y),W=T.pointRef(e,b),R="";if(!D&&!x){var U=z.current,[Z]=T.leaf(e,U),{path:ee}=U,{offset:ne}=y,q=Z.text.slice(ne);q.length>0&&(e.apply({type:"remove_text",path:ee,offset:ne,text:q}),R=q)}if(j.reverse().map(ue=>ue.unref()).filter(ue=>ue!==null).forEach(ue=>ae.removeNodes(e,{at:ue,voids:u})),!S){var L=W.current,[X]=T.leaf(e,L),{path:V}=L,G=D?y.offset:0,J=X.text.slice(G,b.offset);J.length>0&&(e.apply({type:"remove_text",path:V,offset:G,text:J}),R=J)}!D&&_&&W.current&&z.current&&ae.mergeNodes(e,{at:W.current,hanging:!0,voids:u}),c&&a&&o==="character"&&R.length>1&&R.match(/[\u0E00-\u0E7F]+/)&&ae.insertText(e,R.slice(0,R.length-s));var K=z.unref(),Y=W.unref(),fe=a?K||Y:Y||K;r.at==null&&fe&&ae.select(e,fe)}}})},gI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1}=n,{at:o=ov(e),batchDirty:s=!0}=n;if(r.length){if(te.isRange(o))if(i||(o=T.unhangRange(e,o,{voids:a})),te.isCollapsed(o))o=o.anchor;else{var[,u]=te.edges(o);if(!a&&T.void(e,{at:u}))return;var l=T.pointRef(e,u);ae.delete(e,{at:o}),o=l.unref()}else $.isPath(o)&&(o=T.start(e,o));if(!(!a&&T.void(e,{at:o}))){var f=T.above(e,{at:o,match:q=>pe.isElement(q)&&T.isInline(e,q),mode:"highest",voids:a});if(f){var[,c]=f;if(T.isEnd(e,o,c)){var h=T.after(e,c);o=h}else if(T.isStart(e,o,c)){var d=T.before(e,c);o=d}}var p=T.above(e,{match:q=>pe.isElement(q)&&T.isBlock(e,q),at:o,voids:a}),[,g]=p,v=T.isStart(e,o,g),m=T.isEnd(e,o,g),y=v&&m,b=!v||v&&m,w=!m,[,C]=le.first({children:r},[]),[,_]=le.last({children:r},[]),D=[],x=q=>{var[L,X]=q,V=X.length===0;return V?!1:y?!0:!(b&&$.isAncestor(X,C)&&pe.isElement(L)&&!e.isVoid(L)&&!e.isInline(L)||w&&$.isAncestor(X,_)&&pe.isElement(L)&&!e.isVoid(L)&&!e.isInline(L))};for(var S of le.nodes({children:r},{pass:x}))x(S)&&D.push(S);var O=[],E=[],P=[],F=!0,B=!1;for(var[M]of D)pe.isElement(M)&&!e.isInline(M)?(F=!1,B=!0,E.push(M)):F?O.push(M):P.push(M);var[I]=T.nodes(e,{at:o,match:q=>ge.isText(q)||T.isInline(e,q),mode:"highest",voids:a}),[,j]=I,z=T.isStart(e,o,j),W=T.isEnd(e,o,j),R=T.pathRef(e,m&&!P.length?$.next(g):g),U=T.pathRef(e,W?$.next(j):j);ae.splitNodes(e,{at:o,match:q=>B?pe.isElement(q)&&T.isBlock(e,q):ge.isText(q)||T.isInline(e,q),mode:B?"lowest":"highest",always:B&&(!v||O.length>0)&&(!m||P.length>0),voids:a});var Z=T.pathRef(e,!z||z&&W?$.next(j):j);if(ae.insertNodes(e,O,{at:Z.current,match:q=>ge.isText(q)||T.isInline(e,q),mode:"highest",voids:a,batchDirty:s}),y&&!O.length&&E.length&&!P.length&&ae.delete(e,{at:g,voids:a}),ae.insertNodes(e,E,{at:R.current,match:q=>pe.isElement(q)&&T.isBlock(e,q),mode:"lowest",voids:a,batchDirty:s}),ae.insertNodes(e,P,{at:U.current,match:q=>ge.isText(q)||T.isInline(e,q),mode:"highest",voids:a,batchDirty:s}),!n.at){var ee;if(P.length>0&&U.current?ee=$.previous(U.current):E.length>0&&R.current?ee=$.previous(R.current):Z.current&&(ee=$.previous(Z.current)),ee){var ne=T.end(e,ee);ae.select(e,ne)}}Z.unref(),R.unref(),U.unref()}}})},mI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=r,{selection:i}=e;if(i){if(n==="anchor")ae.select(e,i.anchor);else if(n==="focus")ae.select(e,i.focus);else if(n==="start"){var[a]=te.edges(i);ae.select(e,a)}else if(n==="end"){var[,o]=te.edges(i);ae.select(e,o)}}else return},yI=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},bI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:i=1,unit:a="character",reverse:o=!1}=r,{edge:s=null}=r;if(n){s==="start"&&(s=te.isBackward(n)?"focus":"anchor"),s==="end"&&(s=te.isBackward(n)?"anchor":"focus");var{anchor:u,focus:l}=n,f={distance:i,unit:a,ignoreNonSelectable:!0},c={};if(s==null||s==="anchor"){var h=o?T.before(e,u,f):T.after(e,u,f);h&&(c.anchor=h)}if(s==null||s==="focus"){var d=o?T.before(e,l,f):T.after(e,l,f);d&&(c.focus=d)}ae.setSelection(e,c)}},CI=(t,e)=>{var{selection:r}=t;if(e=T.range(t,e),r){ae.setSelection(t,e);return}if(!te.isRange(e))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(Lt.stringify(e)));t.apply({type:"set_selection",properties:r,newProperties:e})};function Fb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Lb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var wI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:a="both"}=n;if(i){a==="start"&&(a=te.isBackward(i)?"focus":"anchor"),a==="end"&&(a=te.isBackward(i)?"anchor":"focus");var{anchor:o,focus:s}=i,u=a==="anchor"?o:s;ae.setSelection(e,{[a==="anchor"?"anchor":"focus"]:Lb(Lb({},u),r)})}},_I=(t,e)=>{var{selection:r}=t,n={},i={};if(r){for(var a in e)(a==="anchor"&&e.anchor!=null&&!ke.equals(e.anchor,r.anchor)||a==="focus"&&e.focus!=null&&!ke.equals(e.focus,r.focus)||a!=="anchor"&&a!=="focus"&&e[a]!==r[a])&&(n[a]=r[a],i[a]=e[a]);Object.keys(n).length>0&&t.apply({type:"set_selection",properties:n,newProperties:i})}},DI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1,mode:o="lowest",batchDirty:s=!0}=n,{at:u,match:l,select:f}=n;if(le.isNode(r)&&(r=[r]),r.length!==0){var[c]=r;if(u||(u=ov(e),f!==!1&&(f=!0)),f==null&&(f=!1),te.isRange(u))if(i||(u=T.unhangRange(e,u,{voids:a})),te.isCollapsed(u))u=u.anchor;else{var[,h]=te.edges(u),d=T.pointRef(e,h);ae.delete(e,{at:u}),u=d.unref()}if(ke.isPoint(u)){l==null&&(ge.isText(c)?l=O=>ge.isText(O):e.isInline(c)?l=O=>ge.isText(O)||T.isInline(e,O):l=O=>pe.isElement(O)&&T.isBlock(e,O));var[p]=T.nodes(e,{at:u.path,match:l,mode:o,voids:a});if(p){var[,g]=p,v=T.pathRef(e,g),m=T.isEnd(e,u,g);ae.splitNodes(e,{at:u,match:l,mode:o,voids:a});var y=v.unref();u=m?$.next(y):y}else return}var b=$.parent(u),w=u[u.length-1];if(!(!a&&T.void(e,{at:b}))){if(s){var C=[],_=$.levels(b);aL(e,()=>{var O=function(){var F=b.concat(w);w++;var B={type:"insert_node",path:F,node:E};e.apply(B),u=$.next(u),C.push(B),ge.isText?_.push(...Array.from(le.nodes(E),M=>{var[,I]=M;return F.concat(I)})):_.push(F)};for(var E of r)O()},()=>{Cb(e,_,O=>{var E=O;for(var P of C)if($.operationCanTransformPath(P)&&(E=$.transform(E,P),!E))return null;return E})})}else for(var D of r){var x=b.concat(w);w++,e.apply({type:"insert_node",path:x,node:D}),u=$.next(u)}if(u=$.previous(u),f){var S=T.end(e,u);S&&ae.select(e,S)}}}})},xI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:i="lowest",voids:a=!1}=r,{match:o}=r;if(o==null&&(o=$.isPath(n)?yo(e,n):w=>pe.isElement(w)&&T.isBlock(e,w)),!!n){var s=T.nodes(e,{at:n,match:o,mode:i,voids:a}),u=Array.from(s,w=>{var[,C]=w;return T.pathRef(e,C)});for(var l of u){var f=l.unref();if(f.length<2)throw new Error("Cannot lift node at a path [".concat(f,"] because it has a depth of less than `2`."));var c=T.node(e,$.parent(f)),[h,d]=c,p=f[f.length-1],{length:g}=h.children;if(g===1){var v=$.next(d);ae.moveNodes(e,{at:f,to:v,voids:a}),ae.removeNodes(e,{at:d,voids:a})}else if(p===0)ae.moveNodes(e,{at:f,to:d,voids:a});else if(p===g-1){var m=$.next(d);ae.moveNodes(e,{at:f,to:m,voids:a})}else{var y=$.next(f),b=$.next(d);ae.splitNodes(e,{at:y,voids:a}),ae.moveNodes(e,{at:f,to:b,voids:a})}}}})},SI=["text"],EI=["children"],Ib=(t,e)=>{if(pe.isElement(e)){var r=e;return T.isVoid(t,e)?!0:r.children.length===1?Ib(t,r.children[0]):!1}else return!T.isEditor(e)},AI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{match:n,at:i=e.selection}=r,{hanging:a=!1,voids:o=!1,mode:s="lowest"}=r;if(i){if(n==null)if($.isPath(i)){var[u]=T.parent(e,i);n=O=>u.children.includes(O)}else n=O=>pe.isElement(O)&&T.isBlock(e,O);if(!a&&te.isRange(i)&&(i=T.unhangRange(e,i,{voids:o})),te.isRange(i))if(te.isCollapsed(i))i=i.anchor;else{var[,l]=te.edges(i),f=T.pointRef(e,l);ae.delete(e,{at:i}),i=f.unref(),r.at==null&&ae.select(e,i)}var[c]=T.nodes(e,{at:i,match:n,voids:o,mode:s}),h=T.previous(e,{at:i,match:n,voids:o,mode:s});if(!(!c||!h)){var[d,p]=c,[g,v]=h;if(!(p.length===0||v.length===0)){var m=$.next(v),y=$.common(p,v),b=$.isSibling(p,v),w=Array.from(T.levels(e,{at:p}),O=>{var[E]=O;return E}).slice(y.length).slice(0,-1),C=T.above(e,{at:p,mode:"highest",match:O=>w.includes(O)&&Ib(e,O)}),_=C&&T.pathRef(e,C[1]),D,x;if(ge.isText(d)&&ge.isText(g)){var S=Yn(d,SI);x=g.text.length,D=S}else if(pe.isElement(d)&&pe.isElement(g)){var S=Yn(d,EI);x=g.children.length,D=S}else throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(Lt.stringify(d)," ").concat(Lt.stringify(g)));b||ae.moveNodes(e,{at:p,to:m,voids:o}),_&&ae.removeNodes(e,{at:_.current,voids:o}),T.shouldMergeNodesRemovePrevNode(e,h,c)?ae.removeNodes(e,{at:v,voids:o}):e.apply({type:"merge_node",path:m,position:x,properties:D}),_&&_.unref()}}}})},TI=(t,e)=>{T.withoutNormalizing(t,()=>{var{to:r,at:n=t.selection,mode:i="lowest",voids:a=!1}=e,{match:o}=e;if(n){o==null&&(o=$.isPath(n)?yo(t,n):d=>pe.isElement(d)&&T.isBlock(t,d));var s=T.pathRef(t,r),u=T.nodes(t,{at:n,match:o,mode:i,voids:a}),l=Array.from(u,d=>{var[,p]=d;return T.pathRef(t,p)});for(var f of l){var c=f.unref(),h=s.current;c.length!==0&&t.apply({type:"move_node",path:c,newPath:h}),s.current&&$.isSibling(h,c)&&$.isAfter(h,c)&&(s.current=$.next(s.current))}s.unref()}})},OI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1,mode:a="lowest"}=r,{at:o=e.selection,match:s}=r;if(o){s==null&&(s=$.isPath(o)?yo(e,o):d=>pe.isElement(d)&&T.isBlock(e,d)),!n&&te.isRange(o)&&(o=T.unhangRange(e,o,{voids:i}));var u=T.nodes(e,{at:o,match:s,mode:a,voids:i}),l=Array.from(u,d=>{var[,p]=d;return T.pathRef(e,p)});for(var f of l){var c=f.unref();if(c){var[h]=T.node(e,c);e.apply({type:"remove_node",path:c,node:h})}}}})},PI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(e,()=>{var{match:i,at:a=e.selection,compare:o,merge:s}=n,{hanging:u=!1,mode:l="lowest",split:f=!1,voids:c=!1}=n;if(a){if(i==null&&(i=$.isPath(a)?yo(e,a):x=>pe.isElement(x)&&T.isBlock(e,x)),!u&&te.isRange(a)&&(a=T.unhangRange(e,a,{voids:c})),f&&te.isRange(a)){if(te.isCollapsed(a)&&T.leaf(e,a.anchor)[0].text.length>0)return;var h=T.rangeRef(e,a,{affinity:"inward"}),[d,p]=te.edges(a),g=l==="lowest"?"lowest":"highest",v=T.isEnd(e,p,p.path);ae.splitNodes(e,{at:p,match:i,mode:g,voids:c,always:!v});var m=T.isStart(e,d,d.path);ae.splitNodes(e,{at:d,match:i,mode:g,voids:c,always:!m}),a=h.unref(),n.at==null&&ae.select(e,a)}o||(o=(x,S)=>x!==S);for(var[y,b]of T.nodes(e,{at:a,match:i,mode:l,voids:c})){var w={},C={};if(b.length!==0){var _=!1;for(var D in r)D==="children"||D==="text"||o(r[D],y[D])&&(_=!0,y.hasOwnProperty(D)&&(w[D]=y[D]),s?r[D]!=null&&(C[D]=s(y[D],r[D])):r[D]!=null&&(C[D]=r[D]));_&&e.apply({type:"set_node",path:b,properties:w,newProperties:C})}}}})},BI=(t,e)=>{if(te.isCollapsed(e))return e.anchor;var[,r]=te.edges(e),n=T.pointRef(t,r);return ae.delete(t,{at:e}),n.unref()},MI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:i=!1}=r,{match:a,at:o=e.selection,height:s=0,always:u=!1}=r;if(a==null&&(a=W=>pe.isElement(W)&&T.isBlock(e,W)),te.isRange(o)&&(o=BI(e,o)),$.isPath(o)){var l=o,f=T.point(e,l),[c]=T.parent(e,l);a=W=>W===c,s=f.path.length-l.length+1,o=f,u=!0}if(o){var h=T.pointRef(e,o,{affinity:"backward"}),d;try{var[p]=T.nodes(e,{at:o,match:a,mode:n,voids:i});if(!p)return;var g=T.void(e,{at:o,mode:"highest"}),v=0;if(!i&&g){var[m,y]=g;if(pe.isElement(m)&&e.isInline(m)){var b=T.after(e,y);if(!b){var w={text:""},C=$.next(y);ae.insertNodes(e,w,{at:C,voids:i}),b=T.point(e,C)}o=b,u=!0}var _=o.path.length-y.length;s=_+1,u=!0}d=T.pointRef(e,o);var D=o.path.length-s,[,x]=p,S=o.path.slice(0,D),O=s===0?o.offset:o.path[D]+v;for(var[E,P]of T.levels(e,{at:S,reverse:!0,voids:i})){var F=!1;if(P.length<x.length||P.length===0||!i&&pe.isElement(E)&&T.isVoid(e,E))break;var B=h.current,M=T.isEnd(e,B,P);if(u||!h||!T.isEdge(e,B,P)){F=!0;var I=le.extractProps(E);e.apply({type:"split_node",path:P,position:O,properties:I})}O=P[P.length-1]+(F||M?1:0)}if(r.at==null){var j=d.current||T.end(e,[]);ae.select(e,j)}}finally{var z;h.unref(),(z=d)===null||z===void 0||z.unref()}}})},FI=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(r)||(r=[r]);var i={};for(var a of r)i[a]=null;ae.setNodes(e,i,n)},LI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.withoutNormalizing(e,()=>{var{mode:n="lowest",split:i=!1,voids:a=!1}=r,{at:o=e.selection,match:s}=r;if(o){s==null&&(s=$.isPath(o)?yo(e,o):d=>pe.isElement(d)&&T.isBlock(e,d)),$.isPath(o)&&(o=T.range(e,o));var u=te.isRange(o)?T.rangeRef(e,o):null,l=T.nodes(e,{at:o,match:s,mode:n,voids:a}),f=Array.from(l,d=>{var[,p]=d;return T.pathRef(e,p)}).reverse(),c=function(){var p=h.unref(),[g]=T.node(e,p),v=T.range(e,p);i&&u&&(v=te.intersection(u.current,v)),ae.liftNodes(e,{at:v,match:m=>pe.isAncestor(g)&&g.children.includes(m),voids:a})};for(var h of f)c();u&&u.unref()}})};function Rb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Nb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rb(Object(r),!0).forEach(function(n){Qt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var II=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};T.withoutNormalizing(e,()=>{var{mode:i="lowest",split:a=!1,voids:o=!1}=n,{match:s,at:u=e.selection}=n;if(u){if(s==null&&($.isPath(u)?s=yo(e,u):e.isInline(r)?s=v=>pe.isElement(v)&&T.isInline(e,v)||ge.isText(v):s=v=>pe.isElement(v)&&T.isBlock(e,v)),a&&te.isRange(u)){var[l,f]=te.edges(u),c=T.rangeRef(e,u,{affinity:"inward"});ae.splitNodes(e,{at:f,match:s,voids:o}),ae.splitNodes(e,{at:l,match:s,voids:o}),u=c.unref(),n.at==null&&ae.select(e,u)}var h=Array.from(T.nodes(e,{at:u,match:e.isInline(r)?v=>pe.isElement(v)&&T.isBlock(e,v):v=>T.isEditor(v),mode:"lowest",voids:o})),d=function(){var m=te.isRange(u)?te.intersection(u,T.range(e,g)):u;if(!m)return 0;var y=Array.from(T.nodes(e,{at:m,match:s,mode:i,voids:o}));if(y.length>0){var[b]=y,w=y[y.length-1],[,C]=b,[,_]=w;if(C.length===0&&_.length===0)return 0;var D=$.equals(C,_)?$.parent(C):$.common(C,_),x=T.range(e,C,_),S=T.node(e,D),[O]=S,E=D.length+1,P=$.next(_.slice(0,E)),F=Nb(Nb({},r),{},{children:[]});ae.insertNodes(e,F,{at:P,voids:o}),ae.moveNodes(e,{at:x,match:B=>pe.isAncestor(O)&&O.children.includes(B),to:P.concat(0),voids:o})}},p;for(var[,g]of h)p=d()}})},RI=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return oL(t,...n)},addMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return hL(t,...n)},deleteBackward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return pL(t,...n)},deleteForward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return gL(t,...n)},deleteFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return mL(t,...n)},getFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return uL(t,...n)},insertBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return TL(t,...n)},insertSoftBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return PL(t,...n)},insertFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return gI(t,...n)},insertNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return OL(t,...n)},insertText:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ML(t,...n)},normalizeNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return lL(t,...n)},removeMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return uI(t,...n)},getDirtyPaths:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return sL(t,...n)},shouldNormalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return fL(t,...n)},above:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return cL(t,...n)},after:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return dL(t,...n)},before:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return vL(t,...n)},collapse:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return mI(t,...n)},delete:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return pI(t,...n)},deselect:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return yI(t,...n)},edges:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return yL(t,...n)},elementReadOnly:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return bL(t,...n)},end:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return CL(t,...n)},first:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return wL(t,...n)},fragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _L(t,...n)},getMarks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return $L(t,...n)},hasBlocks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return xL(t,...n)},hasInlines:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return SL(t,...n)},hasPath:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return EL(t,...n)},hasTexts:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return AL(t,...n)},insertNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return DI(t,...n)},isBlock:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return FL(t,...n)},isEdge:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return LL(t,...n)},isEmpty:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return IL(t,...n)},isEnd:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return RL(t,...n)},isNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return NL(t,...n)},isStart:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return kL(t,...n)},last:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return zL(t,...n)},leaf:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return jL(t,...n)},levels:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return VL(t,...n)},liftNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return xI(t,...n)},mergeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return AI(t,...n)},move:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return bI(t,...n)},moveNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return TI(t,...n)},next:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return GL(t,...n)},node:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return UL(t,...n)},nodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return qL(t,...n)},normalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return YL(t,...n)},parent:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return XL(t,...n)},path:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return JL(t,...n)},pathRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return KL(t,...n)},pathRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ZL(t,...n)},point:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return tI(t,...n)},pointRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return QL(t,...n)},pointRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return eI(t,...n)},positions:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return rI(t,...n)},previous:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return nI(t,...n)},range:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return oI(t,...n)},rangeRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return iI(t,...n)},rangeRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return aI(t,...n)},removeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return OI(t,...n)},select:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return CI(t,...n)},setNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return PI(t,...n)},setNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return lI(t,...n)},setPoint:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return wI(t,...n)},setSelection:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _I(t,...n)},splitNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return MI(t,...n)},start:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return fI(t,...n)},string:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return cI(t,...n)},unhangRange:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return hI(t,...n)},unsetNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return FI(t,...n)},unwrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return LI(t,...n)},void:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return DL(t,...n)},withoutNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return dI(t,...n)},wrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return II(t,...n)},shouldMergeNodesRemovePrevNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return vI(t,...n)}};return t},fa=[],NI=function(){return fa.some(function(t){return t.activeTargets.length>0})},kI=function(){return fa.some(function(t){return t.skippedTargets.length>0})},kb="ResizeObserver loop completed with undelivered notifications.",zI=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:kb}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=kb),window.dispatchEvent(t)},Us;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Us||(Us={}));var ca=function(t){return Object.freeze(t)},jI=function(){function t(e,r){this.inlineSize=e,this.blockSize=r,ca(this)}return t}(),zb=function(){function t(e,r,n,i){return this.x=e,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ca(this)}return t.prototype.toJSON=function(){var e=this,r=e.x,n=e.y,i=e.top,a=e.right,o=e.bottom,s=e.left,u=e.width,l=e.height;return{x:r,y:n,top:i,right:a,bottom:o,left:s,width:u,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),lv=function(t){return t instanceof SVGElement&&"getBBox"in t},jb=function(t){if(lv(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var i=t,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||t.getClientRects().length)},Vb=function(t){var e;if(t instanceof Element)return!0;var r=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},VI=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},qs=typeof window<"u"?window:{},Jl=new WeakMap,Hb=/auto|scroll/,HI=/^tb|vertical/,WI=/msie|trident/i.test(qs.navigator&&qs.navigator.userAgent),bn=function(t){return parseFloat(t||"0")},Co=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=0),r===void 0&&(r=!1),new jI((r?e:t)||0,(r?t:e)||0)},Wb=ca({devicePixelContentBoxSize:Co(),borderBoxSize:Co(),contentBoxSize:Co(),contentRect:new zb(0,0,0,0)}),$b=function(t,e){if(e===void 0&&(e=!1),Jl.has(t)&&!e)return Jl.get(t);if(jb(t))return Jl.set(t,Wb),Wb;var r=getComputedStyle(t),n=lv(t)&&t.ownerSVGElement&&t.getBBox(),i=!WI&&r.boxSizing==="border-box",a=HI.test(r.writingMode||""),o=!n&&Hb.test(r.overflowY||""),s=!n&&Hb.test(r.overflowX||""),u=n?0:bn(r.paddingTop),l=n?0:bn(r.paddingRight),f=n?0:bn(r.paddingBottom),c=n?0:bn(r.paddingLeft),h=n?0:bn(r.borderTopWidth),d=n?0:bn(r.borderRightWidth),p=n?0:bn(r.borderBottomWidth),g=n?0:bn(r.borderLeftWidth),v=c+l,m=u+f,y=g+d,b=h+p,w=s?t.offsetHeight-b-t.clientHeight:0,C=o?t.offsetWidth-y-t.clientWidth:0,_=i?v+y:0,D=i?m+b:0,x=n?n.width:bn(r.width)-_-C,S=n?n.height:bn(r.height)-D-w,O=x+v+C+y,E=S+m+w+b,P=ca({devicePixelContentBoxSize:Co(Math.round(x*devicePixelRatio),Math.round(S*devicePixelRatio),a),borderBoxSize:Co(O,E,a),contentBoxSize:Co(x,S,a),contentRect:new zb(c,u,x,S)});return Jl.set(t,P),P},Gb=function(t,e,r){var n=$b(t,r),i=n.borderBoxSize,a=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(e){case Us.DEVICE_PIXEL_CONTENT_BOX:return o;case Us.BORDER_BOX:return i;default:return a}},$I=function(){function t(e){var r=$b(e);this.target=e,this.contentRect=r.contentRect,this.borderBoxSize=ca([r.borderBoxSize]),this.contentBoxSize=ca([r.contentBoxSize]),this.devicePixelContentBoxSize=ca([r.devicePixelContentBoxSize])}return t}(),Ub=function(t){if(jb(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},GI=function(){var t=1/0,e=[];fa.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(l){var f=new $I(l.target),c=Ub(l.target);s.push(f),l.lastReportedSize=Gb(l.target,l.observedBox),c<t&&(t=c)}),e.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var r=0,n=e;r<n.length;r++){var i=n[r];i()}return t},qb=function(t){fa.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(Ub(i.target)>t?r.activeTargets.push(i):r.skippedTargets.push(i))})})},UI=function(){var t=0;for(qb(t);NI();)t=GI(),qb(t);return kI()&&zI(),t>0},fv,Yb=[],qI=function(){return Yb.splice(0).forEach(function(t){return t()})},YI=function(t){if(!fv){var e=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return qI()}).observe(r,n),fv=function(){r.textContent="".concat(e?e--:e++)}}Yb.push(t),fv()},XI=function(t){YI(function(){requestAnimationFrame(t)})},Ql=0,KI=function(){return!!Ql},ZI=250,JI={attributes:!0,characterData:!0,childList:!0,subtree:!0},Xb=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Kb=function(t){return t===void 0&&(t=0),Date.now()+t},cv=!1,QI=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var r=this;if(e===void 0&&(e=ZI),!cv){cv=!0;var n=Kb(e);XI(function(){var i=!1;try{i=UI()}finally{if(cv=!1,e=n-Kb(),!KI())return;i?r.run(1e3):e>0?r.run(e):r.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,r=function(){return e.observer&&e.observer.observe(document.body,JI)};document.body?r():qs.addEventListener("DOMContentLoaded",r)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Xb.forEach(function(r){return qs.addEventListener(r,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Xb.forEach(function(r){return qs.removeEventListener(r,e.listener,!0)}),this.stopped=!0)},t}(),hv=new QI,Zb=function(t){!Ql&&t>0&&hv.start(),Ql+=t,!Ql&&hv.stop()},e5=function(t){return!lv(t)&&!VI(t)&&getComputedStyle(t).display==="inline"},t5=function(){function t(e,r){this.target=e,this.observedBox=r||Us.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Gb(this.target,this.observedBox,!0);return e5(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),r5=function(){function t(e,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=r}return t}(),ef=new WeakMap,Jb=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},tf=function(){function t(){}return t.connect=function(e,r){var n=new r5(e,r);ef.set(e,n)},t.observe=function(e,r,n){var i=ef.get(e),a=i.observationTargets.length===0;Jb(i.observationTargets,r)<0&&(a&&fa.push(i),i.observationTargets.push(new t5(r,n&&n.box)),Zb(1),hv.schedule())},t.unobserve=function(e,r){var n=ef.get(e),i=Jb(n.observationTargets,r),a=n.observationTargets.length===1;i>=0&&(a&&fa.splice(fa.indexOf(n),1),n.observationTargets.splice(i,1),Zb(-1))},t.disconnect=function(e){var r=this,n=ef.get(e);n.observationTargets.slice().forEach(function(i){return r.unobserve(e,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},t}(),n5=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");tf.connect(this,e)}return t.prototype.observe=function(e,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Vb(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");tf.observe(this,e,r)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Vb(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");tf.unobserve(this,e)},t.prototype.disconnect=function(){tf.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});for(var i5=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),dv={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Qb={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:i5?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},vv={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},rf=1;rf<20;rf++)vv["f"+rf]=111+rf;function nf(t,e,r){e&&!("byKey"in e)&&(r=e,e=null),Array.isArray(t)||(t=[t]);var n=t.map(function(o){return eC(o,e)}),i=function(s){return n.some(function(u){return tC(u,s)})},a=r==null?i:i(r);return a}function a5(t,e){return nf(t,e)}function o5(t,e){return nf(t,{byKey:!0},e)}function eC(t,e){var r=e&&e.byKey,n={};t=t.replace("++","+add");var i=t.split("+"),a=i.length;for(var o in dv)n[dv[o]]=!1;var s=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),c;!(s=(c=f.next()).done);s=!0){var h=c.value,d=h.endsWith("?")&&h.length>1;d&&(h=h.slice(0,-1));var p=pv(h),g=dv[p];if(h.length>1&&!g&&!Qb[h]&&!vv[p])throw new TypeError('Unknown modifier: "'+h+'"');(a===1||!g)&&(r?n.key=p:n.which=rC(h)),g&&(n[g]=d?null:!0)}}catch(v){u=!0,l=v}finally{try{!s&&f.return&&f.return()}finally{if(u)throw l}}return n}function tC(t,e){for(var r in t){var n=t[r],i=void 0;if(n!=null&&(r==="key"&&e.key!=null?i=e.key.toLowerCase():r==="which"?i=n===91&&e.which===93?91:e.which:i=e[r],!(i==null&&n===!1)&&i!==n))return!1}return!0}function rC(t){t=pv(t);var e=vv[t]||t.toUpperCase().charCodeAt(0);return e}function pv(t){return t=t.toLowerCase(),t=Qb[t]||t,t}Kn.default=nf;var gv=Kn.isHotkey=nf;Kn.isCodeHotkey=a5,Kn.isKeyHotkey=o5,Kn.parseHotkey=eC,Kn.compareHotkey=tC,Kn.toKeyCode=rC,Kn.toKeyName=pv;function s5(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function wo(t,e){if(t==null)return{};var r=s5(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ys(t){"@babel/helpers - typeof";return Ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ys(t)}function u5(t,e){if(Ys(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ys(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function l5(t){var e=u5(t,"string");return Ys(e)==="symbol"?e:String(e)}function Rr(t,e,r){return e=l5(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var mv=k.createContext(null),bi=()=>{var t=k.useContext(mv);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},yv,bv,nC=parseInt(k.version.split(".")[0],10),iC=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,aC=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),er=typeof navigator<"u"&&/Android/.test(navigator.userAgent),_o=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ha=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),f5=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),oC=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),c5=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),h5=er&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),d5=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),v5=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),p5=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),af=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((yv=navigator.userAgent.match(/Version\/(\d+)/))!==null&&yv!==void 0&&yv[1]&&parseInt((bv=navigator.userAgent.match(/Version\/(\d+)/))===null||bv===void 0?void 0:bv[1],10)<17);var Ci=(!c5||!h5)&&!f5&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Do=new WeakMap,Cv=new WeakMap,wv=new WeakMap,sC=new WeakMap,of=new WeakMap,_v=new WeakMap,Xs=new WeakMap,da=new WeakMap,sf=new WeakMap,uf=new WeakMap,Dv=new WeakMap,wi=new WeakMap,va=new WeakMap,Ks=new WeakMap,xv=new WeakMap,Sv=new WeakMap,nn=new WeakMap,Zn=new WeakMap,hr=new WeakMap,_i=new WeakMap,Di=new WeakMap,uC=new WeakMap,xo=Symbol("placeholder"),lC=Symbol("mark-placeholder"),fC=globalThis.Node,g5=globalThis.Text,Ev=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,m5=t=>xi(t)&&t.nodeType===8,Nr=t=>xi(t)&&t.nodeType===1,xi=t=>{var e=Ev(t);return!!e&&t instanceof e.Node},Av=t=>{var e=t&&t.anchorNode&&Ev(t.anchorNode);return!!e&&t instanceof e.Selection},cC=t=>xi(t)&&t.nodeType===3,y5=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,b5=t=>{var[e,r]=t;if(Nr(e)&&e.childNodes.length){var n=r===e.childNodes.length,i=n?r-1:r;for([e,i]=hC(e,i,n?"backward":"forward"),n=i<r;Nr(e)&&e.childNodes.length;){var a=n?e.childNodes.length-1:0;e=w5(e,a,n?"backward":"forward")}r=n&&e.textContent!=null?e.textContent.length:0}return[e,r]},C5=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},hC=(t,e,r)=>{for(var{childNodes:n}=t,i=n[e],a=e,o=!1,s=!1;(m5(i)||Nr(i)&&i.childNodes.length===0||Nr(i)&&i.getAttribute("contenteditable")==="false")&&!(o&&s);){if(a>=n.length){o=!0,a=e-1,r="backward";continue}if(a<0){s=!0,a=e+1,r="forward";continue}i=n[a],e=a,a+=r==="forward"?1:-1}return[i,e]},w5=(t,e,r)=>{var[n]=hC(t,e,r);return n},dC=t=>{var e="";if(cC(t)&&t.nodeValue)return t.nodeValue;if(Nr(t)){for(var r of Array.from(t.childNodes))e+=dC(r);var n=getComputedStyle(t).getPropertyValue("display");(n==="block"||n==="list"||t.tagName==="BR")&&(e+=`
|
|
57
|
+
`)}return e},_5=/data-slate-fragment="(.+?)"/m,D5=t=>{var e=t.getData("text/html"),[,r]=e.match(_5)||[];return r},Zs=t=>t.getSelection!=null?t.getSelection():document.getSelection(),Tv=(t,e,r)=>{var{target:n}=e;if(Nr(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:i}=re.getWindow(t);if(i.contains(n))return re.hasDOMNode(t,n,{editable:!0});var a=r.find(o=>{var{addedNodes:s,removedNodes:u}=o;for(var l of s)if(l===n||l.contains(n))return!0;for(var f of u)if(f===n||f.contains(n))return!0});return!a||a===e?!1:Tv(t,a,r)},x5=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(r=t.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var e,r,n;t=(n=t)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return t},vC=(t,e)=>!!(t.compareDocumentPosition(e)&fC.DOCUMENT_POSITION_PRECEDING),S5=(t,e)=>!!(t.compareDocumentPosition(e)&fC.DOCUMENT_POSITION_FOLLOWING),E5=0;class A5{constructor(){Rr(this,"id",void 0),this.id="".concat(E5++)}}var re={androidPendingDiffs:t=>hr.get(t),androidScheduleFlush:t=>{var e;(e=Sv.get(t))===null||e===void 0||e()},blur:t=>{var e=re.toDOMNode(t,t),r=re.findDocumentOrShadowRoot(t);wi.set(t,!1),r.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,r=re.findDocumentOrShadowRoot(t),n=Zs(r);n&&n.rangeCount>0&&n.removeAllRanges(),e&&ae.deselect(t)},findDocumentOrShadowRoot:t=>{var e=re.toDOMNode(t,t),r=e.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:r,clientY:n,target:i}=e;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var a=re.toSlateNode(t,e.target),o=re.findPath(t,a);if(pe.isElement(a)&&T.isVoid(t,a)){var s=i.getBoundingClientRect(),u=t.isInline(a)?r-s.left<s.left+s.width-r:n-s.top<s.top+s.height-n,l=T.point(t,o,{edge:u?"start":"end"}),f=u?T.before(t,l):T.after(t,l);if(f){var c=T.range(t,f);return c}}var h,{document:d}=re.getWindow(t);if(d.caretRangeFromPoint)h=d.caretRangeFromPoint(r,n);else{var p=d.caretPositionFromPoint(r,n);p&&(h=d.createRange(),h.setStart(p.offsetNode,p.offset),h.setEnd(p.offsetNode,p.offset))}if(!h)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var g=re.toSlateRange(t,h,{exactMatch:!1,suppressThrow:!1});return g},findKey:(t,e)=>{var r=sf.get(e);return r||(r=new A5,sf.set(e,r)),r},findPath:(t,e)=>{for(var r=[],n=e;;){var i=wv.get(n);if(i==null){if(T.isEditor(n))return r;break}var a=Cv.get(n);if(a==null)break;r.unshift(a),n=i}throw new Error("Unable to find the path for Slate node: ".concat(Lt.stringify(e)))},focus:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!wi.get(e)){if(r.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{re.focus(e,{retries:r.retries-1})},10);return}var n=re.toDOMNode(e,e),i=re.findDocumentOrShadowRoot(e);if(i.activeElement!==n){if(e.selection&&i instanceof Document){var a=Zs(i),o=re.toDOMRange(e,e.selection);a==null||a.removeAllRanges(),a==null||a.addRange(o)}e.selection||ae.select(e,T.start(e,[])),wi.set(e,!0),n.focus({preventScroll:!0})}}},getWindow:t=>{var e=sC.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:i=!1}=n,a=re.toDOMNode(e,e),o;try{o=Nr(r)?r:r.parentElement}catch(s){if(s instanceof Error&&!s.message.includes('Permission denied to access property "nodeType"'))throw s}return o?o.closest("[data-slate-editor]")===a&&(!i||o.isContentEditable?!0:typeof o.isContentEditable=="boolean"&&o.closest('[contenteditable="false"]')===a||!!o.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>xi(e)&&re.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:r,focus:n}=e;return T.hasPath(t,r.path)&&T.hasPath(t,n.path)},hasSelectableTarget:(t,e)=>re.hasEditableTarget(t,e)||re.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>xi(e)&&re.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!va.get(t),isFocused:t=>!!wi.get(t),isReadOnly:t=>!!Dv.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(Dv.get(t))return!1;var r=re.hasTarget(t,e)&&re.toSlateNode(t,e);return pe.isElement(r)&&T.isVoid(t,r)},setFragmentData:(t,e,r)=>t.setFragmentData(e,r),toDOMNode:(t,e)=>{var r=uf.get(t),n=T.isEditor(e)?of.get(t):r==null?void 0:r.get(re.findKey(t,e));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Lt.stringify(e)));return n},toDOMPoint:(t,e)=>{var[r]=T.node(t,e.path),n=re.toDOMNode(t,r),i;T.void(t,{at:e})&&(e={path:e.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",o=Array.from(n.querySelectorAll(a)),s=0,u=0;u<o.length;u++){var l=o[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:c}=f.textContent,h=l.getAttribute("data-slate-length"),d=h==null?c:parseInt(h,10),p=s+d,g=o[u+1];if(e.offset===p&&g!==null&&g!==void 0&&g.hasAttribute("data-slate-mark-placeholder")){var v,m=g.childNodes[0];i=[m instanceof g5?m:g,(v=g.textContent)!==null&&v!==void 0&&v.startsWith("\uFEFF")?1:0];break}if(e.offset<=p){var y=Math.min(c,Math.max(0,e.offset-s));i=[f,y];break}s=p}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Lt.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:r,focus:n}=e,i=te.isBackward(e),a=re.toDOMPoint(t,r),o=te.isCollapsed(e)?a:re.toDOMPoint(t,n),s=re.getWindow(t),u=s.document.createRange(),[l,f]=i?o:a,[c,h]=i?a:o,d=Nr(l)?l:l.parentElement,p=!!d.getAttribute("data-slate-zero-width"),g=Nr(c)?c:c.parentElement,v=!!g.getAttribute("data-slate-zero-width");return u.setStart(l,p?1:f),u.setEnd(c,v?1:h),u},toSlateNode:(t,e)=>{var r=Nr(e)?e:e.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Xs.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(t,e,r)=>{var{exactMatch:n,suppressThrow:i,searchDirection:a="backward"}=r,[o,s]=n?e:b5(e),u=o.parentNode,l=null,f=0;if(u){var c,h,d=re.toDOMNode(t,t),p=u.closest('[data-slate-void="true"]'),g=p&&d.contains(p)?p:null,v=u.closest('[contenteditable="false"]'),m=v&&d.contains(v)?v:null,y=u.closest("[data-slate-leaf]"),b=null;if(y){if(l=y.closest('[data-slate-node="text"]'),l){var w=re.getWindow(t),C=w.document.createRange();C.setStart(l,0),C.setEnd(o,s);var _=C.cloneContents(),D=[...Array.prototype.slice.call(_.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(_.querySelectorAll("[contenteditable=false]"))];D.forEach(ee=>{if(er&&!n&&ee.hasAttribute("data-slate-zero-width")&&ee.textContent.length>0&&ee.textContext!=="\uFEFF"){ee.textContent.startsWith("\uFEFF")&&(ee.textContent=ee.textContent.slice(1));return}ee.parentNode.removeChild(ee)}),f=_.textContent.length,b=l}}else if(g){for(var x=g.querySelectorAll("[data-slate-leaf]"),S=0;S<x.length;S++){var O=x[S];if(re.hasDOMNode(t,O)){y=O;break}}y?(l=y.closest('[data-slate-node="text"]'),b=y,f=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(ee=>{f-=ee.textContent.length})):f=1}else if(m){var E=ee=>ee?ee.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],P=m.closest('[data-slate-node="element"]');if(a==="forward"){var F,B=[...E(P),...E(P==null?void 0:P.nextElementSibling)];y=(F=B.find(ee=>S5(m,ee)))!==null&&F!==void 0?F:null}else{var M,I=[...E(P==null?void 0:P.previousElementSibling),...E(P)];y=(M=I.findLast(ee=>vC(m,ee)))!==null&&M!==void 0?M:null}y&&(l=y.closest('[data-slate-node="text"]'),b=y,a==="forward"?f=0:(f=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(ee=>{f-=ee.textContent.length})))}b&&f===b.textContent.length&&er&&b.getAttribute("data-slate-zero-width")==="z"&&(c=b.textContent)!==null&&c!==void 0&&c.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||_o&&(h=b.textContent)!==null&&h!==void 0&&h.endsWith(`
|
|
58
58
|
|
|
59
59
|
`))&&f--}if(er&&!l&&!n){var j=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(j&&re.hasDOMNode(t,j,{editable:!0})){var z=re.toSlateNode(t,j),{path:W,offset:R}=T.start(t,re.findPath(t,z));return j.querySelector("[data-slate-leaf]")||(R=s),{path:W,offset:R}}}if(!l){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var U=re.toSlateNode(t,l),Z=re.findPath(t,U);return{path:Z,offset:f}},toSlateRange:(t,e,r)=>{var n,{exactMatch:i,suppressThrow:a}=r,o=Av(e)?e.anchorNode:e.startContainer,s,u,l,f,c;if(o)if(Av(e)){if(_o&&e.rangeCount>1){l=e.focusNode;var h=e.getRangeAt(0),d=e.getRangeAt(e.rangeCount-1);if(l instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement&&d.startContainer instanceof HTMLTableRowElement){let _=function(D){return D.childElementCount>0?_(D.children[0]):D};var p=h.startContainer,g=d.startContainer,v=_(p.children[h.startOffset]),m=_(g.children[d.startOffset]);f=0,m.childNodes.length>0?s=m.childNodes[0]:s=m,v.childNodes.length>0?l=v.childNodes[0]:l=v,m instanceof HTMLElement?u=m.innerHTML.length:u=0}else h.startContainer===l?(s=d.endContainer,u=d.endOffset,f=h.startOffset):(s=h.startContainer,u=h.endOffset,f=d.startOffset)}else s=e.anchorNode,u=e.anchorOffset,l=e.focusNode,f=e.focusOffset;oC&&C5(s)||_o?c=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:c=e.isCollapsed}else s=e.startContainer,u=e.startOffset,l=e.endContainer,f=e.endOffset,c=e.collapsed;if(s==null||l==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));_o&&(n=l.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
60
60
|
|
|
61
|
-
`)&&f===l.textContent.length&&f--;var y=re.toSlatePoint(t,[s,u],{exactMatch:i,suppressThrow:a});if(!y)return null;var b=vC(s,l)||s===l&&f<u,w=c?y:re.toSlatePoint(t,[l,f],{exactMatch:i,suppressThrow:a,searchDirection:b?"forward":"backward"});if(!w)return null;var C={anchor:y,focus:w};return te.isExpanded(C)&&te.isForward(C)&&Nr(l)&&T.void(t,{at:C.focus,mode:"highest"})&&(C=T.unhangRange(t,C,{voids:!0})),C}};function T5(t,e){var{path:r,diff:n}=e;if(!T.hasPath(t,r))return!1;var i=le.get(t,r);if(!ge.isText(i))return!1;if(n.start!==i.text.length||n.text.length===0)return i.text.slice(n.start,n.start+n.text.length)===n.text;var a=$.next(r);if(!T.hasPath(t,a))return!1;var o=le.get(t,a);return ge.isText(o)&&o.text.startsWith(n.text)}function pC(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.reduce((i,a)=>i.slice(0,a.start)+a.text+i.slice(a.end),t)}function O5(t,e){for(var r=Math.min(t.length,e.length),n=0;n<r;n++)if(t.charAt(n)!==e.charAt(n))return n;return r}function P5(t,e,r){for(var n=Math.min(t.length,e.length,r),i=0;i<n;i++)if(t.charAt(t.length-i-1)!==e.charAt(e.length-i-1))return i;return n}function gC(t,e){var{start:r,end:n,text:i}=e,a=t.slice(r,n),o=O5(a,i),s=Math.min(a.length-o,i.length-o),u=P5(a,i,s),l={start:r+o,end:n-u,text:i.slice(o,i.length-u)};return l.start===l.end&&l.text.length===0?null:l}function B5(t,e,r){var n=Math.min(e.start,r.start),i=Math.max(0,Math.min(e.start+e.text.length,r.end)-r.start),a=pC(t,e,r),o=Math.max(r.start+r.text.length,e.start+e.text.length+(e.start+e.text.length>r.start?r.text.length:0)-i),s=a.slice(n,o),u=Math.max(e.end,r.end-e.text.length+(e.end-e.start));return gC(t,{start:n,end:u,text:s})}function M5(t){var{path:e,diff:r}=t;return{anchor:{path:e,offset:r.start},focus:{path:e,offset:r.end}}}function Ov(t,e){var{path:r,offset:n}=e;if(!T.hasPath(t,r))return null;var i=le.get(t,r);if(!ge.isText(i))return null;var a=T.above(t,{match:s=>pe.isElement(s)&&T.isBlock(t,s),at:r});if(!a)return null;for(;n>i.text.length;){var o=T.next(t,{at:r,match:ge.isText});if(!o||!$.isDescendant(o[1],a[1]))return null;n-=i.text.length,i=o[0],r=o[1]}return{path:r,offset:n}}function mC(t,e){var r=Ov(t,e.anchor);if(!r)return null;if(te.isCollapsed(e))return{anchor:r,focus:r};var n=Ov(t,e.focus);return n?{anchor:r,focus:n}:null}function Pv(t,e,r){var n=hr.get(t),i=n==null?void 0:n.find(f=>{var{path:c}=f;return $.equals(c,e.path)});if(!i||e.offset<=i.diff.start)return ke.transform(e,r,{affinity:"backward"});var{diff:a}=i;if(e.offset<=a.start+a.text.length){var o={path:e.path,offset:a.start},s=ke.transform(o,r,{affinity:"backward"});return s?{path:s.path,offset:s.offset+e.offset-a.start}:null}var u={path:e.path,offset:e.offset-a.text.length+a.end-a.start},l=ke.transform(u,r,{affinity:"backward"});return l?r.type==="split_node"&&$.equals(r.path,e.path)&&u.offset<r.position&&a.start<r.position?l:{path:l.path,offset:l.offset+a.text.length-a.end+a.start}:null}function yC(t,e,r){var n=Pv(t,e.anchor,r);if(!n)return null;if(te.isCollapsed(e))return{anchor:n,focus:n};var i=Pv(t,e.focus,r);return i?{anchor:n,focus:i}:null}function F5(t,e){var{path:r,diff:n,id:i}=t;switch(e.type){case"insert_text":return!$.equals(e.path,r)||e.offset>=n.end?t:e.offset<=n.start?{diff:{start:e.text.length+n.start,end:e.text.length+n.end,text:n.text},id:i,path:r}:{diff:{start:n.start,end:n.end+e.text.length,text:n.text},id:i,path:r};case"remove_text":return!$.equals(e.path,r)||e.offset>=n.end?t:e.offset+e.text.length<=n.start?{diff:{start:n.start-e.text.length,end:n.end-e.text.length,text:n.text},id:i,path:r}:{diff:{start:n.start,end:n.end-e.text.length,text:n.text},id:i,path:r};case"split_node":return!$.equals(e.path,r)||e.position>=n.end?{diff:n,id:i,path:$.transform(r,e,{affinity:"backward"})}:e.position>n.start?{diff:{start:n.start,end:Math.min(e.position,n.end),text:n.text},id:i,path:r}:{diff:{start:n.start-e.position,end:n.end-e.position,text:n.text},id:i,path:$.transform(r,e,{affinity:"forward"})};case"merge_node":return $.equals(e.path,r)?{diff:{start:n.start+e.position,end:n.end+e.position,text:n.text},id:i,path:$.transform(r,e)}:{diff:n,id:i,path:$.transform(r,e)}}var a=$.transform(r,e);return a?{diff:n,path:a,id:i}:null}function bC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function lf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var L5=25,I5=200,R5=function(){},N5=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function k5(t){var{editor:e,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=t,i=!1,a=null,o=null,s=null,u=0,l=!1,f=()=>{var P=Di.get(e);if(Di.delete(e),P){var{selection:F}=e,B=mC(e,P);B&&(!F||!te.equals(B,F))&&
|
|
61
|
+
`)&&f===l.textContent.length&&f--;var y=re.toSlatePoint(t,[s,u],{exactMatch:i,suppressThrow:a});if(!y)return null;var b=vC(s,l)||s===l&&f<u,w=c?y:re.toSlatePoint(t,[l,f],{exactMatch:i,suppressThrow:a,searchDirection:b?"forward":"backward"});if(!w)return null;var C={anchor:y,focus:w};return te.isExpanded(C)&&te.isForward(C)&&Nr(l)&&T.void(t,{at:C.focus,mode:"highest"})&&(C=T.unhangRange(t,C,{voids:!0})),C}};function T5(t,e){var{path:r,diff:n}=e;if(!T.hasPath(t,r))return!1;var i=le.get(t,r);if(!ge.isText(i))return!1;if(n.start!==i.text.length||n.text.length===0)return i.text.slice(n.start,n.start+n.text.length)===n.text;var a=$.next(r);if(!T.hasPath(t,a))return!1;var o=le.get(t,a);return ge.isText(o)&&o.text.startsWith(n.text)}function pC(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.reduce((i,a)=>i.slice(0,a.start)+a.text+i.slice(a.end),t)}function O5(t,e){for(var r=Math.min(t.length,e.length),n=0;n<r;n++)if(t.charAt(n)!==e.charAt(n))return n;return r}function P5(t,e,r){for(var n=Math.min(t.length,e.length,r),i=0;i<n;i++)if(t.charAt(t.length-i-1)!==e.charAt(e.length-i-1))return i;return n}function gC(t,e){var{start:r,end:n,text:i}=e,a=t.slice(r,n),o=O5(a,i),s=Math.min(a.length-o,i.length-o),u=P5(a,i,s),l={start:r+o,end:n-u,text:i.slice(o,i.length-u)};return l.start===l.end&&l.text.length===0?null:l}function B5(t,e,r){var n=Math.min(e.start,r.start),i=Math.max(0,Math.min(e.start+e.text.length,r.end)-r.start),a=pC(t,e,r),o=Math.max(r.start+r.text.length,e.start+e.text.length+(e.start+e.text.length>r.start?r.text.length:0)-i),s=a.slice(n,o),u=Math.max(e.end,r.end-e.text.length+(e.end-e.start));return gC(t,{start:n,end:u,text:s})}function M5(t){var{path:e,diff:r}=t;return{anchor:{path:e,offset:r.start},focus:{path:e,offset:r.end}}}function Ov(t,e){var{path:r,offset:n}=e;if(!T.hasPath(t,r))return null;var i=le.get(t,r);if(!ge.isText(i))return null;var a=T.above(t,{match:s=>pe.isElement(s)&&T.isBlock(t,s),at:r});if(!a)return null;for(;n>i.text.length;){var o=T.next(t,{at:r,match:ge.isText});if(!o||!$.isDescendant(o[1],a[1]))return null;n-=i.text.length,i=o[0],r=o[1]}return{path:r,offset:n}}function mC(t,e){var r=Ov(t,e.anchor);if(!r)return null;if(te.isCollapsed(e))return{anchor:r,focus:r};var n=Ov(t,e.focus);return n?{anchor:r,focus:n}:null}function Pv(t,e,r){var n=hr.get(t),i=n==null?void 0:n.find(f=>{var{path:c}=f;return $.equals(c,e.path)});if(!i||e.offset<=i.diff.start)return ke.transform(e,r,{affinity:"backward"});var{diff:a}=i;if(e.offset<=a.start+a.text.length){var o={path:e.path,offset:a.start},s=ke.transform(o,r,{affinity:"backward"});return s?{path:s.path,offset:s.offset+e.offset-a.start}:null}var u={path:e.path,offset:e.offset-a.text.length+a.end-a.start},l=ke.transform(u,r,{affinity:"backward"});return l?r.type==="split_node"&&$.equals(r.path,e.path)&&u.offset<r.position&&a.start<r.position?l:{path:l.path,offset:l.offset+a.text.length-a.end+a.start}:null}function yC(t,e,r){var n=Pv(t,e.anchor,r);if(!n)return null;if(te.isCollapsed(e))return{anchor:n,focus:n};var i=Pv(t,e.focus,r);return i?{anchor:n,focus:i}:null}function F5(t,e){var{path:r,diff:n,id:i}=t;switch(e.type){case"insert_text":return!$.equals(e.path,r)||e.offset>=n.end?t:e.offset<=n.start?{diff:{start:e.text.length+n.start,end:e.text.length+n.end,text:n.text},id:i,path:r}:{diff:{start:n.start,end:n.end+e.text.length,text:n.text},id:i,path:r};case"remove_text":return!$.equals(e.path,r)||e.offset>=n.end?t:e.offset+e.text.length<=n.start?{diff:{start:n.start-e.text.length,end:n.end-e.text.length,text:n.text},id:i,path:r}:{diff:{start:n.start,end:n.end-e.text.length,text:n.text},id:i,path:r};case"split_node":return!$.equals(e.path,r)||e.position>=n.end?{diff:n,id:i,path:$.transform(r,e,{affinity:"backward"})}:e.position>n.start?{diff:{start:n.start,end:Math.min(e.position,n.end),text:n.text},id:i,path:r}:{diff:{start:n.start-e.position,end:n.end-e.position,text:n.text},id:i,path:$.transform(r,e,{affinity:"forward"})};case"merge_node":return $.equals(e.path,r)?{diff:{start:n.start+e.position,end:n.end+e.position,text:n.text},id:i,path:$.transform(r,e)}:{diff:n,id:i,path:$.transform(r,e)}}var a=$.transform(r,e);return a?{diff:n,path:a,id:i}:null}function bC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function lf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var L5=25,I5=200,R5=function(){},N5=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function k5(t){var{editor:e,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=t,i=!1,a=null,o=null,s=null,u=0,l=!1,f=()=>{var P=Di.get(e);if(Di.delete(e),P){var{selection:F}=e,B=mC(e,P);B&&(!F||!te.equals(B,F))&&ae.select(e,B)}},c=()=>{var P=_i.get(e);if(_i.delete(e),!!P){if(P.at){var F=ke.isPoint(P.at)?Ov(e,P.at):mC(e,P.at);if(!F)return;var B=T.range(e,F);(!e.selection||!te.equals(e.selection,B))&&ae.select(e,F)}P.run()}},h=()=>{if(o&&(clearTimeout(o),o=null),s&&(clearTimeout(s),s=null),!w()&&!b()){f();return}i||(i=!0,setTimeout(()=>i=!1)),b()&&(i="action");var P=e.selection&&T.rangeRef(e,e.selection,{affinity:"forward"});Zn.set(e,e.marks),R5("flush",_i.get(e),hr.get(e));for(var F=w(),B;B=(M=hr.get(e))===null||M===void 0?void 0:M[0];){var M,I,j=nn.get(e);j!==void 0&&(nn.delete(e),e.marks=j),j&&l===!1&&(l=null);var z=M5(B);(!e.selection||!te.equals(e.selection,z))&&ae.select(e,z),B.diff.text?T.insertText(e,B.diff.text):T.deleteFragment(e),hr.set(e,(I=hr.get(e))===null||I===void 0?void 0:I.filter(U=>{var{id:Z}=U;return Z!==B.id})),T5(e,B)||(F=!1,_i.delete(e),Zn.delete(e),i="action",Di.delete(e),r.cancel(),n.cancel(),P==null||P.unref())}var W=P==null?void 0:P.unref();if(W&&!Di.get(e)&&(!e.selection||!te.equals(W,e.selection))&&ae.select(e,W),b()){c();return}F&&r(),r.flush(),n.flush(),f();var R=Zn.get(e);Zn.delete(e),R!==void 0&&(e.marks=R,e.onChange())},d=P=>{a&&clearTimeout(a),a=setTimeout(()=>{va.set(e,!1),h()},L5)},p=P=>{va.set(e,!0),a&&(clearTimeout(a),a=null)},g=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,B=_v.get(e);if(B){if(w()||F){B.style.display="none";return}B.style.removeProperty("display")}},v=(P,F)=>{var B,M=(B=hr.get(e))!==null&&B!==void 0?B:[];hr.set(e,M);var I=le.leaf(e,P),j=M.findIndex(R=>$.equals(R.path,P));if(j<0){var z=gC(I.text,F);z&&M.push({path:P,diff:F,id:u++}),g();return}var W=B5(I.text,M[j].diff,F);if(!W){M.splice(j,1),g();return}M[j]=lf(lf({},M[j]),{},{diff:W})},m=function(F){var{at:B}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l=!1,Di.delete(e),r.cancel(),n.cancel(),b()&&h(),_i.set(e,{at:B,run:F}),s=setTimeout(h)},y=P=>{var F;if(o&&(clearTimeout(o),o=null),!Do.get(e)){var{inputType:B}=P,M=null,I=P.dataTransfer||P.data||void 0;l!==!1&&B!=="insertText"&&B!=="insertCompositionText"&&(l=!1);var[j]=P.getTargetRanges();j&&(M=re.toSlateRange(e,j,{exactMatch:!1,suppressThrow:!0}));var z=re.getWindow(e),W=z.getSelection();if(!M&&W&&(j=W,M=re.toSlateRange(e,W,{exactMatch:!1,suppressThrow:!0})),M=(F=M)!==null&&F!==void 0?F:e.selection,!!M){var R=!0;if(B.startsWith("delete")){if(te.isExpanded(M)){var[U,Z]=te.edges(M),ee=le.leaf(e,U.path);if(ee.text.length===U.offset&&Z.offset===0){var ne=T.next(e,{at:U.path,match:ge.isText});ne&&$.equals(ne[1],Z.path)&&(M={anchor:Z,focus:Z})}}var q=B.endsWith("Backward")?"backward":"forward",[L,X]=te.edges(M),[V,G]=T.leaf(e,L.path),J={text:"",start:L.offset,end:X.offset},K=hr.get(e),Y=K==null?void 0:K.find(Zt=>$.equals(Zt.path,G)),fe=Y?[Y.diff,J]:[J],ue=pC(V.text,...fe);if(ue.length===0&&(R=!1),te.isExpanded(M)){if(R&&$.equals(M.anchor.path,M.focus.path)){var Ce={path:M.anchor.path,offset:L.offset},me=T.range(e,Ce,Ce);return D(me),v(M.anchor.path,{text:"",end:X.offset,start:L.offset})}return m(()=>T.deleteFragment(e,{direction:q}),{at:M})}}switch(B){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return m(()=>T.deleteFragment(e),{at:M});case"deleteContent":case"deleteContentForward":{var{anchor:Fe}=M;if(R&&te.isCollapsed(M)){var ie=le.leaf(e,Fe.path);if(Fe.offset<ie.text.length)return v(Fe.path,{text:"",start:Fe.offset,end:Fe.offset+1})}return m(()=>T.deleteForward(e),{at:M})}case"deleteContentBackward":{var ve,{anchor:Le}=M,ft=Av(j)?j.isCollapsed:!!((ve=j)!==null&&ve!==void 0&&ve.collapsed);return R&&ft&&te.isCollapsed(M)&&Le.offset>0?v(Le.path,{text:"",start:Le.offset-1,end:Le.offset}):m(()=>T.deleteBackward(e),{at:M})}case"deleteEntireSoftLine":return m(()=>{T.deleteBackward(e,{unit:"line"}),T.deleteForward(e,{unit:"line"})},{at:M});case"deleteHardLineBackward":return m(()=>T.deleteBackward(e,{unit:"block"}),{at:M});case"deleteSoftLineBackward":return m(()=>T.deleteBackward(e,{unit:"line"}),{at:M});case"deleteHardLineForward":return m(()=>T.deleteForward(e,{unit:"block"}),{at:M});case"deleteSoftLineForward":return m(()=>T.deleteForward(e,{unit:"line"}),{at:M});case"deleteWordBackward":return m(()=>T.deleteBackward(e,{unit:"word"}),{at:M});case"deleteWordForward":return m(()=>T.deleteForward(e,{unit:"word"}),{at:M});case"insertLineBreak":return m(()=>T.insertSoftBreak(e),{at:M});case"insertParagraph":return m(()=>T.insertBreak(e),{at:M});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(N5(I))return m(()=>re.insertData(e,I),{at:M});var Ie=I??"";if(nn.get(e)&&(Ie=Ie.replace("\uFEFF","")),B==="insertText"&&/.*\n.*\n$/.test(Ie)&&(Ie=Ie.slice(0,-1)),Ie.includes(`
|
|
62
62
|
`))return m(()=>{var Zt=Ie.split(`
|
|
63
63
|
`);Zt.forEach((Ir,$n)=>{Ir&&T.insertText(e,Ir),$n!==Zt.length-1&&T.insertSoftBreak(e)})},{at:M});if($.equals(M.anchor.path,M.focus.path)){var[at,Fr]=te.edges(M),et={start:at.offset,end:Fr.offset,text:Ie};if(Ie&&l&&B==="insertCompositionText"){var ct=l.start+l.text.search(/\S|$/),Lr=et.start+et.text.search(/\S|$/);Lr===ct+1&&et.end===l.start+l.text.length?(et.start-=1,l=null,O()):l=!1}else B==="insertText"?l===null?l=et:l&&te.isCollapsed(M)&&l.end+l.text.length===at.offset?l=lf(lf({},l),{},{text:l.text+Ie}):l=!1:l=!1;if(R){v(at.path,et);return}}return m(()=>T.insertText(e,Ie),{at:M})}}}}},b=()=>!!_i.get(e),w=()=>{var P;return!!((P=hr.get(e))!==null&&P!==void 0&&P.length)},C=()=>b()||w(),_=()=>i,D=P=>{Di.set(e,P),o&&(clearTimeout(o),o=null);var{selection:F}=e;if(P){var B=!F||!$.equals(F.anchor.path,P.anchor.path),M=!F||!$.equals(F.anchor.path.slice(0,-1),P.anchor.path.slice(0,-1));(B&&l||M)&&(l=!1),(B||w())&&(o=setTimeout(h,I5))}},x=()=>{(b()||!w())&&h()},S=P=>{w()||(g(!0),setTimeout(g))},O=()=>{b()||(s=setTimeout(h))},E=P=>{if(!(w()||b())&&P.some(B=>Tv(e,B,P))){var F;(F=uC.get(e))===null||F===void 0||F()}};return{flush:h,scheduleFlush:O,hasPendingDiffs:w,hasPendingAction:b,hasPendingChanges:C,isFlushing:_,handleUserSelect:D,handleCompositionEnd:d,handleCompositionStart:p,handleDOMBeforeInput:y,handleKeyDown:S,handleDomMutations:E,handleInput:x}}function z5(){var t=k.useRef(!1);return k.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var Js=af?k.useLayoutEffect:k.useEffect;function j5(t,e,r){var[n]=k.useState(()=>new MutationObserver(e));Js(()=>{n.takeRecords()}),k.useEffect(()=>{if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(t.current,r),()=>n.disconnect()},[n,t,r])}var V5=["node"];function CC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function H5(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?CC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):CC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var W5={subtree:!0,childList:!0,characterData:!0},$5=er?t=>{var{node:e}=t,r=wo(t,V5);if(!er)return null;var n=bi(),i=z5(),[a]=k.useState(()=>k5(H5({editor:n},r)));return j5(e,a.handleDomMutations,W5),Sv.set(n,a.scheduleFlush),i&&a.flush(),a}:()=>null,G5=["anchor","focus"],U5=["anchor","focus"],q5=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>e.hasOwnProperty(r)&&t[r]===e[r]),wC=(t,e)=>{var r=wo(t,G5),n=wo(e,U5);return t[xo]===e[xo]&&q5(r,n)},Y5=(t,e)=>{if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++){var n=t[r],i=e[r];if(!te.equals(n,i)||!wC(n,i))return!1}return!0},X5=(t,e)=>{if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++){var n=t[r],i=e[r];if(n.anchor.offset!==i.anchor.offset||n.focus.offset!==i.focus.offset||!wC(n,i))return!1}return!0};function _C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function K5(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_C(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_C(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Z5=t=>{var{isLast:e,leaf:r,parent:n,text:i}=t,a=bi(),o=re.findPath(a,i),s=$.parent(o),u=!!r[lC];return a.isVoid(n)?k.createElement(Bv,{length:le.string(n).length}):r.text===""&&n.children[n.children.length-1]===i&&!a.isInline(n)&&T.string(a,s)===""?k.createElement(Bv,{isLineBreak:!0,isMarkPlaceholder:u}):r.text===""?k.createElement(Bv,{isMarkPlaceholder:u}):e&&r.text.slice(-1)===`
|
|
64
64
|
`?k.createElement(DC,{isTrailing:!0,text:r.text}):k.createElement(DC,{text:r.text})},DC=t=>{var{text:e,isTrailing:r=!1}=t,n=k.useRef(null),i=()=>"".concat(e??"").concat(r?`
|
|
65
|
-
`:""),[a]=k.useState(i);return Js(()=>{var o=i();n.current&&n.current.textContent!==o&&(n.current.textContent=o)}),k.createElement(J5,{ref:n},a)},J5=k.memo(k.forwardRef((t,e)=>k.createElement("span",{"data-slate-string":!0,ref:e},t.children))),Bv=t=>{var{length:e=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=t,i={"data-slate-zero-width":r?"n":"z","data-slate-length":e};return n&&(i["data-slate-mark-placeholder"]=!0),k.createElement("span",K5({},i),!(er||iC)||!r?"\uFEFF":null,r?k.createElement("br",null):null)};function xC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function SC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Q5=er?300:0;function eR(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function EC(t){t.current&&(clearTimeout(t.current),t.current=null)}var tR=t=>{var{leaf:e,isLast:r,text:n,parent:i,renderPlaceholder:a,renderLeaf:o=y=>k.createElement(nR,SC({},y))}=t,s=bi(),u=k.useRef(null),l=k.useRef(null),[f,c]=k.useState(!1),h=k.useRef(null),d=k.useCallback(y=>{if(eR(u,y==null),y==null){var b;_v.delete(s),(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,null)}else{if(_v.set(s,y),!u.current){var w=window.ResizeObserver||n5;u.current=new w(()=>{var C;(C=e.onPlaceholderResize)===null||C===void 0||C.call(e,y)})}u.current.observe(y),l.current=y}},[l,e,s]),p=k.createElement(Z5,{isLast:r,leaf:e,parent:i,text:n}),g=!!e[xo];if(k.useEffect(()=>(g?h.current||(h.current=setTimeout(()=>{c(!0),h.current=null},Q5)):(EC(h),c(!1)),()=>EC(h)),[g,c]),g&&f){var v={children:e.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:ha?"inherit":void 0},contentEditable:!1,ref:d}};p=k.createElement(k.Fragment,null,a(v),p)}var m={"data-slate-leaf":!0};return o({attributes:m,children:p,leaf:e,text:n})},rR=k.memo(tR,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ge.equals(e.leaf,t.leaf)&&e.leaf[xo]===t.leaf[xo]),nR=t=>{var{attributes:e,children:r}=t;return k.createElement("span",SC({},e),r)},iR=t=>{for(var{decorations:e,isLast:r,parent:n,renderPlaceholder:i,renderLeaf:a,text:o}=t,s=bi(),u=k.useRef(null),l=ge.decorations(o,e),f=re.findKey(s,o),c=[],h=0;h<l.length;h++){var d=l[h];c.push(k.createElement(rR,{isLast:r&&h===l.length-1,key:"".concat(f.id,"-").concat(h),renderPlaceholder:i,leaf:d,text:o,parent:n,renderLeaf:a}))}var p=k.useCallback(g=>{var v=uf.get(s);g?(v==null||v.set(f,g),da.set(o,g),Xs.set(g,o)):(v==null||v.delete(f),da.delete(o),u.current&&Xs.delete(u.current)),u.current=g},[u,s,f,o]);return k.createElement("span",{"data-slate-node":"text",ref:p},c)},AC=k.memo(iR,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&X5(e.decorations,t.decorations));function TC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?TC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):TC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var aR=t=>{var{decorations:e,element:r,renderElement:n=y=>k.createElement(sR,Mv({},y)),renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=bi(),u=fR(),l=s.isInline(r),f=re.findKey(s,r),c=k.useCallback(y=>{var b=uf.get(s);y?(b==null||b.set(f,y),da.set(r,y),Xs.set(y,r)):(b==null||b.delete(f),da.delete(r))},[s,f,r]),h=PC({decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:a,selection:o}),d={"data-slate-node":"element",ref:c};if(l&&(d["data-slate-inline"]=!0),!l&&T.hasInlines(s,r)){var p=le.string(r),g=O1(p);g==="rtl"&&(d.dir=g)}if(T.isVoid(s,r)){d["data-slate-void"]=!0,!u&&l&&(d.contentEditable=!1);var v=l?"span":"div",[[m]]=le.texts(r);h=k.createElement(v,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},k.createElement(AC,{renderPlaceholder:i,decorations:[],isLast:!1,parent:r,text:m})),Cv.set(m,0),wv.set(m,r)}return n({attributes:d,children:h,element:r})},oR=k.memo(aR,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&Y5(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&te.equals(t.selection,e.selection))),sR=t=>{var{attributes:e,children:r,element:n}=t,i=bi(),a=i.isInline(n)?"span":"div";return k.createElement(a,Mv(Mv({},e),{},{style:{position:"relative"}}),r)},OC=k.createContext(()=>[]),uR=()=>k.useContext(OC),lR=k.createContext(!1),PC=t=>{var{decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=uR(),u=bi();Do.set(u,!1);for(var l=re.findPath(u,r),f=[],c=pe.isElement(r)&&!u.isInline(r)&&T.hasInlines(u,r),h=0;h<r.children.length;h++){var d=l.concat(h),p=r.children[h],g=re.findKey(u,p),v=T.range(u,d),m=o&&te.intersection(v,o),y=s([p,d]);for(var b of e){var w=te.intersection(b,v);w&&y.push(w)}pe.isElement(p)?f.push(k.createElement(lR.Provider,{key:"provider-".concat(g.id),value:!!m},k.createElement(oR,{decorations:y,element:p,key:g.id,renderElement:n,renderPlaceholder:i,renderLeaf:a,selection:m}))):f.push(k.createElement(AC,{decorations:y,key:g.id,isLast:c&&h===r.children.length-1,parent:r,renderPlaceholder:i,renderLeaf:a,text:p})),Cv.set(p,h),wv.set(p,r)}return f},BC=k.createContext(!1),fR=()=>k.useContext(BC),MC=k.createContext(null),ff=()=>{var t=k.useContext(MC);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function cR(){var t=bi(),e=k.useRef(!1),r=k.useRef(0),n=k.useCallback(()=>{if(!e.current){e.current=!0;var i=re.getWindow(t);i.cancelAnimationFrame(r.current),r.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return k.useEffect(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:e,onUserInput:n}}var hR=3,dR={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"},vR={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"},pR={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},pt=t=>{var e=dR[t],r=vR[t],n=pR[t],i=e&&gv(e),a=r&&gv(r),o=n&&gv(n);return s=>!!(i&&i(s)||aC&&a&&a(s)||!aC&&o&&o(s))},mt={isBold:pt("bold"),isCompose:pt("compose"),isMoveBackward:pt("moveBackward"),isMoveForward:pt("moveForward"),isDeleteBackward:pt("deleteBackward"),isDeleteForward:pt("deleteForward"),isDeleteLineBackward:pt("deleteLineBackward"),isDeleteLineForward:pt("deleteLineForward"),isDeleteWordBackward:pt("deleteWordBackward"),isDeleteWordForward:pt("deleteWordForward"),isExtendBackward:pt("extendBackward"),isExtendForward:pt("extendForward"),isExtendLineBackward:pt("extendLineBackward"),isExtendLineForward:pt("extendLineForward"),isItalic:pt("italic"),isMoveLineBackward:pt("moveLineBackward"),isMoveLineForward:pt("moveLineForward"),isMoveWordBackward:pt("moveWordBackward"),isMoveWordForward:pt("moveWordForward"),isRedo:pt("redo"),isSoftBreak:pt("insertSoftBreak"),isSplitBlock:pt("splitBlock"),isTransposeCharacter:pt("transposeCharacter"),isUndo:pt("undo")},gR=(t,e)=>{var r=[],n=()=>{r=[]},i=o=>{if(e.current){var s=o.filter(u=>Tv(t,u,o));r.push(...s)}};function a(){r.length>0&&(r.reverse().forEach(o=>{o.type!=="characterData"&&(o.removedNodes.forEach(s=>{o.target.insertBefore(s,o.nextSibling)}),o.addedNodes.forEach(s=>{o.target.removeChild(s)}))}),n())}return{registerMutations:i,restoreDOM:a,clear:n}},mR={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class FC extends k.Component{constructor(){super(...arguments),Rr(this,"context",null),Rr(this,"manager",null),Rr(this,"mutationObserver",null)}observe(){var e,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(r.current,mR)}componentDidMount(){var{receivedUserInput:e}=this.props,r=this.context;this.manager=gR(r,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,r,n,i=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(i!=null&&i.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(i)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)===null||e===void 0||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)===null||e===void 0||e.disconnect()}render(){return this.props.children}}Rr(FC,"contextType",mv);var yR=er?FC:t=>{var{children:e}=t;return k.createElement(k.Fragment,null,e)},bR=k.createContext(!1),CR=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],wR=["text"];function LC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Cn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?LC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var _R=t=>k.createElement(k.Fragment,null,PC(t)),DR=k.forwardRef((t,e)=>{var r=k.useCallback(L=>k.createElement(xR,Cn({},L)),[]),{autoFocus:n,decorate:i=SR,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=r,scrollSelectionIntoView:c=ER,style:h={},as:d="div",disableDefaultStyles:p=!1}=t,g=wo(t,CR),v=ff(),[m,y]=k.useState(!1),b=k.useRef(null),w=k.useRef([]),[C,_]=k.useState(),D=k.useRef(!1),{onUserInput:x,receivedUserInput:S}=cR(),[,O]=k.useReducer(L=>L+1,0);uC.set(v,O),Dv.set(v,s);var E=k.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);k.useEffect(()=>{b.current&&n&&b.current.focus()},[n]);var P=k.useRef(),F=k.useMemo(()=>tF(()=>{if(Do.get(v)){F();return}var L=re.toDOMNode(v,v),X=L.getRootNode();if(!D.current&&ha&&X instanceof ShadowRoot){D.current=!0;var V=x5();V?document.execCommand("indent"):ie.deselect(v),D.current=!1;return}var G=P.current;if((er||!re.isComposing(v))&&(!E.isUpdatingSelection||G!=null&&G.isFlushing())&&!E.isDraggingInternally){var J=re.findDocumentOrShadowRoot(v),{activeElement:K}=J,Y=re.toDOMNode(v,v),fe=Zs(J);if(K===Y?(E.latestElement=K,wi.set(v,!0)):wi.delete(v),!fe)return ie.deselect(v);var{anchorNode:ue,focusNode:Ce}=fe,me=re.hasEditableTarget(v,ue)||re.isTargetInsideNonReadonlyVoid(v,ue),Fe=re.hasTarget(v,Ce);if(me&&Fe){var ae=re.toSlateRange(v,fe,{exactMatch:!1,suppressThrow:!0});ae&&(!re.isComposing(v)&&!(G!=null&&G.hasPendingChanges())&&!(G!=null&&G.isFlushing())?ie.select(v,ae):G==null||G.handleUserSelect(ae))}s&&(!me||!Fe)&&ie.deselect(v)}},100),[v,s,E]),B=k.useMemo(()=>X3(F,0),[F]);P.current=$5({node:b,onDOMSelectionChange:F,scheduleOnDOMSelectionChange:B}),Js(()=>{var L,X,V;b.current&&(V=Ev(b.current))?(sC.set(v,V),of.set(v,b.current),da.set(v,b.current),Xs.set(b.current,v)):da.delete(v);var{selection:G}=v,J=re.findDocumentOrShadowRoot(v),K=Zs(J);if(!(!K||!re.isFocused(v)||(L=P.current)!==null&&L!==void 0&&L.hasPendingAction())){var Y=me=>{var Fe=K.type!=="None";if(!(!G&&!Fe)){var ae=K.focusNode,ve;if(_o&&K.rangeCount>1){var Le=K.getRangeAt(0),ft=K.getRangeAt(K.rangeCount-1);Le.startContainer===ae?ve=ft.endContainer:ve=Le.startContainer}else ve=K.anchorNode;var Ie=of.get(v),at=!1;if(Ie.contains(ve)&&Ie.contains(ae)&&(at=!0),Fe&&at&&G&&!me){var Fr=re.toSlateRange(v,K,{exactMatch:!0,suppressThrow:!0});if(Fr&&te.equals(Fr,G)){var et;if(!E.hasMarkPlaceholder||(et=ve)!==null&&et!==void 0&&(et=et.parentElement)!==null&&et!==void 0&&et.hasAttribute("data-slate-mark-placeholder"))return}}if(G&&!re.hasRange(v,G)){v.selection=re.toSlateRange(v,K,{exactMatch:!1,suppressThrow:!0});return}E.isUpdatingSelection=!0;var ct=G&&re.toDOMRange(v,G);return ct?(re.isComposing(v)&&!er?K.collapseToEnd():te.isBackward(G)?K.setBaseAndExtent(ct.endContainer,ct.endOffset,ct.startContainer,ct.startOffset):K.setBaseAndExtent(ct.startContainer,ct.startOffset,ct.endContainer,ct.endOffset),c(v,ct)):K.removeAllRanges(),ct}};K.rangeCount<=1&&Y();var fe=((X=P.current)===null||X===void 0?void 0:X.isFlushing())==="action";if(!er||!fe){setTimeout(()=>{E.isUpdatingSelection=!1});return}var ue=null,Ce=requestAnimationFrame(()=>{if(fe){var me=Fe=>{try{var ae=re.toDOMNode(v,v);ae.focus(),Y(Fe)}catch{}};me(),ue=setTimeout(()=>{me(!0),E.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Ce),ue&&clearTimeout(ue)}}});var M=k.useCallback(L=>{var X=re.toDOMNode(v,v),V=X.getRootNode();if(D!=null&&D.current&&ha&&V instanceof ShadowRoot){var G=L.getTargetRanges(),J=G[0],K=new window.Range;K.setStart(J.startContainer,J.startOffset),K.setEnd(J.endContainer,J.endOffset);var Y=re.toSlateRange(v,K,{exactMatch:!1,suppressThrow:!1});ie.select(v,Y),L.preventDefault(),L.stopImmediatePropagation();return}if(x(),!s&&re.hasEditableTarget(v,L.target)&&!AR(L,a)){var fe;if(P.current)return P.current.handleDOMBeforeInput(L);B.flush(),F.flush();var{selection:ue}=v,{inputType:Ce}=L,me=L.dataTransfer||L.data||void 0,Fe=Ce==="insertCompositionText"||Ce==="deleteCompositionText";if(Fe&&re.isComposing(v))return;var ae=!1;if(Ce==="insertText"&&ue&&te.isCollapsed(ue)&&L.data&&L.data.length===1&&/[a-z ]/i.test(L.data)&&ue.anchor.offset!==0&&(ae=!0,v.marks&&(ae=!1),!Do.get(v))){var ve,Le,{anchor:ft}=ue,[Ie,at]=re.toDOMPoint(v,ft),Fr=(ve=Ie.parentElement)===null||ve===void 0?void 0:ve.closest("a"),et=re.getWindow(v);if(ae&&Fr&&re.hasDOMNode(v,Fr)){var ct,Lr=et==null?void 0:et.document.createTreeWalker(Fr,NodeFilter.SHOW_TEXT).lastChild();Lr===Ie&&((ct=Lr.textContent)===null||ct===void 0?void 0:ct.length)===at&&(ae=!1)}if(ae&&Ie.parentElement&&(et==null||(Le=et.getComputedStyle(Ie.parentElement))===null||Le===void 0?void 0:Le.whiteSpace)==="pre"){var Zt=T.above(v,{at:ft.path,match:Zi=>pe.isElement(Zi)&&T.isBlock(v,Zi)});Zt&&le.string(Zt[0]).includes(" ")&&(ae=!1)}}if((!Ce.startsWith("delete")||Ce.startsWith("deleteBy"))&&!Do.get(v)){var[Ir]=L.getTargetRanges();if(Ir){var $n=re.toSlateRange(v,Ir,{exactMatch:!1,suppressThrow:!1});if(!ue||!te.equals(ue,$n)){ae=!1;var wr=!Fe&&v.selection&&T.rangeRef(v,v.selection);ie.select(v,$n),wr&&Ks.set(v,wr)}}}if(Fe)return;if(ae||L.preventDefault(),ue&&te.isExpanded(ue)&&Ce.startsWith("delete")){var gl=Ce.endsWith("Backward")?"backward":"forward";T.deleteFragment(v,{direction:gl});return}switch(Ce){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{T.deleteFragment(v);break}case"deleteContent":case"deleteContentForward":{T.deleteForward(v);break}case"deleteContentBackward":{T.deleteBackward(v);break}case"deleteEntireSoftLine":{T.deleteBackward(v,{unit:"line"}),T.deleteForward(v,{unit:"line"});break}case"deleteHardLineBackward":{T.deleteBackward(v,{unit:"block"});break}case"deleteSoftLineBackward":{T.deleteBackward(v,{unit:"line"});break}case"deleteHardLineForward":{T.deleteForward(v,{unit:"block"});break}case"deleteSoftLineForward":{T.deleteForward(v,{unit:"line"});break}case"deleteWordBackward":{T.deleteBackward(v,{unit:"word"});break}case"deleteWordForward":{T.deleteForward(v,{unit:"word"});break}case"insertLineBreak":T.insertSoftBreak(v);break;case"insertParagraph":{T.insertBreak(v);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Ce==="insertFromComposition"&&re.isComposing(v)&&(y(!1),va.set(v,!1)),(me==null?void 0:me.constructor.name)==="DataTransfer"?re.insertData(v,me):typeof me=="string"&&(ae?w.current.push(()=>T.insertText(v,me)):T.insertText(v,me));break}}var so=(fe=Ks.get(v))===null||fe===void 0?void 0:fe.unref();Ks.delete(v),so&&(!v.selection||!te.equals(v.selection,so))&&ie.select(v,so)}},[v,F,x,a,s,B]),I=k.useCallback(L=>{L==null?(F.cancel(),B.cancel(),of.delete(v),da.delete(v),b.current&&Ci&&b.current.removeEventListener("beforeinput",M)):Ci&&L.addEventListener("beforeinput",M),b.current=L,typeof e=="function"?e(L):e&&(e.current=L)},[F,B,v,M,e]);Js(()=>{var L=re.getWindow(v);L.document.addEventListener("selectionchange",B);var X=()=>{E.isDraggingInternally=!1};return L.document.addEventListener("dragend",X),L.document.addEventListener("drop",X),()=>{L.document.removeEventListener("selectionchange",B),L.document.removeEventListener("dragend",X),L.document.removeEventListener("drop",X)}},[B,E]);var j=i([v,[]]),z=o&&v.children.length===1&&Array.from(le.texts(v)).length===1&&le.string(v)===""&&!m,W=k.useCallback(L=>{if(L&&z){var X;_((X=L.getBoundingClientRect())===null||X===void 0?void 0:X.height)}else _(void 0)},[z]);if(z){var R=T.start(v,[]);j.push({[xo]:!0,placeholder:o,onPlaceholderResize:W,anchor:R,focus:R})}var{marks:U}=v;if(E.hasMarkPlaceholder=!1,v.selection&&te.isCollapsed(v.selection)&&U){var{anchor:Z}=v.selection,ee=le.leaf(v,Z.path),ne=wo(ee,wR);if(!ge.equals(ee,U,{loose:!0})){E.hasMarkPlaceholder=!0;var q=Object.fromEntries(Object.keys(ne).map(L=>[L,null]));j.push(Cn(Cn(Cn({[lC]:!0},q),U),{},{anchor:Z,focus:Z}))}}return k.useEffect(()=>{setTimeout(()=>{var{selection:L}=v;if(L){var{anchor:X}=L,V=le.leaf(v,X.path);if(U&&!ge.equals(V,U,{loose:!0})){nn.set(v,U);return}}nn.delete(v)})}),k.createElement(BC.Provider,{value:s},k.createElement(bR.Provider,{value:m},k.createElement(OC.Provider,{value:i},k.createElement(yR,{node:b,receivedUserInput:S},k.createElement(d,Cn(Cn({role:s?void 0:"textbox","aria-multiline":s?void 0:!0},g),{},{spellCheck:Ci||!af?g.spellCheck:!1,autoCorrect:Ci||!af?g.autoCorrect:"false",autoCapitalize:Ci||!af?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:I,style:Cn(Cn({},p?{}:Cn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},C?{minHeight:C}:{})),h),onBeforeInput:k.useCallback(L=>{if(!Ci&&!s&&!tr(L,g.onBeforeInput)&&re.hasSelectableTarget(v,L.target)&&(L.preventDefault(),!re.isComposing(v))){var X=L.data;T.insertText(v,X)}},[g.onBeforeInput,v,s]),onInput:k.useCallback(L=>{if(!tr(L,g.onInput)){if(P.current){P.current.handleInput();return}for(var X of w.current)X();if(w.current=[],!re.isFocused(v)){var V=L.nativeEvent,G=v;if(V.inputType==="historyUndo"&&typeof G.undo=="function"){G.undo();return}if(V.inputType==="historyRedo"&&typeof G.redo=="function"){G.redo();return}}}},[g.onInput,v]),onBlur:k.useCallback(L=>{if(!(s||E.isUpdatingSelection||!re.hasSelectableTarget(v,L.target)||tr(L,g.onBlur))){var X=re.findDocumentOrShadowRoot(v);if(E.latestElement!==X.activeElement){var{relatedTarget:V}=L,G=re.toDOMNode(v,v);if(V!==G&&!(Nr(V)&&V.hasAttribute("data-slate-spacer"))){if(V!=null&&xi(V)&&re.hasDOMNode(v,V)){var J=re.toSlateNode(v,V);if(pe.isElement(J)&&!v.isVoid(J))return}if(ha){var K=Zs(X);K==null||K.removeAllRanges()}wi.delete(v)}}}},[s,E.isUpdatingSelection,E.latestElement,v,g.onBlur]),onClick:k.useCallback(L=>{if(re.hasTarget(v,L.target)&&!tr(L,g.onClick)&&xi(L.target)){var X=re.toSlateNode(v,L.target),V=re.findPath(v,X);if(!T.hasPath(v,V)||le.get(v,V)!==X)return;if(L.detail===hR&&V.length>=1){var G=V;if(!(pe.isElement(X)&&T.isBlock(v,X))){var J,K=T.above(v,{match:ae=>pe.isElement(ae)&&T.isBlock(v,ae),at:V});G=(J=K==null?void 0:K[1])!==null&&J!==void 0?J:V.slice(0,1)}var Y=T.range(v,G);ie.select(v,Y);return}if(s)return;var fe=T.start(v,V),ue=T.end(v,V),Ce=T.void(v,{at:fe}),me=T.void(v,{at:ue});if(Ce&&me&&$.equals(Ce[1],me[1])){var Fe=T.range(v,fe);ie.select(v,Fe)}}},[v,g.onClick,s]),onCompositionEnd:k.useCallback(L=>{if(re.hasSelectableTarget(v,L.target)){var X;if(re.isComposing(v)&&Promise.resolve().then(()=>{y(!1),va.set(v,!1)}),(X=P.current)===null||X===void 0||X.handleCompositionEnd(L),tr(L,g.onCompositionEnd)||er)return;if(!ha&&!d5&&!iC&&!p5&&!v5&&L.data){var V=nn.get(v);nn.delete(v),V!==void 0&&(Zn.set(v,v.marks),v.marks=V),T.insertText(v,L.data);var G=Zn.get(v);Zn.delete(v),G!==void 0&&(v.marks=G)}}},[g.onCompositionEnd,v]),onCompositionUpdate:k.useCallback(L=>{re.hasSelectableTarget(v,L.target)&&!tr(L,g.onCompositionUpdate)&&(re.isComposing(v)||(y(!0),va.set(v,!0)))},[g.onCompositionUpdate,v]),onCompositionStart:k.useCallback(L=>{if(re.hasSelectableTarget(v,L.target)){var X;if((X=P.current)===null||X===void 0||X.handleCompositionStart(L),tr(L,g.onCompositionStart)||er)return;y(!0);var{selection:V}=v;if(V&&te.isExpanded(V)){T.deleteFragment(v);return}}},[g.onCompositionStart,v]),onCopy:k.useCallback(L=>{re.hasSelectableTarget(v,L.target)&&!tr(L,g.onCopy)&&!IC(L)&&(L.preventDefault(),re.setFragmentData(v,L.clipboardData,"copy"))},[g.onCopy,v]),onCut:k.useCallback(L=>{if(!s&&re.hasSelectableTarget(v,L.target)&&!tr(L,g.onCut)&&!IC(L)){L.preventDefault(),re.setFragmentData(v,L.clipboardData,"cut");var{selection:X}=v;if(X)if(te.isExpanded(X))T.deleteFragment(v);else{var V=le.parent(v,X.anchor.path);T.isVoid(v,V)&&ie.delete(v)}}},[s,v,g.onCut]),onDragOver:k.useCallback(L=>{if(re.hasTarget(v,L.target)&&!tr(L,g.onDragOver)){var X=re.toSlateNode(v,L.target);pe.isElement(X)&&T.isVoid(v,X)&&L.preventDefault()}},[g.onDragOver,v]),onDragStart:k.useCallback(L=>{if(!s&&re.hasTarget(v,L.target)&&!tr(L,g.onDragStart)){var X=re.toSlateNode(v,L.target),V=re.findPath(v,X),G=pe.isElement(X)&&T.isVoid(v,X)||T.void(v,{at:V,voids:!0});if(G){var J=T.range(v,V);ie.select(v,J)}E.isDraggingInternally=!0,re.setFragmentData(v,L.dataTransfer,"drag")}},[s,v,g.onDragStart,E]),onDrop:k.useCallback(L=>{if(!s&&re.hasTarget(v,L.target)&&!tr(L,g.onDrop)){L.preventDefault();var X=v.selection,V=re.findEventRange(v,L),G=L.dataTransfer;ie.select(v,V),E.isDraggingInternally&&X&&!te.equals(X,V)&&!T.void(v,{at:V,voids:!0})&&ie.delete(v,{at:X}),re.insertData(v,G),re.isFocused(v)||re.focus(v)}},[s,v,g.onDrop,E]),onDragEnd:k.useCallback(L=>{!s&&E.isDraggingInternally&&g.onDragEnd&&re.hasTarget(v,L.target)&&g.onDragEnd(L)},[s,E,g,v]),onFocus:k.useCallback(L=>{if(!s&&!E.isUpdatingSelection&&re.hasEditableTarget(v,L.target)&&!tr(L,g.onFocus)){var X=re.toDOMNode(v,v),V=re.findDocumentOrShadowRoot(v);if(E.latestElement=V.activeElement,_o&&L.target!==X){X.focus();return}wi.set(v,!0)}},[s,E,v,g.onFocus]),onKeyDown:k.useCallback(L=>{if(!s&&re.hasEditableTarget(v,L.target)){var X;(X=P.current)===null||X===void 0||X.handleKeyDown(L);var{nativeEvent:V}=L;if(re.isComposing(v)&&V.isComposing===!1&&(va.set(v,!1),y(!1)),tr(L,g.onKeyDown)||re.isComposing(v))return;var{selection:G}=v,J=v.children[G!==null?G.focus.path[0]:0],K=O1(le.string(J))==="rtl";if(mt.isRedo(V)){L.preventDefault();var Y=v;typeof Y.redo=="function"&&Y.redo();return}if(mt.isUndo(V)){L.preventDefault();var fe=v;typeof fe.undo=="function"&&fe.undo();return}if(mt.isMoveLineBackward(V)){L.preventDefault(),ie.move(v,{unit:"line",reverse:!0});return}if(mt.isMoveLineForward(V)){L.preventDefault(),ie.move(v,{unit:"line"});return}if(mt.isExtendLineBackward(V)){L.preventDefault(),ie.move(v,{unit:"line",edge:"focus",reverse:!0});return}if(mt.isExtendLineForward(V)){L.preventDefault(),ie.move(v,{unit:"line",edge:"focus"});return}if(mt.isMoveBackward(V)){L.preventDefault(),G&&te.isCollapsed(G)?ie.move(v,{reverse:!K}):ie.collapse(v,{edge:K?"end":"start"});return}if(mt.isMoveForward(V)){L.preventDefault(),G&&te.isCollapsed(G)?ie.move(v,{reverse:K}):ie.collapse(v,{edge:K?"start":"end"});return}if(mt.isMoveWordBackward(V)){L.preventDefault(),G&&te.isExpanded(G)&&ie.collapse(v,{edge:"focus"}),ie.move(v,{unit:"word",reverse:!K});return}if(mt.isMoveWordForward(V)){L.preventDefault(),G&&te.isExpanded(G)&&ie.collapse(v,{edge:"focus"}),ie.move(v,{unit:"word",reverse:K});return}if(Ci){if((oC||ha)&&G&&(mt.isDeleteBackward(V)||mt.isDeleteForward(V))&&te.isCollapsed(G)){var ue=le.parent(v,G.anchor.path);if(pe.isElement(ue)&&T.isVoid(v,ue)&&(T.isInline(v,ue)||T.isBlock(v,ue))){L.preventDefault(),T.deleteBackward(v,{unit:"block"});return}}}else{if(mt.isBold(V)||mt.isItalic(V)||mt.isTransposeCharacter(V)){L.preventDefault();return}if(mt.isSoftBreak(V)){L.preventDefault(),T.insertSoftBreak(v);return}if(mt.isSplitBlock(V)){L.preventDefault(),T.insertBreak(v);return}if(mt.isDeleteBackward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"backward"}):T.deleteBackward(v);return}if(mt.isDeleteForward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"forward"}):T.deleteForward(v);return}if(mt.isDeleteLineBackward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"backward"}):T.deleteBackward(v,{unit:"line"});return}if(mt.isDeleteLineForward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"forward"}):T.deleteForward(v,{unit:"line"});return}if(mt.isDeleteWordBackward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"backward"}):T.deleteBackward(v,{unit:"word"});return}if(mt.isDeleteWordForward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"forward"}):T.deleteForward(v,{unit:"word"});return}}}},[s,v,g.onKeyDown]),onPaste:k.useCallback(L=>{!s&&re.hasEditableTarget(v,L.target)&&!tr(L,g.onPaste)&&(!Ci||y5(L.nativeEvent)||ha)&&(L.preventDefault(),re.insertData(v,L.clipboardData))},[s,v,g.onPaste])}),k.createElement(_R,{decorations:j,node:v,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:v.selection}))))))}),xR=t=>{var{attributes:e,children:r}=t;return k.createElement("span",Cn({},e),r,er&&k.createElement("br",null))},SR=()=>[],ER=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&te.isCollapsed(t.selection))){var r=e.startContainer.parentElement;r.getBoundingClientRect=e.getBoundingClientRect.bind(e),iF(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},tr=(t,e)=>{if(!e)return!1;var r=e(t);return r??(t.isDefaultPrevented()||t.isPropagationStopped())},IC=t=>xi(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),AR=(t,e)=>{if(!e)return!1;var r=e(t);return r??t.defaultPrevented},RC=k.createContext(!1),TR=()=>k.useContext(RC),OR=k.createContext({});function PR(t){var e=k.useRef([]).current,r=k.useRef({editor:t}).current,n=k.useCallback(a=>{r.editor=a,e.forEach(o=>o(a))},[e,r]),i=k.useMemo(()=>({getSlate:()=>r.editor,addEventListener:a=>(e.push(a),()=>{e.splice(e.indexOf(a),1)})}),[e,r]);return{selectorContext:i,onChange:n}}var BR=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],MR=t=>{var{editor:e,children:r,onChange:n,onSelectionChange:i,onValueChange:a,initialValue:o}=t,s=wo(t,BR),[u,l]=k.useState(()=>{if(!le.isNodeList(o))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Lt.stringify(o)));if(!T.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(Lt.stringify(e)));return e.children=o,Object.assign(e,s),{v:0,editor:e}}),{selectorContext:f,onChange:c}=PR(e),h=k.useCallback(g=>{var v;switch(n&&n(e.children),g==null||(v=g.operation)===null||v===void 0?void 0:v.type){case"set_selection":i==null||i(e.selection);break;default:a==null||a(e.children)}l(m=>({v:m.v+1,editor:e})),c(e)},[e,c,n,i,a]);k.useEffect(()=>(xv.set(e,h),()=>{xv.set(e,()=>{})}),[e,h]);var[d,p]=k.useState(re.isFocused(e));return k.useEffect(()=>{p(re.isFocused(e))},[e]),Js(()=>{var g=()=>p(re.isFocused(e));return nC>=17?(document.addEventListener("focusin",g),document.addEventListener("focusout",g),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",g)}):(document.addEventListener("focus",g,!0),document.addEventListener("blur",g,!0),()=>{document.removeEventListener("focus",g,!0),document.removeEventListener("blur",g,!0)})},[]),k.createElement(OR.Provider,{value:f},k.createElement(MC.Provider,{value:u},k.createElement(mv.Provider,{value:u.editor},k.createElement(RC.Provider,{value:d},r))))},NC=(t,e)=>{var r=(e.top+e.bottom)/2;return t.top<=r&&t.bottom>=r},kC=(t,e,r)=>{var n=re.toDOMRange(t,e).getBoundingClientRect(),i=re.toDOMRange(t,r).getBoundingClientRect();return NC(n,i)&&NC(i,n)},FR=(t,e)=>{var r=T.range(t,te.end(e)),n=Array.from(T.positions(t,{at:e})),i=0,a=n.length,o=Math.floor(a/2);if(kC(t,T.range(t,n[i]),r))return T.range(t,n[i],r);if(n.length<2)return T.range(t,n[n.length-1],r);for(;o!==n.length&&o!==i;)kC(t,T.range(t,n[o]),r)?a=o:i=o,o=Math.floor((i+a)/2);return T.range(t,n[a],r)};function zC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var LR=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",n=e,{apply:i,onChange:a,deleteBackward:o,addMark:s,removeMark:u}=n;return uf.set(n,new WeakMap),n.addMark=(l,f)=>{var c,h;(c=Sv.get(n))===null||c===void 0||c(),!nn.get(n)&&(h=hr.get(n))!==null&&h!==void 0&&h.length&&nn.set(n,null),Zn.delete(n),s(l,f)},n.removeMark=l=>{var f;!nn.get(n)&&(f=hr.get(n))!==null&&f!==void 0&&f.length&&nn.set(n,null),Zn.delete(n),u(l)},n.deleteBackward=l=>{if(l!=="line")return o(l);if(n.selection&&te.isCollapsed(n.selection)){var f=T.above(n,{match:p=>pe.isElement(p)&&T.isBlock(n,p),at:n.selection});if(f){var[,c]=f,h=T.range(n,c,n.selection.anchor),d=FR(n,h);te.isCollapsed(d)||ie.delete(n,{at:d})}}},n.apply=l=>{var f=[],c=[],h=hr.get(n);if(h!=null&&h.length){var d=h.map(B=>F5(B,l)).filter(Boolean);hr.set(n,d)}var p=Di.get(n);p&&Di.set(n,yC(n,p,l));var g=_i.get(n);if(g!=null&&g.at){var v=ke.isPoint(g==null?void 0:g.at)?Pv(n,g.at,l):yC(n,g.at,l);_i.set(n,v?jC(jC({},g),{},{at:v}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...So(n,l.path));break}case"set_selection":{var m;(m=Ks.get(n))===null||m===void 0||m.unref(),Ks.delete(n);break}case"insert_node":case"remove_node":{f.push(...So(n,$.parent(l.path)));break}case"merge_node":{var y=$.previous(l.path);f.push(...So(n,y));break}case"move_node":{var b=$.common($.parent(l.path),$.parent(l.newPath));f.push(...So(n,b));var w;$.isBefore(l.path,l.newPath)?(f.push(...So(n,$.parent(l.path))),w=l.newPath):(f.push(...So(n,$.parent(l.newPath))),w=l.path);var C=le.get(e,$.parent(w)),_=re.findKey(n,C),D=T.pathRef(n,$.parent(w));c.push([D,_]);break}}switch(i(l),l.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":Do.set(n,!0)}for(var[x,S]of f){var[O]=T.node(n,x);sf.set(O,S)}for(var[E,P]of c){if(E.current){var[F]=T.node(n,E.current);sf.set(F,P)}E.unref()}},n.setFragmentData=l=>{var{selection:f}=n;if(f){var[c,h]=te.edges(f),d=T.void(n,{at:c.path}),p=T.void(n,{at:h.path});if(!(te.isCollapsed(f)&&!d)){var g=re.toDOMRange(n,f),v=g.cloneContents(),m=v.childNodes[0];if(v.childNodes.forEach(O=>{O.textContent&&O.textContent.trim()!==""&&(m=O)}),p){var[y]=p,b=g.cloneRange(),w=re.toDOMNode(n,y);b.setEndAfter(w),v=b.cloneContents()}if(d&&(m=v.querySelector("[data-slate-spacer]")),Array.from(v.querySelectorAll("[data-slate-zero-width]")).forEach(O=>{var E=O.getAttribute("data-slate-zero-width")==="n";O.textContent=E?`
|
|
66
|
-
`:""}),cC(m)){var C=m.ownerDocument.createElement("span");C.style.whiteSpace="pre",C.appendChild(m),v.appendChild(C),m=C}var _=n.getFragment(),D=JSON.stringify(_),x=window.btoa(encodeURIComponent(D));m.setAttribute("data-slate-fragment",x),l.setData("application/".concat(r),x);var S=v.ownerDocument.createElement("div");return S.appendChild(v),S.setAttribute("hidden","true"),v.ownerDocument.body.appendChild(S),l.setData("text/html",S.innerHTML),l.setData("text/plain",dC(S)),v.ownerDocument.body.removeChild(S),l}}},n.insertData=l=>{n.insertFragmentData(l)||n.insertTextData(l)},n.insertFragmentData=l=>{var f=l.getData("application/".concat(r))||D5(l);if(f){var c=decodeURIComponent(window.atob(f)),h=JSON.parse(c);return n.insertFragment(h),!0}return!1},n.insertTextData=l=>{var f=l.getData("text/plain");if(f){var c=f.split(/\r\n|\r|\n/),h=!1;for(var d of c)h&&
|
|
65
|
+
`:""),[a]=k.useState(i);return Js(()=>{var o=i();n.current&&n.current.textContent!==o&&(n.current.textContent=o)}),k.createElement(J5,{ref:n},a)},J5=k.memo(k.forwardRef((t,e)=>k.createElement("span",{"data-slate-string":!0,ref:e},t.children))),Bv=t=>{var{length:e=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=t,i={"data-slate-zero-width":r?"n":"z","data-slate-length":e};return n&&(i["data-slate-mark-placeholder"]=!0),k.createElement("span",K5({},i),!(er||iC)||!r?"\uFEFF":null,r?k.createElement("br",null):null)};function xC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function SC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Q5=er?300:0;function eR(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function EC(t){t.current&&(clearTimeout(t.current),t.current=null)}var tR=t=>{var{leaf:e,isLast:r,text:n,parent:i,renderPlaceholder:a,renderLeaf:o=y=>k.createElement(nR,SC({},y))}=t,s=bi(),u=k.useRef(null),l=k.useRef(null),[f,c]=k.useState(!1),h=k.useRef(null),d=k.useCallback(y=>{if(eR(u,y==null),y==null){var b;_v.delete(s),(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,null)}else{if(_v.set(s,y),!u.current){var w=window.ResizeObserver||n5;u.current=new w(()=>{var C;(C=e.onPlaceholderResize)===null||C===void 0||C.call(e,y)})}u.current.observe(y),l.current=y}},[l,e,s]),p=k.createElement(Z5,{isLast:r,leaf:e,parent:i,text:n}),g=!!e[xo];if(k.useEffect(()=>(g?h.current||(h.current=setTimeout(()=>{c(!0),h.current=null},Q5)):(EC(h),c(!1)),()=>EC(h)),[g,c]),g&&f){var v={children:e.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:ha?"inherit":void 0},contentEditable:!1,ref:d}};p=k.createElement(k.Fragment,null,a(v),p)}var m={"data-slate-leaf":!0};return o({attributes:m,children:p,leaf:e,text:n})},rR=k.memo(tR,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ge.equals(e.leaf,t.leaf)&&e.leaf[xo]===t.leaf[xo]),nR=t=>{var{attributes:e,children:r}=t;return k.createElement("span",SC({},e),r)},iR=t=>{for(var{decorations:e,isLast:r,parent:n,renderPlaceholder:i,renderLeaf:a,text:o}=t,s=bi(),u=k.useRef(null),l=ge.decorations(o,e),f=re.findKey(s,o),c=[],h=0;h<l.length;h++){var d=l[h];c.push(k.createElement(rR,{isLast:r&&h===l.length-1,key:"".concat(f.id,"-").concat(h),renderPlaceholder:i,leaf:d,text:o,parent:n,renderLeaf:a}))}var p=k.useCallback(g=>{var v=uf.get(s);g?(v==null||v.set(f,g),da.set(o,g),Xs.set(g,o)):(v==null||v.delete(f),da.delete(o),u.current&&Xs.delete(u.current)),u.current=g},[u,s,f,o]);return k.createElement("span",{"data-slate-node":"text",ref:p},c)},AC=k.memo(iR,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&X5(e.decorations,t.decorations));function TC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?TC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):TC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var aR=t=>{var{decorations:e,element:r,renderElement:n=y=>k.createElement(sR,Mv({},y)),renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=bi(),u=fR(),l=s.isInline(r),f=re.findKey(s,r),c=k.useCallback(y=>{var b=uf.get(s);y?(b==null||b.set(f,y),da.set(r,y),Xs.set(y,r)):(b==null||b.delete(f),da.delete(r))},[s,f,r]),h=PC({decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:a,selection:o}),d={"data-slate-node":"element",ref:c};if(l&&(d["data-slate-inline"]=!0),!l&&T.hasInlines(s,r)){var p=le.string(r),g=O1(p);g==="rtl"&&(d.dir=g)}if(T.isVoid(s,r)){d["data-slate-void"]=!0,!u&&l&&(d.contentEditable=!1);var v=l?"span":"div",[[m]]=le.texts(r);h=k.createElement(v,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},k.createElement(AC,{renderPlaceholder:i,decorations:[],isLast:!1,parent:r,text:m})),Cv.set(m,0),wv.set(m,r)}return n({attributes:d,children:h,element:r})},oR=k.memo(aR,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&Y5(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&te.equals(t.selection,e.selection))),sR=t=>{var{attributes:e,children:r,element:n}=t,i=bi(),a=i.isInline(n)?"span":"div";return k.createElement(a,Mv(Mv({},e),{},{style:{position:"relative"}}),r)},OC=k.createContext(()=>[]),uR=()=>k.useContext(OC),lR=k.createContext(!1),PC=t=>{var{decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=uR(),u=bi();Do.set(u,!1);for(var l=re.findPath(u,r),f=[],c=pe.isElement(r)&&!u.isInline(r)&&T.hasInlines(u,r),h=0;h<r.children.length;h++){var d=l.concat(h),p=r.children[h],g=re.findKey(u,p),v=T.range(u,d),m=o&&te.intersection(v,o),y=s([p,d]);for(var b of e){var w=te.intersection(b,v);w&&y.push(w)}pe.isElement(p)?f.push(k.createElement(lR.Provider,{key:"provider-".concat(g.id),value:!!m},k.createElement(oR,{decorations:y,element:p,key:g.id,renderElement:n,renderPlaceholder:i,renderLeaf:a,selection:m}))):f.push(k.createElement(AC,{decorations:y,key:g.id,isLast:c&&h===r.children.length-1,parent:r,renderPlaceholder:i,renderLeaf:a,text:p})),Cv.set(p,h),wv.set(p,r)}return f},BC=k.createContext(!1),fR=()=>k.useContext(BC),MC=k.createContext(null),ff=()=>{var t=k.useContext(MC);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function cR(){var t=bi(),e=k.useRef(!1),r=k.useRef(0),n=k.useCallback(()=>{if(!e.current){e.current=!0;var i=re.getWindow(t);i.cancelAnimationFrame(r.current),r.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return k.useEffect(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:e,onUserInput:n}}var hR=3,dR={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"},vR={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"},pR={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},pt=t=>{var e=dR[t],r=vR[t],n=pR[t],i=e&&gv(e),a=r&&gv(r),o=n&&gv(n);return s=>!!(i&&i(s)||aC&&a&&a(s)||!aC&&o&&o(s))},mt={isBold:pt("bold"),isCompose:pt("compose"),isMoveBackward:pt("moveBackward"),isMoveForward:pt("moveForward"),isDeleteBackward:pt("deleteBackward"),isDeleteForward:pt("deleteForward"),isDeleteLineBackward:pt("deleteLineBackward"),isDeleteLineForward:pt("deleteLineForward"),isDeleteWordBackward:pt("deleteWordBackward"),isDeleteWordForward:pt("deleteWordForward"),isExtendBackward:pt("extendBackward"),isExtendForward:pt("extendForward"),isExtendLineBackward:pt("extendLineBackward"),isExtendLineForward:pt("extendLineForward"),isItalic:pt("italic"),isMoveLineBackward:pt("moveLineBackward"),isMoveLineForward:pt("moveLineForward"),isMoveWordBackward:pt("moveWordBackward"),isMoveWordForward:pt("moveWordForward"),isRedo:pt("redo"),isSoftBreak:pt("insertSoftBreak"),isSplitBlock:pt("splitBlock"),isTransposeCharacter:pt("transposeCharacter"),isUndo:pt("undo")},gR=(t,e)=>{var r=[],n=()=>{r=[]},i=o=>{if(e.current){var s=o.filter(u=>Tv(t,u,o));r.push(...s)}};function a(){r.length>0&&(r.reverse().forEach(o=>{o.type!=="characterData"&&(o.removedNodes.forEach(s=>{o.target.insertBefore(s,o.nextSibling)}),o.addedNodes.forEach(s=>{o.target.removeChild(s)}))}),n())}return{registerMutations:i,restoreDOM:a,clear:n}},mR={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class FC extends k.Component{constructor(){super(...arguments),Rr(this,"context",null),Rr(this,"manager",null),Rr(this,"mutationObserver",null)}observe(){var e,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(r.current,mR)}componentDidMount(){var{receivedUserInput:e}=this.props,r=this.context;this.manager=gR(r,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,r,n,i=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(i!=null&&i.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(i)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)===null||e===void 0||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)===null||e===void 0||e.disconnect()}render(){return this.props.children}}Rr(FC,"contextType",mv);var yR=er?FC:t=>{var{children:e}=t;return k.createElement(k.Fragment,null,e)},bR=k.createContext(!1),CR=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],wR=["text"];function LC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Cn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?LC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var _R=t=>k.createElement(k.Fragment,null,PC(t)),DR=k.forwardRef((t,e)=>{var r=k.useCallback(L=>k.createElement(xR,Cn({},L)),[]),{autoFocus:n,decorate:i=SR,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=r,scrollSelectionIntoView:c=ER,style:h={},as:d="div",disableDefaultStyles:p=!1}=t,g=wo(t,CR),v=ff(),[m,y]=k.useState(!1),b=k.useRef(null),w=k.useRef([]),[C,_]=k.useState(),D=k.useRef(!1),{onUserInput:x,receivedUserInput:S}=cR(),[,O]=k.useReducer(L=>L+1,0);uC.set(v,O),Dv.set(v,s);var E=k.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);k.useEffect(()=>{b.current&&n&&b.current.focus()},[n]);var P=k.useRef(),F=k.useMemo(()=>tF(()=>{if(Do.get(v)){F();return}var L=re.toDOMNode(v,v),X=L.getRootNode();if(!D.current&&ha&&X instanceof ShadowRoot){D.current=!0;var V=x5();V?document.execCommand("indent"):ae.deselect(v),D.current=!1;return}var G=P.current;if((er||!re.isComposing(v))&&(!E.isUpdatingSelection||G!=null&&G.isFlushing())&&!E.isDraggingInternally){var J=re.findDocumentOrShadowRoot(v),{activeElement:K}=J,Y=re.toDOMNode(v,v),fe=Zs(J);if(K===Y?(E.latestElement=K,wi.set(v,!0)):wi.delete(v),!fe)return ae.deselect(v);var{anchorNode:ue,focusNode:Ce}=fe,me=re.hasEditableTarget(v,ue)||re.isTargetInsideNonReadonlyVoid(v,ue),Fe=re.hasTarget(v,Ce);if(me&&Fe){var ie=re.toSlateRange(v,fe,{exactMatch:!1,suppressThrow:!0});ie&&(!re.isComposing(v)&&!(G!=null&&G.hasPendingChanges())&&!(G!=null&&G.isFlushing())?ae.select(v,ie):G==null||G.handleUserSelect(ie))}s&&(!me||!Fe)&&ae.deselect(v)}},100),[v,s,E]),B=k.useMemo(()=>X3(F,0),[F]);P.current=$5({node:b,onDOMSelectionChange:F,scheduleOnDOMSelectionChange:B}),Js(()=>{var L,X,V;b.current&&(V=Ev(b.current))?(sC.set(v,V),of.set(v,b.current),da.set(v,b.current),Xs.set(b.current,v)):da.delete(v);var{selection:G}=v,J=re.findDocumentOrShadowRoot(v),K=Zs(J);if(!(!K||!re.isFocused(v)||(L=P.current)!==null&&L!==void 0&&L.hasPendingAction())){var Y=me=>{var Fe=K.type!=="None";if(!(!G&&!Fe)){var ie=K.focusNode,ve;if(_o&&K.rangeCount>1){var Le=K.getRangeAt(0),ft=K.getRangeAt(K.rangeCount-1);Le.startContainer===ie?ve=ft.endContainer:ve=Le.startContainer}else ve=K.anchorNode;var Ie=of.get(v),at=!1;if(Ie.contains(ve)&&Ie.contains(ie)&&(at=!0),Fe&&at&&G&&!me){var Fr=re.toSlateRange(v,K,{exactMatch:!0,suppressThrow:!0});if(Fr&&te.equals(Fr,G)){var et;if(!E.hasMarkPlaceholder||(et=ve)!==null&&et!==void 0&&(et=et.parentElement)!==null&&et!==void 0&&et.hasAttribute("data-slate-mark-placeholder"))return}}if(G&&!re.hasRange(v,G)){v.selection=re.toSlateRange(v,K,{exactMatch:!1,suppressThrow:!0});return}E.isUpdatingSelection=!0;var ct=G&&re.toDOMRange(v,G);return ct?(re.isComposing(v)&&!er?K.collapseToEnd():te.isBackward(G)?K.setBaseAndExtent(ct.endContainer,ct.endOffset,ct.startContainer,ct.startOffset):K.setBaseAndExtent(ct.startContainer,ct.startOffset,ct.endContainer,ct.endOffset),c(v,ct)):K.removeAllRanges(),ct}};K.rangeCount<=1&&Y();var fe=((X=P.current)===null||X===void 0?void 0:X.isFlushing())==="action";if(!er||!fe){setTimeout(()=>{E.isUpdatingSelection=!1});return}var ue=null,Ce=requestAnimationFrame(()=>{if(fe){var me=Fe=>{try{var ie=re.toDOMNode(v,v);ie.focus(),Y(Fe)}catch{}};me(),ue=setTimeout(()=>{me(!0),E.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Ce),ue&&clearTimeout(ue)}}});var M=k.useCallback(L=>{var X=re.toDOMNode(v,v),V=X.getRootNode();if(D!=null&&D.current&&ha&&V instanceof ShadowRoot){var G=L.getTargetRanges(),J=G[0],K=new window.Range;K.setStart(J.startContainer,J.startOffset),K.setEnd(J.endContainer,J.endOffset);var Y=re.toSlateRange(v,K,{exactMatch:!1,suppressThrow:!1});ae.select(v,Y),L.preventDefault(),L.stopImmediatePropagation();return}if(x(),!s&&re.hasEditableTarget(v,L.target)&&!AR(L,a)){var fe;if(P.current)return P.current.handleDOMBeforeInput(L);B.flush(),F.flush();var{selection:ue}=v,{inputType:Ce}=L,me=L.dataTransfer||L.data||void 0,Fe=Ce==="insertCompositionText"||Ce==="deleteCompositionText";if(Fe&&re.isComposing(v))return;var ie=!1;if(Ce==="insertText"&&ue&&te.isCollapsed(ue)&&L.data&&L.data.length===1&&/[a-z ]/i.test(L.data)&&ue.anchor.offset!==0&&(ie=!0,v.marks&&(ie=!1),!Do.get(v))){var ve,Le,{anchor:ft}=ue,[Ie,at]=re.toDOMPoint(v,ft),Fr=(ve=Ie.parentElement)===null||ve===void 0?void 0:ve.closest("a"),et=re.getWindow(v);if(ie&&Fr&&re.hasDOMNode(v,Fr)){var ct,Lr=et==null?void 0:et.document.createTreeWalker(Fr,NodeFilter.SHOW_TEXT).lastChild();Lr===Ie&&((ct=Lr.textContent)===null||ct===void 0?void 0:ct.length)===at&&(ie=!1)}if(ie&&Ie.parentElement&&(et==null||(Le=et.getComputedStyle(Ie.parentElement))===null||Le===void 0?void 0:Le.whiteSpace)==="pre"){var Zt=T.above(v,{at:ft.path,match:Zi=>pe.isElement(Zi)&&T.isBlock(v,Zi)});Zt&&le.string(Zt[0]).includes(" ")&&(ie=!1)}}if((!Ce.startsWith("delete")||Ce.startsWith("deleteBy"))&&!Do.get(v)){var[Ir]=L.getTargetRanges();if(Ir){var $n=re.toSlateRange(v,Ir,{exactMatch:!1,suppressThrow:!1});if(!ue||!te.equals(ue,$n)){ie=!1;var wr=!Fe&&v.selection&&T.rangeRef(v,v.selection);ae.select(v,$n),wr&&Ks.set(v,wr)}}}if(Fe)return;if(ie||L.preventDefault(),ue&&te.isExpanded(ue)&&Ce.startsWith("delete")){var gl=Ce.endsWith("Backward")?"backward":"forward";T.deleteFragment(v,{direction:gl});return}switch(Ce){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{T.deleteFragment(v);break}case"deleteContent":case"deleteContentForward":{T.deleteForward(v);break}case"deleteContentBackward":{T.deleteBackward(v);break}case"deleteEntireSoftLine":{T.deleteBackward(v,{unit:"line"}),T.deleteForward(v,{unit:"line"});break}case"deleteHardLineBackward":{T.deleteBackward(v,{unit:"block"});break}case"deleteSoftLineBackward":{T.deleteBackward(v,{unit:"line"});break}case"deleteHardLineForward":{T.deleteForward(v,{unit:"block"});break}case"deleteSoftLineForward":{T.deleteForward(v,{unit:"line"});break}case"deleteWordBackward":{T.deleteBackward(v,{unit:"word"});break}case"deleteWordForward":{T.deleteForward(v,{unit:"word"});break}case"insertLineBreak":T.insertSoftBreak(v);break;case"insertParagraph":{T.insertBreak(v);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Ce==="insertFromComposition"&&re.isComposing(v)&&(y(!1),va.set(v,!1)),(me==null?void 0:me.constructor.name)==="DataTransfer"?re.insertData(v,me):typeof me=="string"&&(ie?w.current.push(()=>T.insertText(v,me)):T.insertText(v,me));break}}var so=(fe=Ks.get(v))===null||fe===void 0?void 0:fe.unref();Ks.delete(v),so&&(!v.selection||!te.equals(v.selection,so))&&ae.select(v,so)}},[v,F,x,a,s,B]),I=k.useCallback(L=>{L==null?(F.cancel(),B.cancel(),of.delete(v),da.delete(v),b.current&&Ci&&b.current.removeEventListener("beforeinput",M)):Ci&&L.addEventListener("beforeinput",M),b.current=L,typeof e=="function"?e(L):e&&(e.current=L)},[F,B,v,M,e]);Js(()=>{var L=re.getWindow(v);L.document.addEventListener("selectionchange",B);var X=()=>{E.isDraggingInternally=!1};return L.document.addEventListener("dragend",X),L.document.addEventListener("drop",X),()=>{L.document.removeEventListener("selectionchange",B),L.document.removeEventListener("dragend",X),L.document.removeEventListener("drop",X)}},[B,E]);var j=i([v,[]]),z=o&&v.children.length===1&&Array.from(le.texts(v)).length===1&&le.string(v)===""&&!m,W=k.useCallback(L=>{if(L&&z){var X;_((X=L.getBoundingClientRect())===null||X===void 0?void 0:X.height)}else _(void 0)},[z]);if(z){var R=T.start(v,[]);j.push({[xo]:!0,placeholder:o,onPlaceholderResize:W,anchor:R,focus:R})}var{marks:U}=v;if(E.hasMarkPlaceholder=!1,v.selection&&te.isCollapsed(v.selection)&&U){var{anchor:Z}=v.selection,ee=le.leaf(v,Z.path),ne=wo(ee,wR);if(!ge.equals(ee,U,{loose:!0})){E.hasMarkPlaceholder=!0;var q=Object.fromEntries(Object.keys(ne).map(L=>[L,null]));j.push(Cn(Cn(Cn({[lC]:!0},q),U),{},{anchor:Z,focus:Z}))}}return k.useEffect(()=>{setTimeout(()=>{var{selection:L}=v;if(L){var{anchor:X}=L,V=le.leaf(v,X.path);if(U&&!ge.equals(V,U,{loose:!0})){nn.set(v,U);return}}nn.delete(v)})}),k.createElement(BC.Provider,{value:s},k.createElement(bR.Provider,{value:m},k.createElement(OC.Provider,{value:i},k.createElement(yR,{node:b,receivedUserInput:S},k.createElement(d,Cn(Cn({role:s?void 0:"textbox","aria-multiline":s?void 0:!0},g),{},{spellCheck:Ci||!af?g.spellCheck:!1,autoCorrect:Ci||!af?g.autoCorrect:"false",autoCapitalize:Ci||!af?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:I,style:Cn(Cn({},p?{}:Cn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},C?{minHeight:C}:{})),h),onBeforeInput:k.useCallback(L=>{if(!Ci&&!s&&!tr(L,g.onBeforeInput)&&re.hasSelectableTarget(v,L.target)&&(L.preventDefault(),!re.isComposing(v))){var X=L.data;T.insertText(v,X)}},[g.onBeforeInput,v,s]),onInput:k.useCallback(L=>{if(!tr(L,g.onInput)){if(P.current){P.current.handleInput();return}for(var X of w.current)X();if(w.current=[],!re.isFocused(v)){var V=L.nativeEvent,G=v;if(V.inputType==="historyUndo"&&typeof G.undo=="function"){G.undo();return}if(V.inputType==="historyRedo"&&typeof G.redo=="function"){G.redo();return}}}},[g.onInput,v]),onBlur:k.useCallback(L=>{if(!(s||E.isUpdatingSelection||!re.hasSelectableTarget(v,L.target)||tr(L,g.onBlur))){var X=re.findDocumentOrShadowRoot(v);if(E.latestElement!==X.activeElement){var{relatedTarget:V}=L,G=re.toDOMNode(v,v);if(V!==G&&!(Nr(V)&&V.hasAttribute("data-slate-spacer"))){if(V!=null&&xi(V)&&re.hasDOMNode(v,V)){var J=re.toSlateNode(v,V);if(pe.isElement(J)&&!v.isVoid(J))return}if(ha){var K=Zs(X);K==null||K.removeAllRanges()}wi.delete(v)}}}},[s,E.isUpdatingSelection,E.latestElement,v,g.onBlur]),onClick:k.useCallback(L=>{if(re.hasTarget(v,L.target)&&!tr(L,g.onClick)&&xi(L.target)){var X=re.toSlateNode(v,L.target),V=re.findPath(v,X);if(!T.hasPath(v,V)||le.get(v,V)!==X)return;if(L.detail===hR&&V.length>=1){var G=V;if(!(pe.isElement(X)&&T.isBlock(v,X))){var J,K=T.above(v,{match:ie=>pe.isElement(ie)&&T.isBlock(v,ie),at:V});G=(J=K==null?void 0:K[1])!==null&&J!==void 0?J:V.slice(0,1)}var Y=T.range(v,G);ae.select(v,Y);return}if(s)return;var fe=T.start(v,V),ue=T.end(v,V),Ce=T.void(v,{at:fe}),me=T.void(v,{at:ue});if(Ce&&me&&$.equals(Ce[1],me[1])){var Fe=T.range(v,fe);ae.select(v,Fe)}}},[v,g.onClick,s]),onCompositionEnd:k.useCallback(L=>{if(re.hasSelectableTarget(v,L.target)){var X;if(re.isComposing(v)&&Promise.resolve().then(()=>{y(!1),va.set(v,!1)}),(X=P.current)===null||X===void 0||X.handleCompositionEnd(L),tr(L,g.onCompositionEnd)||er)return;if(!ha&&!d5&&!iC&&!p5&&!v5&&L.data){var V=nn.get(v);nn.delete(v),V!==void 0&&(Zn.set(v,v.marks),v.marks=V),T.insertText(v,L.data);var G=Zn.get(v);Zn.delete(v),G!==void 0&&(v.marks=G)}}},[g.onCompositionEnd,v]),onCompositionUpdate:k.useCallback(L=>{re.hasSelectableTarget(v,L.target)&&!tr(L,g.onCompositionUpdate)&&(re.isComposing(v)||(y(!0),va.set(v,!0)))},[g.onCompositionUpdate,v]),onCompositionStart:k.useCallback(L=>{if(re.hasSelectableTarget(v,L.target)){var X;if((X=P.current)===null||X===void 0||X.handleCompositionStart(L),tr(L,g.onCompositionStart)||er)return;y(!0);var{selection:V}=v;if(V&&te.isExpanded(V)){T.deleteFragment(v);return}}},[g.onCompositionStart,v]),onCopy:k.useCallback(L=>{re.hasSelectableTarget(v,L.target)&&!tr(L,g.onCopy)&&!IC(L)&&(L.preventDefault(),re.setFragmentData(v,L.clipboardData,"copy"))},[g.onCopy,v]),onCut:k.useCallback(L=>{if(!s&&re.hasSelectableTarget(v,L.target)&&!tr(L,g.onCut)&&!IC(L)){L.preventDefault(),re.setFragmentData(v,L.clipboardData,"cut");var{selection:X}=v;if(X)if(te.isExpanded(X))T.deleteFragment(v);else{var V=le.parent(v,X.anchor.path);T.isVoid(v,V)&&ae.delete(v)}}},[s,v,g.onCut]),onDragOver:k.useCallback(L=>{if(re.hasTarget(v,L.target)&&!tr(L,g.onDragOver)){var X=re.toSlateNode(v,L.target);pe.isElement(X)&&T.isVoid(v,X)&&L.preventDefault()}},[g.onDragOver,v]),onDragStart:k.useCallback(L=>{if(!s&&re.hasTarget(v,L.target)&&!tr(L,g.onDragStart)){var X=re.toSlateNode(v,L.target),V=re.findPath(v,X),G=pe.isElement(X)&&T.isVoid(v,X)||T.void(v,{at:V,voids:!0});if(G){var J=T.range(v,V);ae.select(v,J)}E.isDraggingInternally=!0,re.setFragmentData(v,L.dataTransfer,"drag")}},[s,v,g.onDragStart,E]),onDrop:k.useCallback(L=>{if(!s&&re.hasTarget(v,L.target)&&!tr(L,g.onDrop)){L.preventDefault();var X=v.selection,V=re.findEventRange(v,L),G=L.dataTransfer;ae.select(v,V),E.isDraggingInternally&&X&&!te.equals(X,V)&&!T.void(v,{at:V,voids:!0})&&ae.delete(v,{at:X}),re.insertData(v,G),re.isFocused(v)||re.focus(v)}},[s,v,g.onDrop,E]),onDragEnd:k.useCallback(L=>{!s&&E.isDraggingInternally&&g.onDragEnd&&re.hasTarget(v,L.target)&&g.onDragEnd(L)},[s,E,g,v]),onFocus:k.useCallback(L=>{if(!s&&!E.isUpdatingSelection&&re.hasEditableTarget(v,L.target)&&!tr(L,g.onFocus)){var X=re.toDOMNode(v,v),V=re.findDocumentOrShadowRoot(v);if(E.latestElement=V.activeElement,_o&&L.target!==X){X.focus();return}wi.set(v,!0)}},[s,E,v,g.onFocus]),onKeyDown:k.useCallback(L=>{if(!s&&re.hasEditableTarget(v,L.target)){var X;(X=P.current)===null||X===void 0||X.handleKeyDown(L);var{nativeEvent:V}=L;if(re.isComposing(v)&&V.isComposing===!1&&(va.set(v,!1),y(!1)),tr(L,g.onKeyDown)||re.isComposing(v))return;var{selection:G}=v,J=v.children[G!==null?G.focus.path[0]:0],K=O1(le.string(J))==="rtl";if(mt.isRedo(V)){L.preventDefault();var Y=v;typeof Y.redo=="function"&&Y.redo();return}if(mt.isUndo(V)){L.preventDefault();var fe=v;typeof fe.undo=="function"&&fe.undo();return}if(mt.isMoveLineBackward(V)){L.preventDefault(),ae.move(v,{unit:"line",reverse:!0});return}if(mt.isMoveLineForward(V)){L.preventDefault(),ae.move(v,{unit:"line"});return}if(mt.isExtendLineBackward(V)){L.preventDefault(),ae.move(v,{unit:"line",edge:"focus",reverse:!0});return}if(mt.isExtendLineForward(V)){L.preventDefault(),ae.move(v,{unit:"line",edge:"focus"});return}if(mt.isMoveBackward(V)){L.preventDefault(),G&&te.isCollapsed(G)?ae.move(v,{reverse:!K}):ae.collapse(v,{edge:K?"end":"start"});return}if(mt.isMoveForward(V)){L.preventDefault(),G&&te.isCollapsed(G)?ae.move(v,{reverse:K}):ae.collapse(v,{edge:K?"start":"end"});return}if(mt.isMoveWordBackward(V)){L.preventDefault(),G&&te.isExpanded(G)&&ae.collapse(v,{edge:"focus"}),ae.move(v,{unit:"word",reverse:!K});return}if(mt.isMoveWordForward(V)){L.preventDefault(),G&&te.isExpanded(G)&&ae.collapse(v,{edge:"focus"}),ae.move(v,{unit:"word",reverse:K});return}if(Ci){if((oC||ha)&&G&&(mt.isDeleteBackward(V)||mt.isDeleteForward(V))&&te.isCollapsed(G)){var ue=le.parent(v,G.anchor.path);if(pe.isElement(ue)&&T.isVoid(v,ue)&&(T.isInline(v,ue)||T.isBlock(v,ue))){L.preventDefault(),T.deleteBackward(v,{unit:"block"});return}}}else{if(mt.isBold(V)||mt.isItalic(V)||mt.isTransposeCharacter(V)){L.preventDefault();return}if(mt.isSoftBreak(V)){L.preventDefault(),T.insertSoftBreak(v);return}if(mt.isSplitBlock(V)){L.preventDefault(),T.insertBreak(v);return}if(mt.isDeleteBackward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"backward"}):T.deleteBackward(v);return}if(mt.isDeleteForward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"forward"}):T.deleteForward(v);return}if(mt.isDeleteLineBackward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"backward"}):T.deleteBackward(v,{unit:"line"});return}if(mt.isDeleteLineForward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"forward"}):T.deleteForward(v,{unit:"line"});return}if(mt.isDeleteWordBackward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"backward"}):T.deleteBackward(v,{unit:"word"});return}if(mt.isDeleteWordForward(V)){L.preventDefault(),G&&te.isExpanded(G)?T.deleteFragment(v,{direction:"forward"}):T.deleteForward(v,{unit:"word"});return}}}},[s,v,g.onKeyDown]),onPaste:k.useCallback(L=>{!s&&re.hasEditableTarget(v,L.target)&&!tr(L,g.onPaste)&&(!Ci||y5(L.nativeEvent)||ha)&&(L.preventDefault(),re.insertData(v,L.clipboardData))},[s,v,g.onPaste])}),k.createElement(_R,{decorations:j,node:v,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:v.selection}))))))}),xR=t=>{var{attributes:e,children:r}=t;return k.createElement("span",Cn({},e),r,er&&k.createElement("br",null))},SR=()=>[],ER=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&te.isCollapsed(t.selection))){var r=e.startContainer.parentElement;r.getBoundingClientRect=e.getBoundingClientRect.bind(e),iF(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},tr=(t,e)=>{if(!e)return!1;var r=e(t);return r??(t.isDefaultPrevented()||t.isPropagationStopped())},IC=t=>xi(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),AR=(t,e)=>{if(!e)return!1;var r=e(t);return r??t.defaultPrevented},RC=k.createContext(!1),TR=()=>k.useContext(RC),OR=k.createContext({});function PR(t){var e=k.useRef([]).current,r=k.useRef({editor:t}).current,n=k.useCallback(a=>{r.editor=a,e.forEach(o=>o(a))},[e,r]),i=k.useMemo(()=>({getSlate:()=>r.editor,addEventListener:a=>(e.push(a),()=>{e.splice(e.indexOf(a),1)})}),[e,r]);return{selectorContext:i,onChange:n}}var BR=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],MR=t=>{var{editor:e,children:r,onChange:n,onSelectionChange:i,onValueChange:a,initialValue:o}=t,s=wo(t,BR),[u,l]=k.useState(()=>{if(!le.isNodeList(o))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Lt.stringify(o)));if(!T.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(Lt.stringify(e)));return e.children=o,Object.assign(e,s),{v:0,editor:e}}),{selectorContext:f,onChange:c}=PR(e),h=k.useCallback(g=>{var v;switch(n&&n(e.children),g==null||(v=g.operation)===null||v===void 0?void 0:v.type){case"set_selection":i==null||i(e.selection);break;default:a==null||a(e.children)}l(m=>({v:m.v+1,editor:e})),c(e)},[e,c,n,i,a]);k.useEffect(()=>(xv.set(e,h),()=>{xv.set(e,()=>{})}),[e,h]);var[d,p]=k.useState(re.isFocused(e));return k.useEffect(()=>{p(re.isFocused(e))},[e]),Js(()=>{var g=()=>p(re.isFocused(e));return nC>=17?(document.addEventListener("focusin",g),document.addEventListener("focusout",g),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",g)}):(document.addEventListener("focus",g,!0),document.addEventListener("blur",g,!0),()=>{document.removeEventListener("focus",g,!0),document.removeEventListener("blur",g,!0)})},[]),k.createElement(OR.Provider,{value:f},k.createElement(MC.Provider,{value:u},k.createElement(mv.Provider,{value:u.editor},k.createElement(RC.Provider,{value:d},r))))},NC=(t,e)=>{var r=(e.top+e.bottom)/2;return t.top<=r&&t.bottom>=r},kC=(t,e,r)=>{var n=re.toDOMRange(t,e).getBoundingClientRect(),i=re.toDOMRange(t,r).getBoundingClientRect();return NC(n,i)&&NC(i,n)},FR=(t,e)=>{var r=T.range(t,te.end(e)),n=Array.from(T.positions(t,{at:e})),i=0,a=n.length,o=Math.floor(a/2);if(kC(t,T.range(t,n[i]),r))return T.range(t,n[i],r);if(n.length<2)return T.range(t,n[n.length-1],r);for(;o!==n.length&&o!==i;)kC(t,T.range(t,n[o]),r)?a=o:i=o,o=Math.floor((i+a)/2);return T.range(t,n[a],r)};function zC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var LR=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",n=e,{apply:i,onChange:a,deleteBackward:o,addMark:s,removeMark:u}=n;return uf.set(n,new WeakMap),n.addMark=(l,f)=>{var c,h;(c=Sv.get(n))===null||c===void 0||c(),!nn.get(n)&&(h=hr.get(n))!==null&&h!==void 0&&h.length&&nn.set(n,null),Zn.delete(n),s(l,f)},n.removeMark=l=>{var f;!nn.get(n)&&(f=hr.get(n))!==null&&f!==void 0&&f.length&&nn.set(n,null),Zn.delete(n),u(l)},n.deleteBackward=l=>{if(l!=="line")return o(l);if(n.selection&&te.isCollapsed(n.selection)){var f=T.above(n,{match:p=>pe.isElement(p)&&T.isBlock(n,p),at:n.selection});if(f){var[,c]=f,h=T.range(n,c,n.selection.anchor),d=FR(n,h);te.isCollapsed(d)||ae.delete(n,{at:d})}}},n.apply=l=>{var f=[],c=[],h=hr.get(n);if(h!=null&&h.length){var d=h.map(B=>F5(B,l)).filter(Boolean);hr.set(n,d)}var p=Di.get(n);p&&Di.set(n,yC(n,p,l));var g=_i.get(n);if(g!=null&&g.at){var v=ke.isPoint(g==null?void 0:g.at)?Pv(n,g.at,l):yC(n,g.at,l);_i.set(n,v?jC(jC({},g),{},{at:v}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...So(n,l.path));break}case"set_selection":{var m;(m=Ks.get(n))===null||m===void 0||m.unref(),Ks.delete(n);break}case"insert_node":case"remove_node":{f.push(...So(n,$.parent(l.path)));break}case"merge_node":{var y=$.previous(l.path);f.push(...So(n,y));break}case"move_node":{var b=$.common($.parent(l.path),$.parent(l.newPath));f.push(...So(n,b));var w;$.isBefore(l.path,l.newPath)?(f.push(...So(n,$.parent(l.path))),w=l.newPath):(f.push(...So(n,$.parent(l.newPath))),w=l.path);var C=le.get(e,$.parent(w)),_=re.findKey(n,C),D=T.pathRef(n,$.parent(w));c.push([D,_]);break}}switch(i(l),l.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":Do.set(n,!0)}for(var[x,S]of f){var[O]=T.node(n,x);sf.set(O,S)}for(var[E,P]of c){if(E.current){var[F]=T.node(n,E.current);sf.set(F,P)}E.unref()}},n.setFragmentData=l=>{var{selection:f}=n;if(f){var[c,h]=te.edges(f),d=T.void(n,{at:c.path}),p=T.void(n,{at:h.path});if(!(te.isCollapsed(f)&&!d)){var g=re.toDOMRange(n,f),v=g.cloneContents(),m=v.childNodes[0];if(v.childNodes.forEach(O=>{O.textContent&&O.textContent.trim()!==""&&(m=O)}),p){var[y]=p,b=g.cloneRange(),w=re.toDOMNode(n,y);b.setEndAfter(w),v=b.cloneContents()}if(d&&(m=v.querySelector("[data-slate-spacer]")),Array.from(v.querySelectorAll("[data-slate-zero-width]")).forEach(O=>{var E=O.getAttribute("data-slate-zero-width")==="n";O.textContent=E?`
|
|
66
|
+
`:""}),cC(m)){var C=m.ownerDocument.createElement("span");C.style.whiteSpace="pre",C.appendChild(m),v.appendChild(C),m=C}var _=n.getFragment(),D=JSON.stringify(_),x=window.btoa(encodeURIComponent(D));m.setAttribute("data-slate-fragment",x),l.setData("application/".concat(r),x);var S=v.ownerDocument.createElement("div");return S.appendChild(v),S.setAttribute("hidden","true"),v.ownerDocument.body.appendChild(S),l.setData("text/html",S.innerHTML),l.setData("text/plain",dC(S)),v.ownerDocument.body.removeChild(S),l}}},n.insertData=l=>{n.insertFragmentData(l)||n.insertTextData(l)},n.insertFragmentData=l=>{var f=l.getData("application/".concat(r))||D5(l);if(f){var c=decodeURIComponent(window.atob(f)),h=JSON.parse(c);return n.insertFragment(h),!0}return!1},n.insertTextData=l=>{var f=l.getData("text/plain");if(f){var c=f.split(/\r\n|\r|\n/),h=!1;for(var d of c)h&&ae.splitNodes(n,{always:!0}),n.insertText(d),h=!0;return!0}return!1},n.onChange=l=>{var f=nC<18?yl.unstable_batchedUpdates:c=>c();f(()=>{var c=xv.get(n);c&&c(l),a(l)})},n},So=(t,e)=>{var r=[];for(var[n,i]of T.levels(t,{at:e})){var a=re.findKey(t,n);r.push([i,a])}return r},IR={isHistory(t){return Nt(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||yi.isOperationList(t.redos[0].operations))&&(t.undos.length===0||yi.isOperationList(t.undos[0].operations))}},Fv=new WeakMap,Qs=new WeakMap,pa={isHistoryEditor(t){return IR.isHistory(t.history)&&T.isEditor(t)},isMerging(t){return Qs.get(t)},isSaving(t){return Fv.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var r=pa.isMerging(t);Qs.set(t,!0),e(),Qs.set(t,r)},withoutMerging(t,e){var r=pa.isMerging(t);Qs.set(t,!1),e(),Qs.set(t,r)},withoutSaving(t,e){var r=pa.isSaving(t);Fv.set(t,!1),e(),Fv.set(t,r)}},RR=t=>{var e=t,{apply:r}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:n}=e,{redos:i}=n;if(i.length>0){var a=i[i.length-1];a.selectionBefore&&ae.setSelection(e,a.selectionBefore),pa.withoutSaving(e,()=>{T.withoutNormalizing(e,()=>{for(var o of a.operations)e.apply(o)})}),n.redos.pop(),e.writeHistory("undos",a)}},e.undo=()=>{var{history:n}=e,{undos:i}=n;if(i.length>0){var a=i[i.length-1];pa.withoutSaving(e,()=>{T.withoutNormalizing(e,()=>{var o=a.operations.map(yi.inverse).reverse();for(var s of o)e.apply(s);a.selectionBefore&&ae.setSelection(e,a.selectionBefore)})}),e.writeHistory("redos",a),n.undos.pop()}},e.apply=n=>{var{operations:i,history:a}=e,{undos:o}=a,s=o[o.length-1],u=s&&s.operations[s.operations.length-1],l=pa.isSaving(e),f=pa.isMerging(e);if(l==null&&(l=kR(n)),l){if(f==null&&(s==null?f=!1:i.length!==0?f=!0:f=NR(n,u)),s&&f)s.operations.push(n);else{var c={operations:[n],selectionBefore:e.selection};e.writeHistory("undos",c)}for(;o.length>100;)o.shift();a.redos=[]}r(n)},e.writeHistory=(n,i)=>{e.history[n].push(i)},e},NR=(t,e)=>!!(e&&t.type==="insert_text"&&e.type==="insert_text"&&t.offset===e.offset+e.text.length&&$.equals(t.path,e.path)||e&&t.type==="remove_text"&&e.type==="remove_text"&&t.offset+t.text.length===e.offset&&$.equals(t.path,e.path)),kR=(t,e)=>t.type!=="set_selection",VC=k.createContext({});function kt(){return kt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},kt.apply(null,arguments)}function zR(t){if(Array.isArray(t))return t}function jR(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){l=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function HC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function VR(t,e){if(t){if(typeof t=="string")return HC(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?HC(t,e):void 0}}function HR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
67
67
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WC(t,e){return zR(t)||jR(t,e)||VR(t,e)||HR()}function ga(t){"@babel/helpers - typeof";return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ga(t)}function WR(t,e){if(ga(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $R(t){var e=WR(t,"string");return ga(e)=="symbol"?e:e+""}function Lv(t,e,r){return(e=$R(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GR(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}function $C(t,e){if(t==null)return{};var r,n,i=GR(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var GC={exports:{}};/*!
|
|
68
68
|
Copyright (c) 2018 Jed Watson.
|
|
69
69
|
Licensed under the MIT License (MIT), see
|
|
@@ -123,7 +123,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
123
123
|
transform: rotate(360deg);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
`,T4=function(e){var r=k.useContext(VC),n=r.csp,i=r.prefixCls,a=A4;i&&(a=a.replace(/anticon/g,i)),k.useEffect(function(){var o=e.current,s=b4(o);m4(a,"@ant-design-icons",{prepend:!0,csp:n,attachTo:s})},[])},O4=["icon","className","onClick","style","primaryColor","secondaryColor"],tu={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function P4(t){var e=t.primaryColor,r=t.secondaryColor;tu.primaryColor=e,tu.secondaryColor=r||fw(e),tu.calculated=!!r}function B4(){return wn({},tu)}var Eo=function(e){var r=e.icon,n=e.className,i=e.onClick,a=e.style,o=e.primaryColor,s=e.secondaryColor,u=$C(e,O4),l=Xe.useRef(),f=tu;if(o&&(f={primaryColor:o,secondaryColor:s||fw(o)}),T4(l),E4(uw(r),"icon should be icon definiton, but got ".concat(r)),!uw(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=wn(wn({},c),{},{icon:c.icon(f.primaryColor,f.secondaryColor)})),Gv(c.icon,"svg-".concat(c.name),wn(wn({className:n,onClick:i,style:a,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:l}))};Eo.displayName="IconReact",Eo.getTwoToneColors=B4,Eo.setTwoToneColors=P4;function hw(t){var e=cw(t),r=WC(e,2),n=r[0],i=r[1];return Eo.setTwoToneColors({primaryColor:n,secondaryColor:i})}function M4(){var t=Eo.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var F4=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];hw(zv.primary);var zt=Xe.forwardRef(function(t,e){var r=t.className,n=t.icon,i=t.spin,a=t.rotate,o=t.tabIndex,s=t.onClick,u=t.twoToneColor,l=$C(t,F4),f=Xe.useContext(VC),c=f.prefixCls,h=c===void 0?"anticon":c,d=f.rootClassName,p=qR(d,h,Lv(Lv({},"".concat(h,"-").concat(n.name),!!n.name),"".concat(h,"-spin"),!!i||n.name==="loading"),r),g=o;g===void 0&&s&&(g=-1);var v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,m=cw(u),y=WC(m,2),b=y[0],w=y[1];return Xe.createElement("span",kt({role:"img","aria-label":n.name},l,{ref:e,tabIndex:g,onClick:s,className:p}),Xe.createElement(Eo,{icon:n,primaryColor:b,secondaryColor:w,style:v}))});zt.displayName="AntdIcon",zt.getTwoToneColor=M4,zt.setTwoToneColor=hw;var L4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-center",theme:"outlined"},I4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:L4}))},dw=Xe.forwardRef(I4);process.env.NODE_ENV!=="production"&&(dw.displayName="AlignCenterOutlined");var R4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-left",theme:"outlined"},N4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:R4}))},vw=Xe.forwardRef(N4);process.env.NODE_ENV!=="production"&&(vw.displayName="AlignLeftOutlined");var k4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-right",theme:"outlined"},z4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:k4}))},pw=Xe.forwardRef(z4);process.env.NODE_ENV!=="production"&&(pw.displayName="AlignRightOutlined");var j4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z"}}]},name:"bold",theme:"outlined"},V4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:j4}))},gw=Xe.forwardRef(V4);process.env.NODE_ENV!=="production"&&(gw.displayName="BoldOutlined");var H4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},W4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:H4}))},mw=Xe.forwardRef(W4);process.env.NODE_ENV!=="production"&&(mw.displayName="CheckOutlined");var $4={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},G4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:$4}))},pf=Xe.forwardRef(G4);process.env.NODE_ENV!=="production"&&(pf.displayName="CloseOutlined");var U4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"}}]},name:"column-width",theme:"outlined"},q4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:U4}))},yw=Xe.forwardRef(q4);process.env.NODE_ENV!=="production"&&(yw.displayName="ColumnWidthOutlined");var Y4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},X4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:Y4}))},bw=Xe.forwardRef(X4);process.env.NODE_ENV!=="production"&&(bw.displayName="ExclamationCircleOutlined");var K4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"italic",theme:"outlined"},Z4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:K4}))},Cw=Xe.forwardRef(Z4);process.env.NODE_ENV!=="production"&&(Cw.displayName="ItalicOutlined");var J4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},Q4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:J4}))},ww=Xe.forwardRef(Q4);process.env.NODE_ENV!=="production"&&(ww.displayName="MinusCircleOutlined");var e8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M920 760H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-568H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM216 712H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h72.4v20.5h-35.7c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h35.7V838H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4V716c0-2.2-1.8-4-4-4zM100 188h38v120c0 2.2 1.8 4 4 4h40c2.2 0 4-1.8 4-4V152c0-4.4-3.6-8-8-8h-78c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4zm116 240H100c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4h68.4l-70.3 77.7a8.3 8.3 0 00-2.1 5.4V592c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4v-36c0-2.2-1.8-4-4-4h-68.4l70.3-77.7a8.3 8.3 0 002.1-5.4V432c0-2.2-1.8-4-4-4z"}}]},name:"ordered-list",theme:"outlined"},t8=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:e8}))},_w=Xe.forwardRef(t8);process.env.NODE_ENV!=="production"&&(_w.displayName="OrderedListOutlined");var r8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},n8=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:r8}))},Dw=Xe.forwardRef(n8);process.env.NODE_ENV!=="production"&&(Dw.displayName="PlusOutlined");var i8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824 804H200c-4.4 0-8 3.4-8 7.6v60.8c0 4.2 3.6 7.6 8 7.6h624c4.4 0 8-3.4 8-7.6v-60.8c0-4.2-3.6-7.6-8-7.6zm-312-76c69.4 0 134.6-27.1 183.8-76.2C745 602.7 772 537.4 772 468V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 97-79 176-176 176s-176-79-176-176V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 69.4 27.1 134.6 76.2 183.8C377.3 701 442.6 728 512 728z"}}]},name:"underline",theme:"outlined"},a8=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:i8}))},xw=Xe.forwardRef(a8);process.env.NODE_ENV!=="production"&&(xw.displayName="UnderlineOutlined");var o8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"unordered-list",theme:"outlined"},s8=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:o8}))},Sw=Xe.forwardRef(s8);process.env.NODE_ENV!=="production"&&(Sw.displayName="UnorderedListOutlined");const Ew=(t,e)=>{const r=k.useRef(null),n=(...i)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(...i)},e)};return k.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),n},Aw=["numbered-list","bulleted-list"],gf=["left","center","right","justify"],u8=({children:t})=>typeof document=="object"?yl.createPortal(t,document.body):null,l8=({defaultValue:t,onChange:e})=>{const r=k.useCallback(o=>A.jsx(c8,{...o}),[]),n=k.useCallback(o=>A.jsx(h8,{...o}),[]),i=k.useMemo(()=>RR(LR(RI())),[]),a=Ew(o=>{e==null||e(o)},300);return A.jsx("div",{style:{padding:"0px 10px 10px",width:"100%",height:"100%"},children:A.jsxs(MR,{editor:i,initialValue:t,onChange:a,children:[A.jsx(d8,{}),A.jsx(DR,{style:{width:"100%",height:"100%",outline:"none"},renderElement:r,renderLeaf:n,spellCheck:!0,autoFocus:!0,placeholder:"Enter some text...",onDOMBeforeInput:o=>{switch(o.inputType){case"formatBold":return o.preventDefault(),mf(i,"bold");case"formatItalic":return o.preventDefault(),mf(i,"italic");case"formatUnderline":return o.preventDefault(),mf(i,"underlined")}}})]})})},f8=(t,e)=>{const r=Tw(t,e,gf.includes(e)?"align":"type"),n=Aw.includes(e);ie.unwrapNodes(t,{match:a=>!T.isEditor(a)&&pe.isElement(a)&&Aw.includes(a.type)&&!gf.includes(e),split:!0});const i={};if(gf.includes(e)?i.align=r?void 0:e:i.type=r?"paragraph":n?"list-item":e,ie.setNodes(t,i),!r&&n){const a={type:e,children:[]};ie.wrapNodes(t,a)}},mf=(t,e)=>{Ow(t,e)?T.removeMark(t,e):T.addMark(t,e,!0)},Tw=(t,e,r="type")=>{const{selection:n}=t;if(!n)return!1;const[i]=Array.from(T.nodes(t,{at:T.unhangRange(t,n),match:a=>!T.isEditor(a)&&pe.isElement(a)&&a[r]===e}));return!!i},Ow=(t,e)=>{const r=T.marks(t);return r?r[e]===!0:!1},c8=({attributes:t,children:e,element:r})=>{const n={textAlign:r.align};switch(r.type){case"block-quote":return A.jsx("blockquote",{style:n,...t,children:e});case"bulleted-list":return A.jsx("ul",{style:n,...t,children:e});case"heading-one":return A.jsx("h1",{style:n,...t,children:e});case"heading-two":return A.jsx("h2",{style:n,...t,children:e});case"list-item":return A.jsx("li",{style:n,...t,children:e});case"numbered-list":return A.jsx("ol",{style:n,...t,children:e});default:return A.jsx("p",{style:n,...t,children:e})}},h8=({attributes:t,children:e,leaf:r})=>(r.bold&&(e=A.jsx("strong",{children:e})),r.code&&(e=A.jsx("code",{children:e})),r.italic&&(e=A.jsx("em",{children:e})),r.underline&&(e=A.jsx("u",{children:e})),A.jsx("span",{...t,children:e})),d8=()=>{const t=k.useRef(null),e=ff(),r=TR();return k.useEffect(()=>{const n=t.current,{selection:i}=e;if(!n)return;if(!i||!r||te.isCollapsed(i)||T.string(e,i)===""){n.removeAttribute("style");return}const a=window.getSelection(),o=a==null?void 0:a.getRangeAt(0),s=o==null?void 0:o.getBoundingClientRect();n.style.opacity="1",s&&(n.style.top=`${s.top+window.pageYOffset-n.offsetHeight}px`,n.style.left=`${s.left+window.pageXOffset-n.offsetWidth/2+s.width/2}px`)}),A.jsx(u8,{children:A.jsxs("div",{ref:t,className:"editor-menu",onMouseDown:n=>{n.preventDefault()},children:[A.jsx(Uv,{format:"bold",icon:A.jsx(gw,{})}),A.jsx(Uv,{format:"italic",icon:A.jsx(Cw,{})}),A.jsx(Uv,{format:"underline",icon:A.jsx(xw,{})}),A.jsx(Ao,{format:"numbered-list",icon:A.jsx(_w,{})}),A.jsx(Ao,{format:"bulleted-list",icon:A.jsx(Sw,{})}),A.jsx(Ao,{format:"left",icon:A.jsx(vw,{})}),A.jsx(Ao,{format:"center",icon:A.jsx(dw,{})}),A.jsx(Ao,{format:"right",icon:A.jsx(pw,{})}),A.jsx(Ao,{format:"justify",icon:A.jsx(yw,{})})]})})},Uv=({format:t,icon:e})=>{const r=ff();return A.jsx(Q.Button,{onClick:()=>mf(r,t),icon:e,color:Ow(r,t)?"primary":"default",variant:"text"})},Ao=({format:t,icon:e})=>{const r=ff();return A.jsx(Q.Button,{color:Tw(r,t,gf.includes(t)?"align":"type")?"primary":"default",icon:e,variant:"text",onClick:()=>{f8(r,t)}})},v8=({defaultValue:t,onChange:e})=>A.jsx("div",{style:{width:"100%",height:"100%"},children:A.jsx(l8,{defaultValue:t,onChange:e})});var yf={},qv={},Yv={};Object.defineProperty(Yv,"__esModule",{value:!0}),Yv.default=p8;function p8(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var i=Object.prototype.hasOwnProperty,a=0;a<r.length;a++)if(!i.call(e,r[a])||t[r[a]]!==e[r[a]])return!1;return!0}var Xv={},Pw={exports:{}},_t=Pw.exports={},_n,Dn;function Kv(){throw new Error("setTimeout has not been defined")}function Zv(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?_n=setTimeout:_n=Kv}catch{_n=Kv}try{typeof clearTimeout=="function"?Dn=clearTimeout:Dn=Zv}catch{Dn=Zv}})();function Bw(t){if(_n===setTimeout)return setTimeout(t,0);if((_n===Kv||!_n)&&setTimeout)return _n=setTimeout,setTimeout(t,0);try{return _n(t,0)}catch{try{return _n.call(null,t,0)}catch{return _n.call(this,t,0)}}}function g8(t){if(Dn===clearTimeout)return clearTimeout(t);if((Dn===Zv||!Dn)&&clearTimeout)return Dn=clearTimeout,clearTimeout(t);try{return Dn(t)}catch{try{return Dn.call(null,t)}catch{return Dn.call(this,t)}}}var Qn=[],To=!1,ma,bf=-1;function m8(){!To||!ma||(To=!1,ma.length?Qn=ma.concat(Qn):bf=-1,Qn.length&&Mw())}function Mw(){if(!To){var t=Bw(m8);To=!0;for(var e=Qn.length;e;){for(ma=Qn,Qn=[];++bf<e;)ma&&ma[bf].run();bf=-1,e=Qn.length}ma=null,To=!1,g8(t)}}_t.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Qn.push(new Fw(t,e)),Qn.length===1&&!To&&Bw(Mw)};function Fw(t,e){this.fun=t,this.array=e}Fw.prototype.run=function(){this.fun.apply(null,this.array)},_t.title="browser",_t.browser=!0,_t.env={},_t.argv=[],_t.version="",_t.versions={};function ei(){}_t.on=ei,_t.addListener=ei,_t.once=ei,_t.off=ei,_t.removeListener=ei,_t.removeAllListeners=ei,_t.emit=ei,_t.prependListener=ei,_t.prependOnceListener=ei,_t.listeners=function(t){return[]},_t.binding=function(t){throw new Error("process.binding is not supported")},_t.cwd=function(){return"/"},_t.chdir=function(t){throw new Error("process.chdir is not supported")},_t.umask=function(){return 0};var y8=Pw.exports;Object.defineProperty(Xv,"__esModule",{value:!0}),Xv.default=_8;var b8=y8,C8=w8(b8);function w8(t){return t&&t.__esModule?t:{default:t}}function _8(t,e){var r=[],n=0,i=!0;function a(s){function u(){e&&e(s,r)}i?C8.default.nextTick(u):u()}function o(s,u){r.push(u),++n>=t.length||s?a(s):t[n](o)}t.length>0?t[0](o):a(null),i=!1}var Jv={};Object.defineProperty(Jv,"__esModule",{value:!0}),Jv.default=x8;var D8=function(){};function x8(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:D8;t()?e(function n(i){for(var a=arguments.length,o=Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];i?r(i):t.apply(this,o)?e(n):r(null)}):r(null)}var Qv={};Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.default=S8;function S8(t,e){var r=void 0,n=void 0,i=void 0,a=void 0,o=0;function s(){a=0,o=+new Date,i=t.apply(r,n),r=null,n=null}return function(){r=this,n=arguments;var l=new Date-o;return a||(l>=e?s():a=setTimeout(s,e-l)),i}}var ep={};Object.defineProperty(ep,"__esModule",{value:!0}),ep.default=A8;var E8=0;function A8(){return E8++}var Cf={};Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.innerHeight=T8,Cf.innerWidth=O8;function T8(t){var e=window.getComputedStyle(t,null);return e?t.clientHeight-parseInt(e.getPropertyValue("padding-top"),10)-parseInt(e.getPropertyValue("padding-bottom"),10):t.clientHeight}function O8(t){var e=window.getComputedStyle(t,null);return e?t.clientWidth-parseInt(e.getPropertyValue("padding-left"),10)-parseInt(e.getPropertyValue("padding-right"),10):t.clientWidth}Object.defineProperty(qv,"__esModule",{value:!0});var Lw=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},P8=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),B8=k,tp=ya(B8),M8=Un,Ei=ya(M8),F8=Yv,L8=ya(F8),I8=Xv,R8=ya(I8),N8=Jv,Iw=ya(N8),k8=Qv,z8=ya(k8),j8=ep,Rw=ya(j8),Nw=Cf;function ya(t){return t&&t.__esModule?t:{default:t}}function V8(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function H8(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W8(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function $8(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function kw(t,e){return t.scrollWidth-1<=e}function zw(t,e){return t.scrollHeight-1<=e}function G8(){}var rp=function(t){$8(e,t);function e(r){H8(this,e);var n=W8(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r));return n.state={fontSize:null,ready:!1},n.handleWindowResize=function(){n.process()},"perfectFit"in r&&console.warn("TextFit property perfectFit has been removed."),n.handleWindowResize=(0,z8.default)(n.handleWindowResize,r.throttle),n}return P8(e,[{key:"componentDidMount",value:function(){var n=this.props.autoResize;n&&window.addEventListener("resize",this.handleWindowResize),this.process()}},{key:"componentDidUpdate",value:function(n){var i=this.state.ready;i&&((0,L8.default)(this.props,n)||this.process())}},{key:"componentWillUnmount",value:function(){var n=this.props.autoResize;n&&window.removeEventListener("resize",this.handleWindowResize),this.pid=(0,Rw.default)()}},{key:"process",value:function(){var n=this,i=this.props,a=i.min,o=i.max,s=i.mode,u=i.forceSingleModeWidth,l=i.onReady,f=this._parent,c=this._child,h=(0,Nw.innerWidth)(f),d=(0,Nw.innerHeight)(f);if(d<=0||isNaN(d)){console.warn("Can not process element without height. Make sure the element is displayed and has a static height.");return}if(h<=0||isNaN(h)){console.warn("Can not process element without width. Make sure the element is displayed and has a static width.");return}var p=(0,Rw.default)();this.pid=p;var g=function(){return p!==n.pid},v=s==="multi"?function(){return zw(c,d)}:function(){return kw(c,h)},m=s==="multi"?function(){return kw(c,h)}:function(){return zw(c,d)},y=void 0,b=a,w=o;this.setState({ready:!1}),(0,R8.default)([function(C){return(0,Iw.default)(function(){return b<=w},function(_){if(g())return _(!0);y=parseInt((b+w)/2,10),n.setState({fontSize:y},function(){return g()?_(!0):(v()?b=y+1:w=y-1,_())})},C)},function(C){return s==="single"&&u||m()?C():(b=a,w=y,(0,Iw.default)(function(){return b<w},function(_){if(g())return _(!0);y=parseInt((b+w)/2,10),n.setState({fontSize:y},function(){return p!==n.pid?_(!0):(m()?b=y+1:w=y-1,_())})},C))},function(C){if(y=Math.min(b,w),y=Math.max(y,a),y=Math.min(y,o),y=Math.max(y,0),g())return C(!0);n.setState({fontSize:y},C)}],function(C){C||g()||n.setState({ready:!0},function(){return l(y)})})}},{key:"render",value:function(){var n=this,i=this.props,a=i.children,o=i.text,s=i.style;i.min,i.max;var u=i.mode;i.forceWidth,i.forceSingleModeWidth,i.throttle,i.autoResize,i.onReady;var l=V8(i,["children","text","style","min","max","mode","forceWidth","forceSingleModeWidth","throttle","autoResize","onReady"]),f=this.state,c=f.fontSize,h=f.ready,d=Lw({},s,{fontSize:c}),p={display:h?"block":"inline-block"};return u==="single"&&(p.whiteSpace="nowrap"),tp.default.createElement("div",Lw({ref:function(v){return n._parent=v},style:d},l),tp.default.createElement("div",{ref:function(v){return n._child=v},style:p},o&&typeof a=="function"?h?a(o):o:a))}}]),e}(tp.default.Component);rp.propTypes={children:Ei.default.node,text:Ei.default.string,min:Ei.default.number,max:Ei.default.number,mode:Ei.default.oneOf(["single","multi"]),forceSingleModeWidth:Ei.default.bool,throttle:Ei.default.number,onReady:Ei.default.func},rp.defaultProps={min:1,max:100,mode:"multi",forceSingleModeWidth:!0,throttle:50,autoResize:!0,onReady:G8},qv.default=rp,Object.defineProperty(yf,"__esModule",{value:!0});var np=yf.Textfit=void 0,U8=qv,jw=q8(U8);function q8(t){return t&&t.__esModule?t:{default:t}}np=yf.Textfit=jw.default,yf.default=jw.default;const Vw=t=>{const{conditionList:e,conditionType:r}=t,n=e.map(a=>{const{field:o,condition:s,val:u,val2:l}=a;switch(s){case"=":return`${o}.eq.${u}`;case"!=":return`${o}.neq.${u}`;case"contain":return u&&l?`${o}.gte.${u},${o}.lte.${l}`:"";case"before":return`${o}.lt.${u}`;case"after":return`${o}.gt.${u}`;case"null":return`${o}.is.null`;case"notnull":return`${o}.is.not.null`;default:return""}}).filter(Boolean);let i;return r==="all"?i=`or=(${n.join(",")})`:i=`and=(${n.join(",")})`,i};function Y8(t,e=0){if(!Number.isFinite(t))throw new Error("Value must be a finite number.");return new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:e,maximumFractionDigits:e}).format(t)}function ru(t,e=0){if(!Number.isFinite(t))throw new Error("Value must be a finite number.");const r=new Intl.NumberFormat(void 0,{minimumFractionDigits:0,maximumFractionDigits:e}).format(t),[n,i]=r.split("."),a=(i||"").padEnd(e,"0");return`${n}${e>0?".":""}${a}`}const Hw=({moduleDataApi:t,customData:e,customeStyle:r,width:n,height:i})=>{const[a,o]=k.useState(),s=k.useRef(),u=k.useCallback(async()=>{if(e){let h="";e.statisticalMethod==="fieldValue"&&(h+=`select=${e.field}`),e!=null&&e.conditionData&&(e.statisticalMethod==="fieldValue"?h+=`&${Vw(e==null?void 0:e.conditionData)}`:h+=`${Vw(e==null?void 0:e.conditionData)}`),e!=null&&e.dataSourceId&&(t==null||t({id:e==null?void 0:e.dataSourceId,query:h}).then(d=>{if(!d.success){Q.message.error(d.message);return}o(d.data)}))}else o([])},[e]);k.useEffect(()=>{e&&u()},[e]);const l=k.useMemo(()=>{if(!a)return"";const h=a,{statisticalMethod:d,statisticalType:p,field:g}=e||{};let v=0;if(h.length&&d==="fieldValue"&&g){const m=h.map(y=>y[g]).filter(y=>typeof y=="number");switch(p){case"sum":v=m.reduce((y,b)=>y+b,0);break;case"max":v=Math.max(...m);break;case"min":v=Math.min(...m);break;case"average":v=m.length?m.reduce((y,b)=>y+b,0)/m.length:0;break;default:v=0}}else d==="recordTotal"&&(v=h.length);if(r!=null&&r.unit){const{unit:m,precision:y}=r;switch(m){case"4":v=`¥${ru(v,y)}`;break;case"5":v=`$${ru(v,y)}`;break;case"1":v=ru(v,y);break;case"3":v=Y8(v,y);break;default:v=ru(v,y)}}else v=ru(v,r==null?void 0:r.precision);return v},[a,e,r]),[f,c]=k.useState("100%");return k.useEffect(()=>{const h=()=>{s.current&&c(s.current.offsetWidth)};return h(),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[n,i]),A.jsx("div",{ref:s,style:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:A.jsxs("div",{style:{display:"flex",flexWrap:"wrap",height:"100%",width:f},children:[l!==""?A.jsx("div",{className:"stat-text",style:{color:r==null?void 0:r.color,textAlign:"center",lineHeight:"normal",marginBottom:r!=null&&r.desc?0:"auto",marginTop:"auto",padding:"0 20px",width:f},children:A.jsx(np,{mode:"single",children:l})}):null,r!=null&&r.desc?A.jsx("div",{className:"stat-description-text",style:{color:r==null?void 0:r.color,textAlign:"center",marginTop:"15px"},children:A.jsx(np,{mode:"single",max:25,children:r==null?void 0:r.desc})}):null]})})};var Ww={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Ji,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",f="week",c="month",h="quarter",d="year",p="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var M=["th","st","nd","rd"],I=B%100;return"["+B+(M[(I-20)%10]||M[I]||M[0])+"]"}},b=function(B,M,I){var j=String(B);return!j||j.length>=M?B:""+Array(M+1-j.length).join(I)+B},w={s:b,z:function(B){var M=-B.utcOffset(),I=Math.abs(M),j=Math.floor(I/60),z=I%60;return(M<=0?"+":"-")+b(j,2,"0")+":"+b(z,2,"0")},m:function B(M,I){if(M.date()<I.date())return-B(I,M);var j=12*(I.year()-M.year())+(I.month()-M.month()),z=M.clone().add(j,c),W=I-z<0,R=M.clone().add(j+(W?-1:1),c);return+(-(j+(I-z)/(W?z-R:R-z))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:c,y:d,w:f,d:l,D:p,h:u,m:s,s:o,ms:a,Q:h}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},C="en",_={};_[C]=y;var D="$isDayjsObject",x=function(B){return B instanceof P||!(!B||!B[D])},S=function B(M,I,j){var z;if(!M)return C;if(typeof M=="string"){var W=M.toLowerCase();_[W]&&(z=W),I&&(_[W]=I,z=W);var R=M.split("-");if(!z&&R.length>1)return B(R[0])}else{var U=M.name;_[U]=M,z=U}return!j&&z&&(C=z),z||!j&&C},O=function(B,M){if(x(B))return B.clone();var I=typeof M=="object"?M:{};return I.date=B,I.args=arguments,new P(I)},E=w;E.l=S,E.i=x,E.w=function(B,M){return O(B,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var P=function(){function B(I){this.$L=S(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[D]=!0}var M=B.prototype;return M.parse=function(I){this.$d=function(j){var z=j.date,W=j.utc;if(z===null)return new Date(NaN);if(E.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var R=z.match(v);if(R){var U=R[2]-1||0,Z=(R[7]||"0").substring(0,3);return W?new Date(Date.UTC(R[1],U,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Z)):new Date(R[1],U,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Z)}}return new Date(z)}(I),this.init()},M.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},M.$utils=function(){return E},M.isValid=function(){return this.$d.toString()!==g},M.isSame=function(I,j){var z=O(I);return this.startOf(j)<=z&&z<=this.endOf(j)},M.isAfter=function(I,j){return O(I)<this.startOf(j)},M.isBefore=function(I,j){return this.endOf(j)<O(I)},M.$g=function(I,j,z){return E.u(I)?this[j]:this.set(z,I)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(I,j){var z=this,W=!!E.u(j)||j,R=E.p(I),U=function(G,J){var K=E.w(z.$u?Date.UTC(z.$y,J,G):new Date(z.$y,J,G),z);return W?K:K.endOf(l)},Z=function(G,J){return E.w(z.toDate()[G].apply(z.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(J)),z)},ee=this.$W,ne=this.$M,q=this.$D,L="set"+(this.$u?"UTC":"");switch(R){case d:return W?U(1,0):U(31,11);case c:return W?U(1,ne):U(0,ne+1);case f:var X=this.$locale().weekStart||0,V=(ee<X?ee+7:ee)-X;return U(W?q-V:q+(6-V),ne);case l:case p:return Z(L+"Hours",0);case u:return Z(L+"Minutes",1);case s:return Z(L+"Seconds",2);case o:return Z(L+"Milliseconds",3);default:return this.clone()}},M.endOf=function(I){return this.startOf(I,!1)},M.$set=function(I,j){var z,W=E.p(I),R="set"+(this.$u?"UTC":""),U=(z={},z[l]=R+"Date",z[p]=R+"Date",z[c]=R+"Month",z[d]=R+"FullYear",z[u]=R+"Hours",z[s]=R+"Minutes",z[o]=R+"Seconds",z[a]=R+"Milliseconds",z)[W],Z=W===l?this.$D+(j-this.$W):j;if(W===c||W===d){var ee=this.clone().set(p,1);ee.$d[U](Z),ee.init(),this.$d=ee.set(p,Math.min(this.$D,ee.daysInMonth())).$d}else U&&this.$d[U](Z);return this.init(),this},M.set=function(I,j){return this.clone().$set(I,j)},M.get=function(I){return this[E.p(I)]()},M.add=function(I,j){var z,W=this;I=Number(I);var R=E.p(j),U=function(ne){var q=O(W);return E.w(q.date(q.date()+Math.round(ne*I)),W)};if(R===c)return this.set(c,this.$M+I);if(R===d)return this.set(d,this.$y+I);if(R===l)return U(1);if(R===f)return U(7);var Z=(z={},z[s]=n,z[u]=i,z[o]=r,z)[R]||1,ee=this.$d.getTime()+I*Z;return E.w(ee,this)},M.subtract=function(I,j){return this.add(-1*I,j)},M.format=function(I){var j=this,z=this.$locale();if(!this.isValid())return z.invalidDate||g;var W=I||"YYYY-MM-DDTHH:mm:ssZ",R=E.z(this),U=this.$H,Z=this.$m,ee=this.$M,ne=z.weekdays,q=z.months,L=z.meridiem,X=function(J,K,Y,fe){return J&&(J[K]||J(j,W))||Y[K].slice(0,fe)},V=function(J){return E.s(U%12||12,J,"0")},G=L||function(J,K,Y){var fe=J<12?"AM":"PM";return Y?fe.toLowerCase():fe};return W.replace(m,function(J,K){return K||function(Y){switch(Y){case"YY":return String(j.$y).slice(-2);case"YYYY":return E.s(j.$y,4,"0");case"M":return ee+1;case"MM":return E.s(ee+1,2,"0");case"MMM":return X(z.monthsShort,ee,q,3);case"MMMM":return X(q,ee);case"D":return j.$D;case"DD":return E.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return X(z.weekdaysMin,j.$W,ne,2);case"ddd":return X(z.weekdaysShort,j.$W,ne,3);case"dddd":return ne[j.$W];case"H":return String(U);case"HH":return E.s(U,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return G(U,Z,!0);case"A":return G(U,Z,!1);case"m":return String(Z);case"mm":return E.s(Z,2,"0");case"s":return String(j.$s);case"ss":return E.s(j.$s,2,"0");case"SSS":return E.s(j.$ms,3,"0");case"Z":return R}return null}(J)||R.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(I,j,z){var W,R=this,U=E.p(j),Z=O(I),ee=(Z.utcOffset()-this.utcOffset())*n,ne=this-Z,q=function(){return E.m(R,Z)};switch(U){case d:W=q()/12;break;case c:W=q();break;case h:W=q()/3;break;case f:W=(ne-ee)/6048e5;break;case l:W=(ne-ee)/864e5;break;case u:W=ne/i;break;case s:W=ne/n;break;case o:W=ne/r;break;default:W=ne}return z?W:E.a(W)},M.daysInMonth=function(){return this.endOf(c).$D},M.$locale=function(){return _[this.$L]},M.locale=function(I,j){if(!I)return this.$L;var z=this.clone(),W=S(I,j,!0);return W&&(z.$L=W),z},M.clone=function(){return E.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},B}(),F=P.prototype;return O.prototype=F,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",c],["$y",d],["$D",p]].forEach(function(B){F[B[1]]=function(M){return this.$g(M,B[0],B[1])}}),O.extend=function(B,M){return B.$i||(B(M,P,O),B.$i=!0),O},O.locale=S,O.isDayjs=x,O.unix=function(B){return O(1e3*B)},O.en=_[C],O.Ls=_,O.p={},O})})(Ww);var X8=Ww.exports;const ti=lo(X8);var $w={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Ji,function(){return function(r,n,i){n.prototype.isBetween=function(a,o,s,u){var l=i(a),f=i(o),c=(u=u||"()")[0]==="(",h=u[1]===")";return(c?this.isAfter(l,s):!this.isBefore(l,s))&&(h?this.isBefore(f,s):!this.isAfter(f,s))||(c?this.isBefore(l,s):!this.isAfter(l,s))&&(h?this.isAfter(f,s):!this.isBefore(f,s))}}})})($w);var K8=$w.exports;const Z8=lo(K8),Gw=k.createContext(void 0),J8=({children:t,initialData:e})=>{const[r,n]=k.useState(e);return A.jsx(Gw.Provider,{value:{globalData:r,setGlobalData:n},children:t})},Oo=()=>{const t=k.useContext(Gw);if(!t)throw new Error("useAppContext must be used within an AppProvider");return t},Q8=(...t)=>{console!=null&&console.warn&&(ba(t[0])&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t))},Uw={},ip=(...t)=>{ba(t[0])&&Uw[t[0]]||(ba(t[0])&&(Uw[t[0]]=new Date),Q8(...t))},qw=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},Yw=(t,e,r)=>{t.loadNamespaces(e,qw(t,r))},Xw=(t,e,r,n)=>{ba(r)&&(r=[r]),r.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,qw(t,n))},eN=(t,e,r={})=>!e.languages||!e.languages.length?(ip("i18n.languages were undefined or empty",e.languages),!0):e.hasLoadedNamespace(t,{lng:r.lng,precheck:(n,i)=>{var a;if(((a=r.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,t))return!1}}),ba=t=>typeof t=="string",tN=t=>typeof t=="object"&&t!==null,rN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,nN={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},iN=t=>nN[t];let ap={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t=>t.replace(rN,iN)};const aN=(t={})=>{ap={...ap,...t}},oN=()=>ap;let Kw;const sN=t=>{Kw=t},uN=()=>Kw,lN={type:"3rdParty",init(t){aN(t.options.react),sN(t)}},fN=k.createContext();class cN{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const hN=(t,e)=>{const r=k.useRef();return k.useEffect(()=>{r.current=t},[t,e]),r.current},Zw=(t,e,r,n)=>t.getFixedT(e,r,n),dN=(t,e,r,n)=>k.useCallback(Zw(t,e,r,n),[t,e,r,n]),zr=(t,e={})=>{var w,C,_,D;const{i18n:r}=e,{i18n:n,defaultNS:i}=k.useContext(fN)||{},a=r||n||uN();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new cN),!a){ip("You will need to pass in an i18next instance by using initReactI18next");const x=(O,E)=>ba(E)?E:tN(E)&&ba(E.defaultValue)?E.defaultValue:Array.isArray(O)?O[O.length-1]:O,S=[x,{},!1];return S.t=x,S.i18n={},S.ready=!1,S}(w=a.options.react)!=null&&w.wait&&ip("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...oN(),...a.options.react,...e},{useSuspense:s,keyPrefix:u}=o;let l=i||((C=a.options)==null?void 0:C.defaultNS);l=ba(l)?[l]:l||["translation"],(D=(_=a.reportNamespaces).addUsedNamespaces)==null||D.call(_,l);const f=(a.isInitialized||a.initializedStoreOnce)&&l.every(x=>eN(x,a,o)),c=dN(a,e.lng||null,o.nsMode==="fallback"?l:l[0],u),h=()=>c,d=()=>Zw(a,e.lng||null,o.nsMode==="fallback"?l:l[0],u),[p,g]=k.useState(h);let v=l.join();e.lng&&(v=`${e.lng}${v}`);const m=hN(v),y=k.useRef(!0);k.useEffect(()=>{const{bindI18n:x,bindI18nStore:S}=o;y.current=!0,!f&&!s&&(e.lng?Xw(a,e.lng,l,()=>{y.current&&g(d)}):Yw(a,l,()=>{y.current&&g(d)})),f&&m&&m!==v&&y.current&&g(d);const O=()=>{y.current&&g(d)};return x&&(a==null||a.on(x,O)),S&&(a==null||a.store.on(S,O)),()=>{y.current=!1,a&&(x==null||x.split(" ").forEach(E=>a.off(E,O))),S&&a&&S.split(" ").forEach(E=>a.store.off(E,O))}},[a,v]),k.useEffect(()=>{y.current&&f&&g(h)},[a,u,f]);const b=[p,a,f];if(b.t=p,b.i18n=a,b.ready=f,f||!f&&!s)return b;throw new Promise(x=>{e.lng?Xw(a,e.lng,l,()=>x()):Yw(a,l,()=>x())})};ti.extend(Z8);const Jw=({moduleDataApi:t,customData:e})=>{const{t:r}=zr(),{globalData:n}=Oo(),[i,a]=k.useState(),[o,s]=k.useState(),u=k.useCallback(async()=>{e?t==null||t({id:e==null?void 0:e.dataSourceId}).then(c=>{if(!c.success){Q.message.error(c.message);return}a(c.data)}):a([])},[e,t]);k.useEffect(()=>{e&&u()},[u,e==null?void 0:e.dataSourceId,e]),k.useEffect(()=>{var c;n!=null&&n.sourceData&&(e!=null&&e.dataSourceId)&&s((c=n==null?void 0:n.sourceData.find(h=>h.value===(e==null?void 0:e.dataSourceId)))==null?void 0:c.fields)},[n,e]);const l=k.useMemo(()=>c=>{const h=i==null?void 0:i.filter(d=>e!=null&&e.startDateField&&(e!=null&&e.endDateField)?c==null?void 0:c.isBetween(ti(d[e==null?void 0:e.startDateField]),ti(d[e==null?void 0:e.endDateField]),"day"):e!=null&&e.startDateField?(e==null?void 0:e.startDateField)&&c.isSame(ti(d[e==null?void 0:e.startDateField]),"day"):e!=null&&e.endDateField?(e==null?void 0:e.endDateField)&&c.isSame(ti(d[e==null?void 0:e.endDateField]),"day"):!1);return A.jsx("div",{className:"events",children:h==null?void 0:h.map((d,p)=>A.jsx("div",{children:A.jsx(Q.Popover,{placement:"right",trigger:"click",content:A.jsx("div",{style:{width:"200px",height:"300px",overflowY:"auto"},children:o!=null&&o.length?A.jsx(Q.Descriptions,{column:1,title:e!=null&&e.titleField?d[e==null?void 0:e.titleField]||r("unnamedRecord"):null,items:o==null?void 0:o.map((g,v)=>({key:v,label:g.label,children:g!=null&&g.name?d[g.name]||r("unnamedRecord"):null}))}):null}),children:A.jsx(Q.Badge,{status:"warning",text:e!=null&&e.titleField?d[e==null?void 0:e.titleField]||r("unnamedRecord"):null})})},p))})},[i,e==null?void 0:e.endDateField,e==null?void 0:e.startDateField,e==null?void 0:e.titleField]),f=k.useMemo(()=>(c,h)=>h.type==="date"?l(c):h.originNode,[l]);return A.jsx("div",{className:"box-calendar-module",children:A.jsx(Q.Calendar,{cellRender:f})})};/*! *****************************************************************************
|
|
126
|
+
`,T4=function(e){var r=k.useContext(VC),n=r.csp,i=r.prefixCls,a=A4;i&&(a=a.replace(/anticon/g,i)),k.useEffect(function(){var o=e.current,s=b4(o);m4(a,"@ant-design-icons",{prepend:!0,csp:n,attachTo:s})},[])},O4=["icon","className","onClick","style","primaryColor","secondaryColor"],tu={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function P4(t){var e=t.primaryColor,r=t.secondaryColor;tu.primaryColor=e,tu.secondaryColor=r||fw(e),tu.calculated=!!r}function B4(){return wn({},tu)}var Eo=function(e){var r=e.icon,n=e.className,i=e.onClick,a=e.style,o=e.primaryColor,s=e.secondaryColor,u=$C(e,O4),l=Xe.useRef(),f=tu;if(o&&(f={primaryColor:o,secondaryColor:s||fw(o)}),T4(l),E4(uw(r),"icon should be icon definiton, but got ".concat(r)),!uw(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=wn(wn({},c),{},{icon:c.icon(f.primaryColor,f.secondaryColor)})),Gv(c.icon,"svg-".concat(c.name),wn(wn({className:n,onClick:i,style:a,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:l}))};Eo.displayName="IconReact",Eo.getTwoToneColors=B4,Eo.setTwoToneColors=P4;function hw(t){var e=cw(t),r=WC(e,2),n=r[0],i=r[1];return Eo.setTwoToneColors({primaryColor:n,secondaryColor:i})}function M4(){var t=Eo.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var F4=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];hw(zv.primary);var zt=Xe.forwardRef(function(t,e){var r=t.className,n=t.icon,i=t.spin,a=t.rotate,o=t.tabIndex,s=t.onClick,u=t.twoToneColor,l=$C(t,F4),f=Xe.useContext(VC),c=f.prefixCls,h=c===void 0?"anticon":c,d=f.rootClassName,p=qR(d,h,Lv(Lv({},"".concat(h,"-").concat(n.name),!!n.name),"".concat(h,"-spin"),!!i||n.name==="loading"),r),g=o;g===void 0&&s&&(g=-1);var v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,m=cw(u),y=WC(m,2),b=y[0],w=y[1];return Xe.createElement("span",kt({role:"img","aria-label":n.name},l,{ref:e,tabIndex:g,onClick:s,className:p}),Xe.createElement(Eo,{icon:n,primaryColor:b,secondaryColor:w,style:v}))});zt.displayName="AntdIcon",zt.getTwoToneColor=M4,zt.setTwoToneColor=hw;var L4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-center",theme:"outlined"},I4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:L4}))},dw=Xe.forwardRef(I4);process.env.NODE_ENV!=="production"&&(dw.displayName="AlignCenterOutlined");var R4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-left",theme:"outlined"},N4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:R4}))},vw=Xe.forwardRef(N4);process.env.NODE_ENV!=="production"&&(vw.displayName="AlignLeftOutlined");var k4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-right",theme:"outlined"},z4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:k4}))},pw=Xe.forwardRef(z4);process.env.NODE_ENV!=="production"&&(pw.displayName="AlignRightOutlined");var j4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z"}}]},name:"bold",theme:"outlined"},V4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:j4}))},gw=Xe.forwardRef(V4);process.env.NODE_ENV!=="production"&&(gw.displayName="BoldOutlined");var H4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},W4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:H4}))},mw=Xe.forwardRef(W4);process.env.NODE_ENV!=="production"&&(mw.displayName="CheckOutlined");var $4={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},G4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:$4}))},pf=Xe.forwardRef(G4);process.env.NODE_ENV!=="production"&&(pf.displayName="CloseOutlined");var U4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"}}]},name:"column-width",theme:"outlined"},q4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:U4}))},yw=Xe.forwardRef(q4);process.env.NODE_ENV!=="production"&&(yw.displayName="ColumnWidthOutlined");var Y4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},X4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:Y4}))},bw=Xe.forwardRef(X4);process.env.NODE_ENV!=="production"&&(bw.displayName="ExclamationCircleOutlined");var K4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"italic",theme:"outlined"},Z4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:K4}))},Cw=Xe.forwardRef(Z4);process.env.NODE_ENV!=="production"&&(Cw.displayName="ItalicOutlined");var J4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},Q4=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:J4}))},ww=Xe.forwardRef(Q4);process.env.NODE_ENV!=="production"&&(ww.displayName="MinusCircleOutlined");var e8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M920 760H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-568H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM216 712H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h72.4v20.5h-35.7c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h35.7V838H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4V716c0-2.2-1.8-4-4-4zM100 188h38v120c0 2.2 1.8 4 4 4h40c2.2 0 4-1.8 4-4V152c0-4.4-3.6-8-8-8h-78c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4zm116 240H100c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4h68.4l-70.3 77.7a8.3 8.3 0 00-2.1 5.4V592c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4v-36c0-2.2-1.8-4-4-4h-68.4l70.3-77.7a8.3 8.3 0 002.1-5.4V432c0-2.2-1.8-4-4-4z"}}]},name:"ordered-list",theme:"outlined"},t8=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:e8}))},_w=Xe.forwardRef(t8);process.env.NODE_ENV!=="production"&&(_w.displayName="OrderedListOutlined");var r8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},n8=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:r8}))},Dw=Xe.forwardRef(n8);process.env.NODE_ENV!=="production"&&(Dw.displayName="PlusOutlined");var i8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824 804H200c-4.4 0-8 3.4-8 7.6v60.8c0 4.2 3.6 7.6 8 7.6h624c4.4 0 8-3.4 8-7.6v-60.8c0-4.2-3.6-7.6-8-7.6zm-312-76c69.4 0 134.6-27.1 183.8-76.2C745 602.7 772 537.4 772 468V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 97-79 176-176 176s-176-79-176-176V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 69.4 27.1 134.6 76.2 183.8C377.3 701 442.6 728 512 728z"}}]},name:"underline",theme:"outlined"},a8=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:i8}))},xw=Xe.forwardRef(a8);process.env.NODE_ENV!=="production"&&(xw.displayName="UnderlineOutlined");var o8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"unordered-list",theme:"outlined"},s8=function(e,r){return Xe.createElement(zt,kt({},e,{ref:r,icon:o8}))},Sw=Xe.forwardRef(s8);process.env.NODE_ENV!=="production"&&(Sw.displayName="UnorderedListOutlined");const Ew=(t,e)=>{const r=k.useRef(null),n=(...i)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(...i)},e)};return k.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),n},Aw=["numbered-list","bulleted-list"],gf=["left","center","right","justify"],u8=({children:t})=>typeof document=="object"?yl.createPortal(t,document.body):null,l8=({defaultValue:t,onChange:e})=>{const r=k.useCallback(o=>A.jsx(c8,{...o}),[]),n=k.useCallback(o=>A.jsx(h8,{...o}),[]),i=k.useMemo(()=>RR(LR(RI())),[]),a=Ew(o=>{e==null||e(o)},300);return A.jsx("div",{style:{padding:"0px 10px 10px",width:"100%",height:"100%"},children:A.jsxs(MR,{editor:i,initialValue:t,onChange:a,children:[A.jsx(d8,{}),A.jsx(DR,{style:{width:"100%",height:"100%",outline:"none"},renderElement:r,renderLeaf:n,spellCheck:!0,autoFocus:!0,placeholder:"Enter some text...",onDOMBeforeInput:o=>{switch(o.inputType){case"formatBold":return o.preventDefault(),mf(i,"bold");case"formatItalic":return o.preventDefault(),mf(i,"italic");case"formatUnderline":return o.preventDefault(),mf(i,"underlined")}}})]})})},f8=(t,e)=>{const r=Tw(t,e,gf.includes(e)?"align":"type"),n=Aw.includes(e);ae.unwrapNodes(t,{match:a=>!T.isEditor(a)&&pe.isElement(a)&&Aw.includes(a.type)&&!gf.includes(e),split:!0});const i={};if(gf.includes(e)?i.align=r?void 0:e:i.type=r?"paragraph":n?"list-item":e,ae.setNodes(t,i),!r&&n){const a={type:e,children:[]};ae.wrapNodes(t,a)}},mf=(t,e)=>{Ow(t,e)?T.removeMark(t,e):T.addMark(t,e,!0)},Tw=(t,e,r="type")=>{const{selection:n}=t;if(!n)return!1;const[i]=Array.from(T.nodes(t,{at:T.unhangRange(t,n),match:a=>!T.isEditor(a)&&pe.isElement(a)&&a[r]===e}));return!!i},Ow=(t,e)=>{const r=T.marks(t);return r?r[e]===!0:!1},c8=({attributes:t,children:e,element:r})=>{const n={textAlign:r.align};switch(r.type){case"block-quote":return A.jsx("blockquote",{style:n,...t,children:e});case"bulleted-list":return A.jsx("ul",{style:n,...t,children:e});case"heading-one":return A.jsx("h1",{style:n,...t,children:e});case"heading-two":return A.jsx("h2",{style:n,...t,children:e});case"list-item":return A.jsx("li",{style:n,...t,children:e});case"numbered-list":return A.jsx("ol",{style:n,...t,children:e});default:return A.jsx("p",{style:n,...t,children:e})}},h8=({attributes:t,children:e,leaf:r})=>(r.bold&&(e=A.jsx("strong",{children:e})),r.code&&(e=A.jsx("code",{children:e})),r.italic&&(e=A.jsx("em",{children:e})),r.underline&&(e=A.jsx("u",{children:e})),A.jsx("span",{...t,children:e})),d8=()=>{const t=k.useRef(null),e=ff(),r=TR();return k.useEffect(()=>{const n=t.current,{selection:i}=e;if(!n)return;if(!i||!r||te.isCollapsed(i)||T.string(e,i)===""){n.removeAttribute("style");return}const a=window.getSelection(),o=a==null?void 0:a.getRangeAt(0),s=o==null?void 0:o.getBoundingClientRect();n.style.opacity="1",s&&(n.style.top=`${s.top+window.pageYOffset-n.offsetHeight}px`,n.style.left=`${s.left+window.pageXOffset-n.offsetWidth/2+s.width/2}px`)}),A.jsx(u8,{children:A.jsxs("div",{ref:t,className:"editor-menu",onMouseDown:n=>{n.preventDefault()},children:[A.jsx(Uv,{format:"bold",icon:A.jsx(gw,{})}),A.jsx(Uv,{format:"italic",icon:A.jsx(Cw,{})}),A.jsx(Uv,{format:"underline",icon:A.jsx(xw,{})}),A.jsx(Ao,{format:"numbered-list",icon:A.jsx(_w,{})}),A.jsx(Ao,{format:"bulleted-list",icon:A.jsx(Sw,{})}),A.jsx(Ao,{format:"left",icon:A.jsx(vw,{})}),A.jsx(Ao,{format:"center",icon:A.jsx(dw,{})}),A.jsx(Ao,{format:"right",icon:A.jsx(pw,{})}),A.jsx(Ao,{format:"justify",icon:A.jsx(yw,{})})]})})},Uv=({format:t,icon:e})=>{const r=ff();return A.jsx(Q.Button,{onClick:()=>mf(r,t),icon:e,color:Ow(r,t)?"primary":"default",variant:"text"})},Ao=({format:t,icon:e})=>{const r=ff();return A.jsx(Q.Button,{color:Tw(r,t,gf.includes(t)?"align":"type")?"primary":"default",icon:e,variant:"text",onClick:()=>{f8(r,t)}})},v8=({defaultValue:t,onChange:e})=>A.jsx("div",{style:{width:"100%",height:"100%"},children:A.jsx(l8,{defaultValue:t,onChange:e})});var yf={},qv={},Yv={};Object.defineProperty(Yv,"__esModule",{value:!0}),Yv.default=p8;function p8(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var i=Object.prototype.hasOwnProperty,a=0;a<r.length;a++)if(!i.call(e,r[a])||t[r[a]]!==e[r[a]])return!1;return!0}var Xv={},Pw={exports:{}},_t=Pw.exports={},_n,Dn;function Kv(){throw new Error("setTimeout has not been defined")}function Zv(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?_n=setTimeout:_n=Kv}catch{_n=Kv}try{typeof clearTimeout=="function"?Dn=clearTimeout:Dn=Zv}catch{Dn=Zv}})();function Bw(t){if(_n===setTimeout)return setTimeout(t,0);if((_n===Kv||!_n)&&setTimeout)return _n=setTimeout,setTimeout(t,0);try{return _n(t,0)}catch{try{return _n.call(null,t,0)}catch{return _n.call(this,t,0)}}}function g8(t){if(Dn===clearTimeout)return clearTimeout(t);if((Dn===Zv||!Dn)&&clearTimeout)return Dn=clearTimeout,clearTimeout(t);try{return Dn(t)}catch{try{return Dn.call(null,t)}catch{return Dn.call(this,t)}}}var Qn=[],To=!1,ma,bf=-1;function m8(){!To||!ma||(To=!1,ma.length?Qn=ma.concat(Qn):bf=-1,Qn.length&&Mw())}function Mw(){if(!To){var t=Bw(m8);To=!0;for(var e=Qn.length;e;){for(ma=Qn,Qn=[];++bf<e;)ma&&ma[bf].run();bf=-1,e=Qn.length}ma=null,To=!1,g8(t)}}_t.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Qn.push(new Fw(t,e)),Qn.length===1&&!To&&Bw(Mw)};function Fw(t,e){this.fun=t,this.array=e}Fw.prototype.run=function(){this.fun.apply(null,this.array)},_t.title="browser",_t.browser=!0,_t.env={},_t.argv=[],_t.version="",_t.versions={};function ei(){}_t.on=ei,_t.addListener=ei,_t.once=ei,_t.off=ei,_t.removeListener=ei,_t.removeAllListeners=ei,_t.emit=ei,_t.prependListener=ei,_t.prependOnceListener=ei,_t.listeners=function(t){return[]},_t.binding=function(t){throw new Error("process.binding is not supported")},_t.cwd=function(){return"/"},_t.chdir=function(t){throw new Error("process.chdir is not supported")},_t.umask=function(){return 0};var y8=Pw.exports;Object.defineProperty(Xv,"__esModule",{value:!0}),Xv.default=_8;var b8=y8,C8=w8(b8);function w8(t){return t&&t.__esModule?t:{default:t}}function _8(t,e){var r=[],n=0,i=!0;function a(s){function u(){e&&e(s,r)}i?C8.default.nextTick(u):u()}function o(s,u){r.push(u),++n>=t.length||s?a(s):t[n](o)}t.length>0?t[0](o):a(null),i=!1}var Jv={};Object.defineProperty(Jv,"__esModule",{value:!0}),Jv.default=x8;var D8=function(){};function x8(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:D8;t()?e(function n(i){for(var a=arguments.length,o=Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];i?r(i):t.apply(this,o)?e(n):r(null)}):r(null)}var Qv={};Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.default=S8;function S8(t,e){var r=void 0,n=void 0,i=void 0,a=void 0,o=0;function s(){a=0,o=+new Date,i=t.apply(r,n),r=null,n=null}return function(){r=this,n=arguments;var l=new Date-o;return a||(l>=e?s():a=setTimeout(s,e-l)),i}}var ep={};Object.defineProperty(ep,"__esModule",{value:!0}),ep.default=A8;var E8=0;function A8(){return E8++}var Cf={};Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.innerHeight=T8,Cf.innerWidth=O8;function T8(t){var e=window.getComputedStyle(t,null);return e?t.clientHeight-parseInt(e.getPropertyValue("padding-top"),10)-parseInt(e.getPropertyValue("padding-bottom"),10):t.clientHeight}function O8(t){var e=window.getComputedStyle(t,null);return e?t.clientWidth-parseInt(e.getPropertyValue("padding-left"),10)-parseInt(e.getPropertyValue("padding-right"),10):t.clientWidth}Object.defineProperty(qv,"__esModule",{value:!0});var Lw=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},P8=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),B8=k,tp=ya(B8),M8=Un,Ei=ya(M8),F8=Yv,L8=ya(F8),I8=Xv,R8=ya(I8),N8=Jv,Iw=ya(N8),k8=Qv,z8=ya(k8),j8=ep,Rw=ya(j8),Nw=Cf;function ya(t){return t&&t.__esModule?t:{default:t}}function V8(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function H8(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W8(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function $8(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function kw(t,e){return t.scrollWidth-1<=e}function zw(t,e){return t.scrollHeight-1<=e}function G8(){}var rp=function(t){$8(e,t);function e(r){H8(this,e);var n=W8(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r));return n.state={fontSize:null,ready:!1},n.handleWindowResize=function(){n.process()},"perfectFit"in r&&console.warn("TextFit property perfectFit has been removed."),n.handleWindowResize=(0,z8.default)(n.handleWindowResize,r.throttle),n}return P8(e,[{key:"componentDidMount",value:function(){var n=this.props.autoResize;n&&window.addEventListener("resize",this.handleWindowResize),this.process()}},{key:"componentDidUpdate",value:function(n){var i=this.state.ready;i&&((0,L8.default)(this.props,n)||this.process())}},{key:"componentWillUnmount",value:function(){var n=this.props.autoResize;n&&window.removeEventListener("resize",this.handleWindowResize),this.pid=(0,Rw.default)()}},{key:"process",value:function(){var n=this,i=this.props,a=i.min,o=i.max,s=i.mode,u=i.forceSingleModeWidth,l=i.onReady,f=this._parent,c=this._child,h=(0,Nw.innerWidth)(f),d=(0,Nw.innerHeight)(f);if(d<=0||isNaN(d)){console.warn("Can not process element without height. Make sure the element is displayed and has a static height.");return}if(h<=0||isNaN(h)){console.warn("Can not process element without width. Make sure the element is displayed and has a static width.");return}var p=(0,Rw.default)();this.pid=p;var g=function(){return p!==n.pid},v=s==="multi"?function(){return zw(c,d)}:function(){return kw(c,h)},m=s==="multi"?function(){return kw(c,h)}:function(){return zw(c,d)},y=void 0,b=a,w=o;this.setState({ready:!1}),(0,R8.default)([function(C){return(0,Iw.default)(function(){return b<=w},function(_){if(g())return _(!0);y=parseInt((b+w)/2,10),n.setState({fontSize:y},function(){return g()?_(!0):(v()?b=y+1:w=y-1,_())})},C)},function(C){return s==="single"&&u||m()?C():(b=a,w=y,(0,Iw.default)(function(){return b<w},function(_){if(g())return _(!0);y=parseInt((b+w)/2,10),n.setState({fontSize:y},function(){return p!==n.pid?_(!0):(m()?b=y+1:w=y-1,_())})},C))},function(C){if(y=Math.min(b,w),y=Math.max(y,a),y=Math.min(y,o),y=Math.max(y,0),g())return C(!0);n.setState({fontSize:y},C)}],function(C){C||g()||n.setState({ready:!0},function(){return l(y)})})}},{key:"render",value:function(){var n=this,i=this.props,a=i.children,o=i.text,s=i.style;i.min,i.max;var u=i.mode;i.forceWidth,i.forceSingleModeWidth,i.throttle,i.autoResize,i.onReady;var l=V8(i,["children","text","style","min","max","mode","forceWidth","forceSingleModeWidth","throttle","autoResize","onReady"]),f=this.state,c=f.fontSize,h=f.ready,d=Lw({},s,{fontSize:c}),p={display:h?"block":"inline-block"};return u==="single"&&(p.whiteSpace="nowrap"),tp.default.createElement("div",Lw({ref:function(v){return n._parent=v},style:d},l),tp.default.createElement("div",{ref:function(v){return n._child=v},style:p},o&&typeof a=="function"?h?a(o):o:a))}}]),e}(tp.default.Component);rp.propTypes={children:Ei.default.node,text:Ei.default.string,min:Ei.default.number,max:Ei.default.number,mode:Ei.default.oneOf(["single","multi"]),forceSingleModeWidth:Ei.default.bool,throttle:Ei.default.number,onReady:Ei.default.func},rp.defaultProps={min:1,max:100,mode:"multi",forceSingleModeWidth:!0,throttle:50,autoResize:!0,onReady:G8},qv.default=rp,Object.defineProperty(yf,"__esModule",{value:!0});var np=yf.Textfit=void 0,U8=qv,jw=q8(U8);function q8(t){return t&&t.__esModule?t:{default:t}}np=yf.Textfit=jw.default,yf.default=jw.default;const Vw=t=>{const{conditionList:e,conditionType:r}=t,n=r==="all"?"=":".",i=e.map(o=>{const{field:s,condition:u,val:l,val2:f}=o;switch(u){case"=":return`${s}${n}eq.${l}`;case"!=":return`${s}${n}neq.${l}`;case"contain":return l&&f?`${s}${n}gte.${l},${s}.lte.${f}`:"";case"before":return`${s}${n}lt.${l}`;case"after":return`${s}${n}gt.${l}`;case"null":return`${s}${n}is.null`;case"notnull":return`${s}${n}is.not.null`;default:return""}}).filter(Boolean);let a;return r==="all"?a=i.join("&"):a=`or=(${i.join(",")})`,a};function Y8(t,e=0){if(!Number.isFinite(t))throw new Error("Value must be a finite number.");return new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:e,maximumFractionDigits:e}).format(t)}function ru(t,e=0){if(!Number.isFinite(t))throw new Error("Value must be a finite number.");const r=new Intl.NumberFormat(void 0,{minimumFractionDigits:0,maximumFractionDigits:e}).format(t),[n,i]=r.split("."),a=(i||"").padEnd(e,"0");return`${n}${e>0?".":""}${a}`}const Hw=({moduleDataApi:t,customData:e,customeStyle:r,width:n,height:i})=>{const[a,o]=k.useState(),s=k.useRef(),u=k.useCallback(async()=>{if(e){let h="";e.statisticalMethod==="fieldValue"&&(h+=`select=${e.field}`),e!=null&&e.conditionData&&(e.statisticalMethod==="fieldValue"?h+=`&${Vw(e==null?void 0:e.conditionData)}`:h+=`${Vw(e==null?void 0:e.conditionData)}`),e!=null&&e.dataSourceId&&(t==null||t({id:e==null?void 0:e.dataSourceId,query:h}).then(d=>{if(!d.success){Q.message.error(d.message);return}o(d.data)}))}else o([])},[e]);k.useEffect(()=>{e&&u()},[e]);const l=k.useMemo(()=>{if(!a)return"";const h=a,{statisticalMethod:d,statisticalType:p,field:g}=e||{};let v=0;if(h.length&&d==="fieldValue"&&g){const m=h.map(y=>y[g]).filter(y=>typeof y=="number");switch(p){case"sum":v=m.reduce((y,b)=>y+b,0);break;case"max":v=Math.max(...m);break;case"min":v=Math.min(...m);break;case"average":v=m.length?m.reduce((y,b)=>y+b,0)/m.length:0;break;default:v=0}}else d==="recordTotal"&&(v=h.length);if(r!=null&&r.unit){const{unit:m,precision:y}=r;switch(m){case"4":v=`¥${ru(v,y)}`;break;case"5":v=`$${ru(v,y)}`;break;case"1":v=ru(v,y);break;case"3":v=Y8(v,y);break;default:v=ru(v,y)}}else v=ru(v,r==null?void 0:r.precision);return v},[a,e,r]),[f,c]=k.useState("100%");return k.useEffect(()=>{const h=()=>{s.current&&c(s.current.offsetWidth)};return h(),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[n,i]),A.jsx("div",{ref:s,style:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:A.jsxs("div",{style:{display:"flex",flexWrap:"wrap",height:"100%",width:f},children:[l!==""?A.jsx("div",{className:"stat-text",style:{color:r==null?void 0:r.color,textAlign:"center",lineHeight:"normal",marginBottom:r!=null&&r.desc?0:"auto",marginTop:"auto",padding:"0 20px",width:f},children:A.jsx(np,{mode:"single",children:l})}):null,r!=null&&r.desc?A.jsx("div",{className:"stat-description-text",style:{color:r==null?void 0:r.color,textAlign:"center",marginTop:"15px"},children:A.jsx(np,{mode:"single",max:25,children:r==null?void 0:r.desc})}):null]})})};var Ww={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Ji,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",f="week",c="month",h="quarter",d="year",p="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var M=["th","st","nd","rd"],I=B%100;return"["+B+(M[(I-20)%10]||M[I]||M[0])+"]"}},b=function(B,M,I){var j=String(B);return!j||j.length>=M?B:""+Array(M+1-j.length).join(I)+B},w={s:b,z:function(B){var M=-B.utcOffset(),I=Math.abs(M),j=Math.floor(I/60),z=I%60;return(M<=0?"+":"-")+b(j,2,"0")+":"+b(z,2,"0")},m:function B(M,I){if(M.date()<I.date())return-B(I,M);var j=12*(I.year()-M.year())+(I.month()-M.month()),z=M.clone().add(j,c),W=I-z<0,R=M.clone().add(j+(W?-1:1),c);return+(-(j+(I-z)/(W?z-R:R-z))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:c,y:d,w:f,d:l,D:p,h:u,m:s,s:o,ms:a,Q:h}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},C="en",_={};_[C]=y;var D="$isDayjsObject",x=function(B){return B instanceof P||!(!B||!B[D])},S=function B(M,I,j){var z;if(!M)return C;if(typeof M=="string"){var W=M.toLowerCase();_[W]&&(z=W),I&&(_[W]=I,z=W);var R=M.split("-");if(!z&&R.length>1)return B(R[0])}else{var U=M.name;_[U]=M,z=U}return!j&&z&&(C=z),z||!j&&C},O=function(B,M){if(x(B))return B.clone();var I=typeof M=="object"?M:{};return I.date=B,I.args=arguments,new P(I)},E=w;E.l=S,E.i=x,E.w=function(B,M){return O(B,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var P=function(){function B(I){this.$L=S(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[D]=!0}var M=B.prototype;return M.parse=function(I){this.$d=function(j){var z=j.date,W=j.utc;if(z===null)return new Date(NaN);if(E.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var R=z.match(v);if(R){var U=R[2]-1||0,Z=(R[7]||"0").substring(0,3);return W?new Date(Date.UTC(R[1],U,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Z)):new Date(R[1],U,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Z)}}return new Date(z)}(I),this.init()},M.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},M.$utils=function(){return E},M.isValid=function(){return this.$d.toString()!==g},M.isSame=function(I,j){var z=O(I);return this.startOf(j)<=z&&z<=this.endOf(j)},M.isAfter=function(I,j){return O(I)<this.startOf(j)},M.isBefore=function(I,j){return this.endOf(j)<O(I)},M.$g=function(I,j,z){return E.u(I)?this[j]:this.set(z,I)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(I,j){var z=this,W=!!E.u(j)||j,R=E.p(I),U=function(G,J){var K=E.w(z.$u?Date.UTC(z.$y,J,G):new Date(z.$y,J,G),z);return W?K:K.endOf(l)},Z=function(G,J){return E.w(z.toDate()[G].apply(z.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(J)),z)},ee=this.$W,ne=this.$M,q=this.$D,L="set"+(this.$u?"UTC":"");switch(R){case d:return W?U(1,0):U(31,11);case c:return W?U(1,ne):U(0,ne+1);case f:var X=this.$locale().weekStart||0,V=(ee<X?ee+7:ee)-X;return U(W?q-V:q+(6-V),ne);case l:case p:return Z(L+"Hours",0);case u:return Z(L+"Minutes",1);case s:return Z(L+"Seconds",2);case o:return Z(L+"Milliseconds",3);default:return this.clone()}},M.endOf=function(I){return this.startOf(I,!1)},M.$set=function(I,j){var z,W=E.p(I),R="set"+(this.$u?"UTC":""),U=(z={},z[l]=R+"Date",z[p]=R+"Date",z[c]=R+"Month",z[d]=R+"FullYear",z[u]=R+"Hours",z[s]=R+"Minutes",z[o]=R+"Seconds",z[a]=R+"Milliseconds",z)[W],Z=W===l?this.$D+(j-this.$W):j;if(W===c||W===d){var ee=this.clone().set(p,1);ee.$d[U](Z),ee.init(),this.$d=ee.set(p,Math.min(this.$D,ee.daysInMonth())).$d}else U&&this.$d[U](Z);return this.init(),this},M.set=function(I,j){return this.clone().$set(I,j)},M.get=function(I){return this[E.p(I)]()},M.add=function(I,j){var z,W=this;I=Number(I);var R=E.p(j),U=function(ne){var q=O(W);return E.w(q.date(q.date()+Math.round(ne*I)),W)};if(R===c)return this.set(c,this.$M+I);if(R===d)return this.set(d,this.$y+I);if(R===l)return U(1);if(R===f)return U(7);var Z=(z={},z[s]=n,z[u]=i,z[o]=r,z)[R]||1,ee=this.$d.getTime()+I*Z;return E.w(ee,this)},M.subtract=function(I,j){return this.add(-1*I,j)},M.format=function(I){var j=this,z=this.$locale();if(!this.isValid())return z.invalidDate||g;var W=I||"YYYY-MM-DDTHH:mm:ssZ",R=E.z(this),U=this.$H,Z=this.$m,ee=this.$M,ne=z.weekdays,q=z.months,L=z.meridiem,X=function(J,K,Y,fe){return J&&(J[K]||J(j,W))||Y[K].slice(0,fe)},V=function(J){return E.s(U%12||12,J,"0")},G=L||function(J,K,Y){var fe=J<12?"AM":"PM";return Y?fe.toLowerCase():fe};return W.replace(m,function(J,K){return K||function(Y){switch(Y){case"YY":return String(j.$y).slice(-2);case"YYYY":return E.s(j.$y,4,"0");case"M":return ee+1;case"MM":return E.s(ee+1,2,"0");case"MMM":return X(z.monthsShort,ee,q,3);case"MMMM":return X(q,ee);case"D":return j.$D;case"DD":return E.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return X(z.weekdaysMin,j.$W,ne,2);case"ddd":return X(z.weekdaysShort,j.$W,ne,3);case"dddd":return ne[j.$W];case"H":return String(U);case"HH":return E.s(U,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return G(U,Z,!0);case"A":return G(U,Z,!1);case"m":return String(Z);case"mm":return E.s(Z,2,"0");case"s":return String(j.$s);case"ss":return E.s(j.$s,2,"0");case"SSS":return E.s(j.$ms,3,"0");case"Z":return R}return null}(J)||R.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(I,j,z){var W,R=this,U=E.p(j),Z=O(I),ee=(Z.utcOffset()-this.utcOffset())*n,ne=this-Z,q=function(){return E.m(R,Z)};switch(U){case d:W=q()/12;break;case c:W=q();break;case h:W=q()/3;break;case f:W=(ne-ee)/6048e5;break;case l:W=(ne-ee)/864e5;break;case u:W=ne/i;break;case s:W=ne/n;break;case o:W=ne/r;break;default:W=ne}return z?W:E.a(W)},M.daysInMonth=function(){return this.endOf(c).$D},M.$locale=function(){return _[this.$L]},M.locale=function(I,j){if(!I)return this.$L;var z=this.clone(),W=S(I,j,!0);return W&&(z.$L=W),z},M.clone=function(){return E.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},B}(),F=P.prototype;return O.prototype=F,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",c],["$y",d],["$D",p]].forEach(function(B){F[B[1]]=function(M){return this.$g(M,B[0],B[1])}}),O.extend=function(B,M){return B.$i||(B(M,P,O),B.$i=!0),O},O.locale=S,O.isDayjs=x,O.unix=function(B){return O(1e3*B)},O.en=_[C],O.Ls=_,O.p={},O})})(Ww);var X8=Ww.exports;const ti=lo(X8);var $w={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Ji,function(){return function(r,n,i){n.prototype.isBetween=function(a,o,s,u){var l=i(a),f=i(o),c=(u=u||"()")[0]==="(",h=u[1]===")";return(c?this.isAfter(l,s):!this.isBefore(l,s))&&(h?this.isBefore(f,s):!this.isAfter(f,s))||(c?this.isBefore(l,s):!this.isAfter(l,s))&&(h?this.isAfter(f,s):!this.isBefore(f,s))}}})})($w);var K8=$w.exports;const Z8=lo(K8),Gw=k.createContext(void 0),J8=({children:t,initialData:e})=>{const[r,n]=k.useState(e);return A.jsx(Gw.Provider,{value:{globalData:r,setGlobalData:n},children:t})},Oo=()=>{const t=k.useContext(Gw);if(!t)throw new Error("useAppContext must be used within an AppProvider");return t},Q8=(...t)=>{console!=null&&console.warn&&(ba(t[0])&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t))},Uw={},ip=(...t)=>{ba(t[0])&&Uw[t[0]]||(ba(t[0])&&(Uw[t[0]]=new Date),Q8(...t))},qw=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},Yw=(t,e,r)=>{t.loadNamespaces(e,qw(t,r))},Xw=(t,e,r,n)=>{ba(r)&&(r=[r]),r.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,qw(t,n))},eN=(t,e,r={})=>!e.languages||!e.languages.length?(ip("i18n.languages were undefined or empty",e.languages),!0):e.hasLoadedNamespace(t,{lng:r.lng,precheck:(n,i)=>{var a;if(((a=r.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,t))return!1}}),ba=t=>typeof t=="string",tN=t=>typeof t=="object"&&t!==null,rN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,nN={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},iN=t=>nN[t];let ap={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t=>t.replace(rN,iN)};const aN=(t={})=>{ap={...ap,...t}},oN=()=>ap;let Kw;const sN=t=>{Kw=t},uN=()=>Kw,lN={type:"3rdParty",init(t){aN(t.options.react),sN(t)}},fN=k.createContext();class cN{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const hN=(t,e)=>{const r=k.useRef();return k.useEffect(()=>{r.current=t},[t,e]),r.current},Zw=(t,e,r,n)=>t.getFixedT(e,r,n),dN=(t,e,r,n)=>k.useCallback(Zw(t,e,r,n),[t,e,r,n]),zr=(t,e={})=>{var w,C,_,D;const{i18n:r}=e,{i18n:n,defaultNS:i}=k.useContext(fN)||{},a=r||n||uN();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new cN),!a){ip("You will need to pass in an i18next instance by using initReactI18next");const x=(O,E)=>ba(E)?E:tN(E)&&ba(E.defaultValue)?E.defaultValue:Array.isArray(O)?O[O.length-1]:O,S=[x,{},!1];return S.t=x,S.i18n={},S.ready=!1,S}(w=a.options.react)!=null&&w.wait&&ip("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...oN(),...a.options.react,...e},{useSuspense:s,keyPrefix:u}=o;let l=i||((C=a.options)==null?void 0:C.defaultNS);l=ba(l)?[l]:l||["translation"],(D=(_=a.reportNamespaces).addUsedNamespaces)==null||D.call(_,l);const f=(a.isInitialized||a.initializedStoreOnce)&&l.every(x=>eN(x,a,o)),c=dN(a,e.lng||null,o.nsMode==="fallback"?l:l[0],u),h=()=>c,d=()=>Zw(a,e.lng||null,o.nsMode==="fallback"?l:l[0],u),[p,g]=k.useState(h);let v=l.join();e.lng&&(v=`${e.lng}${v}`);const m=hN(v),y=k.useRef(!0);k.useEffect(()=>{const{bindI18n:x,bindI18nStore:S}=o;y.current=!0,!f&&!s&&(e.lng?Xw(a,e.lng,l,()=>{y.current&&g(d)}):Yw(a,l,()=>{y.current&&g(d)})),f&&m&&m!==v&&y.current&&g(d);const O=()=>{y.current&&g(d)};return x&&(a==null||a.on(x,O)),S&&(a==null||a.store.on(S,O)),()=>{y.current=!1,a&&(x==null||x.split(" ").forEach(E=>a.off(E,O))),S&&a&&S.split(" ").forEach(E=>a.store.off(E,O))}},[a,v]),k.useEffect(()=>{y.current&&f&&g(h)},[a,u,f]);const b=[p,a,f];if(b.t=p,b.i18n=a,b.ready=f,f||!f&&!s)return b;throw new Promise(x=>{e.lng?Xw(a,e.lng,l,()=>x()):Yw(a,l,()=>x())})};ti.extend(Z8);const Jw=({moduleDataApi:t,customData:e})=>{const{t:r}=zr(),{globalData:n}=Oo(),[i,a]=k.useState(),[o,s]=k.useState(),u=k.useCallback(async()=>{e?t==null||t({id:e==null?void 0:e.dataSourceId}).then(c=>{if(!c.success){Q.message.error(c.message);return}a(c.data)}):a([])},[e,t]);k.useEffect(()=>{e&&u()},[u,e==null?void 0:e.dataSourceId,e]),k.useEffect(()=>{var c;n!=null&&n.sourceData&&(e!=null&&e.dataSourceId)&&s((c=n==null?void 0:n.sourceData.find(h=>h.value===(e==null?void 0:e.dataSourceId)))==null?void 0:c.fields)},[n,e]);const l=k.useMemo(()=>c=>{const h=i==null?void 0:i.filter(d=>e!=null&&e.startDateField&&(e!=null&&e.endDateField)?c==null?void 0:c.isBetween(ti(d[e==null?void 0:e.startDateField]),ti(d[e==null?void 0:e.endDateField]),"day"):e!=null&&e.startDateField?(e==null?void 0:e.startDateField)&&c.isSame(ti(d[e==null?void 0:e.startDateField]),"day"):e!=null&&e.endDateField?(e==null?void 0:e.endDateField)&&c.isSame(ti(d[e==null?void 0:e.endDateField]),"day"):!1);return A.jsx("div",{className:"events",children:h==null?void 0:h.map((d,p)=>A.jsx("div",{children:A.jsx(Q.Popover,{placement:"right",trigger:"click",content:A.jsx("div",{style:{width:"200px",height:"300px",overflowY:"auto"},children:o!=null&&o.length?A.jsx(Q.Descriptions,{column:1,title:e!=null&&e.titleField?d[e==null?void 0:e.titleField]||r("unnamedRecord"):null,items:o==null?void 0:o.map((g,v)=>({key:v,label:g.label,children:g!=null&&g.name?d[g.name]||r("unnamedRecord"):null}))}):null}),children:A.jsx(Q.Badge,{status:"warning",text:e!=null&&e.titleField?d[e==null?void 0:e.titleField]||r("unnamedRecord"):null})})},p))})},[i,e==null?void 0:e.endDateField,e==null?void 0:e.startDateField,e==null?void 0:e.titleField]),f=k.useMemo(()=>(c,h)=>h.type==="date"?l(c):h.originNode,[l]);return A.jsx("div",{className:"box-calendar-module",children:A.jsx(Q.Calendar,{cellRender:f})})};/*! *****************************************************************************
|
|
127
127
|
Copyright (c) Microsoft Corporation.
|
|
128
128
|
|
|
129
129
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -163,7 +163,7 @@ echarts.use([`+P+"]);":"Unknown series "+E))}return}if(c==="tooltip"){if(b){proc
|
|
|
163
163
|
`,`
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
`];function Uu(t,e){return e.type=t,e}function b0(t){return t.type==="section"}function uE(t){return b0(t)?Zz:Jz}function lE(t){if(b0(t)){var e=0,r=t.blocks.length,n=r>1||r>0&&!t.noHeader;return N(t.blocks,function(i){var a=lE(i);a>=e&&(e=a+ +(n&&(!a||b0(i)&&!i.noHeader)))}),e}return 0}function Zz(t,e,r,n){var i=e.noHeader,a=Qz(lE(e)),o=[],s=e.blocks||[];Ee(!s||he(s)),s=s||[];var u=t.orderMode;if(e.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(xe(l,u)){var f=new ZS(l[u],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else u==="seriesDesc"&&s.reverse()}N(s,function(p,g){var v=e.valueFormatter,m=uE(p)(v?oe(oe({},t),{valueFormatter:v}):t,p,g>0?a.html:0,n);m!=null&&o.push(m)});var c=t.renderMode==="richText"?o.join(a.richText):C0(o.join(""),i?r:a.html);if(i)return c;var h=e0(e.header,"ordinal",t.useUTC),d=sE(n,t.renderMode).nameStyle;return t.renderMode==="richText"?cE(t,h,d)+a.richText+c:C0('<div style="'+d+";"+oE+';">'+Tr(h)+"</div>"+c,r)}function Jz(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,u=e.name,l=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(w){return w=he(w)?w:[w],ye(w,function(C,_){return e0(C,he(d)?d[_]:d,l)})};if(!(a&&o)){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),h=a?"":e0(u,"ordinal",l),d=e.valueType,p=o?[]:f(e.value,e.dataIndex),g=!s||!a,v=!s&&a,m=sE(n,i),y=m.nameStyle,b=m.valueStyle;return i==="richText"?(s?"":c)+(a?"":cE(t,h,y))+(o?"":rj(t,p,g,v,b)):C0((s?"":c)+(a?"":ej(h,!s,y))+(o?"":tj(p,g,v,b)),r)}}function fE(t,e,r,n,i,a){if(t){var o=uE(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function Qz(t){return{html:Xz[t],richText:Kz[t]}}function C0(t,e){var r='<div style="clear:both"></div>',n="margin: "+e+"px 0 0";return'<div style="'+n+";"+oE+';">'+t+r+"</div>"}function ej(t,e,r){var n=e?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Tr(t)+"</span>"}function tj(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=he(t)?t:[t],'<span style="'+a+";"+n+'">'+ye(t,function(o){return Tr(o)}).join(" ")+"</span>"}function cE(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function rj(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(he(e)?e.join(" "):e,a)}function nj(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Ga(n)}function hE(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var w0=function(){function t(){this.richTextStyles={},this._nextStyleNameId=lD()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=W7({color:r,type:e,renderMode:n,markerId:i});return be(a)?a:(process.env.NODE_ENV!=="production"&&Ee(i),this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};he(r)?N(r,function(a){return oe(n,a)}):oe(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function ij(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),u=he(s),l=nj(e,r),f,c,h,d;if(o>1||u&&!o){var p=aj(s,e,r,a,l);f=p.inlineValues,c=p.inlineValueTypes,h=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=f=ls(i,r,a[0]),c=g.type}else d=f=u?s[0]:s;var v=ng(e),m=v&&e.name||"",y=i.getName(r),b=n?m:y;return Uu("section",{header:m,noHeader:n||!v,sortParam:d,blocks:[Uu("nameValue",{markerType:"item",markerColor:l,name:b,noName:!Sn(b),value:f,valueType:c,dataIndex:r})].concat(h||[])})}function aj(t,e,r,n,i){var a=e.getData(),o=ri(t,function(c,h,d){var p=a.getDimensionInfo(d);return c=c||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],u=[],l=[];n.length?N(n,function(c){f(ls(a,r,c),c)}):N(t,f);function f(c,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?l.push(Uu("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:c,valueType:d.type})):(s.push(c),u.push(d.type)))}return{inlineValues:s,inlineValueTypes:u,blocks:l}}var ji=lt();function Kc(t,e){return t.getName(e)||t.getId(e)}var Zc="__universalTransitionEnabled",fn=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Wu({count:sj,reset:uj}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=ji(this).sourceManager=new nE(this);a.prepareSource();var o=this.getInitialData(r,i);vE(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&Ee(o,"getInitialData returned invalid data."),ji(this).dataBeforeProcessed=o,dE(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=ku(this),a=i?$c(r):{},o=this.subType;Ze.hasClass(o)&&(o+="Series"),Qe(r,n.getTheme().get(this.subType)),Qe(r,this.getDefaultOption()),rg(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&qa(r,a,i)},e.prototype.mergeOption=function(r,n){r=Qe(this.option,r,!0),this.fillDataTextStyle(r.data);var i=ku(this);i&&qa(this.option,r,i);var a=ji(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);vE(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ji(this).dataBeforeProcessed=o,dE(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!rr(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&rg(r[i],"label",n)},e.prototype.getInitialData=function(r,n){},e.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},e.prototype.getData=function(r){var n=_0(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return ji(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var n=_0(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}ji(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ae(r)},e.prototype.getSourceManager=function(){return ji(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return ji(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.formatTooltip=function(r,n,i){return ij({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Pe.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=a0.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var u=r[s],l=Kc(o,u);i[l]=!1,this._selectedDataIndicesMap[l]=-1}}},e.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Ke(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Kc(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Zc])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,u=n.length;if(!(!s||!u)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){we(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,f=0;f<u;f++){var c=n[f],h=Kc(r,c);l[h]=!0,this._selectedDataIndicesMap[h]=r.getRawIndex(c)}}else if(s==="single"||s===!0){var d=n[u-1],h=Kc(r,d);o.selectedMap=(i={},i[h]=!0,i),this._selectedDataIndicesMap=(a={},a[h]=r.getRawIndex(d),a)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Ze.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Ze);xn(fn,Bz),xn(fn,a0),DD(fn,Ze);function dE(t){var e=t.name;ng(t)||(t.name=oj(t)||e)}function oj(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return N(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function sj(t){return t.model.getRawData().count()}function uj(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),lj}function lj(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function vE(t,e){N(FN(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Dt(fj,e))})}function fj(t,e){var r=_0(t);return r&&r.setOutputEnd((e||this).count()),e}function _0(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var Br=function(){function t(){this.group=new It,this.uid=Mc("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();og(Br),ec(Br);function D0(){var t=lt();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var pE=lt(),cj=D0(),Zr=function(){function t(){this.group=new It,this.uid=Mc("viewChart"),this.renderTask=Wu({plan:hj,reset:dj}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+i.dataType);return}mE(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+i.dataType);return}mE(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){Pc(this.group,e)},t.markUpdateMethod=function(e,r){pE(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function gE(t,e,r){t&&Jo(t)&&(e==="emphasis"?dc:vc)(t,r)}function mE(t,e,r){var n=Pa(t,e),i=e&&e.highlightKey!=null?P9(e.highlightKey):null;n!=null?N(gt(n),function(a){gE(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){gE(a,r,i)})}og(Zr,["dispose"]),ec(Zr);function hj(t){return cj(t.model)}function dj(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&pE(i).updateMethod,u=a?"incrementalPrepareRender":s&&o[s]?s:"render";return u!=="render"&&o[u](e,r,n,i),vj[u]}var vj={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Jc="\0__throttleOriginMethod",yE="\0__throttleRate",bE="\0__throttleType";function x0(t,e,r){var n,i=0,a=0,o=null,s,u,l,f;e=e||0;function c(){a=new Date().getTime(),o=null,t.apply(u,l||[])}var h=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];n=new Date().getTime(),u=this,l=d;var g=f||e,v=f||r;f=null,s=n-(v?i:a)-g,clearTimeout(o),v?o=setTimeout(c,g):s>=0?c():o=setTimeout(c,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){f=d},h}function CE(t,e,r,n){var i=t[e];if(i){var a=i[Jc]||i,o=i[bE],s=i[yE];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=x0(a,r,n==="debounce"),i[Jc]=a,i[bE]=n,i[yE]=r}return i}}function S0(t,e){var r=t[e];r&&r[Jc]&&(r.clear&&r.clear(),t[e]=r[Jc])}var wE=lt(),_E={itemStyle:wu(qx,!0),lineStyle:wu(Ux,!0)},pj={lineStyle:"stroke",itemStyle:"fill"};function DE(t,e){var r=t.visualStyleMapper||_E[e];return r||(console.warn("Unknown style type '"+e+"'."),_E.itemStyle)}function xE(t,e){var r=t.visualDrawType||pj[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var gj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=DE(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var u=xE(t,n),l=o[u],f=De(l)?l:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[u]||f||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[u]||(o[u]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||De(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||De(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",u),!e.isSeriesFiltered(t)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=t.getDataParams(p),v=oe({},o);v[u]=f(g),d.setItemVisual(p,"style",v)}}}},qu=new Ct,mj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=DE(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var u=o.getRawDataItem(s);if(u&&u[n]){qu.option=u[n];var l=i(qu),f=o.ensureUniqueItemVisual(s,"style");oe(f,l),qu.option.decal&&(o.setItemVisual(s,"decal",qu.option.decal),qu.option.decal.dirty=!0),a in l&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},yj={performRawSeries:!0,overallReset:function(t){var e=Ae();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),wE(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=wE(r).scope,s=r.visualStyleAccessPath||"itemStyle",u=xE(r,s);a.each(function(l){var f=a.getRawIndex(l);i[f]=l}),n.each(function(l){var f=i[l],c=a.getItemVisual(f,"colorFromPalette");if(c){var h=a.ensureUniqueItemVisual(f,"style"),d=n.getName(l)||l+"",p=n.count();h[u]=r.getColorFromPalette(d,o,p)}})}})}},Qc=Math.PI;function bj(t,e){e=e||{},je(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new It,n=new St({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Ot({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new St({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new wc({shape:{startAngle:-Qc/2,endAngle:-Qc/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qc*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,u=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-u*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:u),f=t.getHeight()/2;e.showSpinner&&o.setShape({cx:l,cy:f}),a.setShape({x:l-u,y:f-u,width:u*2,height:u*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var SE=function(){function t(e,r,n,i){this._stageTaskMap=Ae(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,u=s!=null?Math.ceil(s/o):null;return{step:o,modBy:u,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),u=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:u,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Ae();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;N(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),Ee(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;N(e,function(u,l){if(!(i.visualType&&i.visualType!==u.visualType)){var f=o._stageTaskMap.get(u.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var d,p=h.agentStubMap;p.each(function(v){s(i,v)&&(v.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(v){v.perform(g)}),h.perform(g)&&(a=!0)}else c&&c.each(function(v,m){s(i,v)&&v.dirty();var y=o.getPerformArgs(v,i.block);y.skip=!u.performRawSeries&&r.isSeriesFiltered(v.context.model),o.updatePayload(v,n),v.perform(y)&&(a=!0)})}});function s(u,l){return u.setDirty&&(!u.dirtyMap||u.dirtyMap.get(l.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ae(),u=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(f):u?n.eachRawSeriesByType(u,f):l&&l(n,i).each(f);function f(c){var h=c.uid,d=s.set(h,o&&o.get(h)||Wu({plan:xj,reset:Sj,count:Aj}));d.context={model:c,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(c,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||Wu({reset:Cj});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,u=o.agentStubMap=Ae(),l=e.seriesType,f=e.getTargetSeries,c=!0,h=!1,d="";process.env.NODE_ENV!=="production"&&(d='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),Ee(!e.createOnAllSeries,d),l?n.eachRawSeriesByType(l,p):f?f(n,i).each(p):(c=!1,N(n.getSeries(),p));function p(g){var v=g.uid,m=u.set(v,s&&s.get(v)||(h=!0,Wu({reset:wj,onDirty:Dj})));m.context={model:g,overallProgress:c},m.agent=o,m.__block=c,a._pipe(g,m)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return De(e)&&(e={overallReset:e,seriesType:Tj(e)}),e.uid=Mc("stageHandler"),r&&(e.visualType=r),e},t}();function Cj(t){t.overallReset(t.ecModel,t.api,t.payload)}function wj(t){return t.overallProgress&&_j}function _j(){this.agent.dirty(),this.getDownstream().dirty()}function Dj(){this.agent&&this.agent.dirty()}function xj(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Sj(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?ye(e,function(r,n){return EE(n)}):Ej}var Ej=EE(0);function EE(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function Aj(t){return t.data.count()}function Tj(t){eh=null;try{t(Yu,AE)}catch{}return eh}var Yu={},AE={},eh;TE(Yu,s0),TE(AE,ES),Yu.eachSeriesByType=Yu.eachRawSeriesByType=function(t){eh=t},Yu.eachComponent=function(t){t.mainType==="series"&&t.subType&&(eh=t.subType)};function TE(t,e){for(var r in e.prototype)t[r]=dr}var OE=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Oj={color:OE,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],OE]};var ar="#B9B8CE",PE="#100C2A",th=function(){return{axisLine:{lineStyle:{color:ar}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},BE=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],ME={darkMode:!0,color:BE,backgroundColor:PE,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:ar}},textStyle:{color:ar},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:ar}},dataZoom:{borderColor:"#71708A",textStyle:{color:ar},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:ar}},timeline:{lineStyle:{color:ar},label:{color:ar},controlStyle:{color:ar,borderColor:ar}},calendar:{itemStyle:{color:PE},dayLabel:{color:ar},monthLabel:{color:ar},yearLabel:{color:ar}},timeAxis:th(),logAxis:th(),valueAxis:th(),categoryAxis:th(),line:{symbol:"circle"},graph:{color:BE},gauge:{title:{color:ar},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:ar},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};ME.categoryAxis.splitLine.show=!1;var Pj=function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},n={},i={};if(be(e)){var a=Pn(e);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};N(e,function(u,l){for(var f=!1,c=0;c<o.length;c++){var h=o[c],d=l.lastIndexOf(h);if(d>0&&d===l.length-h.length){var p=l.slice(0,d);p!=="data"&&(r.mainType=p,r[h.toLowerCase()]=u,f=!0)}}s.hasOwnProperty(l)&&(n[l]=u,f=!0),f||(i[l]=u)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var u=r.cptQuery,l=r.dataQuery;return f(u,o,"mainType")&&f(u,o,"subType")&&f(u,o,"index","componentIndex")&&f(u,o,"name")&&f(u,o,"id")&&f(l,a,"name")&&f(l,a,"dataIndex")&&f(l,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function f(c,h,d,p){return c[d]==null||h[p||d]===c[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),E0=["symbol","symbolSize","symbolRotate","symbolOffset"],FE=E0.concat(["symbolKeepAspect"]),Bj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<E0.length;o++){var s=E0[o],u=t.get(s);De(u)?(a=!0,i[s]=u):n[s]=u}if(n.symbol=n.symbol||t.defaultSymbol,r.setVisual(oe({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),e.isSeriesFiltered(t))return;var l=Ke(i);function f(c,h){for(var d=t.getRawValue(h),p=t.getDataParams(h),g=0;g<l.length;g++){var v=l[g];c.setItemVisual(h,v,i[v](d,p))}}return{dataEach:a?f:null}}},Mj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<FE.length;s++){var u=FE[s],l=o.getShallow(u,!0);l!=null&&i.setItemVisual(a,u,l)}}return{dataEach:r.hasItemOption?n:null}}};function Fj(t,e,r){switch(r){case"color":var n=t.getItemVisual(e,"style");return n[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function Lj(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function Ij(t,e){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:t,query:i},function(o){a.push(o.seriesIndex)}),a}N([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=oe({},i),process.env.NODE_ENV!=="production"&&Mt(i.type,n[1]),o.dispatchAction(oe(i,{type:n[1],seriesIndex:r(a,i)}))})})}function cs(t,e,r,n,i){var a=t+e;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&On("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,u=o.option.selectedMap,l=i.selected,f=0;f<l.length;f++)if(l[f].seriesIndex===s){var c=o.getData(),h=Pa(c,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:he(h)?c.getName(h[0]):c.getName(h),selected:be(u)?u:oe({},u)})}}))}function Rj(t,e,r){t.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(cs("map","selectchanged",e,i,n),cs("pie","selectchanged",e,i,n)):n.fromAction==="select"?(cs("map","selected",e,i,n),cs("pie","selected",e,i,n)):n.fromAction==="unselect"&&(cs("map","unselected",e,i,n),cs("pie","unselected",e,i,n))})}function Xu(t,e,r){for(var n;t&&!(e(t)&&(n=t,r));)t=t.__hostTarget||t.parent;return n}var Nj=Math.round(Math.random()*9),kj=typeof Object.defineProperty=="function",zj=function(){function t(){this._id="__ec_inner_"+Nj++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return kj?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t}(),jj=Ve.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n+a),t.lineTo(r-i,n+a),t.closePath()}}),Vj=Ve.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n),t.lineTo(r,n+a),t.lineTo(r-i,n),t.closePath()}}),Hj=Ve.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),u=n-a+o+s,l=Math.asin(s/o),f=Math.cos(l)*o,c=Math.sin(l),h=Math.cos(l),d=o*.6,p=o*.7;t.moveTo(r-f,u+s),t.arc(r,u,o,Math.PI-l,Math.PI*2+l),t.bezierCurveTo(r+f-c*d,u+s+h*d,r,n-p,r,n),t.bezierCurveTo(r,n-p,r-f+c*d,u+s+h*d,r-f,u+s),t.closePath()}}),Wj=Ve.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;t.moveTo(i,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r/4*3),t.lineTo(i-o,a+r),t.lineTo(i,a),t.closePath()}}),$j={line:Ni,rect:St,roundRect:St,square:St,circle:yc,diamond:Vj,pin:Hj,arrow:Wj,triangle:jj},Gj={line:function(t,e,r,n,i){i.x1=t,i.y1=e+n/2,i.x2=t+r,i.y2=e+n/2},rect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n},roundRect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(t,e,r,n,i){var a=Math.min(r,n);i.x=t,i.y=e,i.width=a,i.height=a},circle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.r=Math.min(r,n)/2},diamond:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n},pin:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},arrow:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},triangle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n}},A0={};N($j,function(t,e){A0[e]=new t});var Uj=Ve.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var n=Xf(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(t,e,r){var n=e.symbolType;if(n!=="none"){var i=A0[n];i||(n="rect",i=A0[n]),Gj[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function qj(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||"#fff",r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function hs(t,e,r,n,i,a,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var u;return t.indexOf("image://")===0?u=Fx(t.slice(8),new Ue(e,r,n,i),o?"center":"cover"):t.indexOf("path://")===0?u=Vg(t.slice(7),{},new Ue(e,r,n,i),o?"center":"cover"):u=new Uj({shape:{symbolType:t,x:e,y:r,width:n,height:i}}),u.__isEmptyBrush=s,u.setColor=qj,a&&u.setColor(a),u}function Yj(t){return he(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function LE(t,e){if(t!=null)return he(t)||(t=[t,t]),[ut(t[0],e[0])||0,ut(Be(t[1],t[0]),e[1])||0]}function Za(t){return isFinite(t)}function Xj(t,e,r){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Za(n)?n:0,i=Za(i)?i:1,a=Za(a)?a:0,o=Za(o)?o:0;var s=t.createLinearGradient(n,a,i,o);return s}function Kj(t,e,r){var n=r.width,i=r.height,a=Math.min(n,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,u=e.r==null?.5:e.r;e.global||(o=o*n+r.x,s=s*i+r.y,u=u*a),o=Za(o)?o:.5,s=Za(s)?s:.5,u=u>=0&&Za(u)?u:.5;var l=t.createRadialGradient(o,s,0,o,s,u);return l}function T0(t,e,r){for(var n=e.type==="radial"?Kj(t,e,r):Xj(t,e,r),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function Zj(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function rh(t){return parseInt(t,10)}function nh(t,e,r){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(t);return(t[i]||rh(s[n])||rh(t.style[n]))-(rh(s[a])||0)-(rh(s[o])||0)|0}function Jj(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:nt(t)?[t]:he(t)?t:null}function IE(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&Jj(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=ye(r,function(a){return a/i}),n/=i)}return[r,n]}var Qj=new ui(!0);function ih(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function RE(t){return typeof t=="string"&&t!=="none"}function ah(t){var e=t.fill;return e!=null&&e!=="none"}function NE(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function kE(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function O0(t,e,r){var n=xD(e.image,e.__image,r);if(tc(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*LN),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function eV(t,e,r,n){var i,a=ih(r),o=ah(r),s=r.strokePercent,u=s<1,l=!e.path;(!e.silent||u)&&l&&e.createPathProxy();var f=e.path||Qj,c=e.__dirty;if(!n){var h=r.fill,d=r.stroke,p=o&&!!h.colorStops,g=a&&!!d.colorStops,v=o&&!!h.image,m=a&&!!d.image,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0;(p||g)&&(_=e.getBoundingRect()),p&&(y=c?T0(t,h,_):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(b=c?T0(t,d,_):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),v&&(w=c||!e.__canvasFillPattern?O0(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=w),m&&(C=c||!e.__canvasStrokePattern?O0(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=w),p?t.fillStyle=y:v&&(w?t.fillStyle=w:o=!1),g?t.strokeStyle=b:m&&(C?t.strokeStyle=C:a=!1)}var D=e.getGlobalScale();f.setScale(D[0],D[1],e.segmentIgnoreThreshold);var x,S;t.setLineDash&&r.lineDash&&(i=IE(e),x=i[0],S=i[1]);var O=!0;(l||c&Vo)&&(f.setDPR(t.dpr),u?f.setContext(null):(f.setContext(t),O=!1),f.reset(),e.buildPath(f,e.shape,n),f.toStatic(),e.pathUpdated()),O&&f.rebuildPath(t,u?s:1),x&&(t.setLineDash(x),t.lineDashOffset=S),n||(r.strokeFirst?(a&&kE(t,r),o&&NE(t,r)):(o&&NE(t,r),a&&kE(t,r))),x&&t.setLineDash([])}function tV(t,e,r){var n=e.__image=xD(r.image,e.__image,e,e.onload);if(!(!n||!tc(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),u=n.width/n.height;if(o==null&&s!=null?o=s*u:s==null&&o!=null?s=o/u:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var l=r.sx||0,f=r.sy||0;t.drawImage(n,l,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var l=r.sx,f=r.sy,c=o-l,h=s-f;t.drawImage(n,l,f,c,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function rV(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||Ca,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=IE(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(ih(r)&&t.strokeText(i,r.x,r.y),ah(r)&&t.fillText(i,r.x,r.y)):(ah(r)&&t.fillText(i,r.x,r.y),ih(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var zE=["shadowBlur","shadowOffsetX","shadowOffsetY"],jE=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function VE(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){br(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Ma.opacity:o}(n||e.blend!==r.blend)&&(a||(br(t,i),a=!0),t.globalCompositeOperation=e.blend||Ma.blend);for(var s=0;s<zE.length;s++){var u=zE[s];(n||e[u]!==r[u])&&(a||(br(t,i),a=!0),t[u]=t.dpr*(e[u]||0))}return(n||e.shadowColor!==r.shadowColor)&&(a||(br(t,i),a=!0),t.shadowColor=e.shadowColor||Ma.shadowColor),a}function HE(t,e,r,n,i){var a=Ku(e,i.inHover),o=n?null:r&&Ku(r,i.inHover)||{};if(a===o)return!1;var s=VE(t,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(br(t,i),s=!0),RE(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(br(t,i),s=!0),RE(a.stroke)&&(t.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(br(t,i),s=!0),t.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var u=a.lineWidth,l=u/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(br(t,i),s=!0),t.lineWidth=l)}for(var f=0;f<jE.length;f++){var c=jE[f],h=c[0];(n||a[h]!==o[h])&&(s||(br(t,i),s=!0),t[h]=a[h]||c[1])}return s}function nV(t,e,r,n,i){return VE(t,Ku(e,i.inHover),r&&Ku(r,i.inHover),n,i)}function WE(t,e){var r=e.transform,n=t.dpr||1;r?t.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):t.setTransform(n,0,0,n,0,0)}function iV(t,e,r){for(var n=!1,i=0;i<t.length;i++){var a=t[i];n=n||a.isZeroArea(),WE(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}r.allClipped=n}function aV(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var $E=1,GE=2,UE=3,qE=4;function oV(t){var e=ah(t),r=ih(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function br(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Ku(t,e){return e&&t.__hoverStyle||t.style}function YE(t,e){Ja(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Ja(t,e,r,n){var i=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~Or,e.__isRendered=!1;return}var a=e.__clipPaths,o=r.prevElClipPaths,s=!1,u=!1;if((!o||Zj(a,o))&&(o&&o.length&&(br(t,r),t.restore(),u=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(br(t,r),t.save(),iV(a,t,r),s=!0),r.prevElClipPaths=a),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var l=r.prevEl;l||(u=s=!0);var f=e instanceof Ve&&e.autoBatch&&oV(e.style);s||aV(i,l.transform)?(br(t,r),WE(t,e)):f||br(t,r);var c=Ku(e,r.inHover);e instanceof Ve?(r.lastDrawType!==$E&&(u=!0,r.lastDrawType=$E),HE(t,e,l,u,r),(!f||!r.batchFill&&!r.batchStroke)&&t.beginPath(),eV(t,e,c,f),f&&(r.batchFill=c.fill||"",r.batchStroke=c.stroke||"")):e instanceof oc?(r.lastDrawType!==UE&&(u=!0,r.lastDrawType=UE),HE(t,e,l,u,r),rV(t,e,c)):e instanceof fi?(r.lastDrawType!==GE&&(u=!0,r.lastDrawType=GE),nV(t,e,l,u,r),tV(t,e,c)):e.getTemporalDisplayables&&(r.lastDrawType!==qE&&(u=!0,r.lastDrawType=qE),sV(t,e,r)),f&&n&&br(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function sV(t,e,r){var n=e.getDisplayables(),i=e.getTemporalDisplayables();t.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var u=n[o];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Ja(t,u,a,o===s-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}for(var l=0,f=i.length;l<f;l++){var u=i[l];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Ja(t,u,a,l===f-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var P0=new zj,XE=new fu(100),KE=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function B0(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";t.dirty&&P0.delete(t);var a=P0.get(t);if(a)return a;var o=je(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return u(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,P0.set(t,s),t.dirty=!1,s;function u(l){for(var f=[r],c=!0,h=0;h<KE.length;++h){var d=o[KE[h]];if(d!=null&&!he(d)&&!be(d)&&!nt(d)&&typeof d!="boolean"){c=!1;break}f.push(d)}var p;if(c){p=f.join(",")+(i?"-svg":"");var g=XE.get(p);g&&(i?l.svgElement=g:l.image=g)}var v=JE(o.dashArrayX),m=uV(o.dashArrayY),y=ZE(o.symbol),b=lV(v),w=QE(m),C=!i&&Po.createCanvas(),_=i&&{tag:"g",attrs:{},key:"dcl",children:[]},D=S(),x;C&&(C.width=D.width*r,C.height=D.height*r,x=C.getContext("2d")),O(),c&&XE.put(p,C||_),l.image=C,l.svgElement=_,l.svgWidth=D.width,l.svgHeight=D.height;function S(){for(var E=1,P=0,F=b.length;P<F;++P)E=cD(E,b[P]);for(var B=1,P=0,F=y.length;P<F;++P)B=cD(B,y[P].length);E*=B;var M=w*b.length*y.length;if(process.env.NODE_ENV!=="production"){var I=function(j){console.warn("Calculated decal size is greater than "+j+" due to decal option settings so "+j+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+j+" to be larger to avoid incontinuity.")};E>o.maxTileWidth&&I("maxTileWidth"),M>o.maxTileHeight&&I("maxTileHeight")}return{width:Math.max(1,Math.min(E,o.maxTileWidth)),height:Math.max(1,Math.min(M,o.maxTileHeight))}}function O(){x&&(x.clearRect(0,0,C.width,C.height),o.backgroundColor&&(x.fillStyle=o.backgroundColor,x.fillRect(0,0,C.width,C.height)));for(var E=0,P=0;P<m.length;++P)E+=m[P];if(E<=0)return;for(var F=-w,B=0,M=0,I=0;F<D.height;){if(B%2===0){for(var j=M/2%y.length,z=0,W=0,R=0;z<D.width*2;){for(var U=0,P=0;P<v[I].length;++P)U+=v[I][P];if(U<=0)break;if(W%2===0){var Z=(1-o.symbolSize)*.5,ee=z+v[I][W]*Z,ne=F+m[B]*Z,q=v[I][W]*o.symbolSize,L=m[B]*o.symbolSize,X=R/2%y[j].length;V(ee,ne,q,L,y[j][X])}z+=v[I][W],++R,++W,W===v[I].length&&(W=0)}++I,I===v.length&&(I=0)}F+=m[B],++M,++B,B===m.length&&(B=0)}function V(G,J,K,Y,fe){var ue=i?1:r,Ce=hs(fe,G*ue,J*ue,K*ue,Y*ue,o.color,o.symbolKeepAspect);if(i){var me=n.painter.renderOneToVNode(Ce);me&&_.children.push(me)}else YE(x,Ce)}}}}function ZE(t){if(!t||t.length===0)return[["rect"]];if(be(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!be(t[r])){e=!1;break}if(e)return ZE([t]);for(var n=[],r=0;r<t.length;++r)be(t[r])?n.push([t[r]]):n.push(t[r]);return n}function JE(t){if(!t||t.length===0)return[[0,0]];if(nt(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!nt(t[n])){r=!1;break}if(r)return JE([t]);for(var i=[],n=0;n<t.length;++n)if(nt(t[n])){var e=Math.ceil(t[n]);i.push([e,e])}else{var e=ye(t[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function uV(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(nt(t)){var e=Math.ceil(t);return[e,e]}var r=ye(t,function(n){return Math.ceil(n)});return t.length%2?r.concat(r):r}function lV(t){return ye(t,function(e){return QE(e)})}function QE(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function fV(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var u=n.ensureUniqueItemVisual(o,"style");u.decal=B0(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=B0(i,e)}}})}var cn=new En,oh={};function cV(t,e){process.env.NODE_ENV!=="production"&&oh[t]&&Gt("Already has an implementation of "+t+"."),oh[t]=e}function hV(t){return process.env.NODE_ENV!=="production"&&(oh[t]||Gt("Implementation of "+t+" doesn't exists.")),oh[t]}var dV=1,vV=800,pV=900,gV=1e3,mV=2e3,yV=5e3,e2=1e3,bV=1100,M0=2e3,t2=3e3,CV=4e3,sh=4500,wV=4600,_V=5e3,DV=6e3,r2=7e3,xV={PROCESSOR:{FILTER:gV,SERIES_FILTER:vV,STATISTIC:yV},VISUAL:{LAYOUT:e2,PROGRESSIVE_LAYOUT:bV,GLOBAL:M0,CHART:t2,POST_CHART_LAYOUT:wV,COMPONENT:CV,BRUSH:_V,CHART_ITEM:sh,ARIA:DV,DECAL:r2}},Xt="__flagInMainProcess",Cr="__pendingUpdate",F0="__needsUpdateStatus",n2=/^[a-zA-Z0-9_]+$/,L0="__connectUpdateStatus",i2=0,SV=1,EV=2;function a2(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){Mr(this.id);return}return s2(this,t,e)}}function o2(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return s2(this,t,e)}}function s2(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),En.prototype[e].apply(t,r)}var u2=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(En),l2=u2.prototype;l2.on=o2("on"),l2.off=o2("off");var ds,I0,uh,Vi,R0,N0,k0,Zu,Ju,f2,c2,z0,h2,lh,d2,v2,Jr,p2,g2=function(t){ce(e,t);function e(r,n,i){var a=t.call(this,new Pj)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},be(n)&&(n=m2[n]),a._dom=r;var o="canvas",s="auto",u=!1;if(process.env.NODE_ENV!=="production"){var l=Pe.hasGlobalWindow?window:global;l&&(o=Be(l.__ECHARTS__DEFAULT__RENDERER__,o),s=Be(l.__ECHARTS__DEFAULT__COARSE_POINTER,s),u=Be(l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,u))}i.ssr;var f=a._zr=nD(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Be(i.useDirtyRect,u),useCoarsePointer:Be(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=x0(dt(f.flush,f),17),n=$e(n),n&&FS(n,!0),a._theme=n,a._locale=R7(i.locale||Xx),a._coordSysMgr=new l0;var c=a._api=d2(a);function h(d,p){return d.__prio-p.__prio}return Bf(ch,h),Bf(V0,h),a._scheduler=new SE(a,c,V0,ch),a._messageCenter=new u2,a._initEvents(),a.resize=dt(a.resize,a),f.animation.on("frame",a._onframe,a),f2(f,a),c2(f,a),Sf(a),a}return e.prototype._onframe=function(){if(!this._disposed){p2(this);var r=this._scheduler;if(this[Cr]){var n=this[Cr].silent;this[Xt]=!0;try{ds(this),Vi.update.call(this,null,this[Cr].updateParams)}catch(u){throw this[Xt]=!1,this[Cr]=null,u}this._zr.flush(),this[Xt]=!1,this[Cr]=null,Zu.call(this,n),Ju.call(this,n)}else if(r.unfinished){var i=dV,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),N0(this,a),r.performVisualTasks(a),lh(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(this[Xt]){process.env.NODE_ENV!=="production"&&Gt("`setOption` should not be called during main process.");return}if(this._disposed){Mr(this.id);return}var a,o,s;if(we(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Xt]=!0,!this._model||n){var u=new fz(this._api),l=this._theme,f=this._model=new s0;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,l,this._locale,u)}this._model.setOption(r,{replaceMerge:o},H0);var c={seriesTransition:s,optionChanged:!0};if(i)this[Cr]={silent:a,updateParams:c},this[Xt]=!1,this.getZr().wakeUp();else{try{ds(this),Vi.update.call(this,null,c)}catch(h){throw this[Cr]=null,this[Xt]=!1,h}this._ssr||this._zr.flush(),this[Cr]=null,this[Xt]=!1,Zu.call(this,a),Ju.call(this,a)}},e.prototype.setTheme=function(){On("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Pe.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&&Mt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(Pe.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return N(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){Mr(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;N(n,function(u){i.eachComponent({mainType:u},function(l){var f=o._componentsMap[l.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return N(a,function(u){u.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){Mr(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(y2[i]){var u=s,l=s,f=-s,c=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();N(el,function(b,w){if(b.group===i){var C=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas($e(r)),_=b.getDom().getBoundingClientRect();u=a(_.left,u),l=a(_.top,l),f=o(_.right,f),c=o(_.bottom,c),h.push({dom:C,left:_.left,top:_.top})}}),u*=d,l*=d,f*=d,c*=d;var p=f-u,g=c-l,v=Po.createCanvas(),m=nD(v,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:g}),n){var y="";return N(h,function(b){var w=b.left-u,C=b.top-l;y+='<g transform="translate('+w+","+C+')">'+b.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new St({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),N(h,function(b){var w=new fi({style:{x:b.left*d-u,y:b.top*d-l,image:b.dom}});m.add(w)}),m.refreshImmediately(),v.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n){return R0(this,"convertToPixel",r,n)},e.prototype.convertFromPixel=function(r,n){return R0(this,"convertFromPixel",r,n)},e.prototype.containPixel=function(r,n){if(this._disposed){Mr(this.id);return}var i=this._model,a,o=ig(i,r);return N(o,function(s,u){u.indexOf("Models")>=0&&N(s,function(l){var f=l.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(u==="seriesModels"){var c=this._chartsMap[l.__viewId];c&&c.containPoint?a=a||c.containPoint(n,l):process.env.NODE_ENV!=="production"&&xt(u+": "+(c?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&xt(u+": containPoint is not supported")},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=ig(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||xt("There is no specified series model"));var s=o.getData(),u=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return u!=null?Fj(s,u,n):Lj(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;N(AV,function(n){var i=function(a){var o=r.getModel(),s=a.target,u,l=n==="globalout";if(l?u={}:s&&Xu(s,function(p){var g=He(p);if(g&&g.dataIndex!=null){var v=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return u=v&&v.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return u=oe({},g.eventData),!0},!0),u){var f=u.componentType,c=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=u.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),d=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!l&&!(h&&d)&&xt("model or view can not be found by params"),u.event=a,u.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:u,model:h,view:d},r.trigger(n,u)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),N(Qu,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),N(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),Rj(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Mr(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Mr(this.id);return}this._disposed=!0;var r=this.getDom();r&&CD(this.getDom(),$0,"");var n=this,i=n._api,a=n._model;N(n._componentsViews,function(o){o.dispose(a,i)}),N(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete el[n.id]},e.prototype.resize=function(r){if(this[Xt]){process.env.NODE_ENV!=="production"&&Gt("`resize` should not be called during main process.");return}if(this._disposed){Mr(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Cr]&&(a==null&&(a=this[Cr].silent),i=!0,this[Cr]=null),this[Xt]=!0;try{i&&ds(this),Vi.update.call(this,{type:"resize",animation:oe({duration:0},r&&r.animation)})}catch(o){throw this[Xt]=!1,o}this[Xt]=!1,Zu.call(this,a),Ju.call(this,a)}},e.prototype.showLoading=function(r,n){if(this._disposed){Mr(this.id);return}if(we(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!W0[r]){process.env.NODE_ENV!=="production"&&xt("Loading effects "+r+" not exists.");return}var i=W0[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},e.prototype.hideLoading=function(){if(this._disposed){Mr(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=oe({},r);return n.type=Qu[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){Mr(this.id);return}if(we(n)||(n={silent:!!n}),!!fh[r.type]&&this._model){if(this[Xt]){this._pendingActions.push(r);return}var i=n.silent;k0.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Pe.browser.weChat&&this._throttledZrFlush(),Zu.call(this,i),Ju.call(this,i)}},e.prototype.updateLabelLayout=function(){cn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){Mr(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&Ee(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ds=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),I0(c,!0),I0(c,!1),h.plan()},I0=function(c,h){for(var d=c._model,p=c._scheduler,g=h?c._componentsViews:c._chartsViews,v=h?c._componentsMap:c._chartsMap,m=c._zr,y=c._api,b=0;b<g.length;b++)g[b].__alive=!1;h?d.eachComponent(function(_,D){_!=="series"&&w(D)}):d.eachSeries(w);function w(_){var D=_.__requireNewView;_.__requireNewView=!1;var x="_ec_"+_.id+"_"+_.type,S=!D&&v[x];if(!S){var O=Pn(_.type),E=h?Br.getClass(O.main,O.sub):Zr.getClass(O.sub);process.env.NODE_ENV!=="production"&&Ee(E,O.sub+" does not exist."),S=new E,S.init(d,y),v[x]=S,g.push(S),m.add(S.group)}_.__viewId=S.__id=x,S.__alive=!0,S.__model=_,S.group.__ecComponentInfo={mainType:_.mainType,index:_.componentIndex},!h&&p.prepareView(S,_,d,y)}for(var b=0;b<g.length;){var C=g[b];C.__alive?b++:(!h&&C.renderTask.dispose(),m.remove(C.group),C.dispose(d,y),g.splice(b,1),v[C.__id]===C&&delete v[C.__id],C.__id=C.group.__ecComponentInfo=null)}},uh=function(c,h,d,p,g){var v=c._model;if(v.setUpdatePayload(d),!p){N([].concat(c._componentsViews).concat(c._chartsViews),C);return}var m={};m[p+"Id"]=d[p+"Id"],m[p+"Index"]=d[p+"Index"],m[p+"Name"]=d[p+"Name"];var y={mainType:p,query:m};g&&(y.subType=g);var b=d.excludeSeriesId,w;b!=null&&(w=Ae(),N(gt(b),function(_){var D=pr(_,null);D!=null&&w.set(D,!0)})),v&&v.eachComponent(y,function(_){var D=w&&w.get(_.id)!=null;if(!D)if(vx(d))if(_ instanceof fn)d.type===Va&&!d.notBlur&&!_.get(["emphasis","disabled"])&&_9(_,d,c._api);else{var x=Tg(_.mainType,_.componentIndex,d.name,c._api),S=x.focusSelf,O=x.dispatchers;d.type===Va&&S&&!d.notBlur&&Ag(_.mainType,_.componentIndex,c._api),O&&N(O,function(E){d.type===Va?dc(E):vc(E)})}else Pg(d)&&_ instanceof fn&&(S9(_,d,c._api),cx(_),Jr(c))},c),v&&v.eachComponent(y,function(_){var D=w&&w.get(_.id)!=null;D||C(c[p==="series"?"_chartsMap":"_componentsMap"][_.__viewId])},c);function C(_){_&&_.__alive&&_[h]&&_[h](_.__model,v,c._api,d)}},Vi={prepareAndUpdate:function(c){ds(this),Vi.update.call(this,c,{optionChanged:c.newOption!=null})},update:function(c,h){var d=this._model,p=this._api,g=this._zr,v=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(c),m.restoreData(d,c),m.performSeriesTasks(d),v.create(d,p),m.performDataProcessorTasks(d,c),N0(this,d),v.update(d,p),r(d),m.performVisualTasks(d,c),z0(this,d,p,c,h);var y=d.get("backgroundColor")||"transparent",b=d.get("darkMode");g.setBackgroundColor(y),b!=null&&b!=="auto"&&g.setDarkMode(b),cn.trigger("afterupdate",d,p)}},updateTransform:function(c){var h=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(c);var g=[];d.eachComponent(function(m,y){if(m!=="series"){var b=h.getViewOfComponentModel(y);if(b&&b.__alive)if(b.updateTransform){var w=b.updateTransform(y,d,p,c);w&&w.update&&g.push(b)}else g.push(b)}});var v=Ae();d.eachSeries(function(m){var y=h._chartsMap[m.__viewId];if(y.updateTransform){var b=y.updateTransform(m,d,p,c);b&&b.update&&v.set(m.uid,1)}else v.set(m.uid,1)}),r(d),this._scheduler.performVisualTasks(d,c,{setDirty:!0,dirtyMap:v}),lh(this,d,p,c,{},v),cn.trigger("afterupdate",d,p)}},updateView:function(c){var h=this._model;h&&(h.setUpdatePayload(c),Zr.markUpdateMethod(c,"updateView"),r(h),this._scheduler.performVisualTasks(h,c,{setDirty:!0}),z0(this,h,this._api,c,{}),cn.trigger("afterupdate",h,this._api))},updateVisual:function(c){var h=this,d=this._model;d&&(d.setUpdatePayload(c),d.eachSeries(function(p){p.getData().clearAllVisual()}),Zr.markUpdateMethod(c,"updateVisual"),r(d),this._scheduler.performVisualTasks(d,c,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,g){if(p!=="series"){var v=h.getViewOfComponentModel(g);v&&v.__alive&&v.updateVisual(g,d,h._api,c)}}),d.eachSeries(function(p){var g=h._chartsMap[p.__viewId];g.updateVisual(p,d,h._api,c)}),cn.trigger("afterupdate",d,this._api))},updateLayout:function(c){Vi.update.call(this,c)}},R0=function(c,h,d,p){if(c._disposed){Mr(c.id);return}for(var g=c._model,v=c._coordSysMgr.getCoordinateSystems(),m,y=ig(g,d),b=0;b<v.length;b++){var w=v[b];if(w[h]&&(m=w[h](g,y,p))!=null)return m}process.env.NODE_ENV!=="production"&&xt("No coordinate system that supports "+h+" found by the given finder.")},N0=function(c,h){var d=c._chartsMap,p=c._scheduler;h.eachSeries(function(g){p.updateStreamModes(g,d[g.__viewId])})},k0=function(c,h){var d=this,p=this.getModel(),g=c.type,v=c.escapeConnect,m=fh[g],y=m.actionInfo,b=(y.update||"update").split(":"),w=b.pop(),C=b[0]!=null&&Pn(b[0]);this[Xt]=!0;var _=[c],D=!1;c.batch&&(D=!0,_=ye(c.batch,function(B){return B=je(oe({},B),c),B.batch=null,B}));var x=[],S,O=Pg(c),E=vx(c);if(E&&fx(this._api),N(_,function(B){if(S=m.action(B,d._model,d._api),S=S||oe({},B),S.type=y.event||S.type,x.push(S),E){var M=ag(c),I=M.queryOptionMap,j=M.mainTypeSpecified,z=j?I.keys()[0]:"series";uh(d,w,B,z),Jr(d)}else O?(uh(d,w,B,"series"),Jr(d)):C&&uh(d,w,B,C.main,C.sub)}),w!=="none"&&!E&&!O&&!C)try{this[Cr]?(ds(this),Vi.update.call(this,c),this[Cr]=null):Vi[w].call(this,c)}catch(B){throw this[Xt]=!1,B}if(D?S={type:y.event||g,escapeConnect:v,batch:x}:S=x[0],this[Xt]=!1,!h){var P=this._messageCenter;if(P.trigger(S.type,S),O){var F={type:"selectchanged",escapeConnect:v,selected:E9(p),isFromClick:c.isFromClick||!1,fromAction:c.type,fromActionPayload:c};P.trigger(F.type,F)}}},Zu=function(c){for(var h=this._pendingActions;h.length;){var d=h.shift();k0.call(this,d,c)}},Ju=function(c){!c&&this.trigger("updated")},f2=function(c,h){c.on("rendered",function(d){h.trigger("rendered",d),c.animation.isFinished()&&!h[Cr]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},c2=function(c,h){c.on("mouseover",function(d){var p=d.target,g=Xu(p,Jo);g&&(D9(g,d,h._api),Jr(h))}).on("mouseout",function(d){var p=d.target,g=Xu(p,Jo);g&&(x9(g,d,h._api),Jr(h))}).on("click",function(d){var p=d.target,g=Xu(p,function(y){return He(y).dataIndex!=null},!0);if(g){var v=g.selected?"unselect":"select",m=He(g);h._api.dispatchAction({type:v,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function r(c){c.clearColorPalette(),c.eachSeries(function(h){h.clearColorPalette()})}function n(c){var h=[],d=[],p=!1;if(c.eachComponent(function(y,b){var w=b.get("zlevel")||0,C=b.get("z")||0,_=b.getZLevelKey();p=p||!!_,(y==="series"?d:h).push({zlevel:w,z:C,idx:b.componentIndex,type:y,key:_})}),p){var g=h.concat(d),v,m;Bf(g,function(y,b){return y.zlevel===b.zlevel?y.z-b.z:y.zlevel-b.zlevel}),N(g,function(y){var b=c.getComponent(y.type,y.idx),w=y.zlevel,C=y.key;v!=null&&(w=Math.max(v,w)),C?(w===v&&C!==m&&w++,m=C):m&&(w===v&&w++,m=""),v=w,b.setZLevel(w)})}}z0=function(c,h,d,p,g){n(h),h2(c,h,d,p,g),N(c._chartsViews,function(v){v.__alive=!1}),lh(c,h,d,p,g),N(c._chartsViews,function(v){v.__alive||v.remove(h,d)})},h2=function(c,h,d,p,g,v){N(v||c._componentsViews,function(m){var y=m.__model;l(y,m),m.render(y,h,d,p),s(y,m),f(y,m)})},lh=function(c,h,d,p,g,v){var m=c._scheduler;g=oe(g||{},{updatedSeries:h.getSeries()}),cn.trigger("series:beforeupdate",h,d,g);var y=!1;h.eachSeries(function(b){var w=c._chartsMap[b.__viewId];w.__alive=!0;var C=w.renderTask;m.updatePayload(C,p),l(b,w),v&&v.get(b.uid)&&C.dirty(),C.perform(m.getPerformArgs(C))&&(y=!0),w.group.silent=!!b.get("silent"),o(b,w),cx(b)}),m.unfinished=y||m.unfinished,cn.trigger("series:layoutlabels",h,d,g),cn.trigger("series:transition",h,d,g),h.eachSeries(function(b){var w=c._chartsMap[b.__viewId];s(b,w),f(b,w)}),a(c,h),cn.trigger("series:afterupdate",h,d,g)},Jr=function(c){c[F0]=!0,c.getZr().wakeUp()},p2=function(c){c[F0]&&(c.getZr().storage.traverse(function(h){rs(h)||i(h)}),c[F0]=!1)};function i(c){for(var h=[],d=c.currentStates,p=0;p<d.length;p++){var g=d[p];g==="emphasis"||g==="blur"||g==="select"||h.push(g)}c.selected&&c.states.select&&h.push("select"),c.hoverState===uc&&c.states.emphasis?h.push("emphasis"):c.hoverState===sc&&c.states.blur&&h.push("blur"),c.useStates(h)}function a(c,h){var d=c._zr,p=d.storage,g=0;p.traverse(function(v){v.isGroup||g++}),g>h.get("hoverLayerThreshold")&&!Pe.node&&!Pe.worker&&h.eachSeries(function(v){if(!v.preventUsingHoverLayer){var m=c._chartsMap[v.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(c,h){var d=c.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(c,h){if(!c.preventAutoZ){var d=c.get("z")||0,p=c.get("zlevel")||0;h.eachRendered(function(g){return u(g,d,p,-1/0),!0})}}function u(c,h,d,p){var g=c.getTextContent(),v=c.getTextGuideLine(),m=c.isGroup;if(m)for(var y=c.childrenRef(),b=0;b<y.length;b++)p=Math.max(u(y[b],h,d,p),p);else c.z=h,c.zlevel=d,p=Math.max(c.z2,p);if(g&&(g.z=h,g.zlevel=d,isFinite(p)&&(g.z2=p+2)),v){var w=c.textGuideLineConfig;v.z=h,v.zlevel=d,isFinite(p)&&(v.z2=p+(w&&w.showAbove?1:-1))}return p}function l(c,h){h.eachRendered(function(d){if(!rs(d)){var p=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function f(c,h){var d=c.getModel("stateAnimation"),p=c.isAnimationEnabled(),g=d.get("duration"),v=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(rs(m))return;if(m instanceof Ve&&B9(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=v;var b=m.getTextContent(),w=m.getTextGuideLine();b&&(b.stateTransition=v),w&&(w.stateTransition=v)}m.__dirty&&i(m)}})}d2=function(c){return new(function(h){ce(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return c._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){dc(p,g),Jr(c)},d.prototype.leaveEmphasis=function(p,g){vc(p,g),Jr(c)},d.prototype.enterBlur=function(p){w9(p),Jr(c)},d.prototype.leaveBlur=function(p){ox(p),Jr(c)},d.prototype.enterSelect=function(p){sx(p),Jr(c)},d.prototype.leaveSelect=function(p){ux(p),Jr(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(p){return c.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return c.getViewOfSeriesModel(p)},d}(ES))(c)},v2=function(c){function h(d,p){for(var g=0;g<d.length;g++){var v=d[g];v[L0]=p}}N(Qu,function(d,p){c._messageCenter.on(p,function(g){if(y2[c.group]&&c[L0]!==i2){if(g&&g.escapeConnect)return;var v=c.makeActionFromEvent(g),m=[];N(el,function(y){y!==c&&y.group===c.group&&m.push(y)}),h(m,i2),N(m,function(y){y[L0]!==SV&&y.dispatchAction(v)}),h(m,EV)}})})}}(),e}(En),j0=g2.prototype;j0.on=a2("on"),j0.off=a2("off"),j0.one=function(t,e,r){var n=this;On("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(t,i)}this.on.call(this,t,i,r)};var AV=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Mr(t){process.env.NODE_ENV!=="production"&&xt("Instance "+t+" has been disposed")}var fh={},Qu={},V0=[],H0=[],ch=[],m2={},W0={},el={},y2={},TV=+new Date-0,$0="_echarts_instance_";function OV(t,e,r){{if(process.env.NODE_ENV!=="production"&&!t)throw new Error("Initialize failed: invalid dom.");var n=PV(t);if(n)return process.env.NODE_ENV!=="production"&&xt("There is a chart instance already initialized on the dom."),n;process.env.NODE_ENV!=="production"&&Mo(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&!r||!t.clientHeight&&!r)&&xt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var i=new g2(t,e,r);return i.id="ec_"+TV++,el[i.id]=i,CD(t,$0,i.id),v2(i),cn.trigger("afterinit",i),i}function PV(t){return el[h6(t,$0)]}function b2(t,e){m2[t]=e}function C2(t){Ge(H0,t)<0&&H0.push(t)}function w2(t,e){U0(V0,t,e,mV)}function BV(t){G0("afterinit",t)}function MV(t){G0("afterupdate",t)}function G0(t,e){cn.on(t,e)}function vs(t,e,r){De(e)&&(r=e,e="");var n=we(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,!Qu[e]&&(Ee(n2.test(n)&&n2.test(e)),fh[n]||(fh[n]={action:r,actionInfo:t}),Qu[e]=n)}function FV(t,e){l0.register(t,e)}function LV(t,e){U0(ch,t,e,e2,"layout")}function Qa(t,e){U0(ch,t,e,t2,"visual")}var _2=[];function U0(t,e,r,n,i){if((De(e)||we(e))&&(r=e,e=n),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");N(t,function(o){Ee(o.__raw!==r)})}if(!(Ge(_2,r)>=0)){_2.push(r);var a=SE.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function D2(t,e){W0[t]=e}function IV(t,e,r){var n=hV("registerMap");n&&n(t,e,r)}var RV=Wz;Qa(M0,gj),Qa(sh,mj),Qa(sh,yj),Qa(M0,Bj),Qa(sh,Mj),Qa(r2,fV),C2(FS),w2(pV,_z),D2("default",bj),vs({type:Va,event:Va,update:Va},dr),vs({type:fc,event:fc,update:fc},dr),vs({type:xu,event:xu,update:xu},dr),vs({type:cc,event:cc,update:cc},dr),vs({type:Su,event:Su,update:Su},dr),b2("light",Oj),b2("dark",ME);function tl(t){return t==null?0:t.length||1}function x2(t){return t}var q0=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||x2,this._newKeyGetter=i||x2,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],u=n[s],l=tl(u);if(l>1){var f=u.shift();u.length===1&&(n[s]=u[0]),this._update&&this._update(f,o)}else l===1?(n[s]=null,this._update&&this._update(u,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var u=a[s],l=n[u],f=i[u],c=tl(l),h=tl(f);if(c>1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,l),i[u]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,l),i[u]=null;else if(c===1&&h===1)this._update&&this._update(f,l),i[u]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,l),i[u]=null;else if(c>1)for(var d=0;d<c;d++)this._remove&&this._remove(l[d]);else this._remove&&this._remove(l)}this._performRestAdd(o,i)},t.prototype._performRestAdd=function(e,r){for(var n=0;n<e.length;n++){var i=e[n],a=r[i],o=tl(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},t.prototype._initIndexMap=function(e,r,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!r){var u=r[s],l=tl(u);l===0?(r[s]=o,a&&n.push(s)):l===1?r[s]=[u,o]:u.push(o)}}},t}(),NV=function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function kV(t,e){var r={},n=r.encode={},i=Ae(),a=[],o=[],s={};N(t.dimensions,function(h){var d=t.getDimensionInfo(h),p=d.coordDim;if(p){process.env.NODE_ENV!=="production"&&Ee(n0.get(p)==null);var g=d.coordDimIndex;Y0(n,p)[g]=h,d.isExtraCoord||(i.set(p,1),jV(d.type)&&(a[0]=h),Y0(s,p)[g]=t.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}n0.each(function(v,m){var y=Y0(n,m),b=d.otherDims[m];b!=null&&b!==!1&&(y[b]=d.name)})});var u=[],l={};i.each(function(h,d){var p=n[d];l[d]=p[0],u=u.concat(p)}),r.dataDimsOnCoord=u,r.dataDimIndicesOnCoord=ye(u,function(h){return t.getDimensionInfo(h).storeDimIndex}),r.encodeFirstDimNotExtra=l;var f=n.label;f&&f.length&&(a=f.slice());var c=n.tooltip;return c&&c.length?o=c.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new NV(s,e),r}function Y0(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function zV(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function jV(t){return!(t==="ordinal"||t==="time")}var hh=function(){function t(e){this.otherDims={},e!=null&&oe(this,e)}return t}(),VV=lt(),HV={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},S2=function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=T2(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return Be(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=kS(this.source),n=!O2(e),i="",a=[],o=0,s=0;o<e;o++){var u=void 0,l=void 0,f=void 0,c=this.dimensions[s];if(c&&c.storeDimIndex===o)u=r?c.name:null,l=c.type,f=c.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(u=r?h.name:null,l=h.type)}a.push({property:u,type:l,ordinalMeta:f}),r&&u!=null&&(!c||!c.isCalculationCoord)&&(i+=n?u.replace(/\`/g,"`1").replace(/\$/g,"`2"):u),i+="$",i+=HV[l]||"f",f&&(i+=f.uid),i+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:p}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}e.push(i)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function E2(t){return t instanceof S2}function A2(t){for(var e=Ae(),r=0;r<(t||[]).length;r++){var n=t[r],i=we(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,r)}return e}function T2(t){var e=VV(t);return e.dimNameMap||(e.dimNameMap=A2(t.dimensionsDefine))}function O2(t){return t>30}var rl=we,Hi=ye,WV=typeof Int32Array>"u"?Array:Int32Array,$V="e\0\0",P2=-1,GV=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],UV=["_approximateExtent"],B2,dh,nl,ps,X0,vh,K0,M2=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;E2(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},u=!1,l={},f=0;f<n.length;f++){var c=n[f],h=be(c)?new hh({name:c}):c instanceof hh?c:new hh(c),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var p=h.otherDims=h.otherDims||{};o.push(d),a[d]=h,l[d]!=null&&(u=!0),h.createInvertedIndices&&(s[d]=[]),p.itemName===0&&(this._nameDimIdx=f),p.itemId===0&&(this._idDimIdx=f),process.env.NODE_ENV!=="production"&&Ee(i||h.storeDimIndex>=0),i&&(h.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(u),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Ae();N(o,function(v){g.set(a[v].storeDimIndex,v)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(nt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,n=r.encode[e];return(n||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,n){var i=this,a;if(e instanceof y0&&(a=e),!a){var o=this.dimensions,s=h0(e)||Wt(e)?new VS(e,o.length):e;a=new y0;var u=Hi(o,function(l){return{type:i._dimInfos[l].type,property:l}});a.initData(s,u,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=kV(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var n=this._store.appendValues(e,r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var u=s-i;this._nameList[s]=r[u],o&&K0(this,s)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==hi&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,u=s===qr;if(u&&!i.pure)for(var l=[],f=e;f<r;f++){var c=i.getItem(f,l);if(!this.hasItemOption&&r6(c)&&(this.hasItemOption=!0),c){var h=c.name;a[f]==null&&h!=null&&(a[f]=pr(h,null));var d=c.id;o[f]==null&&d!=null&&(o[f]=pr(d,null))}}if(this._shouldMakeIdFromName())for(var f=e;f<r;f++)K0(this,f);B2(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){rl(e)?oe(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=nl(this,this._nameDimIdx,r)),n==null&&(n=""),n},t.prototype._getCategory=function(e,r){var n=this._store.get(e,r),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},t.prototype.getId=function(e){return dh(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var n=this,i=this._store;return he(e)?i.getValues(Hi(e,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var n=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n[r];return i==null||isNaN(i)?P2:i},t.prototype.indicesOfNearest=function(e,r,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),r,n)},t.prototype.each=function(e,r,n){De(e)&&(n=r,r=e,e=[]);var i=n||this,a=Hi(ps(e),this._getStoreDimIndex,this);this._store.each(a,i?dt(r,i):r)},t.prototype.filterSelf=function(e,r,n){De(e)&&(n=r,r=e,e=[]);var i=n||this,a=Hi(ps(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?dt(r,i):r),this},t.prototype.selectRange=function(e){var r=this,n={},i=Ke(e);return N(i,function(a){var o=r._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,r,n){De(e)&&(n=r,r=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(r&&r.apply(this,arguments))},n),i},t.prototype.map=function(e,r,n,i){var a=n||i||this,o=Hi(ps(e),this._getStoreDimIndex,this),s=vh(this);return s._store=this._store.map(o,a?dt(r,a):r),s},t.prototype.modify=function(e,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&N(ps(e),function(u){var l=a.getDimensionInfo(u);l.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Hi(ps(e),this._getStoreDimIndex,this);this._store.modify(s,o?dt(r,o):r)},t.prototype.downSample=function(e,r,n,i){var a=vh(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),r,n,i),a},t.prototype.lttbDownSample=function(e,r){var n=vh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,n=this.getRawDataItem(e);return new Ct(n,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new q0(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return dh(e,n)},function(n){return dh(r,n)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},rl(e)?oe(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var n=this._itemVisuals[e],i=n&&n[r];return i??this.getVisual(r)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),he(a)?a=a.slice():rl(a)&&(a=oe({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,rl(r)?oe(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){rl(e)?oe(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?oe(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;c9(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){N(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Hi(this.dimensions,this._getDimInfo,this),this.hostModel)),X0(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];De(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(fp(arguments)))})},t.internalField=function(){B2=function(e){var r=e._invertedIndicesMap;N(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new WV(o.categories.length);for(var u=0;u<n.length;u++)n[u]=P2;for(var u=0;u<s.count();u++)n[s.get(a.storeDimIndex,u)]=u}})},nl=function(e,r,n){return pr(e._getCategory(r,n),null)},dh=function(e,r){var n=e._idList[r];return n==null&&e._idDimIdx!=null&&(n=nl(e,e._idDimIdx,r)),n==null&&(n=$V+r),n},ps=function(e){return he(e)||(e=e!=null?[e]:[]),e},vh=function(e){var r=new t(e._schema?e._schema:Hi(e.dimensions,e._getDimInfo,e),e.hostModel);return X0(r,e),r},X0=function(e,r){N(GV.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,N(UV,function(n){e[n]=$e(r[n])}),e._calculationInfo=oe({},r._calculationInfo)},K0=function(e,r){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[r],u=i[r];if(s==null&&a!=null&&(n[r]=s=nl(e,a,r)),u==null&&o!=null&&(i[r]=u=nl(e,o,r)),u==null&&s!=null){var l=e._nameRepeatCount,f=l[s]=(l[s]||0)+1;u=s,f>1&&(u+="__ec__"+f),i[r]=u}}}(),t}();function F2(t,e){h0(t)||(t=LS(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Ae(),a=[],o=YV(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&O2(o),u=n===t.dimensionsDefine,l=u?T2(t):A2(n),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(t,o));for(var c=Ae(f),h=new QS(o),d=0;d<h.length;d++)h[d]=-1;function p(S){var O=h[S];if(O<0){var E=n[S],P=we(E)?E:{name:E},F=new hh,B=P.name;B!=null&&l.get(B)!=null&&(F.name=F.displayName=B),P.type!=null&&(F.type=P.type),P.displayName!=null&&(F.displayName=P.displayName);var M=a.length;return h[S]=M,F.storeDimIndex=S,a.push(F),F}return a[O]}if(!s)for(var d=0;d<o;d++)p(d);c.each(function(S,O){var E=gt(S).slice();if(E.length===1&&!be(E[0])&&E[0]<0){c.set(O,!1);return}var P=c.set(O,[]);N(E,function(F,B){var M=be(F)?l.get(F):F;M!=null&&M<o&&(P[B]=M,v(p(M),O,B))})});var g=0;N(r,function(S){var O,E,P,F;if(be(S))O=S,F={};else{F=S,O=F.name;var B=F.ordinalMeta;F.ordinalMeta=null,F=oe({},F),F.ordinalMeta=B,E=F.dimsDef,P=F.otherDims,F.name=F.coordDim=F.coordDimIndex=F.dimsDef=F.otherDims=null}var M=c.get(O);if(M!==!1){if(M=gt(M),!M.length)for(var I=0;I<(E&&E.length||1);I++){for(;g<o&&p(g).coordDim!=null;)g++;g<o&&M.push(g++)}N(M,function(j,z){var W=p(j);if(u&&F.type!=null&&(W.type=F.type),v(je(W,F),O,z),W.name==null&&E){var R=E[z];!we(R)&&(R={name:R}),W.name=W.displayName=R.name,W.defaultTooltip=R.defaultTooltip}P&&je(W.otherDims,P)})}});function v(S,O,E){n0.get(O)!=null?S.otherDims[O]=E:(S.coordDim=O,S.coordDimIndex=E,i.set(O,!0))}var m=e.generateCoord,y=e.generateCoordCount,b=y!=null;y=m?y||1:0;var w=m||"value";function C(S){S.name==null&&(S.name=S.coordDim)}if(s)N(a,function(S){C(S)}),a.sort(function(S,O){return S.storeDimIndex-O.storeDimIndex});else for(var _=0;_<o;_++){var D=p(_),x=D.coordDim;x==null&&(D.coordDim=XV(w,i,b),D.coordDimIndex=0,(!m||y<=0)&&(D.isExtraCoord=!0),y--),C(D),D.type==null&&(yS(t,_)===jt.Must||D.isExtraCoord&&(D.otherDims.itemName!=null||D.otherDims.seriesName!=null))&&(D.type="ordinal")}return qV(a),new S2({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function qV(t){for(var e=Ae(),r=0;r<t.length;r++){var n=t[r],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function YV(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return N(e,function(a){var o;we(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function XV(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var KV=function(){function t(e){this.coordSysDims=[],this.axisMap=Ae(),this.categoryAxisMap=Ae(),this.coordSysName=e}return t}();function ZV(t){var e=t.get("coordinateSystem"),r=new KV(e),n=JV[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var JV={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",sn).models[0],a=t.getReferringComponents("yAxis",sn).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+_a(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+_a(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),gs(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),gs(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",sn).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),gs(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",sn).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),gs(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),gs(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(s,u){var l=i.getComponent("parallelAxis",s),f=o[u];r.set(f,l),gs(l)&&(n.set(f,l),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=u))})}};function gs(t){return t.get("type")==="category"}function QV(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;eH(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var u=!!(t&&t.get("stack")),l,f,c,h;if(N(a,function(y,b){be(y)&&(a[b]=y={name:y}),u&&!y.isExtraCoord&&(!n&&!l&&y.ordinalMeta&&(l=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(f=y))}),f&&!n&&!l&&(n=!0),f){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=f.coordDim,p=f.type,g=0;N(a,function(y){y.coordDim===d&&g++});var v={name:c,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(h,p),m.storeDimIndex=s.ensureCalculationDimension(c,p)),o.appendCalculationDimension(v),o.appendCalculationDimension(m)):(a.push(v),a.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:l&&l.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function eH(t){return!E2(t.schema)}function ms(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function tH(t,e){return ms(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rH(t,e){var r=t.get("coordinateSystem"),n=l0.get(r),i;return e&&e.coordSysDims&&(i=ye(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var u=s.get("type");o.type=zV(u)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function nH(t,e,r){var n,i;return r&&N(t,function(a,o){var s=a.coordDim,u=r.categoryAxisMap.get(s);u&&(n==null&&(n=o),a.ordinalMeta=u.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function Z0(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===qr;var o=ZV(e),s=rH(e,o),u=r.useEncodeDefaulter,l=De(u)?u:u?Dt(X7,s,e):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},c=F2(i,f),h=nH(c.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(c),p=QV(e,{schema:c,store:d}),g=new M2(c,e);g.setCalculationInfo(p);var v=h!=null&&iH(i)?function(m,y,b,w){return w===h?b:this.defaultDimValueGetter(m,y,b,w)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,v),g}function iH(t){if(t.sourceFormat===qr){var e=aH(t.data||[]);return!he(yu(e))}}function aH(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}var kn=function(){function t(e){this._setting=e||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype.unionExtent=function(e){var r=this._extent;e[0]<r[0]&&(r[0]=e[0]),e[1]>r[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();ec(kn);var oH=0,J0=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++oH}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&ye(n,sH);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!be(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ae(this.categories))},t}();function sH(t){return we(t)&&t.value!=null?t.value:t+""}function uH(t){var e=Math.pow(10,Jf(Math.abs(t))),r=Math.abs(t/e);return r===0||r===1||r===2||r===3||r===5}function Q0(t){return t.type==="interval"||t.type==="log"}function lH(t,e,r,n){var i={},a=t[1]-t[0],o=i.interval=sD(a/e);r!=null&&o<r&&(o=i.interval=r),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=L2(o),u=i.niceTickExtent=[Tt(Math.ceil(t[0]/o)*o,s),Tt(Math.floor(t[1]/o)*o,s)];return fH(u,t),i}function em(t){var e=Math.pow(10,Jf(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Tt(r*e)}function L2(t){return ai(t)+2}function I2(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function fH(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),I2(t,0,e),I2(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function ph(t,e){return t>=e[0]&&t<=e[1]}function gh(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function mh(t,e){return t*(e[1]-e[0])+e[0]}var tm=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new J0({})),he(i)&&(i=new J0({categories:ye(i,function(a){return we(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:be(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),ph(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),gh(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(mh(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,u=Math.min(s,n.length);o<u;++o){var l=n[o];i[o]=l,a[l]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;i.push(f),a[f]=o}},e.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(kn);kn.registerClass(tm);var eo=Tt,ys=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return ph(r,this._extent)},e.prototype.normalize=function(r){return gh(r,this._extent)},e.prototype.scale=function(r){return mh(r,this._extent)},e.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(r){var n=this._extent;r[0]<n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=L2(r)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var u=1e4;i[0]<a[0]&&(r?s.push({value:eo(a[0]-n,o)}):s.push({value:i[0]}));for(var l=a[0];l<=a[1]&&(s.push({value:l}),l=eo(l+n,o),l!==s[s.length-1].value);)if(s.length>u)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(r?s.push({value:eo(f+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],u=n[o-1],l=0,f=[],c=s.value-u.value,h=c/r;l<r-1;){var d=eo(u.value+(l+1)*h);d>a[0]&&d<a[1]&&f.push(d),l++}i.push(f)}return i},e.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=ai(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=eo(r.value,i,!0);return uS(a)},e.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=lH(a,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval;r.fixMin||(n[0]=eo(Math.floor(n[0]/o)*o)),r.fixMax||(n[1]=eo(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},e.type="interval",e}(kn);kn.registerClass(ys);var R2=typeof Float32Array<"u",cH=R2?Float32Array:Array;function vi(t){return he(t)?R2?new Float32Array(t):t:new cH(t)}var hH="__ec_stack_";function rm(t){return t.get("stack")||hH+t.seriesIndex}function nm(t){return t.dim+t.index}function N2(t,e){var r=[];return e.eachSeriesByType(t,function(n){z2(n)&&r.push(n)}),r}function dH(t){var e={};N(t,function(u){var l=u.coordinateSystem,f=l.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var c=u.getData(),h=f.dim+"_"+f.index,d=c.getDimensionIndex(c.mapDimension(f.dim)),p=c.getStore(),g=0,v=p.count();g<v;++g){var m=p.get(d,g);e[h]?e[h].push(m):e[h]=[m]}});var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(u,l){return u-l});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function k2(t){var e=dH(t),r=[];return N(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var u=a.dim+"_"+a.index,l=e[u],f=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=l?f/h*l:f}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=ut(n.get("barWidth"),s),g=ut(n.get("barMaxWidth"),s),v=ut(n.get("barMinWidth")||(j2(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:v,barGap:m,barCategoryGap:y,axisKey:nm(a),stackId:rm(n)})}),vH(r)}function vH(t){var e={};N(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},u=s.stacks;e[a]=s;var l=n.stackId;u[l]||s.autoWidthCount++,u[l]=u[l]||{width:0,maxWidth:0};var f=n.barWidth;f&&!u[l].width&&(u[l].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(u[l].maxWidth=c);var h=n.barMinWidth;h&&(u[l].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var u=Ke(a).length;s=Math.max(35-u*4,15)+"%"}var l=ut(s,o),f=ut(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,d=(c-l)/(h+(h-1)*f);d=Math.max(d,0),N(a,function(m){var y=m.maxWidth,b=m.minWidth;if(m.width){var w=m.width;y&&(w=Math.min(w,y)),b&&(w=Math.max(w,b)),m.width=w,c-=w+f*w,h--}else{var w=d;y&&y<w&&(w=Math.min(y,c)),b&&b>w&&(w=b),w!==d&&(m.width=w,c-=w+f*w,h--)}}),d=(c-l)/(h+(h-1)*f),d=Math.max(d,0);var p=0,g;N(a,function(m,y){m.width||(m.width=d),g=m,p+=m.width*(1+f)}),g&&(p-=g.width*f);var v=-p/2;N(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:v,width:m.width},v+=m.width*(1+f)})}),r}function pH(t,e,r){if(t&&e){var n=t[nm(e)];return n!=null&&r!=null?n[rm(r)]:n}}function gH(t,e){var r=N2(t,e),n=k2(r);N(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),u=rm(i),l=n[nm(s)][u],f=l.offset,c=l.width;a.setLayout({bandWidth:l.bandWidth,offset:f,size:c})})}function mH(t){return{seriesType:t,plan:D0(),reset:function(e){if(z2(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),u=e.get("showBackground",!0),l=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),c=ms(r,l)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=yH(i,a),p=j2(e),g=e.get("barMinHeight")||0,v=f&&r.getDimensionIndex(f),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(b,w){for(var C=b.count,_=p&&vi(C*3),D=p&&u&&vi(C*3),x=p&&vi(C),S=n.master.getRect(),O=h?S.width:S.height,E,P=w.getStore(),F=0;(E=b.next())!=null;){var B=P.get(c?v:o,E),M=P.get(s,E),I=d,j=void 0;c&&(j=+B-P.get(o,E));var z=void 0,W=void 0,R=void 0,U=void 0;if(h){var Z=n.dataToPoint([B,M]);if(c){var ee=n.dataToPoint([j,M]);I=ee[0]}z=I,W=Z[1]+y,R=Z[0]-I,U=m,Math.abs(R)<g&&(R=(R<0?-1:1)*g)}else{var Z=n.dataToPoint([M,B]);if(c){var ee=n.dataToPoint([M,j]);I=ee[1]}z=Z[0]+y,W=I,R=m,U=Z[1]-I,Math.abs(U)<g&&(U=(U<=0?-1:1)*g)}p?(_[F]=z,_[F+1]=W,_[F+2]=h?R:U,D&&(D[F]=h?S.x:z,D[F+1]=h?W:S.y,D[F+2]=O),x[E]=E):w.setItemLayout(E,{x:z,y:W,width:R,height:U}),F+=3}p&&w.setLayout({largePoints:_,largeDataIndices:x,largeBackgroundPoints:D,valueAxisHorizontal:h})}}}}}}function z2(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function j2(t){return t.pipelineContext&&t.pipelineContext.large}function yH(t,e){var r=e.model.get("startValue");return r||(r=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?r>0?r:1:r))}var bH=function(t,e,r,n){for(;r<n;){var i=r+n>>>1;t[i][1]<e?r=i+1:n=i}return r},V2=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="time",n}return e.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return Rc(r.value,Jx[j7(as(this._minLevelUnit))]||Jx.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return V7(r,n,i,o,a)},e.prototype.getTicks=function(){var r=this._interval,n=this._extent,i=[];if(!r)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=EH(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Ur,n[1]+=Ur),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Ur}this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=yh.length,u=Math.min(bH(yh,this._approxInterval,0,s),s-1);this._interval=yh[u][1],this._minLevelUnit=yh[Math.max(u-1,0)][0]},e.prototype.parse=function(r){return nt(r)?r:+oi(r)},e.prototype.contain=function(r){return ph(this.parse(r),this._extent)},e.prototype.normalize=function(r){return gh(this.parse(r),this._extent)},e.prototype.scale=function(r){return mh(r,this._extent)},e.type="time",e}(ys),yh=[["second",Kg],["minute",Zg],["hour",Lu],["quarter-day",Lu*6],["half-day",Lu*12],["day",Ur*1.2],["half-week",Ur*3.5],["week",Ur*7],["month",Ur*31],["quarter",Ur*95],["half-year",Zx/2],["year",Zx]];function CH(t,e,r,n){var i=oi(e),a=oi(r),o=function(p){return tS(i,p,n)===tS(a,p,n)},s=function(){return o("year")},u=function(){return s()&&o("month")},l=function(){return u()&&o("day")},f=function(){return l()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},d=function(){return h()&&o("millisecond")};switch(t){case"year":return s();case"month":return u();case"day":return l();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return d()}}function wH(t,e){return t/=Ur,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function _H(t){var e=30*Ur;return t/=e,t>6?6:t>3?3:t>2?2:1}function DH(t){return t/=Lu,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function H2(t,e){return t/=e?Zg:Kg,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function xH(t){return sD(t)}function SH(t,e,r){var n=new Date(t);switch(as(e)){case"year":case"month":n[rS(r)](0);case"day":n[nS(r)](1);case"hour":n[iS(r)](0);case"minute":n[aS(r)](0);case"second":n[oS(r)](0),n[sS(r)](0)}return n.getTime()}function EH(t,e,r,n){var i=1e4,a=Qx,o=0;function s(O,E,P,F,B,M,I){for(var j=new Date(E),z=E,W=j[F]();z<P&&z<=n[1];)I.push({value:z}),W+=O,j[B](W),z=j.getTime();I.push({value:z,notAdd:!0})}function u(O,E,P){var F=[],B=!E.length;if(!CH(as(O),n[0],n[1],r)){B&&(E=[{value:SH(new Date(n[0]),O,r)},{value:n[1]}]);for(var M=0;M<E.length-1;M++){var I=E[M].value,j=E[M+1].value;if(I!==j){var z=void 0,W=void 0,R=void 0,U=!1;switch(O){case"year":z=Math.max(1,Math.round(e/Ur/365)),W=Qg(r),R=H7(r);break;case"half-year":case"quarter":case"month":z=_H(e),W=os(r),R=rS(r);break;case"week":case"half-week":case"day":z=wH(e),W=Nc(r),R=nS(r),U=!0;break;case"half-day":case"quarter-day":case"hour":z=DH(e),W=Ru(r),R=iS(r);break;case"minute":z=H2(e,!0),W=kc(r),R=aS(r);break;case"second":z=H2(e,!1),W=zc(r),R=oS(r);break;case"millisecond":z=xH(e),W=jc(r),R=sS(r);break}s(z,I,j,W,R,U,F),O==="year"&&P.length>1&&M===0&&P.unshift({value:P[0].value-z})}}for(var M=0;M<F.length;M++)P.push(F[M]);return F}}for(var l=[],f=[],c=0,h=0,d=0;d<a.length&&o++<i;++d){var p=as(a[d]);if(z7(a[d])){u(a[d],l[l.length-1]||[],f);var g=a[d+1]?as(a[d+1]):null;if(p!==g){if(f.length){h=c,f.sort(function(O,E){return O.value-E.value});for(var v=[],m=0;m<f.length;++m){var y=f[m].value;(m===0||f[m-1].value!==y)&&(v.push(f[m]),y>=n[0]&&y<=n[1]&&c++)}var b=(n[1]-n[0])/e;if(c>b*1.5&&h>b/1.5||(l.push(v),c>b||t===a[d]))break}f=[]}}}process.env.NODE_ENV!=="production"&&o>=i&&xt("Exceed safe limit.");for(var w=bt(ye(l,function(O){return bt(O,function(E){return E.value>=n[0]&&E.value<=n[1]&&!E.notAdd})}),function(O){return O.length>0}),C=[],_=w.length-1,d=0;d<w.length;++d)for(var D=w[d],x=0;x<D.length;++x)C.push({value:D[x].value,level:_-d});C.sort(function(O,E){return O.value-E.value});for(var S=[],d=0;d<C.length;++d)(d===0||C[d].value!==C[d-1].value)&&S.push(C[d]);return S}kn.registerClass(V2);var W2=kn.prototype,il=ys.prototype,AH=Tt,TH=Math.floor,OH=Math.ceil,bh=Math.pow,hn=Math.log,im=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new ys,r._interval=0,r}return e.prototype.getTicks=function(r){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=il.getTicks.call(this,r);return ye(o,function(s){var u=s.value,l=Tt(bh(this.base,u));return l=u===i[0]&&this._fixMin?Ch(l,a[0]):l,l=u===i[1]&&this._fixMax?Ch(l,a[1]):l,{value:l}},this)},e.prototype.setExtent=function(r,n){var i=hn(this.base);r=hn(Math.max(0,r))/i,n=hn(Math.max(0,n))/i,il.setExtent.call(this,r,n)},e.prototype.getExtent=function(){var r=this.base,n=W2.getExtent.call(this);n[0]=bh(r,n[0]),n[1]=bh(r,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=Ch(n[0],a[0])),this._fixMax&&(n[1]=Ch(n[1],a[1])),n},e.prototype.unionExtent=function(r){this._originalScale.unionExtent(r);var n=this.base;r[0]=hn(r[0])/hn(n),r[1]=hn(r[1])/hn(n),W2.unionExtent.call(this,r)},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=Zk(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Tt(OH(n[0]/a)*a),Tt(TH(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){il.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=hn(r)/hn(this.base),ph(r,this._extent)},e.prototype.normalize=function(r){return r=hn(r)/hn(this.base),gh(r,this._extent)},e.prototype.scale=function(r){return r=mh(r,this._extent),bh(this.base,r)},e.type="log",e}(kn),$2=im.prototype;$2.getMinorTicks=il.getMinorTicks,$2.getLabel=il.getLabel;function Ch(t,e){return AH(t,ai(e))}kn.registerClass(im);var PH=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;De(o)?this._modelMinNum=wh(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=wh(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(De(s)?this._modelMaxNum=wh(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=wh(e,s)),i)this._axisDataLen=r.getCategories().length;else{var u=r.get("boundaryGap"),l=he(u)?u:[u||0,u||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Bi(l[0],1),Bi(l[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,u=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,l=s!=null,f=u!=null;s==null&&(s=e?i?0:NaN:r-a[0]*o),u==null&&(u=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(u==null||!isFinite(u))&&(u=NaN);var c=Fo(s)||Fo(u)||e&&!i;this._needCrossZero&&(s>0&&u>0&&!l&&(s=0),s<0&&u<0&&!f&&(u=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,l=!0),d!=null&&(u=d,f=!0),{min:s,max:u,minFixed:l,maxFixed:f,isBlank:c}},t.prototype.modifyDataMinMax=function(e,r){process.env.NODE_ENV!=="production"&&Ee(!this.frozen),this[MH[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=BH[e];process.env.NODE_ENV!=="production"&&Ee(!this.frozen&&this[n]==null),this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),BH={min:"_determinedMin",max:"_determinedMax"},MH={min:"_dataMin",max:"_dataMax"};function FH(t,e,r){var n=t.rawExtentInfo;return n||(n=new PH(t,e,r),t.rawExtentInfo=n,n)}function wh(t,e){return e==null?null:Fo(e)?NaN:t.parse(e)}function G2(t,e){var r=t.type,n=FH(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=N2("bar",o),u=!1;if(N(s,function(c){u=u||c.getBaseAxis()===e.axis}),u){var l=k2(s),f=LH(i,a,e,l);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function LH(t,e,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=pH(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;N(o,function(d){s=Math.min(d.offset,s)});var u=-1/0;N(o,function(d){u=Math.max(d.offset+d.width,u)}),s=Math.abs(s),u=Math.abs(u);var l=s+u,f=e-t,c=1-(s+u)/a,h=f/c-f;return e+=h*(u/l),t-=h*(s/l),{min:t,max:e}}function U2(t,e){var r=e,n=G2(t,r),i=n.extent,a=r.get("splitNumber");t instanceof im&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),u=o==="interval"||o==="time";t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:u?r.get("minInterval"):null,maxInterval:u?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function IH(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new tm({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new V2({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(kn.getClass(e)||ys)}}function RH(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function bs(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(n){return function(i,a){return t.scale.getFormattedLabel(i,a,n)}}(e):be(e)?function(n){return function(i){var a=t.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):De(e)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(am(t,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return t.scale.getLabel(n)}}function am(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function NH(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof tm?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=bs(t),u,l=1;i>40&&(l=Math.ceil(i/40));for(var f=0;f<i;f+=l){var c=n?n[f]:{value:a[0]+f},h=s(c,f),d=o.getTextRect(h),p=kH(d,o.get("rotate")||0);u?u.union(p):u=p}return u}}function kH(t,e){var r=e*Math.PI/180,n=t.width,i=t.height,a=n*Math.abs(Math.cos(r))+Math.abs(i*Math.sin(r)),o=n*Math.abs(Math.sin(r))+Math.abs(i*Math.cos(r)),s=new Ue(t.x,t.y,a,o);return s}function om(t){var e=t.get("interval");return e??"auto"}function q2(t){return t.type==="category"&&om(t.getLabelModel())===0}function zH(t,e){var r={};return N(t.mapDimensionsAll(e),function(n){r[tH(t,n)]=!0}),Ke(r)}var jH=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),Y2=[],VH={registerPreprocessor:C2,registerProcessor:w2,registerPostInit:BV,registerPostUpdate:MV,registerUpdateLifecycle:G0,registerAction:vs,registerCoordinateSystem:FV,registerLayout:LV,registerVisual:Qa,registerTransform:RV,registerLoading:D2,registerMap:IV,registerImpl:cV,PRIORITY:xV,ComponentModel:Ze,ComponentView:Br,SeriesModel:fn,ChartView:Zr,registerComponentModel:function(t){Ze.registerClass(t)},registerComponentView:function(t){Br.registerClass(t)},registerSeriesModel:function(t){fn.registerClass(t)},registerChartView:function(t){Zr.registerClass(t)},registerSubTypeDefaulter:function(t,e){Ze.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Gk(t,e)}};function Wi(t){if(he(t)){N(t,function(e){Wi(e)});return}Ge(Y2,t)>=0||(Y2.push(t),De(t)&&(t={install:t}),t.install(VH))}var al=lt();function X2(t,e){var r=ye(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function HH(t){var e=t.getLabelModel().get("customValues");if(e){var r=bs(t);return{labels:X2(t,e).map(function(n){var i={value:n};return{formattedLabel:r(i),rawLabel:t.scale.getLabel(i),tickValue:n}})}}return t.type==="category"?$H(t):UH(t)}function WH(t,e){var r=t.getTickModel().get("customValues");return r?{ticks:X2(t,r)}:t.type==="category"?GH(t,e):{ticks:ye(t.scale.getTicks(),function(n){return n.value})}}function $H(t){var e=t.getLabelModel(),r=K2(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function K2(t,e){var r=Z2(t,"labels"),n=om(e),i=J2(r,n);if(i)return i;var a,o;return De(n)?a=tA(t,n):(o=n==="auto"?qH(t):n,a=eA(t,o)),Q2(r,n,{labels:a,labelCategoryInterval:o})}function GH(t,e){var r=Z2(t,"ticks"),n=om(e),i=J2(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),De(n))a=tA(t,n,!0);else if(n==="auto"){var s=K2(t,t.getLabelModel());o=s.labelCategoryInterval,a=ye(s.labels,function(u){return u.tickValue})}else o=n,a=eA(t,o,!0);return Q2(r,n,{ticks:a,tickCategoryInterval:o})}function UH(t){var e=t.scale.getTicks(),r=bs(t);return{labels:ye(e,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value}})}}function Z2(t,e){return al(t)[e]||(al(t)[e]=[])}function J2(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function Q2(t,e,r){return t.push({key:e,value:r}),r}function qH(t){var e=al(t).autoInterval;return e??(al(t).autoInterval=t.calculateCategoryInterval())}function YH(t){var e=XH(t),r=bs(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var u=a[0],l=t.dataToCoord(u+1)-t.dataToCoord(u),f=Math.abs(l*Math.cos(n)),c=Math.abs(l*Math.sin(n)),h=0,d=0;u<=a[1];u+=s){var p=0,g=0,v=Yp(r({value:u}),e.font,"center","top");p=v.width*1.3,g=v.height*1.3,h=Math.max(h,p,7),d=Math.max(d,g,7)}var m=h/f,y=d/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(m,y))),w=al(t.model),C=t.getExtent(),_=w.lastAutoInterval,D=w.lastTickCount;return _!=null&&D!=null&&Math.abs(_-b)<=1&&Math.abs(D-o)<=1&&_>b&&w.axisExtent0===C[0]&&w.axisExtent1===C[1]?b=_:(w.lastTickCount=o,w.lastAutoInterval=b,w.axisExtent0=C[0],w.axisExtent1=C[1]),b}function XH(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function eA(t,e,r){var n=bs(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],u=Math.max((e||0)+1,1),l=a[0],f=i.count();l!==0&&u>1&&f/u>2&&(l=Math.round(Math.ceil(l/u)*u));var c=q2(t),h=o.get("showMinLabel")||c,d=o.get("showMaxLabel")||c;h&&l!==a[0]&&g(a[0]);for(var p=l;p<=a[1];p+=u)g(p);d&&p-u!==a[1]&&g(a[1]);function g(v){var m={value:v};s.push(r?v:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:v})}return s}function tA(t,e,r){var n=t.scale,i=bs(t),a=[];return N(n.getTicks(),function(o){var s=n.getLabel(o),u=o.value;e(o.value,s)&&a.push(r?u:{formattedLabel:i(o),rawLabel:s,tickValue:u})}),a}var rA=[0,1],KH=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return qk(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),nA(n,i.count())),eg(e,rA,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),nA(n,i.count()));var a=eg(e,n,rA,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=WH(this,r),i=n.ticks,a=ye(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return ZH(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=ye(n,function(a){return ye(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(){return HH(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return YH(this)},t}();function nA(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function ZH(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var u=e[i-1].tickValue-e[0].tickValue,l=(e[i-1].coord-e[0].coord)/u;N(e,function(d){d.coord-=l/2});var f=t.scale.getExtent();s=1+f[1]-e[i-1].tickValue,o={coord:e[i-1].coord+l*s},e.push(o)}var c=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(d,p){return d=Tt(d),p=Tt(p),c?d>p:d<p}}var ol=Math.PI*2,to=ui.CMD,JH=["top","right","bottom","left"];function QH(t,e,r,n,i){var a=r.width,o=r.height;switch(t){case"top":n.set(r.x+a/2,r.y-e),i.set(0,-1);break;case"bottom":n.set(r.x+a/2,r.y+o+e),i.set(0,1);break;case"left":n.set(r.x-e,r.y+o/2),i.set(-1,0);break;case"right":n.set(r.x+a+e,r.y+o/2),i.set(1,0);break}}function eW(t,e,r,n,i,a,o,s,u){o-=t,s-=e;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var f=o*r+t,c=s*r+e;if(Math.abs(n-i)%ol<1e-4)return u[0]=f,u[1]=c,l-r;if(a){var h=n;n=li(i),i=li(h)}else n=li(n),i=li(i);n>i&&(i+=ol);var d=Math.atan2(s,o);if(d<0&&(d+=ol),d>=n&&d<=i||d+ol>=n&&d+ol<=i)return u[0]=f,u[1]=c,l-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,v=r*Math.cos(i)+t,m=r*Math.sin(i)+e,y=(p-o)*(p-o)+(g-s)*(g-s),b=(v-o)*(v-o)+(m-s)*(m-s);return y<b?(u[0]=p,u[1]=g,Math.sqrt(y)):(u[0]=v,u[1]=m,Math.sqrt(b))}function _h(t,e,r,n,i,a,o,s){var u=i-t,l=a-e,f=r-t,c=n-e,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var d=u*f+l*c,p=d/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var g=o[0]=t+p*f,v=o[1]=e+p*c;return Math.sqrt((g-i)*(g-i)+(v-a)*(v-a))}function iA(t,e,r,n,i,a,o){r<0&&(t=t+r,r=-r),n<0&&(e=e+n,n=-n);var s=t+r,u=e+n,l=o[0]=Math.min(Math.max(i,t),s),f=o[1]=Math.min(Math.max(a,e),u);return Math.sqrt((l-i)*(l-i)+(f-a)*(f-a))}var dn=[];function tW(t,e,r){var n=iA(e.x,e.y,e.width,e.height,t.x,t.y,dn);return r.set(dn[0],dn[1]),n}function rW(t,e,r){for(var n=0,i=0,a=0,o=0,s,u,l=1/0,f=e.data,c=t.x,h=t.y,d=0;d<f.length;){var p=f[d++];d===1&&(n=f[d],i=f[d+1],a=n,o=i);var g=l;switch(p){case to.M:a=f[d++],o=f[d++],n=a,i=o;break;case to.L:g=_h(n,i,f[d],f[d+1],c,h,dn,!0),n=f[d++],i=f[d++];break;case to.C:g=P_(n,i,f[d++],f[d++],f[d++],f[d++],f[d],f[d+1],c,h,dn),n=f[d++],i=f[d++];break;case to.Q:g=F_(n,i,f[d++],f[d++],f[d],f[d+1],c,h,dn),n=f[d++],i=f[d++];break;case to.A:var v=f[d++],m=f[d++],y=f[d++],b=f[d++],w=f[d++],C=f[d++];d+=1;var _=!!(1-f[d++]);s=Math.cos(w)*y+v,u=Math.sin(w)*b+m,d<=1&&(a=s,o=u);var D=(c-v)*b/y+v;g=eW(v,m,b,w,w+C,_,D,h,dn),n=Math.cos(w+C)*y+v,i=Math.sin(w+C)*b+m;break;case to.R:a=n=f[d++],o=i=f[d++];var x=f[d++],S=f[d++];g=iA(a,o,x,S,c,h,dn);break;case to.Z:g=_h(n,i,a,o,c,h,dn,!0),n=a,i=o;break}g<l&&(l=g,r.set(dn[0],dn[1]))}return l}var vn=new _e,st=new _e,wt=new _e,zn=new _e,jn=new _e;function aA(t,e){if(t){var r=t.getTextGuideLine(),n=t.getTextContent();if(n&&r){var i=t.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||JH,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var u=1/0,l=i.anchor,f=t.getComputedTransform(),c=f&&Tf([],f),h=e.get("length2")||0;l&&wt.copy(l);for(var d=0;d<o.length;d++){var p=o[d];QH(p,0,s,vn,zn),_e.scaleAndAdd(st,vn,zn,h),st.transform(c);var g=t.getBoundingRect(),v=l?l.distance(st):t instanceof Ve?rW(st,t.path,wt):tW(st,g,wt);v<u&&(u=v,st.transform(f),wt.transform(f),wt.toArray(a[0]),st.toArray(a[1]),vn.toArray(a[2]))}oA(a,e.get("minTurnAngle")),r.setShape({points:a})}}}var Dh=[],or=new _e;function oA(t,e){if(e<=180&&e>0){e=e/180*Math.PI,vn.fromArray(t[0]),st.fromArray(t[1]),wt.fromArray(t[2]),_e.sub(zn,vn,st),_e.sub(jn,wt,st);var r=zn.len(),n=jn.len();if(!(r<.001||n<.001)){zn.scale(1/r),jn.scale(1/n);var i=zn.dot(jn),a=Math.cos(e);if(a<i){var o=_h(st.x,st.y,wt.x,wt.y,vn.x,vn.y,Dh,!1);or.fromArray(Dh),or.scaleAndAdd(jn,o/Math.tan(Math.PI-e));var s=wt.x!==st.x?(or.x-st.x)/(wt.x-st.x):(or.y-st.y)/(wt.y-st.y);if(isNaN(s))return;s<0?_e.copy(or,st):s>1&&_e.copy(or,wt),or.toArray(t[1])}}}}function nW(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,vn.fromArray(t[0]),st.fromArray(t[1]),wt.fromArray(t[2]),_e.sub(zn,st,vn),_e.sub(jn,wt,st);var n=zn.len(),i=jn.len();if(!(n<.001||i<.001)){zn.scale(1/n),jn.scale(1/i);var a=zn.dot(e),o=Math.cos(r);if(a<o){var s=_h(st.x,st.y,wt.x,wt.y,vn.x,vn.y,Dh,!1);or.fromArray(Dh);var u=Math.PI/2,l=Math.acos(jn.dot(e)),f=u+l-r;if(f>=u)_e.copy(or,wt);else{or.scaleAndAdd(jn,s/Math.tan(Math.PI/2-f));var c=wt.x!==st.x?(or.x-st.x)/(wt.x-st.x):(or.y-st.y)/(wt.y-st.y);if(isNaN(c))return;c<0?_e.copy(or,st):c>1&&_e.copy(or,wt)}or.toArray(t[1])}}}}function sm(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function iW(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=dp(n[0],n[1]),a=dp(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Af([],n[1],n[0],o/i),u=Af([],n[1],n[2],o/a),l=Af([],s,u,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),t.bezierCurveTo(u[0],u[1],u[0],u[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)t.lineTo(n[f][0],n[f][1])}function sA(t,e,r){var n=t.getTextGuideLine(),i=t.getTextContent();if(!i){n&&t.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,u=0;u<lc.length;u++){var l=lc[u],f=e[l],c=l==="normal";if(f){var h=f.get("show"),d=c?s:Be(i.states[l]&&i.states[l].ignore,s);if(d||!Be(h,o)){var p=c?n:n&&n.states[l];p&&(p.ignore=!0),n&&sm(n,!0,l,f);continue}n||(n=new Pu,t.setTextGuideLine(n),!c&&(s||!o)&&sm(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),sm(n,!1,l,f)}}if(n){je(n.style,r),n.style.fill=null;var g=a.get("showAbove"),v=t.textGuideLineConfig=t.textGuideLineConfig||{};v.showAbove=g||!1,n.buildPath=iW}}function uA(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},n=0;n<Gr.length;n++){var i=Gr[n];r[i]=t.getModel([i,e])}return r}function lA(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,u=i.style.margin||0,l=o.clone();l.applyTransform(a),l.x-=u/2,l.y-=u/2,l.width+=u,l.height+=u;var f=s?new xc(o,a):null;e.push({label:i,labelLine:n.labelLine,rect:l,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return e}function fA(t,e,r,n,i,a){var o=t.length;if(o<2)return;t.sort(function(x,S){return x.rect[e]-S.rect[e]});for(var s=0,u,l=!1,f=0,c=0;c<o;c++){var h=t[c],d=h.rect;u=d[e]-s,u<0&&(d[e]-=u,h.label[e]-=u,l=!0);var p=Math.max(-u,0);f+=p,s=d[e]+d[r]}f>0&&a&&C(-f/o,0,o);var g=t[0],v=t[o-1],m,y;b(),m<0&&_(-m,.8),y<0&&_(y,.8),b(),w(m,y,1),w(y,m,-1),b(),m<0&&D(-m),y<0&&D(y);function b(){m=g.rect[e]-n,y=i-v.rect[e]-v.rect[r]}function w(x,S,O){if(x<0){var E=Math.min(S,-x);if(E>0){C(E*O,0,o);var P=E+x;P<0&&_(-P*O,1)}else _(-x*O,1)}}function C(x,S,O){x!==0&&(l=!0);for(var E=S;E<O;E++){var P=t[E],F=P.rect;F[e]+=x,P.label[e]+=x}}function _(x,S){for(var O=[],E=0,P=1;P<o;P++){var F=t[P-1].rect,B=Math.max(t[P].rect[e]-F[e]-F[r],0);O.push(B),E+=B}if(E){var M=Math.min(Math.abs(x)/E,S);if(x>0)for(var P=0;P<o-1;P++){var I=O[P]*M;C(I,0,P+1)}else for(var P=o-1;P>0;P--){var I=O[P-1]*M;C(-I,P,o)}}}function D(x){var S=x<0?-1:1;x=Math.abs(x);for(var O=Math.ceil(x/(o-1)),E=0;E<o-1;E++)if(S>0?C(O,0,E+1):C(-O,o-E-1,o),x-=O,x<=0)return}return l}function aW(t,e,r,n){return fA(t,"x","width",e,r,n)}function cA(t,e,r,n){return fA(t,"y","height",e,r,n)}function hA(t){var e=[];t.sort(function(g,v){return v.priority-g.priority});var r=new Ue(0,0,0,0);function n(g){if(!g.ignore){var v=g.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}g.ignore=!0}for(var i=0;i<t.length;i++){var a=t[i],o=a.axisAligned,s=a.localRect,u=a.transform,l=a.label,f=a.labelLine;r.copy(a.rect),r.width-=.1,r.height-=.1,r.x+=.05,r.y+=.05;for(var c=a.obb,h=!1,d=0;d<e.length;d++){var p=e[d];if(r.intersect(p.rect)){if(o&&p.axisAligned){h=!0;break}if(p.obb||(p.obb=new xc(p.localRect,p.transform)),c||(c=new xc(s,u)),c.intersect(p.obb)){h=!0;break}}}h?(n(l),f&&n(f)):(l.attr("ignore",a.defaultAttr.ignore),f&&f.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function oW(t){if(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].slice());return e}}function sW(t,e){var r=t.label,n=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:oW(n&&n.shape.points)}}var dA=["align","verticalAlign","width","height","fontSize"],sr=new pu,um=lt(),uW=lt();function xh(t,e,r){for(var n=0;n<r.length;n++){var i=r[n];e[i]!=null&&(t[i]=e[i])}}var Sh=["x","y","rotation"],lW=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(e,r,n,i,a){var o=i.style,s=i.__hostTarget,u=s.textConfig||{},l=i.getComputedTransform(),f=i.getBoundingRect().plain();Ue.applyTransform(f,f,l),l?sr.setLocalTransform(l):(sr.x=sr.y=sr.rotation=sr.originX=sr.originY=0,sr.scaleX=sr.scaleY=1),sr.rotation=li(sr.rotation);var c=i.__hostTarget,h;if(c){h=c.getBoundingRect().plain();var d=c.getComputedTransform();Ue.applyTransform(h,h,d)}var p=h&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:e,dataType:r,layoutOption:a,computedLayoutOption:null,rect:f,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:sr.x,y:sr.y,scaleX:sr.scaleX,scaleY:sr.scaleY,rotation:sr.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:u.position,attachedRot:u.rotation}})},t.prototype.addLabelsOfSeries=function(e){var r=this;this._chartViewList.push(e);var n=e.__model,i=n.get("labelLayout");(De(i)||Ke(i).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=He(a);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,n,o,i)})},t.prototype.updateLayoutConfig=function(e){var r=e.getWidth(),n=e.getHeight();function i(b,w){return function(){aA(b,w)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,u=s.__hostTarget,l=o.defaultAttr,f=void 0;De(o.layoutOption)?f=o.layoutOption(sW(o,u)):f=o.layoutOption,f=f||{},o.computedLayoutOption=f;var c=Math.PI/180;u&&u.setTextConfig({local:!1,position:f.x!=null||f.y!=null?null:l.attachedPos,rotation:f.rotate!=null?f.rotate*c:l.attachedRot,offset:[f.dx||0,f.dy||0]});var h=!1;if(f.x!=null?(s.x=ut(f.x,r),s.setStyle("x",0),h=!0):(s.x=l.x,s.setStyle("x",l.style.x)),f.y!=null?(s.y=ut(f.y,n),s.setStyle("y",0),h=!0):(s.y=l.y,s.setStyle("y",l.style.y)),f.labelLinePoints){var d=u.getTextGuideLine();d&&(d.setShape({points:f.labelLinePoints}),h=!1)}var p=um(s);p.needsUpdateLabelLine=h,s.rotation=f.rotate!=null?f.rotate*c:l.rotation,s.scaleX=l.scaleX,s.scaleY=l.scaleY;for(var g=0;g<dA.length;g++){var v=dA[g];s.setStyle(v,f[v]!=null?f[v]:l.style[v])}if(f.draggable){if(s.draggable=!0,s.cursor="move",u){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",i(u,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=l.cursor}},t.prototype.layout=function(e){var r=e.getWidth(),n=e.getHeight(),i=lA(this._labelList),a=bt(i,function(u){return u.layoutOption.moveOverlap==="shiftX"}),o=bt(i,function(u){return u.layoutOption.moveOverlap==="shiftY"});aW(a,0,r),cA(o,0,n);var s=bt(i,function(u){return u.layoutOption.hideOverlap});hA(s)},t.prototype.processLabelsOverall=function(){var e=this;N(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,u=o.getTextContent();!s&&u&&(s=um(u).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),a&&e._animateLabels(o,n)})})},t.prototype._updateLabelLine=function(e,r){var n=e.getTextContent(),i=He(e),a=i.dataIndex;if(n&&a!=null){var o=r.getData(i.dataType),s=o.getItemModel(a),u={},l=o.getItemVisual(a,"style");if(l){var f=o.getVisual("drawType");u.stroke=l[f]}var c=s.getModel("labelLine");sA(e,uA(s),u),aA(e,c)}},t.prototype._animateLabels=function(e,r){var n=e.getTextContent(),i=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!rs(e))){var a=um(n),o=a.oldLayout,s=He(e),u=s.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},f=r.getData(s.dataType);if(o){n.attr(o);var h=e.prevStates;h&&(Ge(h,"select")>=0&&n.attr(a.oldLayoutSelect),Ge(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Ft(n,l,r,u)}else if(n.attr(l),!ns(n).valueAnimation){var c=Be(n.style.opacity,1);n.style.opacity=0,qt(n,{style:{opacity:c}},r,u)}if(a.oldLayout=l,n.states.select){var d=a.oldLayoutSelect={};xh(d,l,Sh),xh(d,n.states.select,Sh)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};xh(p,l,Sh),xh(p,n.states.emphasis,Sh)}x7(n,u,f,r,r)}if(i&&!i.ignore&&!i.invisible){var a=uW(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Ft(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,qt(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),lm=lt();function fW(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=lm(r).labelManager;i||(i=lm(r).labelManager=new lW),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=lm(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var cW=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Z0(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var n=new It,i=hs("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,u=r.itemHeight*.8,l=hs(s,(r.itemWidth-u)/2,(r.itemHeight-u)/2,u,u,r.itemStyle.fill);n.add(l),l.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return l.rotation=f*Math.PI/180,l.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(l.style.stroke=l.style.fill,l.style.fill="#fff",l.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(fn);function fm(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=ls(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(ls(t,e,r[o]));return a.join(" ")}}function vA(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!he(e))return e+"";for(var n=[],i=0;i<r.length;i++){var a=t.getDimensionIndex(r[i]);a>=0&&n.push(e[a])}return n.join(" ")}var cm=function(t){ce(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=hs(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=hW,this._symbolType=r,this.add(s)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){dc(this.childAt(0))},e.prototype.downplay=function(){vc(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,u=e.getSymbolSize(r,n),l=o!==this._symbolType,f=a&&a.disableAnimation;if(l){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,u,c)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:u[0]/2,scaleY:u[1]/2};f?h.attr(d):Ft(h,d,s,n),zg(h)}if(this._updateCommon(r,n,u,i,a),l){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,qt(h,d,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),u=r.hostModel,l,f,c,h,d,p,g,v,m;if(a&&(l=a.emphasisItemStyle,f=a.blurItemStyle,c=a.selectItemStyle,h=a.focus,d=a.blurScope,g=a.labelStatesModels,v=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),b=y.getModel("emphasis");l=b.getModel("itemStyle").getItemStyle(),c=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),g=Fu(y),v=b.getShallow("scale"),m=y.getShallow("cursor")}var w=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var C=LE(r.getItemVisual(n,"symbolOffset"),i);C&&(s.x=C[0],s.y=C[1]),m&&s.attr("cursor",m);var _=r.getItemVisual(n,"style"),D=_.fill;if(s instanceof fi){var x=s.style;s.useStyle(oe({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},_))}else s.__isEmptyBrush?s.useStyle(oe({},_)):s.useStyle(_),s.style.decal=null,s.setColor(D,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var S=r.getItemVisual(n,"liftZ"),O=this._z2;S!=null?O==null&&(this._z2=s.z2,s.z2+=S):O!=null&&(s.z2=O,this._z2=null);var E=o&&o.useNameLabel;Mu(s,g,{labelFetcher:u,labelDataIndex:n,defaultText:P,inheritColor:D,defaultOpacity:_.opacity});function P(M){return E?r.getName(M):fm(r,M)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var F=s.ensureState("emphasis");F.style=l,s.ensureState("select").style=c,s.ensureState("blur").style=f;var B=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;F.scaleX=this._sizeX*B,F.scaleY=this._sizeY*B,this.setSymbolScale(1),Eu(this,h,d,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=He(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var u=a.getTextContent();u&&Sc(u,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Sc(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Yj(r.getItemVisual(n,"symbolSize"))},e}(It);function hW(t,e){this.parent.drift(t,e)}function hm(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function pA(t){return t!=null&&!we(t)&&(t={isIgnore:t}),t||{}}function gA(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Fu(e),cursorStyle:e.get("cursor")}}var dW=function(){function t(e){this.group=new It,this._SymbolCtor=e||cm}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=pA(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,u=gA(e),l={disableAnimation:s},f=r.getSymbolPoint||function(c){return e.getItemLayout(c)};a||n.removeAll(),e.diff(a).add(function(c){var h=f(c);if(hm(e,h,c,r)){var d=new o(e,c,u,l);d.setPosition(h),e.setItemGraphicEl(c,d),n.add(d)}}).update(function(c,h){var d=a.getItemGraphicEl(h),p=f(c);if(!hm(e,p,c,r)){n.remove(d);return}var g=e.getItemVisual(c,"symbol")||"circle",v=d&&d.getSymbolType&&d.getSymbolType();if(!d||v&&v!==g)n.remove(d),d=new o(e,c,u,l),d.setPosition(p);else{d.updateData(e,c,u,l);var m={x:p[0],y:p[1]};s?d.attr(m):Ft(d,m,i)}n.add(d),e.setItemGraphicEl(c,d)}).remove(function(c){var h=a.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=f,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=gA(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=pA(n);function i(u){u.isGroup||(u.incremental=!0,u.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=r.getItemLayout(a);if(hm(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},t.prototype.eachRendered=function(e){Pc(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},t}();function mA(t,e,r){var n=t.getBaseAxis(),i=t.getOtherAxis(n),a=vW(i,r),o=n.dim,s=i.dim,u=e.mapDimension(s),l=e.mapDimension(o),f=s==="x"||s==="radius"?1:0,c=ye(t.dimensions,function(p){return e.mapDimension(p)}),h=!1,d=e.getCalculationInfo("stackResultDimension");return ms(e,c[0])&&(h=!0,c[0]=d),ms(e,c[1])&&(h=!0,c[1]=d),{dataDimsForPoint:c,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:u,baseDim:l,baseDataOffset:f,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function vW(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:nt(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function yA(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function pW(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function gW(t,e,r,n,i,a,o,s){for(var u=pW(t,e),l=[],f=[],c=[],h=[],d=[],p=[],g=[],v=mA(i,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],b=0;b<u.length;b++){var w=u[b],C=!0,_=void 0,D=void 0;switch(w.cmd){case"=":_=w.idx*2,D=w.idx1*2;var x=m[_],S=m[_+1],O=y[D],E=y[D+1];(isNaN(x)||isNaN(S))&&(x=O,S=E),l.push(x,S),f.push(O,E),c.push(r[_],r[_+1]),h.push(n[D],n[D+1]),g.push(e.getRawIndex(w.idx1));break;case"+":var P=w.idx,F=v.dataDimsForPoint,B=i.dataToPoint([e.get(F[0],P),e.get(F[1],P)]);D=P*2,l.push(B[0],B[1]),f.push(y[D],y[D+1]);var M=yA(v,i,e,P);c.push(M[0],M[1]),h.push(n[D],n[D+1]),g.push(e.getRawIndex(P));break;case"-":C=!1}C&&(d.push(w),p.push(p.length))}p.sort(function(q,L){return g[q]-g[L]});for(var I=l.length,j=vi(I),z=vi(I),W=vi(I),R=vi(I),U=[],b=0;b<p.length;b++){var Z=p[b],ee=b*2,ne=Z*2;j[ee]=l[ne],j[ee+1]=l[ne+1],z[ee]=f[ne],z[ee+1]=f[ne+1],W[ee]=c[ne],W[ee+1]=c[ne+1],R[ee]=h[ne],R[ee+1]=h[ne+1],U[b]=d[Z]}return{current:j,next:z,stackedOnCurrent:W,stackedOnNext:R,status:U}}var $i=Math.min,Gi=Math.max;function ro(t,e){return isNaN(t)||isNaN(e)}function dm(t,e,r,n,i,a,o,s,u){for(var l,f,c,h,d,p,g=r,v=0;v<n;v++){var m=e[g*2],y=e[g*2+1];if(g>=i||g<0)break;if(ro(m,y)){if(u){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](m,y),c=m,h=y;else{var b=m-l,w=y-f;if(b*b+w*w<.5){g+=a;continue}if(o>0){for(var C=g+a,_=e[C*2],D=e[C*2+1];_===m&&D===y&&v<n;)v++,C+=a,g+=a,_=e[C*2],D=e[C*2+1],m=e[g*2],y=e[g*2+1],b=m-l,w=y-f;var x=v+1;if(u)for(;ro(_,D)&&x<n;)x++,C+=a,_=e[C*2],D=e[C*2+1];var S=.5,O=0,E=0,P=void 0,F=void 0;if(x>=n||ro(_,D))d=m,p=y;else{O=_-l,E=D-f;var B=m-l,M=_-m,I=y-f,j=D-y,z=void 0,W=void 0;if(s==="x"){z=Math.abs(B),W=Math.abs(M);var R=O>0?1:-1;d=m-R*z*o,p=y,P=m+R*W*o,F=y}else if(s==="y"){z=Math.abs(I),W=Math.abs(j);var U=E>0?1:-1;d=m,p=y-U*z*o,P=m,F=y+U*W*o}else z=Math.sqrt(B*B+I*I),W=Math.sqrt(M*M+j*j),S=W/(W+z),d=m-O*o*(1-S),p=y-E*o*(1-S),P=m+O*o*S,F=y+E*o*S,P=$i(P,Gi(_,m)),F=$i(F,Gi(D,y)),P=Gi(P,$i(_,m)),F=Gi(F,$i(D,y)),O=P-m,E=F-y,d=m-O*z/W,p=y-E*z/W,d=$i(d,Gi(l,m)),p=$i(p,Gi(f,y)),d=Gi(d,$i(l,m)),p=Gi(p,$i(f,y)),O=m-d,E=y-p,P=m+O*W/z,F=y+E*W/z}t.bezierCurveTo(c,h,d,p,m,y),c=P,h=F}else t.lineTo(m,y)}l=m,f=y,g+=a}return v}var bA=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),mW=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new bA},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&ro(i[o*2-2],i[o*2-1]);o--);for(;a<o&&ro(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=dm(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=ui.CMD,s,u,l=n==="x",f=[],c=0;c<a.length;){var h=a[c++],d=void 0,p=void 0,g=void 0,v=void 0,m=void 0,y=void 0,b=void 0;switch(h){case o.M:s=a[c++],u=a[c++];break;case o.L:if(d=a[c++],p=a[c++],b=l?(r-s)/(d-s):(r-u)/(p-u),b<=1&&b>=0){var w=l?(p-u)*b+u:(d-s)*b+s;return l?[r,w]:[w,r]}s=d,u=p;break;case o.C:d=a[c++],p=a[c++],g=a[c++],v=a[c++],m=a[c++],y=a[c++];var C=l?Rf(s,d,g,m,r,f):Rf(u,p,v,y,r,f);if(C>0)for(var _=0;_<C;_++){var D=f[_];if(D<=1&&D>=0){var w=l?Bt(u,p,v,y,D):Bt(s,d,g,m,D);return l?[r,w]:[w,r]}}s=m,u=y;break}}},e}(Ve),yW=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(bA),bW=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new yW},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,u=n.smoothMonotone;if(n.connectNulls){for(;s>0&&ro(i[s*2-2],i[s*2-1]);s--);for(;o<s&&ro(i[o*2],i[o*2+1]);o++);}for(;o<s;){var l=dm(r,i,o,s,s,1,n.smooth,u,n.connectNulls);dm(r,a,o+l-1,l,s,-1,n.stackedOnSmooth,u,n.connectNulls),o+=l+1,r.closePath()}},e}(Ve);function CA(t,e,r,n,i){var a=t.getArea(),o=a.x,s=a.y,u=a.width,l=a.height,f=r.get(["lineStyle","width"])||2;o-=f/2,s-=f/2,u+=f,l+=f,u=Math.ceil(u),o!==Math.floor(o)&&(o=Math.floor(o),u++);var c=new St({shape:{x:o,y:s,width:u,height:l}});if(e){var h=t.getBaseAxis(),d=h.isHorizontal(),p=h.inverse;d?(p&&(c.shape.x+=u),c.shape.width=0):(p||(c.shape.y+=l),c.shape.height=0);var g=De(i)?function(v){i(v,c)}:null;qt(c,{shape:{width:u,height:l,x:o,y:s}},r,null,n,g)}return c}function wA(t,e,r){var n=t.getArea(),i=Tt(n.r0,1),a=Tt(n.r,1),o=new In({shape:{cx:Tt(t.cx,1),cy:Tt(t.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=t.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,qt(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function CW(t,e,r,n,i){if(t){if(t.type==="polar")return wA(t,e,r);if(t.type==="cartesian2d")return CA(t,e,r,n,i)}else return null;return null}function vm(t,e){return t.type===e}function _A(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function DA(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[e,r],[n,i]]}function xA(t,e){var r=DA(t),n=r[0],i=r[1],a=DA(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function SA(t){return nt(t)?t:t?.5:0}function wW(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),i=vi(n*2),a=0;a<n;a++){var o=yA(r,t,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Ui(t,e,r,n){var i=e.getBaseAxis(),a=i.dim==="x"||i.dim==="radius"?0:1,o=[],s=0,u=[],l=[],f=[],c=[];if(n){for(s=0;s<t.length;s+=2)!isNaN(t[s])&&!isNaN(t[s+1])&&c.push(t[s],t[s+1]);t=c}for(s=0;s<t.length-2;s+=2)switch(f[0]=t[s+2],f[1]=t[s+3],l[0]=t[s],l[1]=t[s+1],o.push(l[0],l[1]),r){case"end":u[a]=f[a],u[1-a]=l[1-a],o.push(u[0],u[1]);break;case"middle":var h=(l[a]+f[a])/2,d=[];u[a]=d[a]=h,u[1-a]=l[1-a],d[1-a]=f[1-a],o.push(u[0],u[1]),o.push(d[0],d[1]);break;default:u[a]=l[a],u[1-a]=f[1-a],o.push(u[0],u[1])}return o.push(t[s++],t[s++]),o}function _W(t,e){var r=[],n=t.length,i,a;function o(f,c,h){var d=f.coord,p=(h-d)/(c.coord-d),g=yk(p,[f.color,c.color]);return{coord:h,color:g}}for(var s=0;s<n;s++){var u=t[s],l=u.coord;if(l<0)i=u;else if(l>e){a?r.push(o(a,u,e)):i&&r.push(o(i,u,0),o(i,u,e));break}else i&&(r.push(o(i,u,0)),i=null),r.push(u),a=u}return r}function DW(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(i),l=ye(a.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),f=l.length,c=a.outerColors.slice();f&&l[0].coord>l[f-1].coord&&(l.reverse(),c.reverse());var h=_W(l,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&f)return l[0].coord<0?c[1]?c[1]:l[f-1].color:c[0]?c[0]:l[0].color;var p=10,g=h[0].coord-p,v=h[d-1].coord+p,m=v-g;if(m<.001)return"transparent";N(h,function(b){b.offset=(b.coord-g)/m}),h.push({offset:d?h[d-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:c[0]||"transparent"});var y=new Ox(0,0,0,0,h,!0);return y[i]=g,y[i+"2"]=v,y}}function xW(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&SW(a,e))){var o=e.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(u){var l=a.scale.getRawOrdinalNumber(u.tickValue);s[l]=1}),function(u){return!s.hasOwnProperty(e.get(o,u))}}}}function SW(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(cm.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function EW(t,e){return isNaN(t)||isNaN(e)}function AW(t){for(var e=t.length/2;e>0&&EW(t[e*2-2],t[e*2-1]);e--);return e-1}function EA(t,e){return[t[e*2],t[e*2+1]]}function TW(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,u=-1,l=0;l<n;l++)if(o=t[l*2+i],!(isNaN(o)||isNaN(t[l*2+1-i]))){if(l===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){u=l;break}s=l,a=o}return{range:[s,u],t:(e-a)/(o-a)}}function AA(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<Gr.length;e++)if(t.get([Gr[e],"endLabel","show"]))return!0;return!1}function pm(t,e,r,n){if(vm(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},u=AA(n)?function(d,p){t._endLabelOnDuring(d,p,o,s,a,i,e)}:null,l=e.getBaseAxis().isHorizontal(),f=CA(e,r,n,function(){var d=t._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},u);if(!n.get("clip",!0)){var c=f.shape,h=Math.max(c.width,c.height);l?(c.y-=h,c.height+=h*2):(c.x-=h,c.width+=h*2)}return u&&u(1,f),f}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),wA(e,r,n)}function OW(t,e){var r=e.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||o}}}var PW=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new It,n=new dW;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=this.group,u=r.getData(),l=r.getModel("lineStyle"),f=r.getModel("areaStyle"),c=u.getLayout("points")||[],h=o.type==="polar",d=this._coordSys,p=this._symbolDraw,g=this._polyline,v=this._polygon,m=this._lineGroup,y=!n.ssr&&r.get("animation"),b=!f.isEmpty(),w=f.get("origin"),C=mA(o,u,w),_=b&&wW(o,u,C),D=r.get("showSymbol"),x=r.get("connectNulls"),S=D&&!h&&xW(r,u,o),O=this._data;O&&O.eachItemGraphicEl(function(L,X){L.__temp&&(s.remove(L),O.setItemGraphicEl(X,null))}),D||p.remove(),s.add(m);var E=h?!1:r.get("step"),P;o&&o.getArea&&r.get("clip",!0)&&(P=o.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var F=DW(u,o,i)||u.getVisual("style")[u.getVisual("drawType")];if(!(g&&d.type===o.type&&E===this._step))D&&p.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),y&&this._initSymbolLabelAnimation(u,o,P),E&&(c=Ui(c,o,E,x),_&&(_=Ui(_,o,E,x))),g=this._newPolyline(c),b?v=this._newPolygon(c,_):v&&(m.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ga(F)),m.setClipPath(pm(this,o,!0,r));else{b&&!v?v=this._newPolygon(c,_):v&&!b&&(m.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ga(F));var B=m.getClipPath();if(B){var M=pm(this,o,!1,r);qt(B,{shape:M.shape},r)}else m.setClipPath(pm(this,o,!0,r));D&&p.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),(!_A(this._stackedOnPoints,_)||!_A(this._points,c))&&(y?this._doUpdateAnimation(u,_,o,i,E,w,x):(E&&(c=Ui(c,o,E,x),_&&(_=Ui(_,o,E,x))),g.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:_})))}var I=r.getModel("emphasis"),j=I.get("focus"),z=I.get("blurScope"),W=I.get("disabled");if(g.useStyle(je(l.getLineStyle(),{fill:"none",stroke:F,lineJoin:"bevel"})),pc(g,r,"lineStyle"),g.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var R=g.getState("emphasis").style;R.lineWidth=+g.style.lineWidth+1}He(g).seriesIndex=r.seriesIndex,Eu(g,j,z,W);var U=SA(r.get("smooth")),Z=r.get("smoothMonotone");if(g.setShape({smooth:U,smoothMonotone:Z,connectNulls:x}),v){var ee=u.getCalculationInfo("stackedOnSeries"),ne=0;v.useStyle(je(f.getAreaStyle(),{fill:F,opacity:.7,lineJoin:"bevel",decal:u.getVisual("style").decal})),ee&&(ne=SA(ee.get("smooth"))),v.setShape({smooth:U,stackedOnSmooth:ne,smoothMonotone:Z,connectNulls:x}),pc(v,r,"areaStyle"),He(v).seriesIndex=r.seriesIndex,Eu(v,j,z,W)}var q=function(L){a._changePolyState(L)};u.eachItemGraphicEl(function(L){L&&(L.onHoverStateChange=q)}),this._polyline.onHoverStateChange=q,this._data=u,this._coordSys=o,this._stackedOnPoints=_,this._points=c,this._step=E,this._valueOrigin=w,r.get("triggerLineEvent")&&(this.packEventData(r,g),v&&this.packEventData(r,v))},e.prototype.packEventData=function(r,n){He(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Pa(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var u=o.getLayout("points"),l=o.getItemGraphicEl(s);if(!l){var f=u[s*2],c=u[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=r.get("zlevel")||0,d=r.get("z")||0;l=new cm(o,s),l.x=f,l.y=c,l.setZ(h,d);var p=l.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=d,p.z2=this._polyline.z2+1),l.__temp=!0,o.setItemGraphicEl(s,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else Zr.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Pa(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var u=o.getItemGraphicEl(s);u&&(u.__temp?(o.setItemGraphicEl(s,null),this.group.remove(u)):u.downplay())}else Zr.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;nx(this._polyline,r),n&&nx(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new mW({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new bW({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),u=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var l=r.hostModel,f=l.get("animationDuration");De(f)&&(f=f(null));var c=l.get("animationDelay")||0,h=De(c)?c(null):c;r.eachItemGraphicEl(function(d,p){var g=d;if(g){var v=[d.x,d.y],m=void 0,y=void 0,b=void 0;if(i)if(o){var w=i,C=n.pointToCoord(v);a?(m=w.startAngle,y=w.endAngle,b=-C[1]/180*Math.PI):(m=w.r0,y=w.r,b=C[0])}else{var _=i;a?(m=_.x,y=_.x+_.width,b=d.x):(m=_.y+_.height,y=_.y,b=d.y)}var D=y===m?0:(b-m)/(y-m);u&&(D=1-D);var x=De(c)?c(p):f*D+h,S=g.getSymbolPath(),O=S.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),O&&O.animateFrom({style:{opacity:0}},{duration:300,delay:x}),S.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(AA(r)){var o=r.getData(),s=this._polyline,u=o.getLayout("points");if(!u){s.removeTextContent(),this._endLabel=null;return}var l=this._endLabel;l||(l=this._endLabel=new Ot({z2:200}),l.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=AW(u);f>=0&&(Mu(s,Fu(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(c,h,d){return d!=null?vA(o,d):fm(o,c)},enableTextSetter:!0},OW(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,u){var l=this._endLabel,f=this._polyline;if(l){r<1&&a.originalX==null&&(a.originalX=l.x,a.originalY=l.y);var c=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,v=u.getBaseAxis(),m=v.isHorizontal(),y=v.inverse,b=n.shape,w=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,C=(m?g:0)*(y?-1:1),_=(m?0:-g)*(y?-1:1),D=m?"x":"y",x=TW(c,w,D),S=x.range,O=S[1]-S[0],E=void 0;if(O>=1){if(O>1&&!d){var P=EA(c,S[0]);l.attr({x:P[0]+C,y:P[1]+_}),o&&(E=h.getRawValue(S[0]))}else{var P=f.getPointOn(w,D);P&&l.attr({x:P[0]+C,y:P[1]+_});var F=h.getRawValue(S[0]),B=h.getRawValue(S[1]);o&&(E=wD(i,p,F,B,x.t))}a.lastFrameIndex=S[0]}else{var M=r===1||a.lastFrameIndex>0?S[0]:0,P=EA(c,M);o&&(E=h.getRawValue(M)),l.attr({x:P[0]+C,y:P[1]+_})}if(o){var I=ns(l);typeof I.setLabelText=="function"&&I.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,u){var l=this._polyline,f=this._polygon,c=r.hostModel,h=gW(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,p=h.stackedOnCurrent,g=h.next,v=h.stackedOnNext;if(o&&(d=Ui(h.current,i,o,u),p=Ui(h.stackedOnCurrent,i,o,u),g=Ui(h.next,i,o,u),v=Ui(h.stackedOnNext,i,o,u)),xA(d,g)>3e3||f&&xA(p,v)>3e3){l.stopAnimation(),l.setShape({points:g}),f&&(f.stopAnimation(),f.setShape({points:g,stackedOnPoints:v}));return}l.shape.__points=h.current,l.shape.points=d;var m={shape:{points:g}};h.current!==d&&(m.shape.__points=h.next),l.stopAnimation(),Ft(l,m,c),f&&(f.setShape({points:d,stackedOnPoints:p}),f.stopAnimation(),Ft(f,{shape:{stackedOnPoints:v}},c),l.shape.points!==f.shape.points&&(f.shape.points=l.shape.points));for(var y=[],b=h.status,w=0;w<b.length;w++){var C=b[w].cmd;if(C==="="){var _=r.getItemGraphicEl(b[w].idx1);_&&y.push({el:_,ptIdx:w})}}l.animators&&l.animators.length&&l.animators[0].during(function(){f&&f.dirtyShape();for(var D=l.shape.__points,x=0;x<y.length;x++){var S=y[x].el,O=y[x].ptIdx*2;S.x=D[O],S.y=D[O+1],S.markRedraw()}})},e.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(Zr);function BW(t,e){return{seriesType:t,plan:D0(),reset:function(r){var n=r.getData(),i=r.coordinateSystem;if(r.pipelineContext,!!i){var a=ye(i.dimensions,function(c){return n.mapDimension(c)}).slice(0,2),o=a.length,s=n.getCalculationInfo("stackResultDimension");ms(n,a[0])&&(a[0]=s),ms(n,a[1])&&(a[1]=s);var u=n.getStore(),l=n.getDimensionIndex(a[0]),f=n.getDimensionIndex(a[1]);return o&&{progress:function(c,h){for(var d=c.end-c.start,p=vi(d*o),g=[],v=[],m=c.start,y=0;m<c.end;m++){var b=void 0;if(o===1){var w=u.get(l,m);b=i.dataToPoint(w,null,v)}else g[0]=u.get(l,m),g[1]=u.get(f,m),b=i.dataToPoint(g,null,v);p[y++]=b[0],p[y++]=b[1]}h.setLayout("points",p)}}}}}}var MW={average:function(t){for(var e=0,r=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},minmax:function(t){for(var e=-1/0,r=-1/0,n=0;n<t.length;n++){var i=t[n],a=Math.abs(i);a>e&&(e=a,r=i)}return isFinite(r)?r:NaN},nearest:function(t){return t[0]}},FW=function(t){return Math.round(t.length/2)};function TA(t){return{seriesType:t,reset:function(e,r,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var u=o.getBaseAxis(),l=o.getOtherAxis(u),f=u.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var p=void 0;be(a)?p=MW[a]:De(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(l.dim),1/d,p,FW))}}}}}function LW(t){t.registerChartView(PW),t.registerSeriesModel(cW),t.registerLayout(BW("line")),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,TA("line"))}var gm=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Z0(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)N(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),v=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!g&&(v+=1),p.length<2)return;if(p.length===2){s[d]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,w=1,C=0;C<p.length;C++){var _=p[C].coord,D=C===p.length-1?p[C-1].tickValue+w:p[C].tickValue;if(D===v){b=_;break}else if(D<v)y=_;else if(y!=null&&D>v){b=(_+y)/2;break}C===1&&(w=D-p[0].tickValue)}b==null&&(y?y&&(b=p[p.length-1].coord):b=p[0].coord),s[d]=h.toGlobalCoord(b)}});else{var u=this.getData(),l=u.getLayout("offset"),f=u.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=l+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(fn);fn.registerClass(gm);var IW=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Z0(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Yx(gm.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(gm),RW=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),OA=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new RW},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),u=(s-o)*.5,l=o+u,f=n.startAngle,c=n.endAngle,h=n.clockwise,d=Math.PI*2,p=h?c-f<d:f-c<d;p||(f=c-(h?d:-d));var g=Math.cos(f),v=Math.sin(f),m=Math.cos(c),y=Math.sin(c);p?(r.moveTo(g*o+i,v*o+a),r.arc(g*l+i,v*l+a,u,-Math.PI+f,f,!h)):r.moveTo(g*s+i,v*s+a),r.arc(i,a,s,f,c,!h),r.arc(m*l+i,y*l+a,u,c-Math.PI*2,c-Math.PI,!h),o!==0&&r.arc(i,a,o,c,f,h)},e}(Ve);function NW(t,e){e=e||{};var r=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Xf(n,i,a);var s=t(o),u=i.distance!=null?i.distance:5,l=this.shape,f=l.cx,c=l.cy,h=l.r,d=l.r0,p=(h+d)/2,g=l.startAngle,v=l.endAngle,m=(g+v)/2,y=r?Math.abs(h-d)/2:0,b=Math.cos,w=Math.sin,C=f+h*b(g),_=c+h*w(g),D="left",x="top";switch(s){case"startArc":C=f+(d-u)*b(m),_=c+(d-u)*w(m),D="center",x="top";break;case"insideStartArc":C=f+(d+u)*b(m),_=c+(d+u)*w(m),D="center",x="bottom";break;case"startAngle":C=f+p*b(g)+Eh(g,u+y,!1),_=c+p*w(g)+Ah(g,u+y,!1),D="right",x="middle";break;case"insideStartAngle":C=f+p*b(g)+Eh(g,-u+y,!1),_=c+p*w(g)+Ah(g,-u+y,!1),D="left",x="middle";break;case"middle":C=f+p*b(m),_=c+p*w(m),D="center",x="middle";break;case"endArc":C=f+(h+u)*b(m),_=c+(h+u)*w(m),D="center",x="bottom";break;case"insideEndArc":C=f+(h-u)*b(m),_=c+(h-u)*w(m),D="center",x="top";break;case"endAngle":C=f+p*b(v)+Eh(v,u+y,!0),_=c+p*w(v)+Ah(v,u+y,!0),D="left",x="middle";break;case"insideEndAngle":C=f+p*b(v)+Eh(v,-u+y,!0),_=c+p*w(v)+Ah(v,-u+y,!0),D="right",x="middle";break;default:return Xf(n,i,a)}return n=n||{},n.x=C,n.y=_,n.align=D,n.verticalAlign=x,n}}function kW(t,e,r,n){if(nt(n)){t.setTextConfig({rotation:n});return}else if(he(e)){t.setTextConfig({rotation:0});return}var i=t.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,u,l=r(e);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":u=s;break;case"startAngle":case"insideStartAngle":u=a;break;case"endAngle":case"insideEndAngle":u=o;break;default:t.setTextConfig({rotation:0});return}var f=Math.PI*1.5-u;l==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),t.setTextConfig({rotation:f})}function Eh(t,e,r){return e*Math.sin(t)*(r?-1:1)}function Ah(t,e,r){return e*Math.cos(t)*(r?1:-1)}function sl(t,e,r){var n=t.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;he(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:ye(n,function(a){return Bi(a,i)})}}var mm=Math.max,ym=Math.min;function zW(t,e){var r=t.getArea&&t.getArea();if(vm(t,"cartesian2d")){var n=t.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var jW=function(t){ce(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&xt("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},e.prototype.eachRendered=function(r){Pc(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),u=this._data,l=r.coordinateSystem,f=l.getBaseAxis(),c;l.type==="cartesian2d"?c=f.isHorizontal():l.type==="polar"&&(c=f.dim==="angle");var h=r.isAnimationEnabled()?r:null,d=VW(r,l);d&&this._enableRealtimeSort(d,s,i);var p=r.get("clip",!0)||d,g=zW(l,s);o.removeClipPath();var v=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),b=y.get("borderRadius")||0,w=[],C=this._backgroundEls,_=a&&a.isInitSort,D=a&&a.type==="changeAxisOrder";function x(E){var P=Th[l.type](s,E),F=YW(l,c,P);return F.useStyle(y.getItemStyle()),l.type==="cartesian2d"?F.setShape("r",b):F.setShape("cornerRadius",b),w[E]=F,F}s.diff(u).add(function(E){var P=s.getItemModel(E),F=Th[l.type](s,E,P);if(m&&x(E),!(!s.hasValue(E)||!LA[l.type](F))){var B=!1;p&&(B=PA[l.type](g,F));var M=BA[l.type](r,s,E,F,c,h,f.model,!1,v);d&&(M.forceLabelAnimation=!0),RA(M,s,E,P,F,r,c,l.type==="polar"),_?M.attr({shape:F}):d?MA(d,h,M,F,E,c,!1,!1):qt(M,{shape:F},r,E),s.setItemGraphicEl(E,M),o.add(M),M.ignore=B}}).update(function(E,P){var F=s.getItemModel(E),B=Th[l.type](s,E,F);if(m){var M=void 0;C.length===0?M=x(P):(M=C[P],M.useStyle(y.getItemStyle()),l.type==="cartesian2d"?M.setShape("r",b):M.setShape("cornerRadius",b),w[E]=M);var I=Th[l.type](s,E),j=jA(c,I,l);Ft(M,{shape:j},h,E)}var z=u.getItemGraphicEl(P);if(!s.hasValue(E)||!LA[l.type](B)){o.remove(z);return}var W=!1;if(p&&(W=PA[l.type](g,B),W&&o.remove(z)),z?zg(z):z=BA[l.type](r,s,E,B,c,h,f.model,!!z,v),d&&(z.forceLabelAnimation=!0),D){var R=z.getTextContent();if(R){var U=ns(R);U.prevValue!=null&&(U.prevValue=U.value)}}else RA(z,s,E,F,B,r,c,l.type==="polar");_?z.attr({shape:B}):d?MA(d,h,z,B,E,c,!0,D):Ft(z,{shape:B},r,E,null),s.setItemGraphicEl(E,z),z.ignore=W,o.add(z)}).remove(function(E){var P=u.getItemGraphicEl(E);P&&Ec(P,r,E)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new It);S.removeAll();for(var O=0;O<w.length;++O)S.add(w[O]);o.add(S),this._backgroundEls=w,this._data=s},e.prototype._renderLarge=function(r,n,i){this._clear(),kA(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),kA(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&CW(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(u){var l=n.getItemGraphicEl(u),f=l&&l.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var u=i(s);u=u??NaN,a.push({dataIndex:s,mappedValue:u,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:ye(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,u=0,l=a.getOrdinalMeta().categories.length;u<l;++u){var f=r.rawIndexOf(o,a.getRawOrdinalNumber(u)),c=f<0?Number.MIN_VALUE:n(r.indexOfRawIndex(f));if(c>s)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Ec(a,r,He(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Zr),PA={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=mm(e.x,t.x),s=ym(e.x+e.width,i),u=mm(e.y,t.y),l=ym(e.y+e.height,a),f=s<o,c=l<u;return e.x=f&&o>i?s:o,e.y=c&&u>a?l:u,e.width=f?0:s-o,e.height=c?0:l-u,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),f||c},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=ym(e.r,t.r),a=mm(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},BA={cartesian2d:function(t,e,r,n,i,a,o,s,u){var l=new St({shape:oe({},n),z2:1});if(l.__dataIndex=r,l.name="item",a){var f=l.shape,c=i?"height":"width";f[c]=0}return l},polar:function(t,e,r,n,i,a,o,s,u){var l=!i&&u?OA:In,f=new l({shape:n,z2:1});f.name="item";var c=IA(i);if(f.calculateTextPosition=NW(c,{isRoundCap:l===OA}),a){var h=f.shape,d=i?"r":"endAngle",p={};h[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Ft:qt)(f,{shape:p},a)}return f}};function VW(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&xt("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&xt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function MA(t,e,r,n,i,a,o,s){var u,l;a?(l={x:n.x,width:n.width},u={y:n.y,height:n.height}):(l={y:n.y,height:n.height},u={x:n.x,width:n.width}),s||(o?Ft:qt)(r,{shape:u},e,i,null);var f=e?t.baseAxis.model:null;(o?Ft:qt)(r,{shape:l},f,i)}function FA(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var HW=["x","y","width","height"],WW=["cx","cy","r","startAngle","endAngle"],LA={cartesian2d:function(t){return!FA(t,HW)},polar:function(t){return!FA(t,WW)}},Th={cartesian2d:function(t,e,r){var n=t.getItemLayout(e),i=r?GW(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function $W(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function IA(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function RA(t,e,r,n,i,a,o,s){var u=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=t.shape,c=sl(n.getModel("itemStyle"),f,!0);oe(f,c),t.setShape(f)}}else{var l=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",l)}t.useStyle(u);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=Fu(n);Mu(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:fm(a.getData(),r),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var v=n.get(["label","position"]);t.textConfig.inside=v==="middle"?!0:null,kW(t,v==="outside"?d:v,IA(o),n.get(["label","rotate"]))}D7(g,p,a.getRawValue(r),function(y){return vA(e,y)});var m=n.getModel(["emphasis"]);Eu(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),pc(t,n),$W(i)&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function GW(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var UW=function(){function t(){}return t}(),NA=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new UW},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],u=[],l=this.barWidth,f=0;f<i.length;f+=3)u[a]=l,u[o]=i[f+2],s[a]=i[f+a],s[o]=i[f+o],r.rect(s[0],s[1],u[0],u[1])},e}(Ve);function kA(t,e,r,n){var i=t.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),u=t.getModel("backgroundStyle"),l=i.getLayout("largeBackgroundPoints");if(l){var f=new NA({shape:{points:l},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(u.getItemStyle()),e.add(f),r&&r.push(f)}var c=new NA({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,e.add(c),c.useStyle(i.getVisual("style")),He(c).seriesIndex=t.seriesIndex,t.get("silent")||(c.on("mousedown",zA),c.on("mousemove",zA)),r&&r.push(c)}var zA=x0(function(t){var e=this,r=qW(e,t.offsetX,t.offsetY);He(e).dataIndex=r>=0?r:null},30,!1);function qW(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],u=[],l=t.barWidth,f=0,c=a.length/3;f<c;f++){var h=f*3;if(u[n]=l,u[i]=a[h+2],s[n]=a[h+n],s[i]=a[h+i],u[i]<0&&(s[i]+=u[i],u[i]=-u[i]),e>=s[0]&&e<=s[0]+u[0]&&r>=s[1]&&r<=s[1]+u[1])return o[f]}return-1}function jA(t,e,r){if(vm(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function YW(t,e,r){var n=t.type==="polar"?In:St;return new n({shape:jA(e,r,t),silent:!0,z2:0})}function XW(t){t.registerChartView(jW),t.registerSeriesModel(IW),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Dt(gH,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mH("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,TA("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var VA=Math.PI*2,Oh=Math.PI/180;function HA(t,e){return Ua(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function WA(t,e){var r=HA(t,e),n=t.get("center"),i=t.get("radius");he(i)||(i=[0,i]);var a=ut(r.width,e.getWidth()),o=ut(r.height,e.getHeight()),s=Math.min(a,o),u=ut(i[0],s/2),l=ut(i[1],s/2),f,c,h=t.coordinateSystem;if(h){var d=h.dataToPoint(n);f=d[0]||0,c=d[1]||0}else he(n)||(n=[n,n]),f=ut(n[0],a)+r.x,c=ut(n[1],o)+r.y;return{cx:f,cy:c,r0:u,r:l}}function KW(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=HA(n,r),s=WA(n,r),u=s.cx,l=s.cy,f=s.r,c=s.r0,h=-n.get("startAngle")*Oh,d=n.get("endAngle"),p=n.get("padAngle")*Oh;d=d==="auto"?h-VA:-d*Oh;var g=n.get("minAngle")*Oh,v=g+p,m=0;i.each(a,function(j){!isNaN(j)&&m++});var y=i.getSum(a),b=Math.PI/(y||m)*2,w=n.get("clockwise"),C=n.get("roseType"),_=n.get("stillShowZeroSum"),D=i.getDataExtent(a);D[0]=0;var x=w?1:-1,S=[h,d],O=x*p/2;ID(S,!w),h=S[0],d=S[1];var E=$A(n);E.startAngle=h,E.endAngle=d,E.clockwise=w;var P=Math.abs(d-h),F=P,B=0,M=h;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(j,z){var W;if(isNaN(j)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:u,cy:l,r0:c,r:C?NaN:f});return}C!=="area"?W=y===0&&_?b:j*b:W=P/m,W<v?(W=v,F-=v):B+=j;var R=M+x*W,U=0,Z=0;p>W?(U=M+x*W/2,Z=U):(U=M+O,Z=R-O),i.setItemLayout(z,{angle:W,startAngle:U,endAngle:Z,clockwise:w,cx:u,cy:l,r0:c,r:C?eg(j,D,[c,f]):f}),M=R}),F<VA&&m)if(F<=.001){var I=P/m;i.each(a,function(j,z){if(!isNaN(j)){var W=i.getItemLayout(z);W.angle=I;var R=0,U=0;I<p?(R=h+x*(z+1/2)*I,U=R):(R=h+x*z*I+O,U=h+x*(z+1)*I-O),W.startAngle=R,W.endAngle=U}})}else b=F/B,M=h,i.each(a,function(j,z){if(!isNaN(j)){var W=i.getItemLayout(z),R=W.angle===v?v:j*b,U=0,Z=0;R<p?(U=M+x*R/2,Z=U):(U=M+O,Z=M+x*R-O),W.startAngle=U,W.endAngle=Z,M+=x*R}})})}var $A=lt();function ZW(t){return{seriesType:t,reset:function(e,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var JW=Math.PI/180;function GA(t,e,r,n,i,a,o,s,u,l){if(t.length<2)return;function f(g){for(var v=g.rB,m=v*v,y=0;y<g.list.length;y++){var b=g.list[y],w=Math.abs(b.label.y-r),C=n+b.len,_=C*C,D=Math.sqrt((1-Math.abs(w*w/m))*_),x=e+(D+b.len2)*i,S=x-b.label.x,O=b.targetTextWidth-S*i;UA(b,O,!0),b.label.x=x}}function c(g){for(var v={list:[],maxY:0},m={list:[],maxY:0},y=0;y<g.length;y++)if(g[y].labelAlignTo==="none"){var b=g[y],w=b.label.y>r?m:v,C=Math.abs(b.label.y-r);if(C>=w.maxY){var _=b.label.x-e-b.len2*i,D=n+b.len,x=Math.abs(_)<D?Math.sqrt(C*C/(1-_*_/D/D)):D;w.rB=x,w.maxY=C}w.list.push(b)}f(v),f(m)}for(var h=t.length,d=0;d<h;d++)if(t[d].position==="outer"&&t[d].labelAlignTo==="labelLine"){var p=t[d].label.x-l;t[d].linePoints[1][0]+=p,t[d].label.x=l}cA(t,u,u+o)&&c(t)}function QW(t,e,r,n,i,a,o,s){for(var u=[],l=[],f=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;h<t.length;h++){var d=t[h].label;bm(t[h])||(d.x<e?(f=Math.min(f,d.x),u.push(t[h])):(c=Math.max(c,d.x),l.push(t[h])))}for(var h=0;h<t.length;h++){var p=t[h];if(!bm(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,g=p.linePoints,v=void 0;p.labelAlignTo==="edge"?d.x<e?v=g[2][0]-p.labelDistance-o-p.edgeDistance:v=o+i-p.edgeDistance-g[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<e?v=f-o-p.bleedMargin:v=o+i-c-p.bleedMargin:d.x<e?v=d.x-o-p.bleedMargin:v=o+i-d.x-p.bleedMargin,p.targetTextWidth=v,UA(p,v)}}GA(l,e,r,n,1,i,a,o,s,c),GA(u,e,r,n,-1,i,a,o,s,f);for(var h=0;h<t.length;h++){var p=t[h];if(!bm(p)&&p.linePoints){var d=p.label,g=p.linePoints,m=p.labelAlignTo==="edge",y=d.style.padding,b=y?y[1]+y[3]:0,w=d.style.backgroundColor?0:b,C=p.rect.width+w,_=g[1][0]-g[2][0];m?d.x<e?g[2][0]=o+p.edgeDistance+C+p.labelDistance:g[2][0]=o+i-p.edgeDistance-C-p.labelDistance:(d.x<e?g[2][0]=d.x+p.labelDistance:g[2][0]=d.x-p.labelDistance,g[1][0]=g[2][0]+_),g[1][1]=g[2][1]=d.y}}}function UA(t,e,r){if(r===void 0&&(r=!1),t.labelStyleWidth==null){var n=t.label,i=n.style,a=t.rect,o=i.backgroundColor,s=i.padding,u=s?s[1]+s[3]:0,l=i.overflow,f=a.width+(o?0:u);if(e<f||r){var c=a.height;if(l&&l.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-u);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var d=e-u,p=e<f?d:r?d>t.unconstrainedWidth?null:d:null;n.setStyle("width",p)}var g=n.getBoundingRect();a.width=g.width;var v=(n.style.margin||0)+2.1;a.height=g.height+v,a.y-=(a.height-c)/2}}}function bm(t){return t.position==="center"}function e$(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*JW,s=e.getLayout("viewRect"),u=e.getLayout("r"),l=s.width,f=s.x,c=s.y,h=s.height;function d(_){_.ignore=!0}function p(_){if(!_.ignore)return!0;for(var D in _.states)if(_.states[D].ignore===!1)return!0;return!1}e.each(function(_){var D=e.getItemGraphicEl(_),x=D.shape,S=D.getTextContent(),O=D.getTextGuideLine(),E=e.getItemModel(_),P=E.getModel("label"),F=P.get("position")||E.get(["emphasis","label","position"]),B=P.get("distanceToLabelLine"),M=P.get("alignTo"),I=ut(P.get("edgeDistance"),l),j=P.get("bleedMargin"),z=E.getModel("labelLine"),W=z.get("length");W=ut(W,l);var R=z.get("length2");if(R=ut(R,l),Math.abs(x.endAngle-x.startAngle)<o){N(S.states,d),S.ignore=!0,O&&(N(O.states,d),O.ignore=!0);return}if(p(S)){var U=(x.startAngle+x.endAngle)/2,Z=Math.cos(U),ee=Math.sin(U),ne,q,L,X;n=x.cx,i=x.cy;var V=F==="inside"||F==="inner";if(F==="center")ne=x.cx,q=x.cy,X="center";else{var G=(V?(x.r+x.r0)/2*Z:x.r*Z)+n,J=(V?(x.r+x.r0)/2*ee:x.r*ee)+i;if(ne=G+Z*3,q=J+ee*3,!V){var K=G+Z*(W+u-x.r),Y=J+ee*(W+u-x.r),fe=K+(Z<0?-1:1)*R,ue=Y;M==="edge"?ne=Z<0?f+I:f+l-I:ne=fe+(Z<0?-B:B),q=ue,L=[[G,J],[K,Y],[fe,ue]]}X=V?"center":M==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var Ce=Math.PI,me=0,Fe=P.get("rotate");if(nt(Fe))me=Fe*(Ce/180);else if(F==="center")me=0;else if(Fe==="radial"||Fe===!0){var ae=Z<0?-U+Ce:-U;me=ae}else if(Fe==="tangential"&&F!=="outside"&&F!=="outer"){var ve=Math.atan2(Z,ee);ve<0&&(ve=Ce*2+ve);var Le=ee>0;Le&&(ve=Ce+ve),me=ve-Ce}if(a=!!me,S.x=ne,S.y=q,S.rotation=me,S.setStyle({verticalAlign:"middle"}),V){S.setStyle({align:X});var at=S.states.select;at&&(at.x+=S.x,at.y+=S.y)}else{var ft=S.getBoundingRect().clone();ft.applyTransform(S.getComputedTransform());var Ie=(S.style.margin||0)+2.1;ft.y-=Ie/2,ft.height+=Ie,r.push({label:S,labelLine:O,position:F,len:W,len2:R,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new _e(Z,ee),linePoints:L,textAlign:X,labelDistance:B,labelAlignTo:M,edgeDistance:I,bleedMargin:j,rect:ft,unconstrainedWidth:ft.width,labelStyleWidth:S.style.width})}D.setTextConfig({inside:V})}}),!a&&t.get("avoidLabelOverlap")&&QW(r,n,i,u,l,h,f,c);for(var g=0;g<r.length;g++){var v=r[g],m=v.label,y=v.labelLine,b=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:v.textAlign}),b&&(N(m.states,d),m.ignore=!0);var w=m.states.select;w&&(w.x+=m.x,w.y+=m.y)}if(y){var C=v.linePoints;b||!C?(N(y.states,d),y.ignore=!0):(oA(C,v.minTurnAngle),nW(C,v.surfaceNormal,v.maxSurfaceAngle),y.setShape({points:C}),m.__hostTarget.textGuideLineConfig={anchor:new _e(C[0][0],C[0][1])})}}}var t$=function(t){ce(e,t);function e(r,n,i){var a=t.call(this)||this;a.z2=2;var o=new Ot;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,u=r.getItemModel(n),l=u.getModel("emphasis"),f=r.getItemLayout(n),c=oe(sl(u.getModel("itemStyle"),f,!0),f);if(isNaN(c.startAngle)){o.setShape(c);return}if(a){o.setShape(c);var h=s.getShallow("animationType");s.ecModel.ssr?(qt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):h==="scale"?(o.shape.r=f.r0,qt(o,{shape:{r:f.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),qt(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,n)):(o.shape.endAngle=f.startAngle,Ft(o,{shape:{endAngle:f.endAngle}},s,n))}else zg(o),Ft(o,{shape:c},s,n);o.useStyle(r.getItemVisual(n,"style")),pc(o,u);var d=(f.startAngle+f.endAngle)/2,p=s.get("selectedOffset"),g=Math.cos(d)*p,v=Math.sin(d)*p,m=u.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=oe({r:f.r+(l.get("scale")&&l.get("scaleSize")||0)},sl(l.getModel("itemStyle"),f)),oe(o.ensureState("select"),{x:g,y:v,shape:sl(u.getModel(["select","itemStyle"]),f)}),oe(o.ensureState("blur"),{shape:sl(u.getModel(["blur","itemStyle"]),f)});var y=o.getTextGuideLine(),b=o.getTextContent();y&&oe(y.ensureState("select"),{x:g,y:v}),oe(b.ensureState("select"),{x:g,y:v}),Eu(this,l.get("focus"),l.get("blurScope"),l.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),u=n.getItemVisual(i,"style"),l=u&&u.fill,f=u&&u.opacity;Mu(a,Fu(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:l,defaultOpacity:f,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var c=a.getTextContent();a.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var h=r.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Pu,this.setTextGuideLine(d)),sA(this,uA(o),{stroke:l,opacity:Da(s.get(["lineStyle","opacity"]),f,1)})}},e}(In),r$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,u=this.group,l;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c<o.count();++c)f=o.getItemLayout(c);f&&(l=f.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var h=$A(r),d=new In({shape:oe(WA(r,i),h)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,u.add(d)}o.diff(s).add(function(p){var g=new t$(o,p,l);o.setItemGraphicEl(p,g),u.add(g)}).update(function(p,g){var v=s.getItemGraphicEl(g);v.updateData(o,p,l),v.off("click"),u.add(v),o.setItemGraphicEl(p,v)}).remove(function(p){var g=s.getItemGraphicEl(p);Ec(g,r,p)}).execute(),e$(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,u=Math.sqrt(o*o+s*s);return u<=a.r&&u>=a.r0}},e.type="pie",e}(Zr);function n$(t,e,r){e=he(e)&&{coordDimensions:e}||oe({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=F2(n,e).dimensions,a=new M2(i,t);return a.initData(n,r),a}var i$=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),a$=lt(),o$=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new i$(dt(this.getData,this),dt(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return n$(this,{coordDimensions:["value"],encodeDefaulter:Dt(K7,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=a$(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(u){o.push(u)}),a=i.seats=Yk(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){rg(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(fn);function s$(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(nt(o)&&!isNaN(o)&&o<0)})}}}function u$(t){t.registerChartView(r$),t.registerSeriesModel(o$),Ij("pie",t.registerAction),t.registerLayout(Dt(KW,"pie")),t.registerProcessor(ZW("pie")),t.registerProcessor(s$("pie"))}var l$=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Ze),Cm=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",sn).models[0]},e.type="cartesian2dAxis",e}(Ze);xn(Cm,jH);var qA={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},f$=Qe({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qA),wm=Qe({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},qA),c$=Qe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},wm),h$=je({logBase:10},wm);const d$={category:f$,value:wm,time:c$,log:h$};var v$={value:1,category:1,time:1,log:1};function YA(t,e,r,n){N(v$,function(i,a){var o=Qe(Qe({},d$[a],!0),n,!0),s=function(u){ce(l,u);function l(){var f=u!==null&&u.apply(this,arguments)||this;return f.type=e+"Axis."+a,f}return l.prototype.mergeDefaultAndTheme=function(f,c){var h=ku(this),d=h?$c(f):{},p=c.getTheme();Qe(f,p.get(a+"Axis")),Qe(f,this.getDefaultOption()),f.type=XA(f),h&&qa(f,d,h)},l.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=J0.createByAxisModel(this))},l.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.type=e+"Axis."+a,l.defaultOption=o,l}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",XA)}function XA(t){return t.type||(t.data?"category":"value")}var p$=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return ye(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),bt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),_m=["x","y"];function KA(t){return t.type==="interval"||t.type==="time"}var g$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=_m,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!KA(r)||!KA(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),u=i[1]-i[0],l=a[1]-a[0];if(!(!u||!l)){var f=(s[0]-o[0])/u,c=(s[1]-o[1])/l,h=o[0]-i[0]*f,d=o[1]-a[0]*c,p=this._transform=[f,0,0,c,h,d];this._invTransform=Tf([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ue(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return jr(i,r,this._transform);var s=this.getAxis("x"),u=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=u.toGlobalCoord(u.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),u=i.parse(r[0]),l=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return jr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,u=Math.max(i[0],i[1])-o+r;return new Ue(a,o,s,u)},e}(p$),m$=function(t){ce(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(KH);function Dm(t,e,r){r=r||{};var n=t.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,u=o?"onZero":s,l=i.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p=l==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=[l==="y"?p[h[u]]:c[0],l==="x"?p[h[u]]:c[3]],a.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),_a(r.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=u==="top"?-m:m,a.z2=1,a}function ZA(t){return t.get("coordinateSystem")==="cartesian2d"}function JA(t){var e={xAxisModel:null,yAxisModel:null};return N(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,sn).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+Da(t.get(i+"Index"),t.get(i+"Id"),0)+'" not found');e[n]=a}),e}var xm=Math.log;function y$(t,e,r){var n=ys.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),u=G2(t,e),l=u.extent,f=u.fixMin,c=u.fixMax;if(t.type==="log"){var h=xm(t.base);l=[xm(l[0])/h,xm(l[1])/h]}t.setExtent(l[0],l[1]),t.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var d=n.getExtent.call(t);f&&(l[0]=d[0]),c&&(l[1]=d[1]);var p=n.getInterval.call(t),g=l[0],v=l[1];if(f&&c)p=(v-g)/o;else if(f)for(v=l[0]+p*o;v<l[1]&&isFinite(v)&&isFinite(l[1]);)p=em(p),v=l[0]+p*o;else if(c)for(g=l[1]-p*o;g>l[0]&&isFinite(g)&&isFinite(l[0]);)p=em(p),g=l[1]-p*o;else{var m=t.getTicks().length-1;m>o&&(p=em(p));var y=p*o;v=Math.ceil(l[1]/p)*p,g=Tt(v-y),g<0&&l[0]>=0?(g=0,v=Tt(y)):v>0&&l[1]<=0&&(v=0,g=-Tt(y))}var b=(i[0].value-a[0].value)/s,w=(i[o].value-a[o].value)/s;if(n.setExtent.call(t,g+p*b,v+p*w),n.setInterval.call(t,p),(b||w)&&n.setNiceExtent.call(t,g+p,v-p),process.env.NODE_ENV!=="production"){var C=n.getTicks.call(t);C[1]&&(!uH(p)||tg(C[1].value)>tg(p))&&xt("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+" and alignTicks: true")}}var b$=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_m,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,u=Ke(o),l=u.length;if(l){for(var f=[],c=l-1;c>=0;c--){var h=+u[c],d=o[h],p=d.model,g=d.scale;Q0(g)&&p.get("alignTicks")&&p.get("interval")==null?f.push(d):(U2(g,p),Q0(g)&&(s=d))}f.length&&(s||(s=f.pop(),U2(s.scale,s.model)),N(f,function(v){y$(v.scale,v.model,s.scale)}))}}i(n.x),i(n.y);var a={};N(n.x,function(o){QA(n,"y",o,a)}),N(n.y,function(o){QA(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=Ua(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;u(),a&&(N(s,function(l){if(!l.model.get(["axisLabel","inside"])){var f=NH(l);if(f){var c=l.isHorizontal()?"height":"width",h=l.model.get(["axisLabel","margin"]);o[c]-=f[c]+h,l.position==="top"?o.y+=f.height+h:l.position==="left"&&(o.x+=f.width+h)}}}),u()),N(this._coordsList,function(l){l.calcAffineTransform()});function u(){N(s,function(l){var f=l.isHorizontal(),c=f?[0,o.width]:[0,o.height],h=l.inverse?1:0;l.setExtent(c[h],c[1-h]),C$(l,f?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}we(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===r)return a[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,n=e.xAxisModel||r&&r.getReferringComponents("xAxis",sn).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",sn).models[0],a=e.gridModel,o=this._coordsList,s,u;if(r)s=r.coordinateSystem,Ge(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)u=this.getAxis("x",n.componentIndex);else if(i)u=this.getAxis("y",i.componentIndex);else if(a){var l=a.coordinateSystem;l===this&&(s=this._coordsList[0])}return{cartesian:s,axis:u}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},u={x:0,y:0};if(r.eachComponent("xAxis",l("x"),this),r.eachComponent("yAxis",l("y"),this),!u.x||!u.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,N(s.x,function(f,c){N(s.y,function(h,d){var p="x"+c+"y"+d,g=new g$(p);g.master=i,g.model=e,i._coordsMap[p]=g,i._coordsList.push(g),g.addAxis(f),g.addAxis(h)})});function l(f){return function(c,h){if(Sm(c,e)){var d=c.get("position");f==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new m$(f,IH(c),[0,0],c.get("type"),d),g=p.type==="category";p.onBand=g&&c.get("boundaryGap"),p.inverse=c.get("inverse"),c.axis=p,p.model=c,p.grid=a,p.index=h,a._axesList.push(p),s[f][h]=p,u[f]++}}}},t.prototype._updateScale=function(e,r){N(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(ZA(i)){var a=JA(i),o=a.xAxisModel,s=a.yAxisModel;if(!Sm(o,r)||!Sm(s,r))return;var u=this.getCartesian(o.componentIndex,s.componentIndex),l=i.getData(),f=u.getAxis("x"),c=u.getAxis("y");n(l,f),n(l,c)}},this);function n(i,a){N(zH(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],n=[];return N(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);Ge(r,a)<0&&r.push(a),Ge(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},t.create=function(e,r){var n=[];return e.eachComponent("grid",function(i,a){var o=new t(i,e,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){if(ZA(i)){var a=JA(i),o=a.xAxisModel,s=a.yAxisModel,u=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+Da(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var l=u.coordinateSystem;i.coordinateSystem=l.getCartesian(o.componentIndex,s.componentIndex)}}),n},t.dimensions=_m,t}();function Sm(t,e){return t.getCoordSysModel()===e}function QA(t,e,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=t[e],a,o=r.model,s=o.get(["axisLine","onZero"]),u=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(u!=null)eT(i[u])&&(a=i[u]);else for(var l in i)if(i.hasOwnProperty(l)&&eT(i[l])&&!n[f(i[l])]){a=i[l];break}a&&(n[f(a)]=!0);function f(c){return c.dim+"_"+c.index}}function eT(t){return t&&t.type!=="category"&&t.type!=="time"&&RH(t)}function C$(t,e){var r=t.getExtent(),n=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return n-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}var qi=Math.PI,Yi=function(){function t(e,r){this.group=new It,this.opt=r,this.axisModel=e,je(r,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new It({x:r.position[0],y:r.position[1],rotation:r.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(e){return!!tT[e]},t.prototype.add=function(e){tT[e](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(e,r,n){var i=oD(r-e),a,o;return Zf(i)?(o=n>0?"top":"bottom",a="center"):Zf(i-qi)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<qi?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),tT={axisLine:function(t,e,r,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&t.handleAutoShown&&(i=t.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],u=[a[1],0],l=s[0]>u[0];o&&(jr(s,s,o),jr(u,u,o));var f=oe({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Ni({shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:f,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Bu(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);be(h)&&(h=[h,h]),(be(d)||nt(d))&&(d=[d,d]);var p=LE(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],v=d[1];N([{rotate:t.rotation+Math.PI/2,offset:p[0],r:0},{rotate:t.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var b=hs(h[y],-g/2,-v/2,g,v,f.stroke,!0),w=m.r+m.offset,C=l?u:s;b.attr({rotation:m.rotate,x:C[0]+w*Math.cos(t.rotation),y:C[1]-w*Math.sin(t.rotation),silent:!0,z2:11}),r.add(b)}})}}},axisTickLabel:function(t,e,r,n){var i=D$(r,n,e,t),a=S$(r,n,e,t);if(_$(e,a,i),x$(r,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=lA(ye(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));hA(o)}},axisName:function(t,e,r,n){var i=_a(t.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),u=e.get("nameGap")||0,l=e.axis.getExtent(),f=l[0]>l[1]?-1:1,c=[a==="start"?l[0]-f*u:a==="end"?l[1]+f*u:(l[0]+l[1])/2,nT(a)?t.labelOffset+o*u:0],h,d=e.get("nameRotate");d!=null&&(d=d*qi/180);var p;nT(a)?h=Yi.innerTextLayout(t.rotation,d??t.rotation,o):(h=w$(t.rotation,a,d||0,l),p=t.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var g=s.getFont(),v=e.get("nameTruncate",!0)||{},m=v.ellipsis,y=_a(t.nameTruncateMaxWidth,v.maxWidth,p),b=new Ot({x:c[0],y:c[1],rotation:h.rotation,silent:Yi.isLabelSilent(e),style:ki(s,{text:i,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Oc({el:b,componentModel:e,itemName:i}),b.__fullText=i,b.anid="name",e.get("triggerEvent")){var w=Yi.makeAxisEventDataBase(e);w.targetType="axisName",w.name=i,He(b).eventData=w}n.add(b),b.updateTransform(),r.add(b),b.decomposeTransform()}}};function w$(t,e,r,n){var i=oD(r-t),a,o,s=n[0]>n[1],u=e==="start"&&!s||e!=="start"&&s;return Zf(i-qi/2)?(o=u?"bottom":"top",a="center"):Zf(i-qi*1.5)?(o=u?"top":"bottom",a="center"):(o="middle",i<qi*1.5&&i>qi/2?a=u?"left":"right":a=u?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function _$(t,e,r){if(!q2(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),i=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var a=e[0],o=e[1],s=e[e.length-1],u=e[e.length-2],l=r[0],f=r[1],c=r[r.length-1],h=r[r.length-2];n===!1?(Qr(a),Qr(l)):rT(a,o)&&(n?(Qr(o),Qr(f)):(Qr(a),Qr(l))),i===!1?(Qr(s),Qr(c)):rT(u,s)&&(i?(Qr(u),Qr(h)):(Qr(s),Qr(c)))}}function Qr(t){t&&(t.ignore=!0)}function rT(t,e){var r=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!r||!n)){var i=wp([]);return Dp(i,i,-t.rotation),r.applyTransform(jo([],i,t.getLocalTransform())),n.applyTransform(jo([],i,e.getLocalTransform())),r.intersect(n)}}function nT(t){return t==="middle"||t==="center"}function iT(t,e,r,n,i){for(var a=[],o=[],s=[],u=0;u<t.length;u++){var l=t[u].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=r,e&&(jr(o,o,e),jr(s,s,e));var f=new Ni({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Bu(f.shape,f.style.lineWidth),f.anid=i+"_"+t[u].tickValue,a.push(f)}return a}function D$(t,e,r,n){var i=r.axis,a=r.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),u=n.tickDirection*a.get("length"),l=i.getTicksCoords(),f=iT(l,e.transform,u,je(s.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<f.length;c++)t.add(f[c]);return f}}function x$(t,e,r,n){var i=r.axis,a=r.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),u=n*a.get("length"),l=je(s.getLineStyle(),je(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var c=iT(o[f],e.transform,u,l,"minorticks_"+f),h=0;h<c.length;h++)t.add(c[h])}}function S$(t,e,r,n){var i=r.axis,a=_a(n.axisLabelShow,r.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=r.getModel("axisLabel"),s=o.get("margin"),u=i.getViewLabels(),l=(_a(n.labelRotate,o.get("rotate"))||0)*qi/180,f=Yi.innerTextLayout(n.rotation,l,n.labelDirection),c=r.getCategories&&r.getCategories(!0),h=[],d=Yi.isLabelSilent(r),p=r.get("triggerEvent");return N(u,function(g,v){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(g.tickValue):g.tickValue,y=g.formattedLabel,b=g.rawLabel,w=o;if(c&&c[m]){var C=c[m];we(C)&&C.textStyle&&(w=new Ct(C.textStyle,o,r.ecModel))}var _=w.getTextColor()||r.get(["axisLine","lineStyle","color"]),D=i.dataToCoord(m),x=w.getShallow("align",!0)||f.textAlign,S=Be(w.getShallow("alignMinLabel",!0),x),O=Be(w.getShallow("alignMaxLabel",!0),x),E=w.getShallow("verticalAlign",!0)||w.getShallow("baseline",!0)||f.textVerticalAlign,P=Be(w.getShallow("verticalAlignMinLabel",!0),E),F=Be(w.getShallow("verticalAlignMaxLabel",!0),E),B=new Ot({x:D,y:n.labelOffset+n.labelDirection*s,rotation:f.rotation,silent:d,z2:10+(g.level||0),style:ki(w,{text:y,align:v===0?S:v===u.length-1?O:x,verticalAlign:v===0?P:v===u.length-1?F:E,fill:De(_)?_(i.type==="category"?b:i.type==="value"?m+"":m,v):_})});if(B.anid="label_"+m,p){var M=Yi.makeAxisEventDataBase(r);M.targetType="axisLabel",M.value=b,M.tickIndex=v,i.type==="category"&&(M.dataIndex=m),He(B).eventData=M}e.add(B),B.updateTransform(),h.push(B),t.add(B),B.decomposeTransform()}),h}}function E$(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return A$(r,t,e),r.seriesInvolved&&O$(r,t),r}function A$(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];N(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var u=ul(s.model),l=t.coordSysAxesInfo[u]={};t.coordSysMap[u]=s;var f=s.model,c=f.getModel("tooltip",n);if(N(s.getAxes(),Dt(g,!1,null)),s.getTooltipAxes&&n&&c.get("show")){var h=c.get("trigger")==="axis",d=c.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(c.get(["axisPointer","axis"]));(h||d)&&N(p.baseAxes,Dt(g,d?"cross":!0,h)),d&&N(p.otherAxes,Dt(g,"cross",!1))}function g(v,m,y){var b=y.model.getModel("axisPointer",i),w=b.get("show");if(!(!w||w==="auto"&&!v&&!Tm(b))){m==null&&(m=b.get("triggerTooltip")),b=v?T$(y,c,i,e,v,m):b;var C=b.get("snap"),_=b.get("triggerEmphasis"),D=ul(y.model),x=m||C||y.type==="category",S=t.axesInfo[D]={key:D,axis:y,coordSys:s,axisPointerModel:b,triggerTooltip:m,triggerEmphasis:_,involveSeries:x,snap:C,useHandle:Tm(b),seriesModels:[],linkGroup:null};l[D]=S,t.seriesInvolved=t.seriesInvolved||x;var O=P$(a,y);if(O!=null){var E=o[O]||(o[O]={axesInfo:{}});E.axesInfo[D]=S,E.mapper=a[O].mapper,S.linkGroup=E}}}})}function T$(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],u={};N(s,function(h){u[h]=$e(o.get(h))}),u.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(u.type="line");var l=u.label||(u.label={});if(l.show==null&&(l.show=!1),i==="cross"){var f=o.get(["label","show"]);if(l.show=f??!0,!a){var c=u.lineStyle=o.get("crossStyle");c&&je(l,c.textStyle)}}return t.model.getModel("axisPointer",new Ct(u,r,n))}function O$(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||N(t.coordSysAxesInfo[ul(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function P$(t,e){for(var r=e.model,n=e.dim,i=0;i<t.length;i++){var a=t[i]||{};if(Em(a[n+"AxisId"],r.id)||Em(a[n+"AxisIndex"],r.componentIndex)||Em(a[n+"AxisName"],r.name))return i}}function Em(t,e){return t==="all"||he(t)&&Ge(t,e)>=0||t===e}function B$(t){var e=Am(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=Tm(r);a==null&&(i.status=s?"show":"hide");var u=n.getExtent().slice();u[0]>u[1]&&u.reverse(),(o==null||o>u[1])&&(o=u[1]),o<u[0]&&(o=u[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function Am(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[ul(t)]}function M$(t){var e=Am(t);return e&&e.axisPointerModel}function Tm(t){return!!t.get(["handle","show"])}function ul(t){return t.type+"||"+t.id}var Om={},aT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this.axisPointerClass&&B$(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},e.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},e.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(r,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=M$(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&Om[r])throw new Error("axisPointer "+r+" exists");Om[r]=n},e.getAxisPointerClass=function(r){return r&&Om[r]},e.type="axis",e}(Br),Pm=lt();function F$(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),u=n.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,clamp:!0});if(l.length){var f=s.length,c=Pm(t).splitAreaColors,h=Ae(),d=0;if(c)for(var p=0;p<l.length;p++){var g=c.get(l[p].tickValue);if(g!=null){d=(g+(f-1)*p)%f;break}}var v=i.toGlobalCoord(l[0].coord),m=o.getAreaStyle();s=he(s)?s:[s];for(var p=1;p<l.length;p++){var y=i.toGlobalCoord(l[p].coord),b=void 0,w=void 0,C=void 0,_=void 0;i.isHorizontal()?(b=v,w=u.y,C=y-b,_=u.height,v=b+C):(b=u.x,w=v,C=u.width,_=y-w,v=w+_);var D=l[p-1].tickValue;D!=null&&h.set(D,d),e.add(new St({anid:D!=null?"area_"+D:null,shape:{x:b,y:w,width:C,height:_},style:je({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%f}Pm(t).splitAreaColors=h}}}function L$(t){Pm(t).splitAreaColors=null}var I$=["axisLine","axisTickLabel","axisName"],R$=["splitArea","splitLine","minorSplitLine"],oT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new It,this.group.add(this._axisGroup),!!r.get("show")){var s=r.getCoordSysModel(),u=Dm(s,r),l=new Yi(r,oe({handleAutoShown:function(c){for(var h=s.coordinateSystem.getCartesians(),d=0;d<h.length;d++)if(Q0(h[d].getOtherAxis(r.axis).scale))return!0;return!1}},u));N(I$,l.add,l),this._axisGroup.add(l.getGroup()),N(R$,function(c){r.get([c,"show"])&&N$[c](this,this._axisGroup,r,s)},this);var f=a&&a.type==="changeAxisOrder"&&a.isInitSort;f||Nx(o,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)}},e.prototype.remove=function(){L$(this)},e.type="cartesianAxis",e}(aT),N$={splitLine:function(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=he(s)?s:[s];for(var u=n.coordinateSystem.getRect(),l=i.isHorizontal(),f=0,c=i.getTicksCoords({tickModel:a}),h=[],d=[],p=o.getLineStyle(),g=0;g<c.length;g++){var v=i.toGlobalCoord(c[g].coord);l?(h[0]=v,h[1]=u.y,d[0]=v,d[1]=u.y+u.height):(h[0]=u.x,h[1]=v,d[0]=u.x+u.width,d[1]=v);var m=f++%s.length,y=c[g].tickValue,b=new Ni({anid:y!=null?"line_"+c[g].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:je({stroke:s[m]},p),silent:!0});Bu(b.shape,p.lineWidth),e.add(b)}}},minorSplitLine:function(t,e,r,n){var i=r.axis,a=r.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),u=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var f=[],c=[],h=o.getLineStyle(),d=0;d<l.length;d++)for(var p=0;p<l[d].length;p++){var g=i.toGlobalCoord(l[d][p].coord);u?(f[0]=g,f[1]=s.y,c[0]=g,c[1]=s.y+s.height):(f[0]=s.x,f[1]=g,c[0]=s.x+s.width,c[1]=g);var v=new Ni({anid:"minor_line_"+l[d][p].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:h,silent:!0});Bu(v.shape,h.lineWidth),e.add(v)}},splitArea:function(t,e,r,n){F$(t,e,r,n)}},sT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e}(oT),k$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=sT.type,r}return e.type="yAxis",e}(oT),z$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new St({shape:r.coordinateSystem.getRect(),style:je({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Br),uT={offset:0};function j$(t){t.registerComponentView(z$),t.registerComponentModel(l$),t.registerCoordinateSystem("cartesian2d",b$),YA(t,"x",Cm,uT),YA(t,"y",Cm,uT),t.registerComponentView(sT),t.registerComponentView(k$),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function V$(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||xe(t,"text")))}function H$(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},xe(n,"text")&&(o.text=n.text),xe(n,"rich")&&(o.rich=n.rich),xe(n,"textFill")&&(o.fill=n.textFill),xe(n,"textStroke")&&(o.stroke=n.textStroke),xe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),xe(n,"fontSize")&&(o.fontSize=n.fontSize),xe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),xe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=xe(n,"textPosition");i.position=s?n.textPosition:"inside",xe(n,"textPosition")&&(i.position=n.textPosition),xe(n,"textOffset")&&(i.offset=n.textOffset),xe(n,"textRotation")&&(i.rotation=n.textRotation),xe(n,"textDistance")&&(i.distance=n.textDistance)}return lT(o,t),N(o.rich,function(u){lT(u,u)}),{textConfig:i,textContent:a}}function lT(t,e){e&&(e.font=e.textFont||e.font,xe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),xe(e,"textAlign")&&(t.align=e.textAlign),xe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),xe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),xe(e,"textWidth")&&(t.width=e.textWidth),xe(e,"textHeight")&&(t.height=e.textHeight),xe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),xe(e,"textPadding")&&(t.padding=e.textPadding),xe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),xe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),xe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),xe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),xe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),xe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),xe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}var fT={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},cT=Ke(fT),Ph=ri(Tn,function(t,e){return t[e]=1,t},{}),hT=Tn.join(", "),Bh=["","style","shape","extra"],Cs=lt();function Bm(t,e,r,n,i){var a=t+"Animation",o=ts(t,n,i)||{},s=Cs(e).userDuring;return o.duration>0&&(o.during=s?dt(Y$,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),oe(o,r[a]),o}function Mm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),u=Cs(t),l=e.style;u.userDuring=e.during;var f={},c={};if(K$(t,e,c),pT("shape",e,c),pT("extra",e,c),!a&&s&&(X$(t,e,f),vT("shape",t,e,f),vT("extra",t,e,f),Z$(t,e,l,f)),c.style=l,$$(t,c,o),U$(t,e),s)if(a){var h={};N(Bh,function(p){var g=p?e[p]:e;g&&g.enterFrom&&(p&&(h[p]=h[p]||{}),oe(p?h[p]:h,g.enterFrom))});var d=Bm("enter",t,e,r,i);d.duration>0&&t.animateFrom(h,d)}else G$(t,e,i||0,r,f);dT(t,e),l?t.dirty():t.markRedraw()}function dT(t,e){for(var r=Cs(t).leaveToProps,n=0;n<Bh.length;n++){var i=Bh[n],a=i?e[i]:e;a&&a.leaveTo&&(r||(r=Cs(t).leaveToProps={}),i&&(r[i]=r[i]||{}),oe(i?r[i]:r,a.leaveTo))}}function W$(t,e,r,n){if(t){var i=t.parent,a=Cs(t).leaveToProps;if(a){var o=Bm("update",t,e,r,0);o.done=function(){i.remove(t)},t.animateTo(a,o)}else i.remove(t)}}function no(t){return t==="all"}function $$(t,e,r){var n=e.style;if(!t.isGroup&&n){if(r){t.useStyle({});for(var i=t.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(t.style)}}t.setStyle(n)}e&&(e.style=null,e&&t.attr(e),e.style=n)}function G$(t,e,r,n,i){if(i){var a=Bm("update",t,e,n,r);a.duration>0&&t.animateFrom(i,a)}}function U$(t,e){xe(e,"silent")&&(t.silent=e.silent),xe(e,"ignore")&&(t.ignore=e.ignore),t instanceof Fi&&xe(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ve&&xe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Vn={},q$={setTransform:function(t,e){return process.env.NODE_ENV!=="production"&&Ee(xe(Ph,t),"Only "+hT+" available in `setTransform`."),Vn.el[t]=e,this},getTransform:function(t){return process.env.NODE_ENV!=="production"&&Ee(xe(Ph,t),"Only "+hT+" available in `getTransform`."),Vn.el[t]},setShape:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.shape;if(e)return e[t]},setStyle:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el,n=r.style;return n&&(process.env.NODE_ENV!=="production"&&Fo(e)&&xt("style."+t+" must not be assigned with NaN."),n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.style;if(e)return e[t]},setExtra:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el.extra||(Vn.el.extra={});return r[t]=e,this},getExtra:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.extra;if(e)return e[t]}};function ws(t){if(process.env.NODE_ENV!=="production"&&(t==="transition"||t==="enterFrom"||t==="leaveTo"))throw new Error('key must not be "'+t+'"')}function Y$(){var t=this,e=t.el;if(e){var r=Cs(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Vn.el=e,n(q$)}}function vT(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,u=i.transition;if(u)if(!o&&(o=n[t]={}),no(u))oe(o,a);else for(var l=gt(u),f=0;f<l.length;f++){var c=l[f],h=a[c];o[c]=h}else if(no(s)||Ge(s,t)>=0){!o&&(o=n[t]={});for(var d=Ke(a),f=0;f<d.length;f++){var c=d[f],h=a[c];J$(i[c],h)&&(o[c]=h)}}}}}function pT(t,e,r){var n=e[t];if(n)for(var i=r[t]={},a=Ke(n),o=0;o<a.length;o++){var s=a[o];i[s]=hu(n[s])}}function X$(t,e,r){for(var n=e.transition,i=no(n)?Tn:gt(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=t[o];process.env.NODE_ENV!=="production"&&gT(o,"el.transition"),r[o]=s}}}function K$(t,e,r){for(var n=0;n<cT.length;n++){var i=cT[n],a=fT[i],o=e[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<Tn.length;n++){var s=Tn[n];e[s]!=null&&(r[s]=e[s])}}function Z$(t,e,r,n){if(r){var i=t.style,a;if(i){var o=r.transition,s=e.transition;if(o&&!no(o)){var u=gt(o);!a&&(a=n.style={});for(var l=0;l<u.length;l++){var f=u[l],c=i[f];a[f]=c}}else if(t.getAnimationStyleProps&&(no(s)||no(o)||Ge(s,"style")>=0)){var h=t.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var p=Ke(r),l=0;l<p.length;l++){var f=p[l];if(d[f]){var c=i[f];a[f]=c}}}}}}}function J$(t,e){return Wt(t)?t!==e:t!=null&&isFinite(t)}var gT;process.env.NODE_ENV!=="production"&&(gT=function(t,e){xe(Ph,t)||xt("Prop `"+t+"` is not a permitted in `"+e+"`. Only `"+Ke(Ph).join("`, `")+"` are permitted.")});var mT=lt(),Q$=["percent","easing","shape","style","extra"];function eG(t){t.stopAnimation("keyframe"),t.attr(mT(t))}function Fm(t,e,r){if(!(!r.isAnimationEnabled()||!e)){if(he(e)){N(e,function(s){Fm(t,s,r)});return}var n=e.keyframes,i=e.duration;if(r&&i==null){var a=ts("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=mT(t);N(Bh,function(s){if(!(s&&!t[s])){var u,l=!1;n.sort(function(f,c){return f.percent-c.percent}),N(n,function(f){var c=t.animators,h=s?f[s]:f;if(process.env.NODE_ENV!=="production"&&f.percent>=1&&(l=!0),!!h){var d=Ke(h);if(s||(d=bt(d,function(v){return Ge(Q$,v)<0})),!!d.length){u||(u=t.animate(s,e.loop,!0),u.scope="keyframe");for(var p=0;p<c.length;p++)c[p]!==u&&c[p].targetName===u.targetName&&c[p].stopTracks(d);s&&(o[s]=o[s]||{});var g=s?o[s]:o;N(d,function(v){g[v]=((s?t[s]:t)||{})[v]}),u.whenWithKeys(i*f.percent,h,d,f.easing)}}}),u&&(process.env.NODE_ENV!=="production"&&(l||xt("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),u.delay(e.delay||0).duration(i).start(e.easing))}})}}}var io=lt(),yT=$e,Lm=dt,tG=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,u=this._handle;if(!o||o==="hide"){s&&s.hide(),u&&u.hide();return}s&&s.show(),u&&u.show();var l={};this.makeElOption(l,a,e,r,n);var f=l.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new It,this.createPointerEl(s,l,e,r),this.createLabelEl(s,l,e,r),n.getZr().add(s);else{var h=Dt(bT,r,c);this.updatePointerEl(s,l,h),this.updateLabelEl(s,l,h,r)}_T(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var u=Am(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/u>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=io(e).pointerEl=new b7[a.type](yT(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=io(e).labelEl=new Ot(yT(r.label));e.add(a),wT(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=io(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=io(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),wT(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Wg(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){v_(l.event)},onmousedown:Lm(this._onHandleDragMove,this,0,0),drift:Lm(this._onHandleDragMove,this),ondragend:Lm(this._onHandleDragEnd,this)}),n.add(i)),_T(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=a.get("size");he(u)||(u=[u,u]),i.scaleX=u[0]/2,i.scaleY=u[1]/2,CE(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){bT(this._axisPointerModel,!r&&this._moveAnimation,this._handle,Im(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Im(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Im(i)),io(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),S0(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function bT(t,e,r,n){CT(io(r).lastProp,n)||(io(r).lastProp=n,e?Ft(r,n,t):(r.stopAnimation(),r.attr(n)))}function CT(t,e){if(we(t)&&we(e)){var r=!0;return N(e,function(n,i){r=r&&CT(t[i],n)}),!!r}else return t===e}function wT(t,e){t[e.get(["label","show"])?"show":"hide"]()}function Im(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function _T(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function rG(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function nG(t,e,r,n,i){var a=r.get("value"),o=DT(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),u=Vc(s.get("padding")||0),l=s.getFont(),f=Yp(o,l),c=i.position,h=f.width+u[1]+u[3],d=f.height+u[0]+u[2],p=i.align;p==="right"&&(c[0]-=h),p==="center"&&(c[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(c[1]-=d),g==="middle"&&(c[1]-=d/2),iG(c,h,d,n);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:ki(s,{text:o,font:l,fill:s.getTextColor(),padding:u,backgroundColor:v}),z2:10}}function iG(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function DT(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:am(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};N(n,function(u){var l=r.getSeriesByIndex(u.seriesIndex),f=u.dataIndexInside,c=l&&l.getDataParams(f);c&&s.seriesData.push(c)}),be(o)?a=o.replace("{value}",a):De(o)&&(a=o(s))}return a}function xT(t,e,r){var n=zo();return Dp(n,n,r.rotation),_p(n,n,r.position),Hg([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function aG(t,e,r,n,i,a){var o=Yi.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),nG(e,n,i,a,{position:xT(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function oG(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function sG(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}var uG=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,u=s.grid,l=a.get("type"),f=ST(u,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(l&&l!=="none"){var h=rG(a),d=lG[l](s,c,f);d.style=h,r.graphicKey=d.type,r.pointer=d}var p=Dm(u.model,i);aG(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Dm(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=xT(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,u=o.getGlobalExtent(!0),l=ST(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[r.x,r.y];c[f]+=n[f],c[f]=Math.min(u[1],c[f]),c[f]=Math.max(u[0],c[f]);var h=(l[1]+l[0])/2,d=[h,h];d[f]=c[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[f]}},e}(tG);function ST(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var lG={line:function(t,e,r){var n=oG([e,r[0]],[e,r[1]],ET(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:sG([e-n/2,r[0]],[n,i],ET(t))}}};function ET(t){return t.dim==="x"?0:1}var fG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Ze),pi=lt(),cG=N;function AT(t,e,r){if(!Pe.node){var n=e.getZr();pi(n).records||(pi(n).records={}),hG(n,e);var i=pi(n).records[t]||(pi(n).records[t]={});i.handler=r}}function hG(t,e){if(pi(t).initialized)return;pi(t).initialized=!0,r("click",Dt(TT,"click")),r("mousemove",Dt(TT,"mousemove")),r("globalout",vG);function r(n,i){t.on(n,function(a){var o=pG(e);cG(pi(t).records,function(s){s&&i(s,a,o.dispatchAction)}),dG(o.pendings,e)})}}function dG(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function vG(t,e,r){t.handler("leave",null,r)}function TT(t,e,r,n){e.handler(t,r,n)}function pG(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function Rm(t,e){if(!Pe.node){var r=e.getZr(),n=(pi(r).records||{})[t];n&&(pi(r).records[t]=null)}}var gG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";AT("axisPointer",i,function(s,u,l){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&l({type:"updateAxisPointer",currTrigger:s,x:u&&u.offsetX,y:u&&u.offsetY})})},e.prototype.remove=function(r,n){Rm("axisPointer",n)},e.prototype.dispose=function(r,n){Rm("axisPointer",n)},e.type="axisPointer",e}(Br);function OT(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Pa(a,t);if(o==null||o<0||he(o))return{point:[]};var s=a.getItemGraphicEl(o),u=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(u&&u.dataToPoint)if(t.isStacked){var l=u.getBaseAxis(),f=u.getOtherAxis(l),c=f.dim,h=l.dim,d=c==="x"||c==="radius"?1:0,p=a.mapDimension(h),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=u.dataToPoint(g)||[]}else r=u.dataToPoint(a.getValues(ye(u.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),r=[v.x+v.width/2,v.y+v.height/2]}return{point:r,el:s}}var PT=lt();function mG(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||dt(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Mh(i)&&(i=OT({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var u=Mh(i),l=a.axesInfo,f=s.axesInfo,c=n==="leave"||Mh(i),h={},d={},p={list:[],map:{}},g={showPointer:Dt(bG,d),showTooltip:Dt(CG,p)};N(s.coordSysMap,function(m,y){var b=u||m.containPoint(i);N(s.coordSysAxesInfo[y],function(w,C){var _=w.axis,D=xG(l,w);if(!c&&b&&(!l||D)){var x=D&&D.value;x==null&&!u&&(x=_.pointToData(i)),x!=null&&BT(w,x,g,!1,h)}})});var v={};return N(f,function(m,y){var b=m.linkGroup;b&&!d[y]&&N(b.axesInfo,function(w,C){var _=d[C];if(w!==m&&_){var D=_.value;b.mapper&&(D=m.axis.scale.parse(b.mapper(D,MT(w),MT(m)))),v[m.key]=D}})}),N(v,function(m,y){BT(f[y],m,g,!0,h)}),wG(d,f,h),_G(p,i,t,o),DG(f,o,r),h}}function BT(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=yG(e,t),s=o.payloadBatch,u=o.snapToValue;s[0]&&i.seriesIndex==null&&oe(i,s[0]),!n&&t.snap&&a.containData(u)&&u!=null&&(e=u),r.showPointer(t,e,s),r.showTooltip(t,o,u)}}function yG(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return N(e.seriesModels,function(u,l){var f=u.getData().mapDimensionsAll(n),c,h;if(u.getAxisTooltipData){var d=u.getAxisTooltipData(f,t,r);h=d.dataIndices,c=d.nestestValue}else{if(h=u.getData().indicesOfNearest(f[0],t,r.type==="category"?.5:null),!h.length)return;c=u.getData().get(f[0],h[0])}if(!(c==null||!isFinite(c))){var p=t-c,g=Math.abs(p);g<=o&&((g<o||p>=0&&s<0)&&(o=g,s=p,i=c,a.length=0),N(h,function(v){a.push({seriesIndex:u.seriesIndex,dataIndexInside:v,dataIndex:u.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:i}}function bG(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function CG(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var u=e.coordSys.model,l=ul(u),f=t.map[l];f||(f=t.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function wG(t,e,r){var n=r.axesInfo=[];N(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function _G(t,e,r,n){if(Mh(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function DG(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=PT(n)[i]||{},o=PT(n)[i]={};N(t,function(l,f){var c=l.axisPointerModel.option;c.status==="show"&&l.triggerEmphasis&&N(c.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],u=[];N(a,function(l,f){!o[f]&&u.push(l)}),N(o,function(l,f){!a[f]&&s.push(l)}),u.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function xG(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function MT(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function Mh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function FT(t){aT.registerAxisPointerClass("CartesianAxisPointer",uG),t.registerComponentModel(fG),t.registerComponentView(gG),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!he(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=E$(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},mG)}function SG(t){Wi(j$),Wi(FT)}function EG(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function LT(t,e){var r;return N(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function AG(t,e,r){var n=oe({},r),i=t[e],a=r.$action||"merge";if(a==="merge")if(i){if(process.env.NODE_ENV!=="production"){var o=r.type;Ee(!o||i.type===o,'Please set $action: "replace" to change `type`')}Qe(i,n,!0),qa(i,n,{ignoreSize:!0}),vS(r,i),Fh(r,i),Fh(r,i,"shape"),Fh(r,i,"style"),Fh(r,i,"extra"),r.clipPath=i.clipPath}else t[e]=n;else a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var IT=["transition","enterFrom","leaveTo"],TG=IT.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Fh(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?IT:TG,i=0;i<n.length;i++){var a=n[i];t[a]==null&&e[a]!=null&&(t[a]=e[a])}}function OG(t,e){if(t&&(t.hv=e.hv=[LT(e,["left","right"]),LT(e,["top","bottom"])],t.type==="group")){var r=t,n=e;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var PG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.mergeOption=function(r,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,r,n),this.option.elements=i},e.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var u=gD(o,s,"normalMerge"),l=this._elOptionsToUpdate=[];N(u,function(f,c){var h=f.newOption;process.env.NODE_ENV!=="production"&&Ee(we(h)||f.existing,"Empty graphic option definition"),h&&(l.push(h),EG(f,h),AG(o,c,h),OG(o[c],h))},this),i.elements=bt(o,function(f){return f&&delete f.$action,f!=null})},e.prototype._flatten=function(r,n,i){N(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},e.type="graphic",e.defaultOption={elements:[]},e}(Ze),RT={path:null,compoundPath:null,group:It,image:fi,text:Ot},en=lt(),BG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this._elMap=Ae()},e.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},e.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");N(n,function(u){var l=pr(u.id,null),f=l!=null?i.get(l):null,c=pr(u.parentId,null),h=c!=null?i.get(c):a,d=u.type,p=u.style;d==="text"&&p&&u.hv&&u.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var g=u.textContent,v=u.textConfig;if(p&&V$(p,d,!!v,!!g)){var m=H$(p,d);!v&&m.textConfig&&(v=u.textConfig=m.textConfig),!g&&m.textContent&&(g=m.textContent)}var y=MG(u);process.env.NODE_ENV!=="production"&&f&&Ee(h===f.parent,"Changing parent is not supported.");var b=u.$action||"merge",w=b==="merge",C=b==="replace";if(w){var _=!f,D=f;_?D=NT(l,h,u.type,i):(D&&(en(D).isNew=!1),eG(D)),D&&(Mm(D,y,r,{isInit:_}),kT(D,u,o,s))}else if(C){Lh(f,u,i,r);var x=NT(l,h,u.type,i);x&&(Mm(x,y,r,{isInit:!0}),kT(x,u,o,s))}else b==="remove"&&(dT(f,u),Lh(f,u,i,r));var S=i.get(l);if(S&&g)if(w){var O=S.getTextContent();O?O.attr(g):S.setTextContent(new Ot(g))}else C&&S.setTextContent(new Ot(g));if(S){var E=u.clipPath;if(E){var P=E.type,F=void 0,_=!1;if(w){var B=S.getClipPath();_=!B||en(B).type!==P,F=_?Nm(P):B}else C&&(_=!0,F=Nm(P));S.setClipPath(F),Mm(F,E,r,{isInit:_}),Fm(F,E.keyframeAnimation,r)}var M=en(S);S.setTextConfig(v),M.option=u,FG(S,r,u),Oc({el:S,componentModel:r,itemName:S.name,itemTooltipOption:u.tooltip}),Fm(S,u.keyframeAnimation,r)}})}},e.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),u=n.getHeight(),l=["x","y"],f=0;f<i.length;f++){var c=i[f],h=pr(c.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var p=d.parent,g=p===a,v=en(d),m=en(p);v.width=ut(v.option.width,g?s:m.width)||0,v.height=ut(v.option.height,g?u:m.height)||0}}for(var f=i.length-1;f>=0;f--){var c=i[f],h=pr(c.id,null),d=h!=null?o.get(h):null;if(d){var p=d.parent,m=en(p),y=p===a?{width:s,height:u}:{width:m.width,height:m.height},b={},w=$7(d,c,y,null,{hv:c.hv,boundingMode:c.bounding},b);if(!en(d).isNew&&w){for(var C=c.transition,_={},D=0;D<l.length;D++){var x=l[D],S=b[x];C&&(no(C)||Ge(C,x)>=0)?_[x]=S:d[x]=S}Ft(d,_,r,0)}else d.attr(b)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Lh(i,en(i).option,n,r._lastGraphicModel)}),this._elMap=Ae()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Br);function Nm(t){process.env.NODE_ENV!=="production"&&Ee(t,"graphic type MUST be set");var e=xe(RT,t)?RT[t]:Mx(t);process.env.NODE_ENV!=="production"&&Ee(e,"graphic type "+t+" can not be found");var r=new e({});return en(r).type=t,r}function NT(t,e,r,n){var i=Nm(r);return e.add(i),n.set(t,i),en(i).id=t,en(i).isNew=!0,i}function Lh(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Lh(a,e,r,n)}),W$(t,e,n),r.removeKey(en(t).id))}function kT(t,e,r,n){t.isGroup||N([["cursor",Fi.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];xe(e,a)?t[a]=Be(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),N(Ke(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=De(a)?a:null}}),xe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function MG(t){return t=oe({},t),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(dS),function(e){delete t[e]}),t}function FG(t,e,r){var n=He(t).eventData;!t.silent&&!t.ignore&&!n&&(n=He(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function LG(t){t.registerComponentModel(PG),t.registerComponentView(BG),t.registerPreprocessor(function(e){var r=e.graphic;he(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}function IG(t,e){var r=Vc(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new St({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),t}var RG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Ze);function zT(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function jT(t){if(Pe.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r<n;r++)if(t[r]in e)return t[r]}}var VT=jT(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),NG=jT(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function HT(t,e){if(!t)return e;e=lS(e,!0);var r=t.indexOf(e);return t=r===-1?e:"-"+t.slice(0,r)+"-"+e,t.toLowerCase()}function kG(t,e){var r=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return r?r[e]:null}var zG=HT(NG,"transition"),km=HT(VT,"transform"),jG="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Pe.transform3dSupported?"will-change:transform;":"");function VG(t){return t=t==="left"?"right":t==="right"?"left":t==="top"?"bottom":"top",t}function HG(t,e,r){if(!be(r)||r==="inside")return"";var n=t.get("backgroundColor"),i=t.get("borderWidth");e=Ga(e);var a=VG(r),o=Math.max(Math.round(i)*1.5,6),s="",u=km+":",l;Ge(["left","right"],a)>-1?(s+="top:50%",u+="translateY(-50%) rotate("+(l=a==="left"?-225:-45)+"deg)"):(s+="left:50%",u+="translateX(-50%) rotate("+(l=a==="top"?225:45)+"deg)");var f=l*Math.PI/180,c=o+i,h=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-c)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+u+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+g.join("")+'"></div>'}function WG(t,e){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+r,i="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+r,i+=Pe.transformSupported?","+km+n:",left"+n+",top"+n),zG+":"+i}function WT(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Pe.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Pe.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+km+":"+o+";":[["top",0],["left",0],[VT,o]]}function $G(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px");var i=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,o=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),N(["decoration","align"],function(u){var l=t.get(u);l&&e.push("text-"+u+":"+l)}),e.join(";")}function GG(t,e,r){var n=[],i=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.get("shadowBlur"),s=t.get("shadowColor"),u=t.get("shadowOffsetX"),l=t.get("shadowOffsetY"),f=t.getModel("textStyle"),c=hE(t,"html"),h=u+"px "+l+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i&&n.push(WG(i,r)),a&&n.push("background-color:"+a),N(["width","color","radius"],function(d){var p="border-"+d,g=lS(p),v=t.get(g);v!=null&&n.push(p+":"+v+(d==="color"?"":"px"))}),n.push($G(f)),c!=null&&n.push("padding:"+Vc(c).join("px ")+"px"),n.join(";")+";"}function $T(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&WN(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var UG=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Pe.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(be(a)?document.querySelector(a):Mo(a)?a:De(a)&&a(e.getDom()));$T(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(u){if(u=u||window.event,!s._enterable){var l=i.handler,f=i.painter.getViewportRoot();Vr(f,u,!0),l.dispatch("mousemove",u)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=kG(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=jG+GG(e,!this._firstShow,this._longHide)+WT(a[0],a[1],!0)+("border-color:"+Ga(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(be(a)&&n.get("trigger")==="item"&&!zT(n)&&(s=HG(n,i,a)),be(e))o.innerHTML=e+s;else if(e){o.innerHTML="",he(e)||(e=[e]);for(var u=0;u<e.length;u++)Mo(e[u])&&e[u].parentNode!==o&&o.appendChild(e[u]);if(s&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=s,o.appendChild(l)}}},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},t.prototype.moveTo=function(e,r){var n=this._styleCoord;if($T(n,this._zr,this._container,e,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=WT(n[0],n[1]);N(a,function(o){i[o[0]]=o[1]})}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){var e=this,r=this.el.style;r.visibility="hidden",r.opacity="0",Pe.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},t}(),qG=function(){function t(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),UT(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return t.prototype.update=function(e){var r=e.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(e,r,n,i,a){var o=this;we(e)&&qe(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Ot({style:{rich:r.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:hE(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),N(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(l){o.el.style[l]=n.get(l)}),N(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(l){o.el.style[l]=s.get(l)||0}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el,r=this.el.getBoundingRect(),n=GT(e.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},t.prototype.moveTo=function(e,r){var n=this.el;if(n){var i=this._styleCoord;UT(i,this._zr,e,r),e=i[0],r=i[1];var a=n.style,o=Xi(a.borderWidth||0),s=GT(a);n.x=e+o+s.left,n.y=r+o+s.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function Xi(t){return Math.max(0,t)}function GT(t){var e=Xi(t.shadowBlur||0),r=Xi(t.shadowOffsetX||0),n=Xi(t.shadowOffsetY||0);return{left:Xi(e-r),right:Xi(e+r),top:Xi(e-n),bottom:Xi(e+n)}}function UT(t,e,r,n){t[0]=r,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var YG=new St({shape:{x:-1,y:-1,width:2,height:2}}),XG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){if(!(Pe.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=d6(i.get("renderMode"));this._tooltipContent=a==="richText"?new qG(n):new UG(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(r,n,i){if(!(Pe.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?CE(this,"_updatePosition",50,"fixRate"):S0(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");AT("itemTooltip",this._api,dt(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Pe.node||!i.getDom())){var o=qT(a,i);this._ticket="";var s=a.dataByCoordSys,u=QG(a,n,i);if(u){var l=u.el.getBoundingRect().clone();l.applyTransform(u.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:u.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=YG;f.x=a.x,f.y=a.y,f.update(),He(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var c=OT(a,n),h=c.point[0],d=c.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(qT(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,u=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||u==null)){var l=n.getSeriesByIndex(o);if(l){var f=l.getData(),c=ll([f.getItemModel(s),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=He(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var u,l;Xu(i,function(f){if(He(f).dataIndex!=null)return u=f,!0;if(He(f).tooltipConfig!=null)return l=f,!0},!0),u?this._showSeriesItemTooltip(r,u,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=dt(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ll([n.tooltipOption],a),u=this._renderMode,l=[],f=Uu("section",{blocks:[],noHeader:!0}),c=[],h=new w0;N(r,function(y){N(y.dataByAxis,function(b){var w=i.getComponent(b.axisDim+"Axis",b.axisIndex),C=b.value;if(!(!w||C==null)){var _=DT(C,w.axis,i,b.seriesDataIndices,b.valueLabelOpt),D=Uu("section",{header:_,noHeader:!Sn(_),sortBlocks:!0,blocks:[]});f.blocks.push(D),N(b.seriesDataIndices,function(x){var S=i.getSeriesByIndex(x.seriesIndex),O=x.dataIndexInside,E=S.getDataParams(O);if(!(E.dataIndex<0)){E.axisDim=b.axisDim,E.axisIndex=b.axisIndex,E.axisType=b.axisType,E.axisId=b.axisId,E.axisValue=am(w.axis,{value:C}),E.axisValueLabel=_,E.marker=h.makeTooltipMarker("item",Ga(E.color),u);var P=qS(S.formatTooltip(O,!0,null)),F=P.frag;if(F){var B=ll([S],a).get("valueFormatter");D.blocks.push(B?oe({valueFormatter:B},F):F)}P.text&&c.push(P.text),l.push(E)}})}})}),f.blocks.reverse(),c.reverse();var d=n.position,p=s.get("order"),g=fE(f,h,u,p,i.get("useUTC"),s.get("textStyle"));g&&c.unshift(g);var v=u==="richText"?`
|
|
166
|
+
`];function Uu(t,e){return e.type=t,e}function b0(t){return t.type==="section"}function uE(t){return b0(t)?Zz:Jz}function lE(t){if(b0(t)){var e=0,r=t.blocks.length,n=r>1||r>0&&!t.noHeader;return N(t.blocks,function(i){var a=lE(i);a>=e&&(e=a+ +(n&&(!a||b0(i)&&!i.noHeader)))}),e}return 0}function Zz(t,e,r,n){var i=e.noHeader,a=Qz(lE(e)),o=[],s=e.blocks||[];Ee(!s||he(s)),s=s||[];var u=t.orderMode;if(e.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(xe(l,u)){var f=new ZS(l[u],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else u==="seriesDesc"&&s.reverse()}N(s,function(p,g){var v=e.valueFormatter,m=uE(p)(v?oe(oe({},t),{valueFormatter:v}):t,p,g>0?a.html:0,n);m!=null&&o.push(m)});var c=t.renderMode==="richText"?o.join(a.richText):C0(o.join(""),i?r:a.html);if(i)return c;var h=e0(e.header,"ordinal",t.useUTC),d=sE(n,t.renderMode).nameStyle;return t.renderMode==="richText"?cE(t,h,d)+a.richText+c:C0('<div style="'+d+";"+oE+';">'+Tr(h)+"</div>"+c,r)}function Jz(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,u=e.name,l=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(w){return w=he(w)?w:[w],ye(w,function(C,_){return e0(C,he(d)?d[_]:d,l)})};if(!(a&&o)){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),h=a?"":e0(u,"ordinal",l),d=e.valueType,p=o?[]:f(e.value,e.dataIndex),g=!s||!a,v=!s&&a,m=sE(n,i),y=m.nameStyle,b=m.valueStyle;return i==="richText"?(s?"":c)+(a?"":cE(t,h,y))+(o?"":rj(t,p,g,v,b)):C0((s?"":c)+(a?"":ej(h,!s,y))+(o?"":tj(p,g,v,b)),r)}}function fE(t,e,r,n,i,a){if(t){var o=uE(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function Qz(t){return{html:Xz[t],richText:Kz[t]}}function C0(t,e){var r='<div style="clear:both"></div>',n="margin: "+e+"px 0 0";return'<div style="'+n+";"+oE+';">'+t+r+"</div>"}function ej(t,e,r){var n=e?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Tr(t)+"</span>"}function tj(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=he(t)?t:[t],'<span style="'+a+";"+n+'">'+ye(t,function(o){return Tr(o)}).join(" ")+"</span>"}function cE(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function rj(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(he(e)?e.join(" "):e,a)}function nj(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Ga(n)}function hE(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var w0=function(){function t(){this.richTextStyles={},this._nextStyleNameId=lD()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=W7({color:r,type:e,renderMode:n,markerId:i});return be(a)?a:(process.env.NODE_ENV!=="production"&&Ee(i),this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};he(r)?N(r,function(a){return oe(n,a)}):oe(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function ij(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),u=he(s),l=nj(e,r),f,c,h,d;if(o>1||u&&!o){var p=aj(s,e,r,a,l);f=p.inlineValues,c=p.inlineValueTypes,h=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=f=ls(i,r,a[0]),c=g.type}else d=f=u?s[0]:s;var v=ng(e),m=v&&e.name||"",y=i.getName(r),b=n?m:y;return Uu("section",{header:m,noHeader:n||!v,sortParam:d,blocks:[Uu("nameValue",{markerType:"item",markerColor:l,name:b,noName:!Sn(b),value:f,valueType:c,dataIndex:r})].concat(h||[])})}function aj(t,e,r,n,i){var a=e.getData(),o=ri(t,function(c,h,d){var p=a.getDimensionInfo(d);return c=c||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],u=[],l=[];n.length?N(n,function(c){f(ls(a,r,c),c)}):N(t,f);function f(c,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?l.push(Uu("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:c,valueType:d.type})):(s.push(c),u.push(d.type)))}return{inlineValues:s,inlineValueTypes:u,blocks:l}}var ji=lt();function Kc(t,e){return t.getName(e)||t.getId(e)}var Zc="__universalTransitionEnabled",fn=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Wu({count:sj,reset:uj}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=ji(this).sourceManager=new nE(this);a.prepareSource();var o=this.getInitialData(r,i);vE(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&Ee(o,"getInitialData returned invalid data."),ji(this).dataBeforeProcessed=o,dE(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=ku(this),a=i?$c(r):{},o=this.subType;Ze.hasClass(o)&&(o+="Series"),Qe(r,n.getTheme().get(this.subType)),Qe(r,this.getDefaultOption()),rg(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&qa(r,a,i)},e.prototype.mergeOption=function(r,n){r=Qe(this.option,r,!0),this.fillDataTextStyle(r.data);var i=ku(this);i&&qa(this.option,r,i);var a=ji(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);vE(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ji(this).dataBeforeProcessed=o,dE(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!rr(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&rg(r[i],"label",n)},e.prototype.getInitialData=function(r,n){},e.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},e.prototype.getData=function(r){var n=_0(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return ji(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var n=_0(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}ji(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ae(r)},e.prototype.getSourceManager=function(){return ji(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return ji(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.formatTooltip=function(r,n,i){return ij({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Pe.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=a0.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var u=r[s],l=Kc(o,u);i[l]=!1,this._selectedDataIndicesMap[l]=-1}}},e.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Ke(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Kc(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Zc])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,u=n.length;if(!(!s||!u)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){we(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,f=0;f<u;f++){var c=n[f],h=Kc(r,c);l[h]=!0,this._selectedDataIndicesMap[h]=r.getRawIndex(c)}}else if(s==="single"||s===!0){var d=n[u-1],h=Kc(r,d);o.selectedMap=(i={},i[h]=!0,i),this._selectedDataIndicesMap=(a={},a[h]=r.getRawIndex(d),a)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Ze.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Ze);xn(fn,Bz),xn(fn,a0),DD(fn,Ze);function dE(t){var e=t.name;ng(t)||(t.name=oj(t)||e)}function oj(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return N(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function sj(t){return t.model.getRawData().count()}function uj(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),lj}function lj(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function vE(t,e){N(FN(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Dt(fj,e))})}function fj(t,e){var r=_0(t);return r&&r.setOutputEnd((e||this).count()),e}function _0(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var Br=function(){function t(){this.group=new It,this.uid=Mc("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();og(Br),ec(Br);function D0(){var t=lt();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var pE=lt(),cj=D0(),Zr=function(){function t(){this.group=new It,this.uid=Mc("viewChart"),this.renderTask=Wu({plan:hj,reset:dj}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+i.dataType);return}mE(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Gt("Unknown dataType "+i.dataType);return}mE(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){Pc(this.group,e)},t.markUpdateMethod=function(e,r){pE(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function gE(t,e,r){t&&Jo(t)&&(e==="emphasis"?dc:vc)(t,r)}function mE(t,e,r){var n=Pa(t,e),i=e&&e.highlightKey!=null?P9(e.highlightKey):null;n!=null?N(gt(n),function(a){gE(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){gE(a,r,i)})}og(Zr,["dispose"]),ec(Zr);function hj(t){return cj(t.model)}function dj(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&pE(i).updateMethod,u=a?"incrementalPrepareRender":s&&o[s]?s:"render";return u!=="render"&&o[u](e,r,n,i),vj[u]}var vj={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Jc="\0__throttleOriginMethod",yE="\0__throttleRate",bE="\0__throttleType";function x0(t,e,r){var n,i=0,a=0,o=null,s,u,l,f;e=e||0;function c(){a=new Date().getTime(),o=null,t.apply(u,l||[])}var h=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];n=new Date().getTime(),u=this,l=d;var g=f||e,v=f||r;f=null,s=n-(v?i:a)-g,clearTimeout(o),v?o=setTimeout(c,g):s>=0?c():o=setTimeout(c,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){f=d},h}function CE(t,e,r,n){var i=t[e];if(i){var a=i[Jc]||i,o=i[bE],s=i[yE];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=x0(a,r,n==="debounce"),i[Jc]=a,i[bE]=n,i[yE]=r}return i}}function S0(t,e){var r=t[e];r&&r[Jc]&&(r.clear&&r.clear(),t[e]=r[Jc])}var wE=lt(),_E={itemStyle:wu(qx,!0),lineStyle:wu(Ux,!0)},pj={lineStyle:"stroke",itemStyle:"fill"};function DE(t,e){var r=t.visualStyleMapper||_E[e];return r||(console.warn("Unknown style type '"+e+"'."),_E.itemStyle)}function xE(t,e){var r=t.visualDrawType||pj[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var gj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=DE(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var u=xE(t,n),l=o[u],f=De(l)?l:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[u]||f||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[u]||(o[u]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||De(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||De(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",u),!e.isSeriesFiltered(t)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=t.getDataParams(p),v=oe({},o);v[u]=f(g),d.setItemVisual(p,"style",v)}}}},qu=new Ct,mj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=DE(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var u=o.getRawDataItem(s);if(u&&u[n]){qu.option=u[n];var l=i(qu),f=o.ensureUniqueItemVisual(s,"style");oe(f,l),qu.option.decal&&(o.setItemVisual(s,"decal",qu.option.decal),qu.option.decal.dirty=!0),a in l&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},yj={performRawSeries:!0,overallReset:function(t){var e=Ae();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),wE(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=wE(r).scope,s=r.visualStyleAccessPath||"itemStyle",u=xE(r,s);a.each(function(l){var f=a.getRawIndex(l);i[f]=l}),n.each(function(l){var f=i[l],c=a.getItemVisual(f,"colorFromPalette");if(c){var h=a.ensureUniqueItemVisual(f,"style"),d=n.getName(l)||l+"",p=n.count();h[u]=r.getColorFromPalette(d,o,p)}})}})}},Qc=Math.PI;function bj(t,e){e=e||{},je(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new It,n=new St({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Ot({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new St({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new wc({shape:{startAngle:-Qc/2,endAngle:-Qc/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qc*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,u=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-u*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:u),f=t.getHeight()/2;e.showSpinner&&o.setShape({cx:l,cy:f}),a.setShape({x:l-u,y:f-u,width:u*2,height:u*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var SE=function(){function t(e,r,n,i){this._stageTaskMap=Ae(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,u=s!=null?Math.ceil(s/o):null;return{step:o,modBy:u,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),u=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:u,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Ae();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;N(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),Ee(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;N(e,function(u,l){if(!(i.visualType&&i.visualType!==u.visualType)){var f=o._stageTaskMap.get(u.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var d,p=h.agentStubMap;p.each(function(v){s(i,v)&&(v.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(v){v.perform(g)}),h.perform(g)&&(a=!0)}else c&&c.each(function(v,m){s(i,v)&&v.dirty();var y=o.getPerformArgs(v,i.block);y.skip=!u.performRawSeries&&r.isSeriesFiltered(v.context.model),o.updatePayload(v,n),v.perform(y)&&(a=!0)})}});function s(u,l){return u.setDirty&&(!u.dirtyMap||u.dirtyMap.get(l.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ae(),u=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(f):u?n.eachRawSeriesByType(u,f):l&&l(n,i).each(f);function f(c){var h=c.uid,d=s.set(h,o&&o.get(h)||Wu({plan:xj,reset:Sj,count:Aj}));d.context={model:c,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(c,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||Wu({reset:Cj});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,u=o.agentStubMap=Ae(),l=e.seriesType,f=e.getTargetSeries,c=!0,h=!1,d="";process.env.NODE_ENV!=="production"&&(d='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),Ee(!e.createOnAllSeries,d),l?n.eachRawSeriesByType(l,p):f?f(n,i).each(p):(c=!1,N(n.getSeries(),p));function p(g){var v=g.uid,m=u.set(v,s&&s.get(v)||(h=!0,Wu({reset:wj,onDirty:Dj})));m.context={model:g,overallProgress:c},m.agent=o,m.__block=c,a._pipe(g,m)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return De(e)&&(e={overallReset:e,seriesType:Tj(e)}),e.uid=Mc("stageHandler"),r&&(e.visualType=r),e},t}();function Cj(t){t.overallReset(t.ecModel,t.api,t.payload)}function wj(t){return t.overallProgress&&_j}function _j(){this.agent.dirty(),this.getDownstream().dirty()}function Dj(){this.agent&&this.agent.dirty()}function xj(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Sj(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?ye(e,function(r,n){return EE(n)}):Ej}var Ej=EE(0);function EE(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function Aj(t){return t.data.count()}function Tj(t){eh=null;try{t(Yu,AE)}catch{}return eh}var Yu={},AE={},eh;TE(Yu,s0),TE(AE,ES),Yu.eachSeriesByType=Yu.eachRawSeriesByType=function(t){eh=t},Yu.eachComponent=function(t){t.mainType==="series"&&t.subType&&(eh=t.subType)};function TE(t,e){for(var r in e.prototype)t[r]=dr}var OE=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Oj={color:OE,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],OE]};var ar="#B9B8CE",PE="#100C2A",th=function(){return{axisLine:{lineStyle:{color:ar}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},BE=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],ME={darkMode:!0,color:BE,backgroundColor:PE,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:ar}},textStyle:{color:ar},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:ar}},dataZoom:{borderColor:"#71708A",textStyle:{color:ar},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:ar}},timeline:{lineStyle:{color:ar},label:{color:ar},controlStyle:{color:ar,borderColor:ar}},calendar:{itemStyle:{color:PE},dayLabel:{color:ar},monthLabel:{color:ar},yearLabel:{color:ar}},timeAxis:th(),logAxis:th(),valueAxis:th(),categoryAxis:th(),line:{symbol:"circle"},graph:{color:BE},gauge:{title:{color:ar},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:ar},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};ME.categoryAxis.splitLine.show=!1;var Pj=function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},n={},i={};if(be(e)){var a=Pn(e);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};N(e,function(u,l){for(var f=!1,c=0;c<o.length;c++){var h=o[c],d=l.lastIndexOf(h);if(d>0&&d===l.length-h.length){var p=l.slice(0,d);p!=="data"&&(r.mainType=p,r[h.toLowerCase()]=u,f=!0)}}s.hasOwnProperty(l)&&(n[l]=u,f=!0),f||(i[l]=u)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var u=r.cptQuery,l=r.dataQuery;return f(u,o,"mainType")&&f(u,o,"subType")&&f(u,o,"index","componentIndex")&&f(u,o,"name")&&f(u,o,"id")&&f(l,a,"name")&&f(l,a,"dataIndex")&&f(l,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function f(c,h,d,p){return c[d]==null||h[p||d]===c[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),E0=["symbol","symbolSize","symbolRotate","symbolOffset"],FE=E0.concat(["symbolKeepAspect"]),Bj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<E0.length;o++){var s=E0[o],u=t.get(s);De(u)?(a=!0,i[s]=u):n[s]=u}if(n.symbol=n.symbol||t.defaultSymbol,r.setVisual(oe({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),e.isSeriesFiltered(t))return;var l=Ke(i);function f(c,h){for(var d=t.getRawValue(h),p=t.getDataParams(h),g=0;g<l.length;g++){var v=l[g];c.setItemVisual(h,v,i[v](d,p))}}return{dataEach:a?f:null}}},Mj={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<FE.length;s++){var u=FE[s],l=o.getShallow(u,!0);l!=null&&i.setItemVisual(a,u,l)}}return{dataEach:r.hasItemOption?n:null}}};function Fj(t,e,r){switch(r){case"color":var n=t.getItemVisual(e,"style");return n[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function Lj(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function Ij(t,e){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:t,query:i},function(o){a.push(o.seriesIndex)}),a}N([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=oe({},i),process.env.NODE_ENV!=="production"&&Mt(i.type,n[1]),o.dispatchAction(oe(i,{type:n[1],seriesIndex:r(a,i)}))})})}function cs(t,e,r,n,i){var a=t+e;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&On("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,u=o.option.selectedMap,l=i.selected,f=0;f<l.length;f++)if(l[f].seriesIndex===s){var c=o.getData(),h=Pa(c,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:he(h)?c.getName(h[0]):c.getName(h),selected:be(u)?u:oe({},u)})}}))}function Rj(t,e,r){t.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(cs("map","selectchanged",e,i,n),cs("pie","selectchanged",e,i,n)):n.fromAction==="select"?(cs("map","selected",e,i,n),cs("pie","selected",e,i,n)):n.fromAction==="unselect"&&(cs("map","unselected",e,i,n),cs("pie","unselected",e,i,n))})}function Xu(t,e,r){for(var n;t&&!(e(t)&&(n=t,r));)t=t.__hostTarget||t.parent;return n}var Nj=Math.round(Math.random()*9),kj=typeof Object.defineProperty=="function",zj=function(){function t(){this._id="__ec_inner_"+Nj++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return kj?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t}(),jj=Ve.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n+a),t.lineTo(r-i,n+a),t.closePath()}}),Vj=Ve.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n),t.lineTo(r,n+a),t.lineTo(r-i,n),t.closePath()}}),Hj=Ve.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),u=n-a+o+s,l=Math.asin(s/o),f=Math.cos(l)*o,c=Math.sin(l),h=Math.cos(l),d=o*.6,p=o*.7;t.moveTo(r-f,u+s),t.arc(r,u,o,Math.PI-l,Math.PI*2+l),t.bezierCurveTo(r+f-c*d,u+s+h*d,r,n-p,r,n),t.bezierCurveTo(r,n-p,r-f+c*d,u+s+h*d,r-f,u+s),t.closePath()}}),Wj=Ve.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;t.moveTo(i,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r/4*3),t.lineTo(i-o,a+r),t.lineTo(i,a),t.closePath()}}),$j={line:Ni,rect:St,roundRect:St,square:St,circle:yc,diamond:Vj,pin:Hj,arrow:Wj,triangle:jj},Gj={line:function(t,e,r,n,i){i.x1=t,i.y1=e+n/2,i.x2=t+r,i.y2=e+n/2},rect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n},roundRect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(t,e,r,n,i){var a=Math.min(r,n);i.x=t,i.y=e,i.width=a,i.height=a},circle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.r=Math.min(r,n)/2},diamond:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n},pin:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},arrow:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},triangle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n}},A0={};N($j,function(t,e){A0[e]=new t});var Uj=Ve.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var n=Xf(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(t,e,r){var n=e.symbolType;if(n!=="none"){var i=A0[n];i||(n="rect",i=A0[n]),Gj[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function qj(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||"#fff",r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function hs(t,e,r,n,i,a,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var u;return t.indexOf("image://")===0?u=Fx(t.slice(8),new Ue(e,r,n,i),o?"center":"cover"):t.indexOf("path://")===0?u=Vg(t.slice(7),{},new Ue(e,r,n,i),o?"center":"cover"):u=new Uj({shape:{symbolType:t,x:e,y:r,width:n,height:i}}),u.__isEmptyBrush=s,u.setColor=qj,a&&u.setColor(a),u}function Yj(t){return he(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function LE(t,e){if(t!=null)return he(t)||(t=[t,t]),[ut(t[0],e[0])||0,ut(Be(t[1],t[0]),e[1])||0]}function Za(t){return isFinite(t)}function Xj(t,e,r){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Za(n)?n:0,i=Za(i)?i:1,a=Za(a)?a:0,o=Za(o)?o:0;var s=t.createLinearGradient(n,a,i,o);return s}function Kj(t,e,r){var n=r.width,i=r.height,a=Math.min(n,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,u=e.r==null?.5:e.r;e.global||(o=o*n+r.x,s=s*i+r.y,u=u*a),o=Za(o)?o:.5,s=Za(s)?s:.5,u=u>=0&&Za(u)?u:.5;var l=t.createRadialGradient(o,s,0,o,s,u);return l}function T0(t,e,r){for(var n=e.type==="radial"?Kj(t,e,r):Xj(t,e,r),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function Zj(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function rh(t){return parseInt(t,10)}function nh(t,e,r){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(t);return(t[i]||rh(s[n])||rh(t.style[n]))-(rh(s[a])||0)-(rh(s[o])||0)|0}function Jj(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:nt(t)?[t]:he(t)?t:null}function IE(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&Jj(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=ye(r,function(a){return a/i}),n/=i)}return[r,n]}var Qj=new ui(!0);function ih(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function RE(t){return typeof t=="string"&&t!=="none"}function ah(t){var e=t.fill;return e!=null&&e!=="none"}function NE(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function kE(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function O0(t,e,r){var n=xD(e.image,e.__image,r);if(tc(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*LN),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function eV(t,e,r,n){var i,a=ih(r),o=ah(r),s=r.strokePercent,u=s<1,l=!e.path;(!e.silent||u)&&l&&e.createPathProxy();var f=e.path||Qj,c=e.__dirty;if(!n){var h=r.fill,d=r.stroke,p=o&&!!h.colorStops,g=a&&!!d.colorStops,v=o&&!!h.image,m=a&&!!d.image,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0;(p||g)&&(_=e.getBoundingRect()),p&&(y=c?T0(t,h,_):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(b=c?T0(t,d,_):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),v&&(w=c||!e.__canvasFillPattern?O0(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=w),m&&(C=c||!e.__canvasStrokePattern?O0(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=w),p?t.fillStyle=y:v&&(w?t.fillStyle=w:o=!1),g?t.strokeStyle=b:m&&(C?t.strokeStyle=C:a=!1)}var D=e.getGlobalScale();f.setScale(D[0],D[1],e.segmentIgnoreThreshold);var x,S;t.setLineDash&&r.lineDash&&(i=IE(e),x=i[0],S=i[1]);var O=!0;(l||c&Vo)&&(f.setDPR(t.dpr),u?f.setContext(null):(f.setContext(t),O=!1),f.reset(),e.buildPath(f,e.shape,n),f.toStatic(),e.pathUpdated()),O&&f.rebuildPath(t,u?s:1),x&&(t.setLineDash(x),t.lineDashOffset=S),n||(r.strokeFirst?(a&&kE(t,r),o&&NE(t,r)):(o&&NE(t,r),a&&kE(t,r))),x&&t.setLineDash([])}function tV(t,e,r){var n=e.__image=xD(r.image,e.__image,e,e.onload);if(!(!n||!tc(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),u=n.width/n.height;if(o==null&&s!=null?o=s*u:s==null&&o!=null?s=o/u:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var l=r.sx||0,f=r.sy||0;t.drawImage(n,l,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var l=r.sx,f=r.sy,c=o-l,h=s-f;t.drawImage(n,l,f,c,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function rV(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||Ca,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=IE(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(ih(r)&&t.strokeText(i,r.x,r.y),ah(r)&&t.fillText(i,r.x,r.y)):(ah(r)&&t.fillText(i,r.x,r.y),ih(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var zE=["shadowBlur","shadowOffsetX","shadowOffsetY"],jE=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function VE(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){br(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Ma.opacity:o}(n||e.blend!==r.blend)&&(a||(br(t,i),a=!0),t.globalCompositeOperation=e.blend||Ma.blend);for(var s=0;s<zE.length;s++){var u=zE[s];(n||e[u]!==r[u])&&(a||(br(t,i),a=!0),t[u]=t.dpr*(e[u]||0))}return(n||e.shadowColor!==r.shadowColor)&&(a||(br(t,i),a=!0),t.shadowColor=e.shadowColor||Ma.shadowColor),a}function HE(t,e,r,n,i){var a=Ku(e,i.inHover),o=n?null:r&&Ku(r,i.inHover)||{};if(a===o)return!1;var s=VE(t,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(br(t,i),s=!0),RE(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(br(t,i),s=!0),RE(a.stroke)&&(t.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(br(t,i),s=!0),t.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var u=a.lineWidth,l=u/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(br(t,i),s=!0),t.lineWidth=l)}for(var f=0;f<jE.length;f++){var c=jE[f],h=c[0];(n||a[h]!==o[h])&&(s||(br(t,i),s=!0),t[h]=a[h]||c[1])}return s}function nV(t,e,r,n,i){return VE(t,Ku(e,i.inHover),r&&Ku(r,i.inHover),n,i)}function WE(t,e){var r=e.transform,n=t.dpr||1;r?t.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):t.setTransform(n,0,0,n,0,0)}function iV(t,e,r){for(var n=!1,i=0;i<t.length;i++){var a=t[i];n=n||a.isZeroArea(),WE(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}r.allClipped=n}function aV(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var $E=1,GE=2,UE=3,qE=4;function oV(t){var e=ah(t),r=ih(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function br(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Ku(t,e){return e&&t.__hoverStyle||t.style}function YE(t,e){Ja(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Ja(t,e,r,n){var i=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~Or,e.__isRendered=!1;return}var a=e.__clipPaths,o=r.prevElClipPaths,s=!1,u=!1;if((!o||Zj(a,o))&&(o&&o.length&&(br(t,r),t.restore(),u=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(br(t,r),t.save(),iV(a,t,r),s=!0),r.prevElClipPaths=a),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var l=r.prevEl;l||(u=s=!0);var f=e instanceof Ve&&e.autoBatch&&oV(e.style);s||aV(i,l.transform)?(br(t,r),WE(t,e)):f||br(t,r);var c=Ku(e,r.inHover);e instanceof Ve?(r.lastDrawType!==$E&&(u=!0,r.lastDrawType=$E),HE(t,e,l,u,r),(!f||!r.batchFill&&!r.batchStroke)&&t.beginPath(),eV(t,e,c,f),f&&(r.batchFill=c.fill||"",r.batchStroke=c.stroke||"")):e instanceof oc?(r.lastDrawType!==UE&&(u=!0,r.lastDrawType=UE),HE(t,e,l,u,r),rV(t,e,c)):e instanceof fi?(r.lastDrawType!==GE&&(u=!0,r.lastDrawType=GE),nV(t,e,l,u,r),tV(t,e,c)):e.getTemporalDisplayables&&(r.lastDrawType!==qE&&(u=!0,r.lastDrawType=qE),sV(t,e,r)),f&&n&&br(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function sV(t,e,r){var n=e.getDisplayables(),i=e.getTemporalDisplayables();t.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var u=n[o];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Ja(t,u,a,o===s-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}for(var l=0,f=i.length;l<f;l++){var u=i[l];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Ja(t,u,a,l===f-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var P0=new zj,XE=new fu(100),KE=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function B0(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";t.dirty&&P0.delete(t);var a=P0.get(t);if(a)return a;var o=je(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return u(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,P0.set(t,s),t.dirty=!1,s;function u(l){for(var f=[r],c=!0,h=0;h<KE.length;++h){var d=o[KE[h]];if(d!=null&&!he(d)&&!be(d)&&!nt(d)&&typeof d!="boolean"){c=!1;break}f.push(d)}var p;if(c){p=f.join(",")+(i?"-svg":"");var g=XE.get(p);g&&(i?l.svgElement=g:l.image=g)}var v=JE(o.dashArrayX),m=uV(o.dashArrayY),y=ZE(o.symbol),b=lV(v),w=QE(m),C=!i&&Po.createCanvas(),_=i&&{tag:"g",attrs:{},key:"dcl",children:[]},D=S(),x;C&&(C.width=D.width*r,C.height=D.height*r,x=C.getContext("2d")),O(),c&&XE.put(p,C||_),l.image=C,l.svgElement=_,l.svgWidth=D.width,l.svgHeight=D.height;function S(){for(var E=1,P=0,F=b.length;P<F;++P)E=cD(E,b[P]);for(var B=1,P=0,F=y.length;P<F;++P)B=cD(B,y[P].length);E*=B;var M=w*b.length*y.length;if(process.env.NODE_ENV!=="production"){var I=function(j){console.warn("Calculated decal size is greater than "+j+" due to decal option settings so "+j+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+j+" to be larger to avoid incontinuity.")};E>o.maxTileWidth&&I("maxTileWidth"),M>o.maxTileHeight&&I("maxTileHeight")}return{width:Math.max(1,Math.min(E,o.maxTileWidth)),height:Math.max(1,Math.min(M,o.maxTileHeight))}}function O(){x&&(x.clearRect(0,0,C.width,C.height),o.backgroundColor&&(x.fillStyle=o.backgroundColor,x.fillRect(0,0,C.width,C.height)));for(var E=0,P=0;P<m.length;++P)E+=m[P];if(E<=0)return;for(var F=-w,B=0,M=0,I=0;F<D.height;){if(B%2===0){for(var j=M/2%y.length,z=0,W=0,R=0;z<D.width*2;){for(var U=0,P=0;P<v[I].length;++P)U+=v[I][P];if(U<=0)break;if(W%2===0){var Z=(1-o.symbolSize)*.5,ee=z+v[I][W]*Z,ne=F+m[B]*Z,q=v[I][W]*o.symbolSize,L=m[B]*o.symbolSize,X=R/2%y[j].length;V(ee,ne,q,L,y[j][X])}z+=v[I][W],++R,++W,W===v[I].length&&(W=0)}++I,I===v.length&&(I=0)}F+=m[B],++M,++B,B===m.length&&(B=0)}function V(G,J,K,Y,fe){var ue=i?1:r,Ce=hs(fe,G*ue,J*ue,K*ue,Y*ue,o.color,o.symbolKeepAspect);if(i){var me=n.painter.renderOneToVNode(Ce);me&&_.children.push(me)}else YE(x,Ce)}}}}function ZE(t){if(!t||t.length===0)return[["rect"]];if(be(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!be(t[r])){e=!1;break}if(e)return ZE([t]);for(var n=[],r=0;r<t.length;++r)be(t[r])?n.push([t[r]]):n.push(t[r]);return n}function JE(t){if(!t||t.length===0)return[[0,0]];if(nt(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!nt(t[n])){r=!1;break}if(r)return JE([t]);for(var i=[],n=0;n<t.length;++n)if(nt(t[n])){var e=Math.ceil(t[n]);i.push([e,e])}else{var e=ye(t[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function uV(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(nt(t)){var e=Math.ceil(t);return[e,e]}var r=ye(t,function(n){return Math.ceil(n)});return t.length%2?r.concat(r):r}function lV(t){return ye(t,function(e){return QE(e)})}function QE(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function fV(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var u=n.ensureUniqueItemVisual(o,"style");u.decal=B0(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=B0(i,e)}}})}var cn=new En,oh={};function cV(t,e){process.env.NODE_ENV!=="production"&&oh[t]&&Gt("Already has an implementation of "+t+"."),oh[t]=e}function hV(t){return process.env.NODE_ENV!=="production"&&(oh[t]||Gt("Implementation of "+t+" doesn't exists.")),oh[t]}var dV=1,vV=800,pV=900,gV=1e3,mV=2e3,yV=5e3,e2=1e3,bV=1100,M0=2e3,t2=3e3,CV=4e3,sh=4500,wV=4600,_V=5e3,DV=6e3,r2=7e3,xV={PROCESSOR:{FILTER:gV,SERIES_FILTER:vV,STATISTIC:yV},VISUAL:{LAYOUT:e2,PROGRESSIVE_LAYOUT:bV,GLOBAL:M0,CHART:t2,POST_CHART_LAYOUT:wV,COMPONENT:CV,BRUSH:_V,CHART_ITEM:sh,ARIA:DV,DECAL:r2}},Xt="__flagInMainProcess",Cr="__pendingUpdate",F0="__needsUpdateStatus",n2=/^[a-zA-Z0-9_]+$/,L0="__connectUpdateStatus",i2=0,SV=1,EV=2;function a2(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){Mr(this.id);return}return s2(this,t,e)}}function o2(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return s2(this,t,e)}}function s2(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),En.prototype[e].apply(t,r)}var u2=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(En),l2=u2.prototype;l2.on=o2("on"),l2.off=o2("off");var ds,I0,uh,Vi,R0,N0,k0,Zu,Ju,f2,c2,z0,h2,lh,d2,v2,Jr,p2,g2=function(t){ce(e,t);function e(r,n,i){var a=t.call(this,new Pj)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},be(n)&&(n=m2[n]),a._dom=r;var o="canvas",s="auto",u=!1;if(process.env.NODE_ENV!=="production"){var l=Pe.hasGlobalWindow?window:global;l&&(o=Be(l.__ECHARTS__DEFAULT__RENDERER__,o),s=Be(l.__ECHARTS__DEFAULT__COARSE_POINTER,s),u=Be(l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,u))}i.ssr;var f=a._zr=nD(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Be(i.useDirtyRect,u),useCoarsePointer:Be(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=x0(dt(f.flush,f),17),n=$e(n),n&&FS(n,!0),a._theme=n,a._locale=R7(i.locale||Xx),a._coordSysMgr=new l0;var c=a._api=d2(a);function h(d,p){return d.__prio-p.__prio}return Bf(ch,h),Bf(V0,h),a._scheduler=new SE(a,c,V0,ch),a._messageCenter=new u2,a._initEvents(),a.resize=dt(a.resize,a),f.animation.on("frame",a._onframe,a),f2(f,a),c2(f,a),Sf(a),a}return e.prototype._onframe=function(){if(!this._disposed){p2(this);var r=this._scheduler;if(this[Cr]){var n=this[Cr].silent;this[Xt]=!0;try{ds(this),Vi.update.call(this,null,this[Cr].updateParams)}catch(u){throw this[Xt]=!1,this[Cr]=null,u}this._zr.flush(),this[Xt]=!1,this[Cr]=null,Zu.call(this,n),Ju.call(this,n)}else if(r.unfinished){var i=dV,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),N0(this,a),r.performVisualTasks(a),lh(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(this[Xt]){process.env.NODE_ENV!=="production"&&Gt("`setOption` should not be called during main process.");return}if(this._disposed){Mr(this.id);return}var a,o,s;if(we(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Xt]=!0,!this._model||n){var u=new fz(this._api),l=this._theme,f=this._model=new s0;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,l,this._locale,u)}this._model.setOption(r,{replaceMerge:o},H0);var c={seriesTransition:s,optionChanged:!0};if(i)this[Cr]={silent:a,updateParams:c},this[Xt]=!1,this.getZr().wakeUp();else{try{ds(this),Vi.update.call(this,null,c)}catch(h){throw this[Cr]=null,this[Xt]=!1,h}this._ssr||this._zr.flush(),this[Cr]=null,this[Xt]=!1,Zu.call(this,a),Ju.call(this,a)}},e.prototype.setTheme=function(){On("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Pe.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&&Mt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(Pe.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return N(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){Mr(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;N(n,function(u){i.eachComponent({mainType:u},function(l){var f=o._componentsMap[l.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return N(a,function(u){u.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){Mr(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(y2[i]){var u=s,l=s,f=-s,c=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();N(el,function(b,w){if(b.group===i){var C=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas($e(r)),_=b.getDom().getBoundingClientRect();u=a(_.left,u),l=a(_.top,l),f=o(_.right,f),c=o(_.bottom,c),h.push({dom:C,left:_.left,top:_.top})}}),u*=d,l*=d,f*=d,c*=d;var p=f-u,g=c-l,v=Po.createCanvas(),m=nD(v,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:g}),n){var y="";return N(h,function(b){var w=b.left-u,C=b.top-l;y+='<g transform="translate('+w+","+C+')">'+b.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new St({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),N(h,function(b){var w=new fi({style:{x:b.left*d-u,y:b.top*d-l,image:b.dom}});m.add(w)}),m.refreshImmediately(),v.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n){return R0(this,"convertToPixel",r,n)},e.prototype.convertFromPixel=function(r,n){return R0(this,"convertFromPixel",r,n)},e.prototype.containPixel=function(r,n){if(this._disposed){Mr(this.id);return}var i=this._model,a,o=ig(i,r);return N(o,function(s,u){u.indexOf("Models")>=0&&N(s,function(l){var f=l.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(u==="seriesModels"){var c=this._chartsMap[l.__viewId];c&&c.containPoint?a=a||c.containPoint(n,l):process.env.NODE_ENV!=="production"&&xt(u+": "+(c?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&xt(u+": containPoint is not supported")},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=ig(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||xt("There is no specified series model"));var s=o.getData(),u=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return u!=null?Fj(s,u,n):Lj(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;N(AV,function(n){var i=function(a){var o=r.getModel(),s=a.target,u,l=n==="globalout";if(l?u={}:s&&Xu(s,function(p){var g=He(p);if(g&&g.dataIndex!=null){var v=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return u=v&&v.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return u=oe({},g.eventData),!0},!0),u){var f=u.componentType,c=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=u.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),d=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!l&&!(h&&d)&&xt("model or view can not be found by params"),u.event=a,u.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:u,model:h,view:d},r.trigger(n,u)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),N(Qu,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),N(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),Rj(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Mr(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Mr(this.id);return}this._disposed=!0;var r=this.getDom();r&&CD(this.getDom(),$0,"");var n=this,i=n._api,a=n._model;N(n._componentsViews,function(o){o.dispose(a,i)}),N(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete el[n.id]},e.prototype.resize=function(r){if(this[Xt]){process.env.NODE_ENV!=="production"&&Gt("`resize` should not be called during main process.");return}if(this._disposed){Mr(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Cr]&&(a==null&&(a=this[Cr].silent),i=!0,this[Cr]=null),this[Xt]=!0;try{i&&ds(this),Vi.update.call(this,{type:"resize",animation:oe({duration:0},r&&r.animation)})}catch(o){throw this[Xt]=!1,o}this[Xt]=!1,Zu.call(this,a),Ju.call(this,a)}},e.prototype.showLoading=function(r,n){if(this._disposed){Mr(this.id);return}if(we(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!W0[r]){process.env.NODE_ENV!=="production"&&xt("Loading effects "+r+" not exists.");return}var i=W0[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},e.prototype.hideLoading=function(){if(this._disposed){Mr(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=oe({},r);return n.type=Qu[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){Mr(this.id);return}if(we(n)||(n={silent:!!n}),!!fh[r.type]&&this._model){if(this[Xt]){this._pendingActions.push(r);return}var i=n.silent;k0.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Pe.browser.weChat&&this._throttledZrFlush(),Zu.call(this,i),Ju.call(this,i)}},e.prototype.updateLabelLayout=function(){cn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){Mr(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&Ee(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ds=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),I0(c,!0),I0(c,!1),h.plan()},I0=function(c,h){for(var d=c._model,p=c._scheduler,g=h?c._componentsViews:c._chartsViews,v=h?c._componentsMap:c._chartsMap,m=c._zr,y=c._api,b=0;b<g.length;b++)g[b].__alive=!1;h?d.eachComponent(function(_,D){_!=="series"&&w(D)}):d.eachSeries(w);function w(_){var D=_.__requireNewView;_.__requireNewView=!1;var x="_ec_"+_.id+"_"+_.type,S=!D&&v[x];if(!S){var O=Pn(_.type),E=h?Br.getClass(O.main,O.sub):Zr.getClass(O.sub);process.env.NODE_ENV!=="production"&&Ee(E,O.sub+" does not exist."),S=new E,S.init(d,y),v[x]=S,g.push(S),m.add(S.group)}_.__viewId=S.__id=x,S.__alive=!0,S.__model=_,S.group.__ecComponentInfo={mainType:_.mainType,index:_.componentIndex},!h&&p.prepareView(S,_,d,y)}for(var b=0;b<g.length;){var C=g[b];C.__alive?b++:(!h&&C.renderTask.dispose(),m.remove(C.group),C.dispose(d,y),g.splice(b,1),v[C.__id]===C&&delete v[C.__id],C.__id=C.group.__ecComponentInfo=null)}},uh=function(c,h,d,p,g){var v=c._model;if(v.setUpdatePayload(d),!p){N([].concat(c._componentsViews).concat(c._chartsViews),C);return}var m={};m[p+"Id"]=d[p+"Id"],m[p+"Index"]=d[p+"Index"],m[p+"Name"]=d[p+"Name"];var y={mainType:p,query:m};g&&(y.subType=g);var b=d.excludeSeriesId,w;b!=null&&(w=Ae(),N(gt(b),function(_){var D=pr(_,null);D!=null&&w.set(D,!0)})),v&&v.eachComponent(y,function(_){var D=w&&w.get(_.id)!=null;if(!D)if(vx(d))if(_ instanceof fn)d.type===Va&&!d.notBlur&&!_.get(["emphasis","disabled"])&&_9(_,d,c._api);else{var x=Tg(_.mainType,_.componentIndex,d.name,c._api),S=x.focusSelf,O=x.dispatchers;d.type===Va&&S&&!d.notBlur&&Ag(_.mainType,_.componentIndex,c._api),O&&N(O,function(E){d.type===Va?dc(E):vc(E)})}else Pg(d)&&_ instanceof fn&&(S9(_,d,c._api),cx(_),Jr(c))},c),v&&v.eachComponent(y,function(_){var D=w&&w.get(_.id)!=null;D||C(c[p==="series"?"_chartsMap":"_componentsMap"][_.__viewId])},c);function C(_){_&&_.__alive&&_[h]&&_[h](_.__model,v,c._api,d)}},Vi={prepareAndUpdate:function(c){ds(this),Vi.update.call(this,c,{optionChanged:c.newOption!=null})},update:function(c,h){var d=this._model,p=this._api,g=this._zr,v=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(c),m.restoreData(d,c),m.performSeriesTasks(d),v.create(d,p),m.performDataProcessorTasks(d,c),N0(this,d),v.update(d,p),r(d),m.performVisualTasks(d,c),z0(this,d,p,c,h);var y=d.get("backgroundColor")||"transparent",b=d.get("darkMode");g.setBackgroundColor(y),b!=null&&b!=="auto"&&g.setDarkMode(b),cn.trigger("afterupdate",d,p)}},updateTransform:function(c){var h=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(c);var g=[];d.eachComponent(function(m,y){if(m!=="series"){var b=h.getViewOfComponentModel(y);if(b&&b.__alive)if(b.updateTransform){var w=b.updateTransform(y,d,p,c);w&&w.update&&g.push(b)}else g.push(b)}});var v=Ae();d.eachSeries(function(m){var y=h._chartsMap[m.__viewId];if(y.updateTransform){var b=y.updateTransform(m,d,p,c);b&&b.update&&v.set(m.uid,1)}else v.set(m.uid,1)}),r(d),this._scheduler.performVisualTasks(d,c,{setDirty:!0,dirtyMap:v}),lh(this,d,p,c,{},v),cn.trigger("afterupdate",d,p)}},updateView:function(c){var h=this._model;h&&(h.setUpdatePayload(c),Zr.markUpdateMethod(c,"updateView"),r(h),this._scheduler.performVisualTasks(h,c,{setDirty:!0}),z0(this,h,this._api,c,{}),cn.trigger("afterupdate",h,this._api))},updateVisual:function(c){var h=this,d=this._model;d&&(d.setUpdatePayload(c),d.eachSeries(function(p){p.getData().clearAllVisual()}),Zr.markUpdateMethod(c,"updateVisual"),r(d),this._scheduler.performVisualTasks(d,c,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,g){if(p!=="series"){var v=h.getViewOfComponentModel(g);v&&v.__alive&&v.updateVisual(g,d,h._api,c)}}),d.eachSeries(function(p){var g=h._chartsMap[p.__viewId];g.updateVisual(p,d,h._api,c)}),cn.trigger("afterupdate",d,this._api))},updateLayout:function(c){Vi.update.call(this,c)}},R0=function(c,h,d,p){if(c._disposed){Mr(c.id);return}for(var g=c._model,v=c._coordSysMgr.getCoordinateSystems(),m,y=ig(g,d),b=0;b<v.length;b++){var w=v[b];if(w[h]&&(m=w[h](g,y,p))!=null)return m}process.env.NODE_ENV!=="production"&&xt("No coordinate system that supports "+h+" found by the given finder.")},N0=function(c,h){var d=c._chartsMap,p=c._scheduler;h.eachSeries(function(g){p.updateStreamModes(g,d[g.__viewId])})},k0=function(c,h){var d=this,p=this.getModel(),g=c.type,v=c.escapeConnect,m=fh[g],y=m.actionInfo,b=(y.update||"update").split(":"),w=b.pop(),C=b[0]!=null&&Pn(b[0]);this[Xt]=!0;var _=[c],D=!1;c.batch&&(D=!0,_=ye(c.batch,function(B){return B=je(oe({},B),c),B.batch=null,B}));var x=[],S,O=Pg(c),E=vx(c);if(E&&fx(this._api),N(_,function(B){if(S=m.action(B,d._model,d._api),S=S||oe({},B),S.type=y.event||S.type,x.push(S),E){var M=ag(c),I=M.queryOptionMap,j=M.mainTypeSpecified,z=j?I.keys()[0]:"series";uh(d,w,B,z),Jr(d)}else O?(uh(d,w,B,"series"),Jr(d)):C&&uh(d,w,B,C.main,C.sub)}),w!=="none"&&!E&&!O&&!C)try{this[Cr]?(ds(this),Vi.update.call(this,c),this[Cr]=null):Vi[w].call(this,c)}catch(B){throw this[Xt]=!1,B}if(D?S={type:y.event||g,escapeConnect:v,batch:x}:S=x[0],this[Xt]=!1,!h){var P=this._messageCenter;if(P.trigger(S.type,S),O){var F={type:"selectchanged",escapeConnect:v,selected:E9(p),isFromClick:c.isFromClick||!1,fromAction:c.type,fromActionPayload:c};P.trigger(F.type,F)}}},Zu=function(c){for(var h=this._pendingActions;h.length;){var d=h.shift();k0.call(this,d,c)}},Ju=function(c){!c&&this.trigger("updated")},f2=function(c,h){c.on("rendered",function(d){h.trigger("rendered",d),c.animation.isFinished()&&!h[Cr]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},c2=function(c,h){c.on("mouseover",function(d){var p=d.target,g=Xu(p,Jo);g&&(D9(g,d,h._api),Jr(h))}).on("mouseout",function(d){var p=d.target,g=Xu(p,Jo);g&&(x9(g,d,h._api),Jr(h))}).on("click",function(d){var p=d.target,g=Xu(p,function(y){return He(y).dataIndex!=null},!0);if(g){var v=g.selected?"unselect":"select",m=He(g);h._api.dispatchAction({type:v,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function r(c){c.clearColorPalette(),c.eachSeries(function(h){h.clearColorPalette()})}function n(c){var h=[],d=[],p=!1;if(c.eachComponent(function(y,b){var w=b.get("zlevel")||0,C=b.get("z")||0,_=b.getZLevelKey();p=p||!!_,(y==="series"?d:h).push({zlevel:w,z:C,idx:b.componentIndex,type:y,key:_})}),p){var g=h.concat(d),v,m;Bf(g,function(y,b){return y.zlevel===b.zlevel?y.z-b.z:y.zlevel-b.zlevel}),N(g,function(y){var b=c.getComponent(y.type,y.idx),w=y.zlevel,C=y.key;v!=null&&(w=Math.max(v,w)),C?(w===v&&C!==m&&w++,m=C):m&&(w===v&&w++,m=""),v=w,b.setZLevel(w)})}}z0=function(c,h,d,p,g){n(h),h2(c,h,d,p,g),N(c._chartsViews,function(v){v.__alive=!1}),lh(c,h,d,p,g),N(c._chartsViews,function(v){v.__alive||v.remove(h,d)})},h2=function(c,h,d,p,g,v){N(v||c._componentsViews,function(m){var y=m.__model;l(y,m),m.render(y,h,d,p),s(y,m),f(y,m)})},lh=function(c,h,d,p,g,v){var m=c._scheduler;g=oe(g||{},{updatedSeries:h.getSeries()}),cn.trigger("series:beforeupdate",h,d,g);var y=!1;h.eachSeries(function(b){var w=c._chartsMap[b.__viewId];w.__alive=!0;var C=w.renderTask;m.updatePayload(C,p),l(b,w),v&&v.get(b.uid)&&C.dirty(),C.perform(m.getPerformArgs(C))&&(y=!0),w.group.silent=!!b.get("silent"),o(b,w),cx(b)}),m.unfinished=y||m.unfinished,cn.trigger("series:layoutlabels",h,d,g),cn.trigger("series:transition",h,d,g),h.eachSeries(function(b){var w=c._chartsMap[b.__viewId];s(b,w),f(b,w)}),a(c,h),cn.trigger("series:afterupdate",h,d,g)},Jr=function(c){c[F0]=!0,c.getZr().wakeUp()},p2=function(c){c[F0]&&(c.getZr().storage.traverse(function(h){rs(h)||i(h)}),c[F0]=!1)};function i(c){for(var h=[],d=c.currentStates,p=0;p<d.length;p++){var g=d[p];g==="emphasis"||g==="blur"||g==="select"||h.push(g)}c.selected&&c.states.select&&h.push("select"),c.hoverState===uc&&c.states.emphasis?h.push("emphasis"):c.hoverState===sc&&c.states.blur&&h.push("blur"),c.useStates(h)}function a(c,h){var d=c._zr,p=d.storage,g=0;p.traverse(function(v){v.isGroup||g++}),g>h.get("hoverLayerThreshold")&&!Pe.node&&!Pe.worker&&h.eachSeries(function(v){if(!v.preventUsingHoverLayer){var m=c._chartsMap[v.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(c,h){var d=c.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(c,h){if(!c.preventAutoZ){var d=c.get("z")||0,p=c.get("zlevel")||0;h.eachRendered(function(g){return u(g,d,p,-1/0),!0})}}function u(c,h,d,p){var g=c.getTextContent(),v=c.getTextGuideLine(),m=c.isGroup;if(m)for(var y=c.childrenRef(),b=0;b<y.length;b++)p=Math.max(u(y[b],h,d,p),p);else c.z=h,c.zlevel=d,p=Math.max(c.z2,p);if(g&&(g.z=h,g.zlevel=d,isFinite(p)&&(g.z2=p+2)),v){var w=c.textGuideLineConfig;v.z=h,v.zlevel=d,isFinite(p)&&(v.z2=p+(w&&w.showAbove?1:-1))}return p}function l(c,h){h.eachRendered(function(d){if(!rs(d)){var p=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function f(c,h){var d=c.getModel("stateAnimation"),p=c.isAnimationEnabled(),g=d.get("duration"),v=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(rs(m))return;if(m instanceof Ve&&B9(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=v;var b=m.getTextContent(),w=m.getTextGuideLine();b&&(b.stateTransition=v),w&&(w.stateTransition=v)}m.__dirty&&i(m)}})}d2=function(c){return new(function(h){ce(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return c._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){dc(p,g),Jr(c)},d.prototype.leaveEmphasis=function(p,g){vc(p,g),Jr(c)},d.prototype.enterBlur=function(p){w9(p),Jr(c)},d.prototype.leaveBlur=function(p){ox(p),Jr(c)},d.prototype.enterSelect=function(p){sx(p),Jr(c)},d.prototype.leaveSelect=function(p){ux(p),Jr(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(p){return c.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return c.getViewOfSeriesModel(p)},d}(ES))(c)},v2=function(c){function h(d,p){for(var g=0;g<d.length;g++){var v=d[g];v[L0]=p}}N(Qu,function(d,p){c._messageCenter.on(p,function(g){if(y2[c.group]&&c[L0]!==i2){if(g&&g.escapeConnect)return;var v=c.makeActionFromEvent(g),m=[];N(el,function(y){y!==c&&y.group===c.group&&m.push(y)}),h(m,i2),N(m,function(y){y[L0]!==SV&&y.dispatchAction(v)}),h(m,EV)}})})}}(),e}(En),j0=g2.prototype;j0.on=a2("on"),j0.off=a2("off"),j0.one=function(t,e,r){var n=this;On("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(t,i)}this.on.call(this,t,i,r)};var AV=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Mr(t){process.env.NODE_ENV!=="production"&&xt("Instance "+t+" has been disposed")}var fh={},Qu={},V0=[],H0=[],ch=[],m2={},W0={},el={},y2={},TV=+new Date-0,$0="_echarts_instance_";function OV(t,e,r){{if(process.env.NODE_ENV!=="production"&&!t)throw new Error("Initialize failed: invalid dom.");var n=PV(t);if(n)return process.env.NODE_ENV!=="production"&&xt("There is a chart instance already initialized on the dom."),n;process.env.NODE_ENV!=="production"&&Mo(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&!r||!t.clientHeight&&!r)&&xt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var i=new g2(t,e,r);return i.id="ec_"+TV++,el[i.id]=i,CD(t,$0,i.id),v2(i),cn.trigger("afterinit",i),i}function PV(t){return el[h6(t,$0)]}function b2(t,e){m2[t]=e}function C2(t){Ge(H0,t)<0&&H0.push(t)}function w2(t,e){U0(V0,t,e,mV)}function BV(t){G0("afterinit",t)}function MV(t){G0("afterupdate",t)}function G0(t,e){cn.on(t,e)}function vs(t,e,r){De(e)&&(r=e,e="");var n=we(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,!Qu[e]&&(Ee(n2.test(n)&&n2.test(e)),fh[n]||(fh[n]={action:r,actionInfo:t}),Qu[e]=n)}function FV(t,e){l0.register(t,e)}function LV(t,e){U0(ch,t,e,e2,"layout")}function Qa(t,e){U0(ch,t,e,t2,"visual")}var _2=[];function U0(t,e,r,n,i){if((De(e)||we(e))&&(r=e,e=n),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");N(t,function(o){Ee(o.__raw!==r)})}if(!(Ge(_2,r)>=0)){_2.push(r);var a=SE.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function D2(t,e){W0[t]=e}function IV(t,e,r){var n=hV("registerMap");n&&n(t,e,r)}var RV=Wz;Qa(M0,gj),Qa(sh,mj),Qa(sh,yj),Qa(M0,Bj),Qa(sh,Mj),Qa(r2,fV),C2(FS),w2(pV,_z),D2("default",bj),vs({type:Va,event:Va,update:Va},dr),vs({type:fc,event:fc,update:fc},dr),vs({type:xu,event:xu,update:xu},dr),vs({type:cc,event:cc,update:cc},dr),vs({type:Su,event:Su,update:Su},dr),b2("light",Oj),b2("dark",ME);function tl(t){return t==null?0:t.length||1}function x2(t){return t}var q0=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||x2,this._newKeyGetter=i||x2,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],u=n[s],l=tl(u);if(l>1){var f=u.shift();u.length===1&&(n[s]=u[0]),this._update&&this._update(f,o)}else l===1?(n[s]=null,this._update&&this._update(u,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var u=a[s],l=n[u],f=i[u],c=tl(l),h=tl(f);if(c>1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,l),i[u]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,l),i[u]=null;else if(c===1&&h===1)this._update&&this._update(f,l),i[u]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,l),i[u]=null;else if(c>1)for(var d=0;d<c;d++)this._remove&&this._remove(l[d]);else this._remove&&this._remove(l)}this._performRestAdd(o,i)},t.prototype._performRestAdd=function(e,r){for(var n=0;n<e.length;n++){var i=e[n],a=r[i],o=tl(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},t.prototype._initIndexMap=function(e,r,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!r){var u=r[s],l=tl(u);l===0?(r[s]=o,a&&n.push(s)):l===1?r[s]=[u,o]:u.push(o)}}},t}(),NV=function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function kV(t,e){var r={},n=r.encode={},i=Ae(),a=[],o=[],s={};N(t.dimensions,function(h){var d=t.getDimensionInfo(h),p=d.coordDim;if(p){process.env.NODE_ENV!=="production"&&Ee(n0.get(p)==null);var g=d.coordDimIndex;Y0(n,p)[g]=h,d.isExtraCoord||(i.set(p,1),jV(d.type)&&(a[0]=h),Y0(s,p)[g]=t.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}n0.each(function(v,m){var y=Y0(n,m),b=d.otherDims[m];b!=null&&b!==!1&&(y[b]=d.name)})});var u=[],l={};i.each(function(h,d){var p=n[d];l[d]=p[0],u=u.concat(p)}),r.dataDimsOnCoord=u,r.dataDimIndicesOnCoord=ye(u,function(h){return t.getDimensionInfo(h).storeDimIndex}),r.encodeFirstDimNotExtra=l;var f=n.label;f&&f.length&&(a=f.slice());var c=n.tooltip;return c&&c.length?o=c.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new NV(s,e),r}function Y0(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function zV(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function jV(t){return!(t==="ordinal"||t==="time")}var hh=function(){function t(e){this.otherDims={},e!=null&&oe(this,e)}return t}(),VV=lt(),HV={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},S2=function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=T2(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return Be(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=kS(this.source),n=!O2(e),i="",a=[],o=0,s=0;o<e;o++){var u=void 0,l=void 0,f=void 0,c=this.dimensions[s];if(c&&c.storeDimIndex===o)u=r?c.name:null,l=c.type,f=c.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(u=r?h.name:null,l=h.type)}a.push({property:u,type:l,ordinalMeta:f}),r&&u!=null&&(!c||!c.isCalculationCoord)&&(i+=n?u.replace(/\`/g,"`1").replace(/\$/g,"`2"):u),i+="$",i+=HV[l]||"f",f&&(i+=f.uid),i+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:p}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}e.push(i)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function E2(t){return t instanceof S2}function A2(t){for(var e=Ae(),r=0;r<(t||[]).length;r++){var n=t[r],i=we(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,r)}return e}function T2(t){var e=VV(t);return e.dimNameMap||(e.dimNameMap=A2(t.dimensionsDefine))}function O2(t){return t>30}var rl=we,Hi=ye,WV=typeof Int32Array>"u"?Array:Int32Array,$V="e\0\0",P2=-1,GV=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],UV=["_approximateExtent"],B2,dh,nl,ps,X0,vh,K0,M2=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;E2(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},u=!1,l={},f=0;f<n.length;f++){var c=n[f],h=be(c)?new hh({name:c}):c instanceof hh?c:new hh(c),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var p=h.otherDims=h.otherDims||{};o.push(d),a[d]=h,l[d]!=null&&(u=!0),h.createInvertedIndices&&(s[d]=[]),p.itemName===0&&(this._nameDimIdx=f),p.itemId===0&&(this._idDimIdx=f),process.env.NODE_ENV!=="production"&&Ee(i||h.storeDimIndex>=0),i&&(h.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(u),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Ae();N(o,function(v){g.set(a[v].storeDimIndex,v)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(nt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,n=r.encode[e];return(n||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,n){var i=this,a;if(e instanceof y0&&(a=e),!a){var o=this.dimensions,s=h0(e)||Wt(e)?new VS(e,o.length):e;a=new y0;var u=Hi(o,function(l){return{type:i._dimInfos[l].type,property:l}});a.initData(s,u,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=kV(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var n=this._store.appendValues(e,r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var u=s-i;this._nameList[s]=r[u],o&&K0(this,s)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==hi&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,u=s===qr;if(u&&!i.pure)for(var l=[],f=e;f<r;f++){var c=i.getItem(f,l);if(!this.hasItemOption&&r6(c)&&(this.hasItemOption=!0),c){var h=c.name;a[f]==null&&h!=null&&(a[f]=pr(h,null));var d=c.id;o[f]==null&&d!=null&&(o[f]=pr(d,null))}}if(this._shouldMakeIdFromName())for(var f=e;f<r;f++)K0(this,f);B2(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){rl(e)?oe(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=nl(this,this._nameDimIdx,r)),n==null&&(n=""),n},t.prototype._getCategory=function(e,r){var n=this._store.get(e,r),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},t.prototype.getId=function(e){return dh(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var n=this,i=this._store;return he(e)?i.getValues(Hi(e,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var n=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n[r];return i==null||isNaN(i)?P2:i},t.prototype.indicesOfNearest=function(e,r,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),r,n)},t.prototype.each=function(e,r,n){De(e)&&(n=r,r=e,e=[]);var i=n||this,a=Hi(ps(e),this._getStoreDimIndex,this);this._store.each(a,i?dt(r,i):r)},t.prototype.filterSelf=function(e,r,n){De(e)&&(n=r,r=e,e=[]);var i=n||this,a=Hi(ps(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?dt(r,i):r),this},t.prototype.selectRange=function(e){var r=this,n={},i=Ke(e);return N(i,function(a){var o=r._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,r,n){De(e)&&(n=r,r=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(r&&r.apply(this,arguments))},n),i},t.prototype.map=function(e,r,n,i){var a=n||i||this,o=Hi(ps(e),this._getStoreDimIndex,this),s=vh(this);return s._store=this._store.map(o,a?dt(r,a):r),s},t.prototype.modify=function(e,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&N(ps(e),function(u){var l=a.getDimensionInfo(u);l.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Hi(ps(e),this._getStoreDimIndex,this);this._store.modify(s,o?dt(r,o):r)},t.prototype.downSample=function(e,r,n,i){var a=vh(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),r,n,i),a},t.prototype.lttbDownSample=function(e,r){var n=vh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,n=this.getRawDataItem(e);return new Ct(n,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new q0(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return dh(e,n)},function(n){return dh(r,n)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},rl(e)?oe(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var n=this._itemVisuals[e],i=n&&n[r];return i??this.getVisual(r)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),he(a)?a=a.slice():rl(a)&&(a=oe({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,rl(r)?oe(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){rl(e)?oe(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?oe(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;c9(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){N(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Hi(this.dimensions,this._getDimInfo,this),this.hostModel)),X0(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];De(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(fp(arguments)))})},t.internalField=function(){B2=function(e){var r=e._invertedIndicesMap;N(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new WV(o.categories.length);for(var u=0;u<n.length;u++)n[u]=P2;for(var u=0;u<s.count();u++)n[s.get(a.storeDimIndex,u)]=u}})},nl=function(e,r,n){return pr(e._getCategory(r,n),null)},dh=function(e,r){var n=e._idList[r];return n==null&&e._idDimIdx!=null&&(n=nl(e,e._idDimIdx,r)),n==null&&(n=$V+r),n},ps=function(e){return he(e)||(e=e!=null?[e]:[]),e},vh=function(e){var r=new t(e._schema?e._schema:Hi(e.dimensions,e._getDimInfo,e),e.hostModel);return X0(r,e),r},X0=function(e,r){N(GV.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,N(UV,function(n){e[n]=$e(r[n])}),e._calculationInfo=oe({},r._calculationInfo)},K0=function(e,r){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[r],u=i[r];if(s==null&&a!=null&&(n[r]=s=nl(e,a,r)),u==null&&o!=null&&(i[r]=u=nl(e,o,r)),u==null&&s!=null){var l=e._nameRepeatCount,f=l[s]=(l[s]||0)+1;u=s,f>1&&(u+="__ec__"+f),i[r]=u}}}(),t}();function F2(t,e){h0(t)||(t=LS(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Ae(),a=[],o=YV(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&O2(o),u=n===t.dimensionsDefine,l=u?T2(t):A2(n),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(t,o));for(var c=Ae(f),h=new QS(o),d=0;d<h.length;d++)h[d]=-1;function p(S){var O=h[S];if(O<0){var E=n[S],P=we(E)?E:{name:E},F=new hh,B=P.name;B!=null&&l.get(B)!=null&&(F.name=F.displayName=B),P.type!=null&&(F.type=P.type),P.displayName!=null&&(F.displayName=P.displayName);var M=a.length;return h[S]=M,F.storeDimIndex=S,a.push(F),F}return a[O]}if(!s)for(var d=0;d<o;d++)p(d);c.each(function(S,O){var E=gt(S).slice();if(E.length===1&&!be(E[0])&&E[0]<0){c.set(O,!1);return}var P=c.set(O,[]);N(E,function(F,B){var M=be(F)?l.get(F):F;M!=null&&M<o&&(P[B]=M,v(p(M),O,B))})});var g=0;N(r,function(S){var O,E,P,F;if(be(S))O=S,F={};else{F=S,O=F.name;var B=F.ordinalMeta;F.ordinalMeta=null,F=oe({},F),F.ordinalMeta=B,E=F.dimsDef,P=F.otherDims,F.name=F.coordDim=F.coordDimIndex=F.dimsDef=F.otherDims=null}var M=c.get(O);if(M!==!1){if(M=gt(M),!M.length)for(var I=0;I<(E&&E.length||1);I++){for(;g<o&&p(g).coordDim!=null;)g++;g<o&&M.push(g++)}N(M,function(j,z){var W=p(j);if(u&&F.type!=null&&(W.type=F.type),v(je(W,F),O,z),W.name==null&&E){var R=E[z];!we(R)&&(R={name:R}),W.name=W.displayName=R.name,W.defaultTooltip=R.defaultTooltip}P&&je(W.otherDims,P)})}});function v(S,O,E){n0.get(O)!=null?S.otherDims[O]=E:(S.coordDim=O,S.coordDimIndex=E,i.set(O,!0))}var m=e.generateCoord,y=e.generateCoordCount,b=y!=null;y=m?y||1:0;var w=m||"value";function C(S){S.name==null&&(S.name=S.coordDim)}if(s)N(a,function(S){C(S)}),a.sort(function(S,O){return S.storeDimIndex-O.storeDimIndex});else for(var _=0;_<o;_++){var D=p(_),x=D.coordDim;x==null&&(D.coordDim=XV(w,i,b),D.coordDimIndex=0,(!m||y<=0)&&(D.isExtraCoord=!0),y--),C(D),D.type==null&&(yS(t,_)===jt.Must||D.isExtraCoord&&(D.otherDims.itemName!=null||D.otherDims.seriesName!=null))&&(D.type="ordinal")}return qV(a),new S2({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function qV(t){for(var e=Ae(),r=0;r<t.length;r++){var n=t[r],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function YV(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return N(e,function(a){var o;we(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function XV(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var KV=function(){function t(e){this.coordSysDims=[],this.axisMap=Ae(),this.categoryAxisMap=Ae(),this.coordSysName=e}return t}();function ZV(t){var e=t.get("coordinateSystem"),r=new KV(e),n=JV[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var JV={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",sn).models[0],a=t.getReferringComponents("yAxis",sn).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+_a(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+_a(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),gs(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),gs(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",sn).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),gs(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",sn).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),gs(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),gs(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(s,u){var l=i.getComponent("parallelAxis",s),f=o[u];r.set(f,l),gs(l)&&(n.set(f,l),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=u))})}};function gs(t){return t.get("type")==="category"}function QV(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;eH(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var u=!!(t&&t.get("stack")),l,f,c,h;if(N(a,function(y,b){be(y)&&(a[b]=y={name:y}),u&&!y.isExtraCoord&&(!n&&!l&&y.ordinalMeta&&(l=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(f=y))}),f&&!n&&!l&&(n=!0),f){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=f.coordDim,p=f.type,g=0;N(a,function(y){y.coordDim===d&&g++});var v={name:c,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(h,p),m.storeDimIndex=s.ensureCalculationDimension(c,p)),o.appendCalculationDimension(v),o.appendCalculationDimension(m)):(a.push(v),a.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:l&&l.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function eH(t){return!E2(t.schema)}function ms(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function tH(t,e){return ms(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rH(t,e){var r=t.get("coordinateSystem"),n=l0.get(r),i;return e&&e.coordSysDims&&(i=ye(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var u=s.get("type");o.type=zV(u)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function nH(t,e,r){var n,i;return r&&N(t,function(a,o){var s=a.coordDim,u=r.categoryAxisMap.get(s);u&&(n==null&&(n=o),a.ordinalMeta=u.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function Z0(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===qr;var o=ZV(e),s=rH(e,o),u=r.useEncodeDefaulter,l=De(u)?u:u?Dt(X7,s,e):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},c=F2(i,f),h=nH(c.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(c),p=QV(e,{schema:c,store:d}),g=new M2(c,e);g.setCalculationInfo(p);var v=h!=null&&iH(i)?function(m,y,b,w){return w===h?b:this.defaultDimValueGetter(m,y,b,w)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,v),g}function iH(t){if(t.sourceFormat===qr){var e=aH(t.data||[]);return!he(yu(e))}}function aH(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}var kn=function(){function t(e){this._setting=e||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype.unionExtent=function(e){var r=this._extent;e[0]<r[0]&&(r[0]=e[0]),e[1]>r[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();ec(kn);var oH=0,J0=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++oH}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&ye(n,sH);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!be(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ae(this.categories))},t}();function sH(t){return we(t)&&t.value!=null?t.value:t+""}function uH(t){var e=Math.pow(10,Jf(Math.abs(t))),r=Math.abs(t/e);return r===0||r===1||r===2||r===3||r===5}function Q0(t){return t.type==="interval"||t.type==="log"}function lH(t,e,r,n){var i={},a=t[1]-t[0],o=i.interval=sD(a/e);r!=null&&o<r&&(o=i.interval=r),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=L2(o),u=i.niceTickExtent=[Tt(Math.ceil(t[0]/o)*o,s),Tt(Math.floor(t[1]/o)*o,s)];return fH(u,t),i}function em(t){var e=Math.pow(10,Jf(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Tt(r*e)}function L2(t){return ai(t)+2}function I2(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function fH(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),I2(t,0,e),I2(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function ph(t,e){return t>=e[0]&&t<=e[1]}function gh(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function mh(t,e){return t*(e[1]-e[0])+e[0]}var tm=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new J0({})),he(i)&&(i=new J0({categories:ye(i,function(a){return we(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:be(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),ph(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),gh(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(mh(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,u=Math.min(s,n.length);o<u;++o){var l=n[o];i[o]=l,a[l]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;i.push(f),a[f]=o}},e.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(kn);kn.registerClass(tm);var eo=Tt,ys=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return ph(r,this._extent)},e.prototype.normalize=function(r){return gh(r,this._extent)},e.prototype.scale=function(r){return mh(r,this._extent)},e.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(r){var n=this._extent;r[0]<n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=L2(r)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var u=1e4;i[0]<a[0]&&(r?s.push({value:eo(a[0]-n,o)}):s.push({value:i[0]}));for(var l=a[0];l<=a[1]&&(s.push({value:l}),l=eo(l+n,o),l!==s[s.length-1].value);)if(s.length>u)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(r?s.push({value:eo(f+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],u=n[o-1],l=0,f=[],c=s.value-u.value,h=c/r;l<r-1;){var d=eo(u.value+(l+1)*h);d>a[0]&&d<a[1]&&f.push(d),l++}i.push(f)}return i},e.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=ai(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=eo(r.value,i,!0);return uS(a)},e.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=lH(a,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval;r.fixMin||(n[0]=eo(Math.floor(n[0]/o)*o)),r.fixMax||(n[1]=eo(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},e.type="interval",e}(kn);kn.registerClass(ys);var R2=typeof Float32Array<"u",cH=R2?Float32Array:Array;function vi(t){return he(t)?R2?new Float32Array(t):t:new cH(t)}var hH="__ec_stack_";function rm(t){return t.get("stack")||hH+t.seriesIndex}function nm(t){return t.dim+t.index}function N2(t,e){var r=[];return e.eachSeriesByType(t,function(n){z2(n)&&r.push(n)}),r}function dH(t){var e={};N(t,function(u){var l=u.coordinateSystem,f=l.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var c=u.getData(),h=f.dim+"_"+f.index,d=c.getDimensionIndex(c.mapDimension(f.dim)),p=c.getStore(),g=0,v=p.count();g<v;++g){var m=p.get(d,g);e[h]?e[h].push(m):e[h]=[m]}});var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(u,l){return u-l});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function k2(t){var e=dH(t),r=[];return N(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var u=a.dim+"_"+a.index,l=e[u],f=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=l?f/h*l:f}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=ut(n.get("barWidth"),s),g=ut(n.get("barMaxWidth"),s),v=ut(n.get("barMinWidth")||(j2(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:v,barGap:m,barCategoryGap:y,axisKey:nm(a),stackId:rm(n)})}),vH(r)}function vH(t){var e={};N(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},u=s.stacks;e[a]=s;var l=n.stackId;u[l]||s.autoWidthCount++,u[l]=u[l]||{width:0,maxWidth:0};var f=n.barWidth;f&&!u[l].width&&(u[l].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(u[l].maxWidth=c);var h=n.barMinWidth;h&&(u[l].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var u=Ke(a).length;s=Math.max(35-u*4,15)+"%"}var l=ut(s,o),f=ut(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,d=(c-l)/(h+(h-1)*f);d=Math.max(d,0),N(a,function(m){var y=m.maxWidth,b=m.minWidth;if(m.width){var w=m.width;y&&(w=Math.min(w,y)),b&&(w=Math.max(w,b)),m.width=w,c-=w+f*w,h--}else{var w=d;y&&y<w&&(w=Math.min(y,c)),b&&b>w&&(w=b),w!==d&&(m.width=w,c-=w+f*w,h--)}}),d=(c-l)/(h+(h-1)*f),d=Math.max(d,0);var p=0,g;N(a,function(m,y){m.width||(m.width=d),g=m,p+=m.width*(1+f)}),g&&(p-=g.width*f);var v=-p/2;N(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:v,width:m.width},v+=m.width*(1+f)})}),r}function pH(t,e,r){if(t&&e){var n=t[nm(e)];return n!=null&&r!=null?n[rm(r)]:n}}function gH(t,e){var r=N2(t,e),n=k2(r);N(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),u=rm(i),l=n[nm(s)][u],f=l.offset,c=l.width;a.setLayout({bandWidth:l.bandWidth,offset:f,size:c})})}function mH(t){return{seriesType:t,plan:D0(),reset:function(e){if(z2(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),u=e.get("showBackground",!0),l=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),c=ms(r,l)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=yH(i,a),p=j2(e),g=e.get("barMinHeight")||0,v=f&&r.getDimensionIndex(f),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(b,w){for(var C=b.count,_=p&&vi(C*3),D=p&&u&&vi(C*3),x=p&&vi(C),S=n.master.getRect(),O=h?S.width:S.height,E,P=w.getStore(),F=0;(E=b.next())!=null;){var B=P.get(c?v:o,E),M=P.get(s,E),I=d,j=void 0;c&&(j=+B-P.get(o,E));var z=void 0,W=void 0,R=void 0,U=void 0;if(h){var Z=n.dataToPoint([B,M]);if(c){var ee=n.dataToPoint([j,M]);I=ee[0]}z=I,W=Z[1]+y,R=Z[0]-I,U=m,Math.abs(R)<g&&(R=(R<0?-1:1)*g)}else{var Z=n.dataToPoint([M,B]);if(c){var ee=n.dataToPoint([M,j]);I=ee[1]}z=Z[0]+y,W=I,R=m,U=Z[1]-I,Math.abs(U)<g&&(U=(U<=0?-1:1)*g)}p?(_[F]=z,_[F+1]=W,_[F+2]=h?R:U,D&&(D[F]=h?S.x:z,D[F+1]=h?W:S.y,D[F+2]=O),x[E]=E):w.setItemLayout(E,{x:z,y:W,width:R,height:U}),F+=3}p&&w.setLayout({largePoints:_,largeDataIndices:x,largeBackgroundPoints:D,valueAxisHorizontal:h})}}}}}}function z2(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function j2(t){return t.pipelineContext&&t.pipelineContext.large}function yH(t,e){var r=e.model.get("startValue");return r||(r=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?r>0?r:1:r))}var bH=function(t,e,r,n){for(;r<n;){var i=r+n>>>1;t[i][1]<e?r=i+1:n=i}return r},V2=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="time",n}return e.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return Rc(r.value,Jx[j7(as(this._minLevelUnit))]||Jx.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return V7(r,n,i,o,a)},e.prototype.getTicks=function(){var r=this._interval,n=this._extent,i=[];if(!r)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=EH(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Ur,n[1]+=Ur),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Ur}this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=yh.length,u=Math.min(bH(yh,this._approxInterval,0,s),s-1);this._interval=yh[u][1],this._minLevelUnit=yh[Math.max(u-1,0)][0]},e.prototype.parse=function(r){return nt(r)?r:+oi(r)},e.prototype.contain=function(r){return ph(this.parse(r),this._extent)},e.prototype.normalize=function(r){return gh(this.parse(r),this._extent)},e.prototype.scale=function(r){return mh(r,this._extent)},e.type="time",e}(ys),yh=[["second",Kg],["minute",Zg],["hour",Lu],["quarter-day",Lu*6],["half-day",Lu*12],["day",Ur*1.2],["half-week",Ur*3.5],["week",Ur*7],["month",Ur*31],["quarter",Ur*95],["half-year",Zx/2],["year",Zx]];function CH(t,e,r,n){var i=oi(e),a=oi(r),o=function(p){return tS(i,p,n)===tS(a,p,n)},s=function(){return o("year")},u=function(){return s()&&o("month")},l=function(){return u()&&o("day")},f=function(){return l()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},d=function(){return h()&&o("millisecond")};switch(t){case"year":return s();case"month":return u();case"day":return l();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return d()}}function wH(t,e){return t/=Ur,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function _H(t){var e=30*Ur;return t/=e,t>6?6:t>3?3:t>2?2:1}function DH(t){return t/=Lu,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function H2(t,e){return t/=e?Zg:Kg,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function xH(t){return sD(t)}function SH(t,e,r){var n=new Date(t);switch(as(e)){case"year":case"month":n[rS(r)](0);case"day":n[nS(r)](1);case"hour":n[iS(r)](0);case"minute":n[aS(r)](0);case"second":n[oS(r)](0),n[sS(r)](0)}return n.getTime()}function EH(t,e,r,n){var i=1e4,a=Qx,o=0;function s(O,E,P,F,B,M,I){for(var j=new Date(E),z=E,W=j[F]();z<P&&z<=n[1];)I.push({value:z}),W+=O,j[B](W),z=j.getTime();I.push({value:z,notAdd:!0})}function u(O,E,P){var F=[],B=!E.length;if(!CH(as(O),n[0],n[1],r)){B&&(E=[{value:SH(new Date(n[0]),O,r)},{value:n[1]}]);for(var M=0;M<E.length-1;M++){var I=E[M].value,j=E[M+1].value;if(I!==j){var z=void 0,W=void 0,R=void 0,U=!1;switch(O){case"year":z=Math.max(1,Math.round(e/Ur/365)),W=Qg(r),R=H7(r);break;case"half-year":case"quarter":case"month":z=_H(e),W=os(r),R=rS(r);break;case"week":case"half-week":case"day":z=wH(e),W=Nc(r),R=nS(r),U=!0;break;case"half-day":case"quarter-day":case"hour":z=DH(e),W=Ru(r),R=iS(r);break;case"minute":z=H2(e,!0),W=kc(r),R=aS(r);break;case"second":z=H2(e,!1),W=zc(r),R=oS(r);break;case"millisecond":z=xH(e),W=jc(r),R=sS(r);break}s(z,I,j,W,R,U,F),O==="year"&&P.length>1&&M===0&&P.unshift({value:P[0].value-z})}}for(var M=0;M<F.length;M++)P.push(F[M]);return F}}for(var l=[],f=[],c=0,h=0,d=0;d<a.length&&o++<i;++d){var p=as(a[d]);if(z7(a[d])){u(a[d],l[l.length-1]||[],f);var g=a[d+1]?as(a[d+1]):null;if(p!==g){if(f.length){h=c,f.sort(function(O,E){return O.value-E.value});for(var v=[],m=0;m<f.length;++m){var y=f[m].value;(m===0||f[m-1].value!==y)&&(v.push(f[m]),y>=n[0]&&y<=n[1]&&c++)}var b=(n[1]-n[0])/e;if(c>b*1.5&&h>b/1.5||(l.push(v),c>b||t===a[d]))break}f=[]}}}process.env.NODE_ENV!=="production"&&o>=i&&xt("Exceed safe limit.");for(var w=bt(ye(l,function(O){return bt(O,function(E){return E.value>=n[0]&&E.value<=n[1]&&!E.notAdd})}),function(O){return O.length>0}),C=[],_=w.length-1,d=0;d<w.length;++d)for(var D=w[d],x=0;x<D.length;++x)C.push({value:D[x].value,level:_-d});C.sort(function(O,E){return O.value-E.value});for(var S=[],d=0;d<C.length;++d)(d===0||C[d].value!==C[d-1].value)&&S.push(C[d]);return S}kn.registerClass(V2);var W2=kn.prototype,il=ys.prototype,AH=Tt,TH=Math.floor,OH=Math.ceil,bh=Math.pow,hn=Math.log,im=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new ys,r._interval=0,r}return e.prototype.getTicks=function(r){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=il.getTicks.call(this,r);return ye(o,function(s){var u=s.value,l=Tt(bh(this.base,u));return l=u===i[0]&&this._fixMin?Ch(l,a[0]):l,l=u===i[1]&&this._fixMax?Ch(l,a[1]):l,{value:l}},this)},e.prototype.setExtent=function(r,n){var i=hn(this.base);r=hn(Math.max(0,r))/i,n=hn(Math.max(0,n))/i,il.setExtent.call(this,r,n)},e.prototype.getExtent=function(){var r=this.base,n=W2.getExtent.call(this);n[0]=bh(r,n[0]),n[1]=bh(r,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=Ch(n[0],a[0])),this._fixMax&&(n[1]=Ch(n[1],a[1])),n},e.prototype.unionExtent=function(r){this._originalScale.unionExtent(r);var n=this.base;r[0]=hn(r[0])/hn(n),r[1]=hn(r[1])/hn(n),W2.unionExtent.call(this,r)},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=Zk(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Tt(OH(n[0]/a)*a),Tt(TH(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){il.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=hn(r)/hn(this.base),ph(r,this._extent)},e.prototype.normalize=function(r){return r=hn(r)/hn(this.base),gh(r,this._extent)},e.prototype.scale=function(r){return r=mh(r,this._extent),bh(this.base,r)},e.type="log",e}(kn),$2=im.prototype;$2.getMinorTicks=il.getMinorTicks,$2.getLabel=il.getLabel;function Ch(t,e){return AH(t,ai(e))}kn.registerClass(im);var PH=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;De(o)?this._modelMinNum=wh(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=wh(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(De(s)?this._modelMaxNum=wh(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=wh(e,s)),i)this._axisDataLen=r.getCategories().length;else{var u=r.get("boundaryGap"),l=he(u)?u:[u||0,u||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Bi(l[0],1),Bi(l[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,u=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,l=s!=null,f=u!=null;s==null&&(s=e?i?0:NaN:r-a[0]*o),u==null&&(u=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(u==null||!isFinite(u))&&(u=NaN);var c=Fo(s)||Fo(u)||e&&!i;this._needCrossZero&&(s>0&&u>0&&!l&&(s=0),s<0&&u<0&&!f&&(u=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,l=!0),d!=null&&(u=d,f=!0),{min:s,max:u,minFixed:l,maxFixed:f,isBlank:c}},t.prototype.modifyDataMinMax=function(e,r){process.env.NODE_ENV!=="production"&&Ee(!this.frozen),this[MH[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=BH[e];process.env.NODE_ENV!=="production"&&Ee(!this.frozen&&this[n]==null),this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),BH={min:"_determinedMin",max:"_determinedMax"},MH={min:"_dataMin",max:"_dataMax"};function FH(t,e,r){var n=t.rawExtentInfo;return n||(n=new PH(t,e,r),t.rawExtentInfo=n,n)}function wh(t,e){return e==null?null:Fo(e)?NaN:t.parse(e)}function G2(t,e){var r=t.type,n=FH(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=N2("bar",o),u=!1;if(N(s,function(c){u=u||c.getBaseAxis()===e.axis}),u){var l=k2(s),f=LH(i,a,e,l);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function LH(t,e,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=pH(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;N(o,function(d){s=Math.min(d.offset,s)});var u=-1/0;N(o,function(d){u=Math.max(d.offset+d.width,u)}),s=Math.abs(s),u=Math.abs(u);var l=s+u,f=e-t,c=1-(s+u)/a,h=f/c-f;return e+=h*(u/l),t-=h*(s/l),{min:t,max:e}}function U2(t,e){var r=e,n=G2(t,r),i=n.extent,a=r.get("splitNumber");t instanceof im&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),u=o==="interval"||o==="time";t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:u?r.get("minInterval"):null,maxInterval:u?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function IH(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new tm({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new V2({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(kn.getClass(e)||ys)}}function RH(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function bs(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(n){return function(i,a){return t.scale.getFormattedLabel(i,a,n)}}(e):be(e)?function(n){return function(i){var a=t.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):De(e)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(am(t,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return t.scale.getLabel(n)}}function am(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function NH(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof tm?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=bs(t),u,l=1;i>40&&(l=Math.ceil(i/40));for(var f=0;f<i;f+=l){var c=n?n[f]:{value:a[0]+f},h=s(c,f),d=o.getTextRect(h),p=kH(d,o.get("rotate")||0);u?u.union(p):u=p}return u}}function kH(t,e){var r=e*Math.PI/180,n=t.width,i=t.height,a=n*Math.abs(Math.cos(r))+Math.abs(i*Math.sin(r)),o=n*Math.abs(Math.sin(r))+Math.abs(i*Math.cos(r)),s=new Ue(t.x,t.y,a,o);return s}function om(t){var e=t.get("interval");return e??"auto"}function q2(t){return t.type==="category"&&om(t.getLabelModel())===0}function zH(t,e){var r={};return N(t.mapDimensionsAll(e),function(n){r[tH(t,n)]=!0}),Ke(r)}var jH=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),Y2=[],VH={registerPreprocessor:C2,registerProcessor:w2,registerPostInit:BV,registerPostUpdate:MV,registerUpdateLifecycle:G0,registerAction:vs,registerCoordinateSystem:FV,registerLayout:LV,registerVisual:Qa,registerTransform:RV,registerLoading:D2,registerMap:IV,registerImpl:cV,PRIORITY:xV,ComponentModel:Ze,ComponentView:Br,SeriesModel:fn,ChartView:Zr,registerComponentModel:function(t){Ze.registerClass(t)},registerComponentView:function(t){Br.registerClass(t)},registerSeriesModel:function(t){fn.registerClass(t)},registerChartView:function(t){Zr.registerClass(t)},registerSubTypeDefaulter:function(t,e){Ze.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Gk(t,e)}};function Wi(t){if(he(t)){N(t,function(e){Wi(e)});return}Ge(Y2,t)>=0||(Y2.push(t),De(t)&&(t={install:t}),t.install(VH))}var al=lt();function X2(t,e){var r=ye(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function HH(t){var e=t.getLabelModel().get("customValues");if(e){var r=bs(t);return{labels:X2(t,e).map(function(n){var i={value:n};return{formattedLabel:r(i),rawLabel:t.scale.getLabel(i),tickValue:n}})}}return t.type==="category"?$H(t):UH(t)}function WH(t,e){var r=t.getTickModel().get("customValues");return r?{ticks:X2(t,r)}:t.type==="category"?GH(t,e):{ticks:ye(t.scale.getTicks(),function(n){return n.value})}}function $H(t){var e=t.getLabelModel(),r=K2(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function K2(t,e){var r=Z2(t,"labels"),n=om(e),i=J2(r,n);if(i)return i;var a,o;return De(n)?a=tA(t,n):(o=n==="auto"?qH(t):n,a=eA(t,o)),Q2(r,n,{labels:a,labelCategoryInterval:o})}function GH(t,e){var r=Z2(t,"ticks"),n=om(e),i=J2(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),De(n))a=tA(t,n,!0);else if(n==="auto"){var s=K2(t,t.getLabelModel());o=s.labelCategoryInterval,a=ye(s.labels,function(u){return u.tickValue})}else o=n,a=eA(t,o,!0);return Q2(r,n,{ticks:a,tickCategoryInterval:o})}function UH(t){var e=t.scale.getTicks(),r=bs(t);return{labels:ye(e,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value}})}}function Z2(t,e){return al(t)[e]||(al(t)[e]=[])}function J2(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function Q2(t,e,r){return t.push({key:e,value:r}),r}function qH(t){var e=al(t).autoInterval;return e??(al(t).autoInterval=t.calculateCategoryInterval())}function YH(t){var e=XH(t),r=bs(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var u=a[0],l=t.dataToCoord(u+1)-t.dataToCoord(u),f=Math.abs(l*Math.cos(n)),c=Math.abs(l*Math.sin(n)),h=0,d=0;u<=a[1];u+=s){var p=0,g=0,v=Yp(r({value:u}),e.font,"center","top");p=v.width*1.3,g=v.height*1.3,h=Math.max(h,p,7),d=Math.max(d,g,7)}var m=h/f,y=d/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(m,y))),w=al(t.model),C=t.getExtent(),_=w.lastAutoInterval,D=w.lastTickCount;return _!=null&&D!=null&&Math.abs(_-b)<=1&&Math.abs(D-o)<=1&&_>b&&w.axisExtent0===C[0]&&w.axisExtent1===C[1]?b=_:(w.lastTickCount=o,w.lastAutoInterval=b,w.axisExtent0=C[0],w.axisExtent1=C[1]),b}function XH(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function eA(t,e,r){var n=bs(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],u=Math.max((e||0)+1,1),l=a[0],f=i.count();l!==0&&u>1&&f/u>2&&(l=Math.round(Math.ceil(l/u)*u));var c=q2(t),h=o.get("showMinLabel")||c,d=o.get("showMaxLabel")||c;h&&l!==a[0]&&g(a[0]);for(var p=l;p<=a[1];p+=u)g(p);d&&p-u!==a[1]&&g(a[1]);function g(v){var m={value:v};s.push(r?v:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:v})}return s}function tA(t,e,r){var n=t.scale,i=bs(t),a=[];return N(n.getTicks(),function(o){var s=n.getLabel(o),u=o.value;e(o.value,s)&&a.push(r?u:{formattedLabel:i(o),rawLabel:s,tickValue:u})}),a}var rA=[0,1],KH=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return qk(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),nA(n,i.count())),eg(e,rA,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),nA(n,i.count()));var a=eg(e,n,rA,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=WH(this,r),i=n.ticks,a=ye(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return ZH(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=ye(n,function(a){return ye(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(){return HH(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return YH(this)},t}();function nA(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function ZH(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var u=e[i-1].tickValue-e[0].tickValue,l=(e[i-1].coord-e[0].coord)/u;N(e,function(d){d.coord-=l/2});var f=t.scale.getExtent();s=1+f[1]-e[i-1].tickValue,o={coord:e[i-1].coord+l*s},e.push(o)}var c=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(d,p){return d=Tt(d),p=Tt(p),c?d>p:d<p}}var ol=Math.PI*2,to=ui.CMD,JH=["top","right","bottom","left"];function QH(t,e,r,n,i){var a=r.width,o=r.height;switch(t){case"top":n.set(r.x+a/2,r.y-e),i.set(0,-1);break;case"bottom":n.set(r.x+a/2,r.y+o+e),i.set(0,1);break;case"left":n.set(r.x-e,r.y+o/2),i.set(-1,0);break;case"right":n.set(r.x+a+e,r.y+o/2),i.set(1,0);break}}function eW(t,e,r,n,i,a,o,s,u){o-=t,s-=e;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var f=o*r+t,c=s*r+e;if(Math.abs(n-i)%ol<1e-4)return u[0]=f,u[1]=c,l-r;if(a){var h=n;n=li(i),i=li(h)}else n=li(n),i=li(i);n>i&&(i+=ol);var d=Math.atan2(s,o);if(d<0&&(d+=ol),d>=n&&d<=i||d+ol>=n&&d+ol<=i)return u[0]=f,u[1]=c,l-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,v=r*Math.cos(i)+t,m=r*Math.sin(i)+e,y=(p-o)*(p-o)+(g-s)*(g-s),b=(v-o)*(v-o)+(m-s)*(m-s);return y<b?(u[0]=p,u[1]=g,Math.sqrt(y)):(u[0]=v,u[1]=m,Math.sqrt(b))}function _h(t,e,r,n,i,a,o,s){var u=i-t,l=a-e,f=r-t,c=n-e,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var d=u*f+l*c,p=d/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var g=o[0]=t+p*f,v=o[1]=e+p*c;return Math.sqrt((g-i)*(g-i)+(v-a)*(v-a))}function iA(t,e,r,n,i,a,o){r<0&&(t=t+r,r=-r),n<0&&(e=e+n,n=-n);var s=t+r,u=e+n,l=o[0]=Math.min(Math.max(i,t),s),f=o[1]=Math.min(Math.max(a,e),u);return Math.sqrt((l-i)*(l-i)+(f-a)*(f-a))}var dn=[];function tW(t,e,r){var n=iA(e.x,e.y,e.width,e.height,t.x,t.y,dn);return r.set(dn[0],dn[1]),n}function rW(t,e,r){for(var n=0,i=0,a=0,o=0,s,u,l=1/0,f=e.data,c=t.x,h=t.y,d=0;d<f.length;){var p=f[d++];d===1&&(n=f[d],i=f[d+1],a=n,o=i);var g=l;switch(p){case to.M:a=f[d++],o=f[d++],n=a,i=o;break;case to.L:g=_h(n,i,f[d],f[d+1],c,h,dn,!0),n=f[d++],i=f[d++];break;case to.C:g=P_(n,i,f[d++],f[d++],f[d++],f[d++],f[d],f[d+1],c,h,dn),n=f[d++],i=f[d++];break;case to.Q:g=F_(n,i,f[d++],f[d++],f[d],f[d+1],c,h,dn),n=f[d++],i=f[d++];break;case to.A:var v=f[d++],m=f[d++],y=f[d++],b=f[d++],w=f[d++],C=f[d++];d+=1;var _=!!(1-f[d++]);s=Math.cos(w)*y+v,u=Math.sin(w)*b+m,d<=1&&(a=s,o=u);var D=(c-v)*b/y+v;g=eW(v,m,b,w,w+C,_,D,h,dn),n=Math.cos(w+C)*y+v,i=Math.sin(w+C)*b+m;break;case to.R:a=n=f[d++],o=i=f[d++];var x=f[d++],S=f[d++];g=iA(a,o,x,S,c,h,dn);break;case to.Z:g=_h(n,i,a,o,c,h,dn,!0),n=a,i=o;break}g<l&&(l=g,r.set(dn[0],dn[1]))}return l}var vn=new _e,st=new _e,wt=new _e,zn=new _e,jn=new _e;function aA(t,e){if(t){var r=t.getTextGuideLine(),n=t.getTextContent();if(n&&r){var i=t.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||JH,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var u=1/0,l=i.anchor,f=t.getComputedTransform(),c=f&&Tf([],f),h=e.get("length2")||0;l&&wt.copy(l);for(var d=0;d<o.length;d++){var p=o[d];QH(p,0,s,vn,zn),_e.scaleAndAdd(st,vn,zn,h),st.transform(c);var g=t.getBoundingRect(),v=l?l.distance(st):t instanceof Ve?rW(st,t.path,wt):tW(st,g,wt);v<u&&(u=v,st.transform(f),wt.transform(f),wt.toArray(a[0]),st.toArray(a[1]),vn.toArray(a[2]))}oA(a,e.get("minTurnAngle")),r.setShape({points:a})}}}var Dh=[],or=new _e;function oA(t,e){if(e<=180&&e>0){e=e/180*Math.PI,vn.fromArray(t[0]),st.fromArray(t[1]),wt.fromArray(t[2]),_e.sub(zn,vn,st),_e.sub(jn,wt,st);var r=zn.len(),n=jn.len();if(!(r<.001||n<.001)){zn.scale(1/r),jn.scale(1/n);var i=zn.dot(jn),a=Math.cos(e);if(a<i){var o=_h(st.x,st.y,wt.x,wt.y,vn.x,vn.y,Dh,!1);or.fromArray(Dh),or.scaleAndAdd(jn,o/Math.tan(Math.PI-e));var s=wt.x!==st.x?(or.x-st.x)/(wt.x-st.x):(or.y-st.y)/(wt.y-st.y);if(isNaN(s))return;s<0?_e.copy(or,st):s>1&&_e.copy(or,wt),or.toArray(t[1])}}}}function nW(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,vn.fromArray(t[0]),st.fromArray(t[1]),wt.fromArray(t[2]),_e.sub(zn,st,vn),_e.sub(jn,wt,st);var n=zn.len(),i=jn.len();if(!(n<.001||i<.001)){zn.scale(1/n),jn.scale(1/i);var a=zn.dot(e),o=Math.cos(r);if(a<o){var s=_h(st.x,st.y,wt.x,wt.y,vn.x,vn.y,Dh,!1);or.fromArray(Dh);var u=Math.PI/2,l=Math.acos(jn.dot(e)),f=u+l-r;if(f>=u)_e.copy(or,wt);else{or.scaleAndAdd(jn,s/Math.tan(Math.PI/2-f));var c=wt.x!==st.x?(or.x-st.x)/(wt.x-st.x):(or.y-st.y)/(wt.y-st.y);if(isNaN(c))return;c<0?_e.copy(or,st):c>1&&_e.copy(or,wt)}or.toArray(t[1])}}}}function sm(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function iW(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=dp(n[0],n[1]),a=dp(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Af([],n[1],n[0],o/i),u=Af([],n[1],n[2],o/a),l=Af([],s,u,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),t.bezierCurveTo(u[0],u[1],u[0],u[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)t.lineTo(n[f][0],n[f][1])}function sA(t,e,r){var n=t.getTextGuideLine(),i=t.getTextContent();if(!i){n&&t.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,u=0;u<lc.length;u++){var l=lc[u],f=e[l],c=l==="normal";if(f){var h=f.get("show"),d=c?s:Be(i.states[l]&&i.states[l].ignore,s);if(d||!Be(h,o)){var p=c?n:n&&n.states[l];p&&(p.ignore=!0),n&&sm(n,!0,l,f);continue}n||(n=new Pu,t.setTextGuideLine(n),!c&&(s||!o)&&sm(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),sm(n,!1,l,f)}}if(n){je(n.style,r),n.style.fill=null;var g=a.get("showAbove"),v=t.textGuideLineConfig=t.textGuideLineConfig||{};v.showAbove=g||!1,n.buildPath=iW}}function uA(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},n=0;n<Gr.length;n++){var i=Gr[n];r[i]=t.getModel([i,e])}return r}function lA(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,u=i.style.margin||0,l=o.clone();l.applyTransform(a),l.x-=u/2,l.y-=u/2,l.width+=u,l.height+=u;var f=s?new xc(o,a):null;e.push({label:i,labelLine:n.labelLine,rect:l,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return e}function fA(t,e,r,n,i,a){var o=t.length;if(o<2)return;t.sort(function(x,S){return x.rect[e]-S.rect[e]});for(var s=0,u,l=!1,f=0,c=0;c<o;c++){var h=t[c],d=h.rect;u=d[e]-s,u<0&&(d[e]-=u,h.label[e]-=u,l=!0);var p=Math.max(-u,0);f+=p,s=d[e]+d[r]}f>0&&a&&C(-f/o,0,o);var g=t[0],v=t[o-1],m,y;b(),m<0&&_(-m,.8),y<0&&_(y,.8),b(),w(m,y,1),w(y,m,-1),b(),m<0&&D(-m),y<0&&D(y);function b(){m=g.rect[e]-n,y=i-v.rect[e]-v.rect[r]}function w(x,S,O){if(x<0){var E=Math.min(S,-x);if(E>0){C(E*O,0,o);var P=E+x;P<0&&_(-P*O,1)}else _(-x*O,1)}}function C(x,S,O){x!==0&&(l=!0);for(var E=S;E<O;E++){var P=t[E],F=P.rect;F[e]+=x,P.label[e]+=x}}function _(x,S){for(var O=[],E=0,P=1;P<o;P++){var F=t[P-1].rect,B=Math.max(t[P].rect[e]-F[e]-F[r],0);O.push(B),E+=B}if(E){var M=Math.min(Math.abs(x)/E,S);if(x>0)for(var P=0;P<o-1;P++){var I=O[P]*M;C(I,0,P+1)}else for(var P=o-1;P>0;P--){var I=O[P-1]*M;C(-I,P,o)}}}function D(x){var S=x<0?-1:1;x=Math.abs(x);for(var O=Math.ceil(x/(o-1)),E=0;E<o-1;E++)if(S>0?C(O,0,E+1):C(-O,o-E-1,o),x-=O,x<=0)return}return l}function aW(t,e,r,n){return fA(t,"x","width",e,r,n)}function cA(t,e,r,n){return fA(t,"y","height",e,r,n)}function hA(t){var e=[];t.sort(function(g,v){return v.priority-g.priority});var r=new Ue(0,0,0,0);function n(g){if(!g.ignore){var v=g.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}g.ignore=!0}for(var i=0;i<t.length;i++){var a=t[i],o=a.axisAligned,s=a.localRect,u=a.transform,l=a.label,f=a.labelLine;r.copy(a.rect),r.width-=.1,r.height-=.1,r.x+=.05,r.y+=.05;for(var c=a.obb,h=!1,d=0;d<e.length;d++){var p=e[d];if(r.intersect(p.rect)){if(o&&p.axisAligned){h=!0;break}if(p.obb||(p.obb=new xc(p.localRect,p.transform)),c||(c=new xc(s,u)),c.intersect(p.obb)){h=!0;break}}}h?(n(l),f&&n(f)):(l.attr("ignore",a.defaultAttr.ignore),f&&f.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function oW(t){if(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].slice());return e}}function sW(t,e){var r=t.label,n=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:oW(n&&n.shape.points)}}var dA=["align","verticalAlign","width","height","fontSize"],sr=new pu,um=lt(),uW=lt();function xh(t,e,r){for(var n=0;n<r.length;n++){var i=r[n];e[i]!=null&&(t[i]=e[i])}}var Sh=["x","y","rotation"],lW=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(e,r,n,i,a){var o=i.style,s=i.__hostTarget,u=s.textConfig||{},l=i.getComputedTransform(),f=i.getBoundingRect().plain();Ue.applyTransform(f,f,l),l?sr.setLocalTransform(l):(sr.x=sr.y=sr.rotation=sr.originX=sr.originY=0,sr.scaleX=sr.scaleY=1),sr.rotation=li(sr.rotation);var c=i.__hostTarget,h;if(c){h=c.getBoundingRect().plain();var d=c.getComputedTransform();Ue.applyTransform(h,h,d)}var p=h&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:e,dataType:r,layoutOption:a,computedLayoutOption:null,rect:f,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:sr.x,y:sr.y,scaleX:sr.scaleX,scaleY:sr.scaleY,rotation:sr.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:u.position,attachedRot:u.rotation}})},t.prototype.addLabelsOfSeries=function(e){var r=this;this._chartViewList.push(e);var n=e.__model,i=n.get("labelLayout");(De(i)||Ke(i).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=He(a);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,n,o,i)})},t.prototype.updateLayoutConfig=function(e){var r=e.getWidth(),n=e.getHeight();function i(b,w){return function(){aA(b,w)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,u=s.__hostTarget,l=o.defaultAttr,f=void 0;De(o.layoutOption)?f=o.layoutOption(sW(o,u)):f=o.layoutOption,f=f||{},o.computedLayoutOption=f;var c=Math.PI/180;u&&u.setTextConfig({local:!1,position:f.x!=null||f.y!=null?null:l.attachedPos,rotation:f.rotate!=null?f.rotate*c:l.attachedRot,offset:[f.dx||0,f.dy||0]});var h=!1;if(f.x!=null?(s.x=ut(f.x,r),s.setStyle("x",0),h=!0):(s.x=l.x,s.setStyle("x",l.style.x)),f.y!=null?(s.y=ut(f.y,n),s.setStyle("y",0),h=!0):(s.y=l.y,s.setStyle("y",l.style.y)),f.labelLinePoints){var d=u.getTextGuideLine();d&&(d.setShape({points:f.labelLinePoints}),h=!1)}var p=um(s);p.needsUpdateLabelLine=h,s.rotation=f.rotate!=null?f.rotate*c:l.rotation,s.scaleX=l.scaleX,s.scaleY=l.scaleY;for(var g=0;g<dA.length;g++){var v=dA[g];s.setStyle(v,f[v]!=null?f[v]:l.style[v])}if(f.draggable){if(s.draggable=!0,s.cursor="move",u){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",i(u,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=l.cursor}},t.prototype.layout=function(e){var r=e.getWidth(),n=e.getHeight(),i=lA(this._labelList),a=bt(i,function(u){return u.layoutOption.moveOverlap==="shiftX"}),o=bt(i,function(u){return u.layoutOption.moveOverlap==="shiftY"});aW(a,0,r),cA(o,0,n);var s=bt(i,function(u){return u.layoutOption.hideOverlap});hA(s)},t.prototype.processLabelsOverall=function(){var e=this;N(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,u=o.getTextContent();!s&&u&&(s=um(u).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),a&&e._animateLabels(o,n)})})},t.prototype._updateLabelLine=function(e,r){var n=e.getTextContent(),i=He(e),a=i.dataIndex;if(n&&a!=null){var o=r.getData(i.dataType),s=o.getItemModel(a),u={},l=o.getItemVisual(a,"style");if(l){var f=o.getVisual("drawType");u.stroke=l[f]}var c=s.getModel("labelLine");sA(e,uA(s),u),aA(e,c)}},t.prototype._animateLabels=function(e,r){var n=e.getTextContent(),i=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!rs(e))){var a=um(n),o=a.oldLayout,s=He(e),u=s.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},f=r.getData(s.dataType);if(o){n.attr(o);var h=e.prevStates;h&&(Ge(h,"select")>=0&&n.attr(a.oldLayoutSelect),Ge(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Ft(n,l,r,u)}else if(n.attr(l),!ns(n).valueAnimation){var c=Be(n.style.opacity,1);n.style.opacity=0,qt(n,{style:{opacity:c}},r,u)}if(a.oldLayout=l,n.states.select){var d=a.oldLayoutSelect={};xh(d,l,Sh),xh(d,n.states.select,Sh)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};xh(p,l,Sh),xh(p,n.states.emphasis,Sh)}x7(n,u,f,r,r)}if(i&&!i.ignore&&!i.invisible){var a=uW(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Ft(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,qt(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),lm=lt();function fW(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=lm(r).labelManager;i||(i=lm(r).labelManager=new lW),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=lm(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var cW=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Z0(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var n=new It,i=hs("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,u=r.itemHeight*.8,l=hs(s,(r.itemWidth-u)/2,(r.itemHeight-u)/2,u,u,r.itemStyle.fill);n.add(l),l.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return l.rotation=f*Math.PI/180,l.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(l.style.stroke=l.style.fill,l.style.fill="#fff",l.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(fn);function fm(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=ls(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(ls(t,e,r[o]));return a.join(" ")}}function vA(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!he(e))return e+"";for(var n=[],i=0;i<r.length;i++){var a=t.getDimensionIndex(r[i]);a>=0&&n.push(e[a])}return n.join(" ")}var cm=function(t){ce(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=hs(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=hW,this._symbolType=r,this.add(s)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){dc(this.childAt(0))},e.prototype.downplay=function(){vc(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,u=e.getSymbolSize(r,n),l=o!==this._symbolType,f=a&&a.disableAnimation;if(l){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,u,c)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:u[0]/2,scaleY:u[1]/2};f?h.attr(d):Ft(h,d,s,n),zg(h)}if(this._updateCommon(r,n,u,i,a),l){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,qt(h,d,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),u=r.hostModel,l,f,c,h,d,p,g,v,m;if(a&&(l=a.emphasisItemStyle,f=a.blurItemStyle,c=a.selectItemStyle,h=a.focus,d=a.blurScope,g=a.labelStatesModels,v=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),b=y.getModel("emphasis");l=b.getModel("itemStyle").getItemStyle(),c=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),g=Fu(y),v=b.getShallow("scale"),m=y.getShallow("cursor")}var w=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var C=LE(r.getItemVisual(n,"symbolOffset"),i);C&&(s.x=C[0],s.y=C[1]),m&&s.attr("cursor",m);var _=r.getItemVisual(n,"style"),D=_.fill;if(s instanceof fi){var x=s.style;s.useStyle(oe({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},_))}else s.__isEmptyBrush?s.useStyle(oe({},_)):s.useStyle(_),s.style.decal=null,s.setColor(D,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var S=r.getItemVisual(n,"liftZ"),O=this._z2;S!=null?O==null&&(this._z2=s.z2,s.z2+=S):O!=null&&(s.z2=O,this._z2=null);var E=o&&o.useNameLabel;Mu(s,g,{labelFetcher:u,labelDataIndex:n,defaultText:P,inheritColor:D,defaultOpacity:_.opacity});function P(M){return E?r.getName(M):fm(r,M)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var F=s.ensureState("emphasis");F.style=l,s.ensureState("select").style=c,s.ensureState("blur").style=f;var B=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;F.scaleX=this._sizeX*B,F.scaleY=this._sizeY*B,this.setSymbolScale(1),Eu(this,h,d,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=He(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var u=a.getTextContent();u&&Sc(u,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Sc(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Yj(r.getItemVisual(n,"symbolSize"))},e}(It);function hW(t,e){this.parent.drift(t,e)}function hm(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function pA(t){return t!=null&&!we(t)&&(t={isIgnore:t}),t||{}}function gA(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Fu(e),cursorStyle:e.get("cursor")}}var dW=function(){function t(e){this.group=new It,this._SymbolCtor=e||cm}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=pA(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,u=gA(e),l={disableAnimation:s},f=r.getSymbolPoint||function(c){return e.getItemLayout(c)};a||n.removeAll(),e.diff(a).add(function(c){var h=f(c);if(hm(e,h,c,r)){var d=new o(e,c,u,l);d.setPosition(h),e.setItemGraphicEl(c,d),n.add(d)}}).update(function(c,h){var d=a.getItemGraphicEl(h),p=f(c);if(!hm(e,p,c,r)){n.remove(d);return}var g=e.getItemVisual(c,"symbol")||"circle",v=d&&d.getSymbolType&&d.getSymbolType();if(!d||v&&v!==g)n.remove(d),d=new o(e,c,u,l),d.setPosition(p);else{d.updateData(e,c,u,l);var m={x:p[0],y:p[1]};s?d.attr(m):Ft(d,m,i)}n.add(d),e.setItemGraphicEl(c,d)}).remove(function(c){var h=a.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=f,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=gA(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=pA(n);function i(u){u.isGroup||(u.incremental=!0,u.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=r.getItemLayout(a);if(hm(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},t.prototype.eachRendered=function(e){Pc(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},t}();function mA(t,e,r){var n=t.getBaseAxis(),i=t.getOtherAxis(n),a=vW(i,r),o=n.dim,s=i.dim,u=e.mapDimension(s),l=e.mapDimension(o),f=s==="x"||s==="radius"?1:0,c=ye(t.dimensions,function(p){return e.mapDimension(p)}),h=!1,d=e.getCalculationInfo("stackResultDimension");return ms(e,c[0])&&(h=!0,c[0]=d),ms(e,c[1])&&(h=!0,c[1]=d),{dataDimsForPoint:c,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:u,baseDim:l,baseDataOffset:f,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function vW(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:nt(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function yA(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function pW(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function gW(t,e,r,n,i,a,o,s){for(var u=pW(t,e),l=[],f=[],c=[],h=[],d=[],p=[],g=[],v=mA(i,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],b=0;b<u.length;b++){var w=u[b],C=!0,_=void 0,D=void 0;switch(w.cmd){case"=":_=w.idx*2,D=w.idx1*2;var x=m[_],S=m[_+1],O=y[D],E=y[D+1];(isNaN(x)||isNaN(S))&&(x=O,S=E),l.push(x,S),f.push(O,E),c.push(r[_],r[_+1]),h.push(n[D],n[D+1]),g.push(e.getRawIndex(w.idx1));break;case"+":var P=w.idx,F=v.dataDimsForPoint,B=i.dataToPoint([e.get(F[0],P),e.get(F[1],P)]);D=P*2,l.push(B[0],B[1]),f.push(y[D],y[D+1]);var M=yA(v,i,e,P);c.push(M[0],M[1]),h.push(n[D],n[D+1]),g.push(e.getRawIndex(P));break;case"-":C=!1}C&&(d.push(w),p.push(p.length))}p.sort(function(q,L){return g[q]-g[L]});for(var I=l.length,j=vi(I),z=vi(I),W=vi(I),R=vi(I),U=[],b=0;b<p.length;b++){var Z=p[b],ee=b*2,ne=Z*2;j[ee]=l[ne],j[ee+1]=l[ne+1],z[ee]=f[ne],z[ee+1]=f[ne+1],W[ee]=c[ne],W[ee+1]=c[ne+1],R[ee]=h[ne],R[ee+1]=h[ne+1],U[b]=d[Z]}return{current:j,next:z,stackedOnCurrent:W,stackedOnNext:R,status:U}}var $i=Math.min,Gi=Math.max;function ro(t,e){return isNaN(t)||isNaN(e)}function dm(t,e,r,n,i,a,o,s,u){for(var l,f,c,h,d,p,g=r,v=0;v<n;v++){var m=e[g*2],y=e[g*2+1];if(g>=i||g<0)break;if(ro(m,y)){if(u){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](m,y),c=m,h=y;else{var b=m-l,w=y-f;if(b*b+w*w<.5){g+=a;continue}if(o>0){for(var C=g+a,_=e[C*2],D=e[C*2+1];_===m&&D===y&&v<n;)v++,C+=a,g+=a,_=e[C*2],D=e[C*2+1],m=e[g*2],y=e[g*2+1],b=m-l,w=y-f;var x=v+1;if(u)for(;ro(_,D)&&x<n;)x++,C+=a,_=e[C*2],D=e[C*2+1];var S=.5,O=0,E=0,P=void 0,F=void 0;if(x>=n||ro(_,D))d=m,p=y;else{O=_-l,E=D-f;var B=m-l,M=_-m,I=y-f,j=D-y,z=void 0,W=void 0;if(s==="x"){z=Math.abs(B),W=Math.abs(M);var R=O>0?1:-1;d=m-R*z*o,p=y,P=m+R*W*o,F=y}else if(s==="y"){z=Math.abs(I),W=Math.abs(j);var U=E>0?1:-1;d=m,p=y-U*z*o,P=m,F=y+U*W*o}else z=Math.sqrt(B*B+I*I),W=Math.sqrt(M*M+j*j),S=W/(W+z),d=m-O*o*(1-S),p=y-E*o*(1-S),P=m+O*o*S,F=y+E*o*S,P=$i(P,Gi(_,m)),F=$i(F,Gi(D,y)),P=Gi(P,$i(_,m)),F=Gi(F,$i(D,y)),O=P-m,E=F-y,d=m-O*z/W,p=y-E*z/W,d=$i(d,Gi(l,m)),p=$i(p,Gi(f,y)),d=Gi(d,$i(l,m)),p=Gi(p,$i(f,y)),O=m-d,E=y-p,P=m+O*W/z,F=y+E*W/z}t.bezierCurveTo(c,h,d,p,m,y),c=P,h=F}else t.lineTo(m,y)}l=m,f=y,g+=a}return v}var bA=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),mW=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new bA},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&ro(i[o*2-2],i[o*2-1]);o--);for(;a<o&&ro(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=dm(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=ui.CMD,s,u,l=n==="x",f=[],c=0;c<a.length;){var h=a[c++],d=void 0,p=void 0,g=void 0,v=void 0,m=void 0,y=void 0,b=void 0;switch(h){case o.M:s=a[c++],u=a[c++];break;case o.L:if(d=a[c++],p=a[c++],b=l?(r-s)/(d-s):(r-u)/(p-u),b<=1&&b>=0){var w=l?(p-u)*b+u:(d-s)*b+s;return l?[r,w]:[w,r]}s=d,u=p;break;case o.C:d=a[c++],p=a[c++],g=a[c++],v=a[c++],m=a[c++],y=a[c++];var C=l?Rf(s,d,g,m,r,f):Rf(u,p,v,y,r,f);if(C>0)for(var _=0;_<C;_++){var D=f[_];if(D<=1&&D>=0){var w=l?Bt(u,p,v,y,D):Bt(s,d,g,m,D);return l?[r,w]:[w,r]}}s=m,u=y;break}}},e}(Ve),yW=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(bA),bW=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new yW},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,u=n.smoothMonotone;if(n.connectNulls){for(;s>0&&ro(i[s*2-2],i[s*2-1]);s--);for(;o<s&&ro(i[o*2],i[o*2+1]);o++);}for(;o<s;){var l=dm(r,i,o,s,s,1,n.smooth,u,n.connectNulls);dm(r,a,o+l-1,l,s,-1,n.stackedOnSmooth,u,n.connectNulls),o+=l+1,r.closePath()}},e}(Ve);function CA(t,e,r,n,i){var a=t.getArea(),o=a.x,s=a.y,u=a.width,l=a.height,f=r.get(["lineStyle","width"])||2;o-=f/2,s-=f/2,u+=f,l+=f,u=Math.ceil(u),o!==Math.floor(o)&&(o=Math.floor(o),u++);var c=new St({shape:{x:o,y:s,width:u,height:l}});if(e){var h=t.getBaseAxis(),d=h.isHorizontal(),p=h.inverse;d?(p&&(c.shape.x+=u),c.shape.width=0):(p||(c.shape.y+=l),c.shape.height=0);var g=De(i)?function(v){i(v,c)}:null;qt(c,{shape:{width:u,height:l,x:o,y:s}},r,null,n,g)}return c}function wA(t,e,r){var n=t.getArea(),i=Tt(n.r0,1),a=Tt(n.r,1),o=new In({shape:{cx:Tt(t.cx,1),cy:Tt(t.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=t.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,qt(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function CW(t,e,r,n,i){if(t){if(t.type==="polar")return wA(t,e,r);if(t.type==="cartesian2d")return CA(t,e,r,n,i)}else return null;return null}function vm(t,e){return t.type===e}function _A(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function DA(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[e,r],[n,i]]}function xA(t,e){var r=DA(t),n=r[0],i=r[1],a=DA(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function SA(t){return nt(t)?t:t?.5:0}function wW(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),i=vi(n*2),a=0;a<n;a++){var o=yA(r,t,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Ui(t,e,r,n){var i=e.getBaseAxis(),a=i.dim==="x"||i.dim==="radius"?0:1,o=[],s=0,u=[],l=[],f=[],c=[];if(n){for(s=0;s<t.length;s+=2)!isNaN(t[s])&&!isNaN(t[s+1])&&c.push(t[s],t[s+1]);t=c}for(s=0;s<t.length-2;s+=2)switch(f[0]=t[s+2],f[1]=t[s+3],l[0]=t[s],l[1]=t[s+1],o.push(l[0],l[1]),r){case"end":u[a]=f[a],u[1-a]=l[1-a],o.push(u[0],u[1]);break;case"middle":var h=(l[a]+f[a])/2,d=[];u[a]=d[a]=h,u[1-a]=l[1-a],d[1-a]=f[1-a],o.push(u[0],u[1]),o.push(d[0],d[1]);break;default:u[a]=l[a],u[1-a]=f[1-a],o.push(u[0],u[1])}return o.push(t[s++],t[s++]),o}function _W(t,e){var r=[],n=t.length,i,a;function o(f,c,h){var d=f.coord,p=(h-d)/(c.coord-d),g=yk(p,[f.color,c.color]);return{coord:h,color:g}}for(var s=0;s<n;s++){var u=t[s],l=u.coord;if(l<0)i=u;else if(l>e){a?r.push(o(a,u,e)):i&&r.push(o(i,u,0),o(i,u,e));break}else i&&(r.push(o(i,u,0)),i=null),r.push(u),a=u}return r}function DW(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(i),l=ye(a.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),f=l.length,c=a.outerColors.slice();f&&l[0].coord>l[f-1].coord&&(l.reverse(),c.reverse());var h=_W(l,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&f)return l[0].coord<0?c[1]?c[1]:l[f-1].color:c[0]?c[0]:l[0].color;var p=10,g=h[0].coord-p,v=h[d-1].coord+p,m=v-g;if(m<.001)return"transparent";N(h,function(b){b.offset=(b.coord-g)/m}),h.push({offset:d?h[d-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:c[0]||"transparent"});var y=new Ox(0,0,0,0,h,!0);return y[i]=g,y[i+"2"]=v,y}}function xW(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&SW(a,e))){var o=e.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(u){var l=a.scale.getRawOrdinalNumber(u.tickValue);s[l]=1}),function(u){return!s.hasOwnProperty(e.get(o,u))}}}}function SW(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(cm.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function EW(t,e){return isNaN(t)||isNaN(e)}function AW(t){for(var e=t.length/2;e>0&&EW(t[e*2-2],t[e*2-1]);e--);return e-1}function EA(t,e){return[t[e*2],t[e*2+1]]}function TW(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,u=-1,l=0;l<n;l++)if(o=t[l*2+i],!(isNaN(o)||isNaN(t[l*2+1-i]))){if(l===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){u=l;break}s=l,a=o}return{range:[s,u],t:(e-a)/(o-a)}}function AA(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<Gr.length;e++)if(t.get([Gr[e],"endLabel","show"]))return!0;return!1}function pm(t,e,r,n){if(vm(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},u=AA(n)?function(d,p){t._endLabelOnDuring(d,p,o,s,a,i,e)}:null,l=e.getBaseAxis().isHorizontal(),f=CA(e,r,n,function(){var d=t._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},u);if(!n.get("clip",!0)){var c=f.shape,h=Math.max(c.width,c.height);l?(c.y-=h,c.height+=h*2):(c.x-=h,c.width+=h*2)}return u&&u(1,f),f}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),wA(e,r,n)}function OW(t,e){var r=e.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||o}}}var PW=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new It,n=new dW;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=this.group,u=r.getData(),l=r.getModel("lineStyle"),f=r.getModel("areaStyle"),c=u.getLayout("points")||[],h=o.type==="polar",d=this._coordSys,p=this._symbolDraw,g=this._polyline,v=this._polygon,m=this._lineGroup,y=!n.ssr&&r.get("animation"),b=!f.isEmpty(),w=f.get("origin"),C=mA(o,u,w),_=b&&wW(o,u,C),D=r.get("showSymbol"),x=r.get("connectNulls"),S=D&&!h&&xW(r,u,o),O=this._data;O&&O.eachItemGraphicEl(function(L,X){L.__temp&&(s.remove(L),O.setItemGraphicEl(X,null))}),D||p.remove(),s.add(m);var E=h?!1:r.get("step"),P;o&&o.getArea&&r.get("clip",!0)&&(P=o.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var F=DW(u,o,i)||u.getVisual("style")[u.getVisual("drawType")];if(!(g&&d.type===o.type&&E===this._step))D&&p.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),y&&this._initSymbolLabelAnimation(u,o,P),E&&(c=Ui(c,o,E,x),_&&(_=Ui(_,o,E,x))),g=this._newPolyline(c),b?v=this._newPolygon(c,_):v&&(m.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ga(F)),m.setClipPath(pm(this,o,!0,r));else{b&&!v?v=this._newPolygon(c,_):v&&!b&&(m.remove(v),v=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ga(F));var B=m.getClipPath();if(B){var M=pm(this,o,!1,r);qt(B,{shape:M.shape},r)}else m.setClipPath(pm(this,o,!0,r));D&&p.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),(!_A(this._stackedOnPoints,_)||!_A(this._points,c))&&(y?this._doUpdateAnimation(u,_,o,i,E,w,x):(E&&(c=Ui(c,o,E,x),_&&(_=Ui(_,o,E,x))),g.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:_})))}var I=r.getModel("emphasis"),j=I.get("focus"),z=I.get("blurScope"),W=I.get("disabled");if(g.useStyle(je(l.getLineStyle(),{fill:"none",stroke:F,lineJoin:"bevel"})),pc(g,r,"lineStyle"),g.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var R=g.getState("emphasis").style;R.lineWidth=+g.style.lineWidth+1}He(g).seriesIndex=r.seriesIndex,Eu(g,j,z,W);var U=SA(r.get("smooth")),Z=r.get("smoothMonotone");if(g.setShape({smooth:U,smoothMonotone:Z,connectNulls:x}),v){var ee=u.getCalculationInfo("stackedOnSeries"),ne=0;v.useStyle(je(f.getAreaStyle(),{fill:F,opacity:.7,lineJoin:"bevel",decal:u.getVisual("style").decal})),ee&&(ne=SA(ee.get("smooth"))),v.setShape({smooth:U,stackedOnSmooth:ne,smoothMonotone:Z,connectNulls:x}),pc(v,r,"areaStyle"),He(v).seriesIndex=r.seriesIndex,Eu(v,j,z,W)}var q=function(L){a._changePolyState(L)};u.eachItemGraphicEl(function(L){L&&(L.onHoverStateChange=q)}),this._polyline.onHoverStateChange=q,this._data=u,this._coordSys=o,this._stackedOnPoints=_,this._points=c,this._step=E,this._valueOrigin=w,r.get("triggerLineEvent")&&(this.packEventData(r,g),v&&this.packEventData(r,v))},e.prototype.packEventData=function(r,n){He(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Pa(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var u=o.getLayout("points"),l=o.getItemGraphicEl(s);if(!l){var f=u[s*2],c=u[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=r.get("zlevel")||0,d=r.get("z")||0;l=new cm(o,s),l.x=f,l.y=c,l.setZ(h,d);var p=l.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=d,p.z2=this._polyline.z2+1),l.__temp=!0,o.setItemGraphicEl(s,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else Zr.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Pa(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var u=o.getItemGraphicEl(s);u&&(u.__temp?(o.setItemGraphicEl(s,null),this.group.remove(u)):u.downplay())}else Zr.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;nx(this._polyline,r),n&&nx(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new mW({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new bW({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),u=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var l=r.hostModel,f=l.get("animationDuration");De(f)&&(f=f(null));var c=l.get("animationDelay")||0,h=De(c)?c(null):c;r.eachItemGraphicEl(function(d,p){var g=d;if(g){var v=[d.x,d.y],m=void 0,y=void 0,b=void 0;if(i)if(o){var w=i,C=n.pointToCoord(v);a?(m=w.startAngle,y=w.endAngle,b=-C[1]/180*Math.PI):(m=w.r0,y=w.r,b=C[0])}else{var _=i;a?(m=_.x,y=_.x+_.width,b=d.x):(m=_.y+_.height,y=_.y,b=d.y)}var D=y===m?0:(b-m)/(y-m);u&&(D=1-D);var x=De(c)?c(p):f*D+h,S=g.getSymbolPath(),O=S.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),O&&O.animateFrom({style:{opacity:0}},{duration:300,delay:x}),S.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(AA(r)){var o=r.getData(),s=this._polyline,u=o.getLayout("points");if(!u){s.removeTextContent(),this._endLabel=null;return}var l=this._endLabel;l||(l=this._endLabel=new Ot({z2:200}),l.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=AW(u);f>=0&&(Mu(s,Fu(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(c,h,d){return d!=null?vA(o,d):fm(o,c)},enableTextSetter:!0},OW(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,u){var l=this._endLabel,f=this._polyline;if(l){r<1&&a.originalX==null&&(a.originalX=l.x,a.originalY=l.y);var c=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,v=u.getBaseAxis(),m=v.isHorizontal(),y=v.inverse,b=n.shape,w=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,C=(m?g:0)*(y?-1:1),_=(m?0:-g)*(y?-1:1),D=m?"x":"y",x=TW(c,w,D),S=x.range,O=S[1]-S[0],E=void 0;if(O>=1){if(O>1&&!d){var P=EA(c,S[0]);l.attr({x:P[0]+C,y:P[1]+_}),o&&(E=h.getRawValue(S[0]))}else{var P=f.getPointOn(w,D);P&&l.attr({x:P[0]+C,y:P[1]+_});var F=h.getRawValue(S[0]),B=h.getRawValue(S[1]);o&&(E=wD(i,p,F,B,x.t))}a.lastFrameIndex=S[0]}else{var M=r===1||a.lastFrameIndex>0?S[0]:0,P=EA(c,M);o&&(E=h.getRawValue(M)),l.attr({x:P[0]+C,y:P[1]+_})}if(o){var I=ns(l);typeof I.setLabelText=="function"&&I.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,u){var l=this._polyline,f=this._polygon,c=r.hostModel,h=gW(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,p=h.stackedOnCurrent,g=h.next,v=h.stackedOnNext;if(o&&(d=Ui(h.current,i,o,u),p=Ui(h.stackedOnCurrent,i,o,u),g=Ui(h.next,i,o,u),v=Ui(h.stackedOnNext,i,o,u)),xA(d,g)>3e3||f&&xA(p,v)>3e3){l.stopAnimation(),l.setShape({points:g}),f&&(f.stopAnimation(),f.setShape({points:g,stackedOnPoints:v}));return}l.shape.__points=h.current,l.shape.points=d;var m={shape:{points:g}};h.current!==d&&(m.shape.__points=h.next),l.stopAnimation(),Ft(l,m,c),f&&(f.setShape({points:d,stackedOnPoints:p}),f.stopAnimation(),Ft(f,{shape:{stackedOnPoints:v}},c),l.shape.points!==f.shape.points&&(f.shape.points=l.shape.points));for(var y=[],b=h.status,w=0;w<b.length;w++){var C=b[w].cmd;if(C==="="){var _=r.getItemGraphicEl(b[w].idx1);_&&y.push({el:_,ptIdx:w})}}l.animators&&l.animators.length&&l.animators[0].during(function(){f&&f.dirtyShape();for(var D=l.shape.__points,x=0;x<y.length;x++){var S=y[x].el,O=y[x].ptIdx*2;S.x=D[O],S.y=D[O+1],S.markRedraw()}})},e.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(Zr);function BW(t,e){return{seriesType:t,plan:D0(),reset:function(r){var n=r.getData(),i=r.coordinateSystem;if(r.pipelineContext,!!i){var a=ye(i.dimensions,function(c){return n.mapDimension(c)}).slice(0,2),o=a.length,s=n.getCalculationInfo("stackResultDimension");ms(n,a[0])&&(a[0]=s),ms(n,a[1])&&(a[1]=s);var u=n.getStore(),l=n.getDimensionIndex(a[0]),f=n.getDimensionIndex(a[1]);return o&&{progress:function(c,h){for(var d=c.end-c.start,p=vi(d*o),g=[],v=[],m=c.start,y=0;m<c.end;m++){var b=void 0;if(o===1){var w=u.get(l,m);b=i.dataToPoint(w,null,v)}else g[0]=u.get(l,m),g[1]=u.get(f,m),b=i.dataToPoint(g,null,v);p[y++]=b[0],p[y++]=b[1]}h.setLayout("points",p)}}}}}}var MW={average:function(t){for(var e=0,r=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},minmax:function(t){for(var e=-1/0,r=-1/0,n=0;n<t.length;n++){var i=t[n],a=Math.abs(i);a>e&&(e=a,r=i)}return isFinite(r)?r:NaN},nearest:function(t){return t[0]}},FW=function(t){return Math.round(t.length/2)};function TA(t){return{seriesType:t,reset:function(e,r,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var u=o.getBaseAxis(),l=o.getOtherAxis(u),f=u.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var p=void 0;be(a)?p=MW[a]:De(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(l.dim),1/d,p,FW))}}}}}function LW(t){t.registerChartView(PW),t.registerSeriesModel(cW),t.registerLayout(BW("line")),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,TA("line"))}var gm=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Z0(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)N(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),v=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!g&&(v+=1),p.length<2)return;if(p.length===2){s[d]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,w=1,C=0;C<p.length;C++){var _=p[C].coord,D=C===p.length-1?p[C-1].tickValue+w:p[C].tickValue;if(D===v){b=_;break}else if(D<v)y=_;else if(y!=null&&D>v){b=(_+y)/2;break}C===1&&(w=D-p[0].tickValue)}b==null&&(y?y&&(b=p[p.length-1].coord):b=p[0].coord),s[d]=h.toGlobalCoord(b)}});else{var u=this.getData(),l=u.getLayout("offset"),f=u.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=l+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(fn);fn.registerClass(gm);var IW=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Z0(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Yx(gm.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(gm),RW=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),OA=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new RW},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),u=(s-o)*.5,l=o+u,f=n.startAngle,c=n.endAngle,h=n.clockwise,d=Math.PI*2,p=h?c-f<d:f-c<d;p||(f=c-(h?d:-d));var g=Math.cos(f),v=Math.sin(f),m=Math.cos(c),y=Math.sin(c);p?(r.moveTo(g*o+i,v*o+a),r.arc(g*l+i,v*l+a,u,-Math.PI+f,f,!h)):r.moveTo(g*s+i,v*s+a),r.arc(i,a,s,f,c,!h),r.arc(m*l+i,y*l+a,u,c-Math.PI*2,c-Math.PI,!h),o!==0&&r.arc(i,a,o,c,f,h)},e}(Ve);function NW(t,e){e=e||{};var r=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Xf(n,i,a);var s=t(o),u=i.distance!=null?i.distance:5,l=this.shape,f=l.cx,c=l.cy,h=l.r,d=l.r0,p=(h+d)/2,g=l.startAngle,v=l.endAngle,m=(g+v)/2,y=r?Math.abs(h-d)/2:0,b=Math.cos,w=Math.sin,C=f+h*b(g),_=c+h*w(g),D="left",x="top";switch(s){case"startArc":C=f+(d-u)*b(m),_=c+(d-u)*w(m),D="center",x="top";break;case"insideStartArc":C=f+(d+u)*b(m),_=c+(d+u)*w(m),D="center",x="bottom";break;case"startAngle":C=f+p*b(g)+Eh(g,u+y,!1),_=c+p*w(g)+Ah(g,u+y,!1),D="right",x="middle";break;case"insideStartAngle":C=f+p*b(g)+Eh(g,-u+y,!1),_=c+p*w(g)+Ah(g,-u+y,!1),D="left",x="middle";break;case"middle":C=f+p*b(m),_=c+p*w(m),D="center",x="middle";break;case"endArc":C=f+(h+u)*b(m),_=c+(h+u)*w(m),D="center",x="bottom";break;case"insideEndArc":C=f+(h-u)*b(m),_=c+(h-u)*w(m),D="center",x="top";break;case"endAngle":C=f+p*b(v)+Eh(v,u+y,!0),_=c+p*w(v)+Ah(v,u+y,!0),D="left",x="middle";break;case"insideEndAngle":C=f+p*b(v)+Eh(v,-u+y,!0),_=c+p*w(v)+Ah(v,-u+y,!0),D="right",x="middle";break;default:return Xf(n,i,a)}return n=n||{},n.x=C,n.y=_,n.align=D,n.verticalAlign=x,n}}function kW(t,e,r,n){if(nt(n)){t.setTextConfig({rotation:n});return}else if(he(e)){t.setTextConfig({rotation:0});return}var i=t.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,u,l=r(e);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":u=s;break;case"startAngle":case"insideStartAngle":u=a;break;case"endAngle":case"insideEndAngle":u=o;break;default:t.setTextConfig({rotation:0});return}var f=Math.PI*1.5-u;l==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),t.setTextConfig({rotation:f})}function Eh(t,e,r){return e*Math.sin(t)*(r?-1:1)}function Ah(t,e,r){return e*Math.cos(t)*(r?1:-1)}function sl(t,e,r){var n=t.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;he(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:ye(n,function(a){return Bi(a,i)})}}var mm=Math.max,ym=Math.min;function zW(t,e){var r=t.getArea&&t.getArea();if(vm(t,"cartesian2d")){var n=t.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var jW=function(t){ce(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&xt("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},e.prototype.eachRendered=function(r){Pc(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),u=this._data,l=r.coordinateSystem,f=l.getBaseAxis(),c;l.type==="cartesian2d"?c=f.isHorizontal():l.type==="polar"&&(c=f.dim==="angle");var h=r.isAnimationEnabled()?r:null,d=VW(r,l);d&&this._enableRealtimeSort(d,s,i);var p=r.get("clip",!0)||d,g=zW(l,s);o.removeClipPath();var v=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),b=y.get("borderRadius")||0,w=[],C=this._backgroundEls,_=a&&a.isInitSort,D=a&&a.type==="changeAxisOrder";function x(E){var P=Th[l.type](s,E),F=YW(l,c,P);return F.useStyle(y.getItemStyle()),l.type==="cartesian2d"?F.setShape("r",b):F.setShape("cornerRadius",b),w[E]=F,F}s.diff(u).add(function(E){var P=s.getItemModel(E),F=Th[l.type](s,E,P);if(m&&x(E),!(!s.hasValue(E)||!LA[l.type](F))){var B=!1;p&&(B=PA[l.type](g,F));var M=BA[l.type](r,s,E,F,c,h,f.model,!1,v);d&&(M.forceLabelAnimation=!0),RA(M,s,E,P,F,r,c,l.type==="polar"),_?M.attr({shape:F}):d?MA(d,h,M,F,E,c,!1,!1):qt(M,{shape:F},r,E),s.setItemGraphicEl(E,M),o.add(M),M.ignore=B}}).update(function(E,P){var F=s.getItemModel(E),B=Th[l.type](s,E,F);if(m){var M=void 0;C.length===0?M=x(P):(M=C[P],M.useStyle(y.getItemStyle()),l.type==="cartesian2d"?M.setShape("r",b):M.setShape("cornerRadius",b),w[E]=M);var I=Th[l.type](s,E),j=jA(c,I,l);Ft(M,{shape:j},h,E)}var z=u.getItemGraphicEl(P);if(!s.hasValue(E)||!LA[l.type](B)){o.remove(z);return}var W=!1;if(p&&(W=PA[l.type](g,B),W&&o.remove(z)),z?zg(z):z=BA[l.type](r,s,E,B,c,h,f.model,!!z,v),d&&(z.forceLabelAnimation=!0),D){var R=z.getTextContent();if(R){var U=ns(R);U.prevValue!=null&&(U.prevValue=U.value)}}else RA(z,s,E,F,B,r,c,l.type==="polar");_?z.attr({shape:B}):d?MA(d,h,z,B,E,c,!0,D):Ft(z,{shape:B},r,E,null),s.setItemGraphicEl(E,z),z.ignore=W,o.add(z)}).remove(function(E){var P=u.getItemGraphicEl(E);P&&Ec(P,r,E)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new It);S.removeAll();for(var O=0;O<w.length;++O)S.add(w[O]);o.add(S),this._backgroundEls=w,this._data=s},e.prototype._renderLarge=function(r,n,i){this._clear(),kA(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),kA(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&CW(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(u){var l=n.getItemGraphicEl(u),f=l&&l.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var u=i(s);u=u??NaN,a.push({dataIndex:s,mappedValue:u,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:ye(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,u=0,l=a.getOrdinalMeta().categories.length;u<l;++u){var f=r.rawIndexOf(o,a.getRawOrdinalNumber(u)),c=f<0?Number.MIN_VALUE:n(r.indexOfRawIndex(f));if(c>s)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Ec(a,r,He(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Zr),PA={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=mm(e.x,t.x),s=ym(e.x+e.width,i),u=mm(e.y,t.y),l=ym(e.y+e.height,a),f=s<o,c=l<u;return e.x=f&&o>i?s:o,e.y=c&&u>a?l:u,e.width=f?0:s-o,e.height=c?0:l-u,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),f||c},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=ym(e.r,t.r),a=mm(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},BA={cartesian2d:function(t,e,r,n,i,a,o,s,u){var l=new St({shape:oe({},n),z2:1});if(l.__dataIndex=r,l.name="item",a){var f=l.shape,c=i?"height":"width";f[c]=0}return l},polar:function(t,e,r,n,i,a,o,s,u){var l=!i&&u?OA:In,f=new l({shape:n,z2:1});f.name="item";var c=IA(i);if(f.calculateTextPosition=NW(c,{isRoundCap:l===OA}),a){var h=f.shape,d=i?"r":"endAngle",p={};h[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Ft:qt)(f,{shape:p},a)}return f}};function VW(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&xt("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&xt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function MA(t,e,r,n,i,a,o,s){var u,l;a?(l={x:n.x,width:n.width},u={y:n.y,height:n.height}):(l={y:n.y,height:n.height},u={x:n.x,width:n.width}),s||(o?Ft:qt)(r,{shape:u},e,i,null);var f=e?t.baseAxis.model:null;(o?Ft:qt)(r,{shape:l},f,i)}function FA(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var HW=["x","y","width","height"],WW=["cx","cy","r","startAngle","endAngle"],LA={cartesian2d:function(t){return!FA(t,HW)},polar:function(t){return!FA(t,WW)}},Th={cartesian2d:function(t,e,r){var n=t.getItemLayout(e),i=r?GW(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function $W(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function IA(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function RA(t,e,r,n,i,a,o,s){var u=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=t.shape,c=sl(n.getModel("itemStyle"),f,!0);oe(f,c),t.setShape(f)}}else{var l=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",l)}t.useStyle(u);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=Fu(n);Mu(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:fm(a.getData(),r),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var v=n.get(["label","position"]);t.textConfig.inside=v==="middle"?!0:null,kW(t,v==="outside"?d:v,IA(o),n.get(["label","rotate"]))}D7(g,p,a.getRawValue(r),function(y){return vA(e,y)});var m=n.getModel(["emphasis"]);Eu(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),pc(t,n),$W(i)&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function GW(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var UW=function(){function t(){}return t}(),NA=function(t){ce(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new UW},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],u=[],l=this.barWidth,f=0;f<i.length;f+=3)u[a]=l,u[o]=i[f+2],s[a]=i[f+a],s[o]=i[f+o],r.rect(s[0],s[1],u[0],u[1])},e}(Ve);function kA(t,e,r,n){var i=t.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),u=t.getModel("backgroundStyle"),l=i.getLayout("largeBackgroundPoints");if(l){var f=new NA({shape:{points:l},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(u.getItemStyle()),e.add(f),r&&r.push(f)}var c=new NA({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,e.add(c),c.useStyle(i.getVisual("style")),He(c).seriesIndex=t.seriesIndex,t.get("silent")||(c.on("mousedown",zA),c.on("mousemove",zA)),r&&r.push(c)}var zA=x0(function(t){var e=this,r=qW(e,t.offsetX,t.offsetY);He(e).dataIndex=r>=0?r:null},30,!1);function qW(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],u=[],l=t.barWidth,f=0,c=a.length/3;f<c;f++){var h=f*3;if(u[n]=l,u[i]=a[h+2],s[n]=a[h+n],s[i]=a[h+i],u[i]<0&&(s[i]+=u[i],u[i]=-u[i]),e>=s[0]&&e<=s[0]+u[0]&&r>=s[1]&&r<=s[1]+u[1])return o[f]}return-1}function jA(t,e,r){if(vm(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function YW(t,e,r){var n=t.type==="polar"?In:St;return new n({shape:jA(e,r,t),silent:!0,z2:0})}function XW(t){t.registerChartView(jW),t.registerSeriesModel(IW),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Dt(gH,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mH("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,TA("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var VA=Math.PI*2,Oh=Math.PI/180;function HA(t,e){return Ua(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function WA(t,e){var r=HA(t,e),n=t.get("center"),i=t.get("radius");he(i)||(i=[0,i]);var a=ut(r.width,e.getWidth()),o=ut(r.height,e.getHeight()),s=Math.min(a,o),u=ut(i[0],s/2),l=ut(i[1],s/2),f,c,h=t.coordinateSystem;if(h){var d=h.dataToPoint(n);f=d[0]||0,c=d[1]||0}else he(n)||(n=[n,n]),f=ut(n[0],a)+r.x,c=ut(n[1],o)+r.y;return{cx:f,cy:c,r0:u,r:l}}function KW(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=HA(n,r),s=WA(n,r),u=s.cx,l=s.cy,f=s.r,c=s.r0,h=-n.get("startAngle")*Oh,d=n.get("endAngle"),p=n.get("padAngle")*Oh;d=d==="auto"?h-VA:-d*Oh;var g=n.get("minAngle")*Oh,v=g+p,m=0;i.each(a,function(j){!isNaN(j)&&m++});var y=i.getSum(a),b=Math.PI/(y||m)*2,w=n.get("clockwise"),C=n.get("roseType"),_=n.get("stillShowZeroSum"),D=i.getDataExtent(a);D[0]=0;var x=w?1:-1,S=[h,d],O=x*p/2;ID(S,!w),h=S[0],d=S[1];var E=$A(n);E.startAngle=h,E.endAngle=d,E.clockwise=w;var P=Math.abs(d-h),F=P,B=0,M=h;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(j,z){var W;if(isNaN(j)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:u,cy:l,r0:c,r:C?NaN:f});return}C!=="area"?W=y===0&&_?b:j*b:W=P/m,W<v?(W=v,F-=v):B+=j;var R=M+x*W,U=0,Z=0;p>W?(U=M+x*W/2,Z=U):(U=M+O,Z=R-O),i.setItemLayout(z,{angle:W,startAngle:U,endAngle:Z,clockwise:w,cx:u,cy:l,r0:c,r:C?eg(j,D,[c,f]):f}),M=R}),F<VA&&m)if(F<=.001){var I=P/m;i.each(a,function(j,z){if(!isNaN(j)){var W=i.getItemLayout(z);W.angle=I;var R=0,U=0;I<p?(R=h+x*(z+1/2)*I,U=R):(R=h+x*z*I+O,U=h+x*(z+1)*I-O),W.startAngle=R,W.endAngle=U}})}else b=F/B,M=h,i.each(a,function(j,z){if(!isNaN(j)){var W=i.getItemLayout(z),R=W.angle===v?v:j*b,U=0,Z=0;R<p?(U=M+x*R/2,Z=U):(U=M+O,Z=M+x*R-O),W.startAngle=U,W.endAngle=Z,M+=x*R}})})}var $A=lt();function ZW(t){return{seriesType:t,reset:function(e,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var JW=Math.PI/180;function GA(t,e,r,n,i,a,o,s,u,l){if(t.length<2)return;function f(g){for(var v=g.rB,m=v*v,y=0;y<g.list.length;y++){var b=g.list[y],w=Math.abs(b.label.y-r),C=n+b.len,_=C*C,D=Math.sqrt((1-Math.abs(w*w/m))*_),x=e+(D+b.len2)*i,S=x-b.label.x,O=b.targetTextWidth-S*i;UA(b,O,!0),b.label.x=x}}function c(g){for(var v={list:[],maxY:0},m={list:[],maxY:0},y=0;y<g.length;y++)if(g[y].labelAlignTo==="none"){var b=g[y],w=b.label.y>r?m:v,C=Math.abs(b.label.y-r);if(C>=w.maxY){var _=b.label.x-e-b.len2*i,D=n+b.len,x=Math.abs(_)<D?Math.sqrt(C*C/(1-_*_/D/D)):D;w.rB=x,w.maxY=C}w.list.push(b)}f(v),f(m)}for(var h=t.length,d=0;d<h;d++)if(t[d].position==="outer"&&t[d].labelAlignTo==="labelLine"){var p=t[d].label.x-l;t[d].linePoints[1][0]+=p,t[d].label.x=l}cA(t,u,u+o)&&c(t)}function QW(t,e,r,n,i,a,o,s){for(var u=[],l=[],f=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;h<t.length;h++){var d=t[h].label;bm(t[h])||(d.x<e?(f=Math.min(f,d.x),u.push(t[h])):(c=Math.max(c,d.x),l.push(t[h])))}for(var h=0;h<t.length;h++){var p=t[h];if(!bm(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,g=p.linePoints,v=void 0;p.labelAlignTo==="edge"?d.x<e?v=g[2][0]-p.labelDistance-o-p.edgeDistance:v=o+i-p.edgeDistance-g[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<e?v=f-o-p.bleedMargin:v=o+i-c-p.bleedMargin:d.x<e?v=d.x-o-p.bleedMargin:v=o+i-d.x-p.bleedMargin,p.targetTextWidth=v,UA(p,v)}}GA(l,e,r,n,1,i,a,o,s,c),GA(u,e,r,n,-1,i,a,o,s,f);for(var h=0;h<t.length;h++){var p=t[h];if(!bm(p)&&p.linePoints){var d=p.label,g=p.linePoints,m=p.labelAlignTo==="edge",y=d.style.padding,b=y?y[1]+y[3]:0,w=d.style.backgroundColor?0:b,C=p.rect.width+w,_=g[1][0]-g[2][0];m?d.x<e?g[2][0]=o+p.edgeDistance+C+p.labelDistance:g[2][0]=o+i-p.edgeDistance-C-p.labelDistance:(d.x<e?g[2][0]=d.x+p.labelDistance:g[2][0]=d.x-p.labelDistance,g[1][0]=g[2][0]+_),g[1][1]=g[2][1]=d.y}}}function UA(t,e,r){if(r===void 0&&(r=!1),t.labelStyleWidth==null){var n=t.label,i=n.style,a=t.rect,o=i.backgroundColor,s=i.padding,u=s?s[1]+s[3]:0,l=i.overflow,f=a.width+(o?0:u);if(e<f||r){var c=a.height;if(l&&l.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-u);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var d=e-u,p=e<f?d:r?d>t.unconstrainedWidth?null:d:null;n.setStyle("width",p)}var g=n.getBoundingRect();a.width=g.width;var v=(n.style.margin||0)+2.1;a.height=g.height+v,a.y-=(a.height-c)/2}}}function bm(t){return t.position==="center"}function e$(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*JW,s=e.getLayout("viewRect"),u=e.getLayout("r"),l=s.width,f=s.x,c=s.y,h=s.height;function d(_){_.ignore=!0}function p(_){if(!_.ignore)return!0;for(var D in _.states)if(_.states[D].ignore===!1)return!0;return!1}e.each(function(_){var D=e.getItemGraphicEl(_),x=D.shape,S=D.getTextContent(),O=D.getTextGuideLine(),E=e.getItemModel(_),P=E.getModel("label"),F=P.get("position")||E.get(["emphasis","label","position"]),B=P.get("distanceToLabelLine"),M=P.get("alignTo"),I=ut(P.get("edgeDistance"),l),j=P.get("bleedMargin"),z=E.getModel("labelLine"),W=z.get("length");W=ut(W,l);var R=z.get("length2");if(R=ut(R,l),Math.abs(x.endAngle-x.startAngle)<o){N(S.states,d),S.ignore=!0,O&&(N(O.states,d),O.ignore=!0);return}if(p(S)){var U=(x.startAngle+x.endAngle)/2,Z=Math.cos(U),ee=Math.sin(U),ne,q,L,X;n=x.cx,i=x.cy;var V=F==="inside"||F==="inner";if(F==="center")ne=x.cx,q=x.cy,X="center";else{var G=(V?(x.r+x.r0)/2*Z:x.r*Z)+n,J=(V?(x.r+x.r0)/2*ee:x.r*ee)+i;if(ne=G+Z*3,q=J+ee*3,!V){var K=G+Z*(W+u-x.r),Y=J+ee*(W+u-x.r),fe=K+(Z<0?-1:1)*R,ue=Y;M==="edge"?ne=Z<0?f+I:f+l-I:ne=fe+(Z<0?-B:B),q=ue,L=[[G,J],[K,Y],[fe,ue]]}X=V?"center":M==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var Ce=Math.PI,me=0,Fe=P.get("rotate");if(nt(Fe))me=Fe*(Ce/180);else if(F==="center")me=0;else if(Fe==="radial"||Fe===!0){var ie=Z<0?-U+Ce:-U;me=ie}else if(Fe==="tangential"&&F!=="outside"&&F!=="outer"){var ve=Math.atan2(Z,ee);ve<0&&(ve=Ce*2+ve);var Le=ee>0;Le&&(ve=Ce+ve),me=ve-Ce}if(a=!!me,S.x=ne,S.y=q,S.rotation=me,S.setStyle({verticalAlign:"middle"}),V){S.setStyle({align:X});var at=S.states.select;at&&(at.x+=S.x,at.y+=S.y)}else{var ft=S.getBoundingRect().clone();ft.applyTransform(S.getComputedTransform());var Ie=(S.style.margin||0)+2.1;ft.y-=Ie/2,ft.height+=Ie,r.push({label:S,labelLine:O,position:F,len:W,len2:R,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new _e(Z,ee),linePoints:L,textAlign:X,labelDistance:B,labelAlignTo:M,edgeDistance:I,bleedMargin:j,rect:ft,unconstrainedWidth:ft.width,labelStyleWidth:S.style.width})}D.setTextConfig({inside:V})}}),!a&&t.get("avoidLabelOverlap")&&QW(r,n,i,u,l,h,f,c);for(var g=0;g<r.length;g++){var v=r[g],m=v.label,y=v.labelLine,b=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:v.textAlign}),b&&(N(m.states,d),m.ignore=!0);var w=m.states.select;w&&(w.x+=m.x,w.y+=m.y)}if(y){var C=v.linePoints;b||!C?(N(y.states,d),y.ignore=!0):(oA(C,v.minTurnAngle),nW(C,v.surfaceNormal,v.maxSurfaceAngle),y.setShape({points:C}),m.__hostTarget.textGuideLineConfig={anchor:new _e(C[0][0],C[0][1])})}}}var t$=function(t){ce(e,t);function e(r,n,i){var a=t.call(this)||this;a.z2=2;var o=new Ot;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,u=r.getItemModel(n),l=u.getModel("emphasis"),f=r.getItemLayout(n),c=oe(sl(u.getModel("itemStyle"),f,!0),f);if(isNaN(c.startAngle)){o.setShape(c);return}if(a){o.setShape(c);var h=s.getShallow("animationType");s.ecModel.ssr?(qt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):h==="scale"?(o.shape.r=f.r0,qt(o,{shape:{r:f.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),qt(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,n)):(o.shape.endAngle=f.startAngle,Ft(o,{shape:{endAngle:f.endAngle}},s,n))}else zg(o),Ft(o,{shape:c},s,n);o.useStyle(r.getItemVisual(n,"style")),pc(o,u);var d=(f.startAngle+f.endAngle)/2,p=s.get("selectedOffset"),g=Math.cos(d)*p,v=Math.sin(d)*p,m=u.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=oe({r:f.r+(l.get("scale")&&l.get("scaleSize")||0)},sl(l.getModel("itemStyle"),f)),oe(o.ensureState("select"),{x:g,y:v,shape:sl(u.getModel(["select","itemStyle"]),f)}),oe(o.ensureState("blur"),{shape:sl(u.getModel(["blur","itemStyle"]),f)});var y=o.getTextGuideLine(),b=o.getTextContent();y&&oe(y.ensureState("select"),{x:g,y:v}),oe(b.ensureState("select"),{x:g,y:v}),Eu(this,l.get("focus"),l.get("blurScope"),l.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),u=n.getItemVisual(i,"style"),l=u&&u.fill,f=u&&u.opacity;Mu(a,Fu(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:l,defaultOpacity:f,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var c=a.getTextContent();a.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var h=r.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Pu,this.setTextGuideLine(d)),sA(this,uA(o),{stroke:l,opacity:Da(s.get(["lineStyle","opacity"]),f,1)})}},e}(In),r$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,u=this.group,l;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c<o.count();++c)f=o.getItemLayout(c);f&&(l=f.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var h=$A(r),d=new In({shape:oe(WA(r,i),h)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,u.add(d)}o.diff(s).add(function(p){var g=new t$(o,p,l);o.setItemGraphicEl(p,g),u.add(g)}).update(function(p,g){var v=s.getItemGraphicEl(g);v.updateData(o,p,l),v.off("click"),u.add(v),o.setItemGraphicEl(p,v)}).remove(function(p){var g=s.getItemGraphicEl(p);Ec(g,r,p)}).execute(),e$(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,u=Math.sqrt(o*o+s*s);return u<=a.r&&u>=a.r0}},e.type="pie",e}(Zr);function n$(t,e,r){e=he(e)&&{coordDimensions:e}||oe({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=F2(n,e).dimensions,a=new M2(i,t);return a.initData(n,r),a}var i$=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),a$=lt(),o$=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new i$(dt(this.getData,this),dt(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return n$(this,{coordDimensions:["value"],encodeDefaulter:Dt(K7,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=a$(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(u){o.push(u)}),a=i.seats=Yk(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){rg(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(fn);function s$(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(nt(o)&&!isNaN(o)&&o<0)})}}}function u$(t){t.registerChartView(r$),t.registerSeriesModel(o$),Ij("pie",t.registerAction),t.registerLayout(Dt(KW,"pie")),t.registerProcessor(ZW("pie")),t.registerProcessor(s$("pie"))}var l$=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Ze),Cm=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",sn).models[0]},e.type="cartesian2dAxis",e}(Ze);xn(Cm,jH);var qA={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},f$=Qe({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qA),wm=Qe({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},qA),c$=Qe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},wm),h$=je({logBase:10},wm);const d$={category:f$,value:wm,time:c$,log:h$};var v$={value:1,category:1,time:1,log:1};function YA(t,e,r,n){N(v$,function(i,a){var o=Qe(Qe({},d$[a],!0),n,!0),s=function(u){ce(l,u);function l(){var f=u!==null&&u.apply(this,arguments)||this;return f.type=e+"Axis."+a,f}return l.prototype.mergeDefaultAndTheme=function(f,c){var h=ku(this),d=h?$c(f):{},p=c.getTheme();Qe(f,p.get(a+"Axis")),Qe(f,this.getDefaultOption()),f.type=XA(f),h&&qa(f,d,h)},l.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=J0.createByAxisModel(this))},l.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.type=e+"Axis."+a,l.defaultOption=o,l}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",XA)}function XA(t){return t.type||(t.data?"category":"value")}var p$=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return ye(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),bt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),_m=["x","y"];function KA(t){return t.type==="interval"||t.type==="time"}var g$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=_m,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!KA(r)||!KA(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),u=i[1]-i[0],l=a[1]-a[0];if(!(!u||!l)){var f=(s[0]-o[0])/u,c=(s[1]-o[1])/l,h=o[0]-i[0]*f,d=o[1]-a[0]*c,p=this._transform=[f,0,0,c,h,d];this._invTransform=Tf([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ue(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return jr(i,r,this._transform);var s=this.getAxis("x"),u=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=u.toGlobalCoord(u.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),u=i.parse(r[0]),l=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return jr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,u=Math.max(i[0],i[1])-o+r;return new Ue(a,o,s,u)},e}(p$),m$=function(t){ce(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(KH);function Dm(t,e,r){r=r||{};var n=t.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,u=o?"onZero":s,l=i.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p=l==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=[l==="y"?p[h[u]]:c[0],l==="x"?p[h[u]]:c[3]],a.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),_a(r.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=u==="top"?-m:m,a.z2=1,a}function ZA(t){return t.get("coordinateSystem")==="cartesian2d"}function JA(t){var e={xAxisModel:null,yAxisModel:null};return N(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,sn).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+Da(t.get(i+"Index"),t.get(i+"Id"),0)+'" not found');e[n]=a}),e}var xm=Math.log;function y$(t,e,r){var n=ys.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),u=G2(t,e),l=u.extent,f=u.fixMin,c=u.fixMax;if(t.type==="log"){var h=xm(t.base);l=[xm(l[0])/h,xm(l[1])/h]}t.setExtent(l[0],l[1]),t.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var d=n.getExtent.call(t);f&&(l[0]=d[0]),c&&(l[1]=d[1]);var p=n.getInterval.call(t),g=l[0],v=l[1];if(f&&c)p=(v-g)/o;else if(f)for(v=l[0]+p*o;v<l[1]&&isFinite(v)&&isFinite(l[1]);)p=em(p),v=l[0]+p*o;else if(c)for(g=l[1]-p*o;g>l[0]&&isFinite(g)&&isFinite(l[0]);)p=em(p),g=l[1]-p*o;else{var m=t.getTicks().length-1;m>o&&(p=em(p));var y=p*o;v=Math.ceil(l[1]/p)*p,g=Tt(v-y),g<0&&l[0]>=0?(g=0,v=Tt(y)):v>0&&l[1]<=0&&(v=0,g=-Tt(y))}var b=(i[0].value-a[0].value)/s,w=(i[o].value-a[o].value)/s;if(n.setExtent.call(t,g+p*b,v+p*w),n.setInterval.call(t,p),(b||w)&&n.setNiceExtent.call(t,g+p,v-p),process.env.NODE_ENV!=="production"){var C=n.getTicks.call(t);C[1]&&(!uH(p)||tg(C[1].value)>tg(p))&&xt("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+" and alignTicks: true")}}var b$=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_m,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,u=Ke(o),l=u.length;if(l){for(var f=[],c=l-1;c>=0;c--){var h=+u[c],d=o[h],p=d.model,g=d.scale;Q0(g)&&p.get("alignTicks")&&p.get("interval")==null?f.push(d):(U2(g,p),Q0(g)&&(s=d))}f.length&&(s||(s=f.pop(),U2(s.scale,s.model)),N(f,function(v){y$(v.scale,v.model,s.scale)}))}}i(n.x),i(n.y);var a={};N(n.x,function(o){QA(n,"y",o,a)}),N(n.y,function(o){QA(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=Ua(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;u(),a&&(N(s,function(l){if(!l.model.get(["axisLabel","inside"])){var f=NH(l);if(f){var c=l.isHorizontal()?"height":"width",h=l.model.get(["axisLabel","margin"]);o[c]-=f[c]+h,l.position==="top"?o.y+=f.height+h:l.position==="left"&&(o.x+=f.width+h)}}}),u()),N(this._coordsList,function(l){l.calcAffineTransform()});function u(){N(s,function(l){var f=l.isHorizontal(),c=f?[0,o.width]:[0,o.height],h=l.inverse?1:0;l.setExtent(c[h],c[1-h]),C$(l,f?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}we(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===r)return a[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,n=e.xAxisModel||r&&r.getReferringComponents("xAxis",sn).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",sn).models[0],a=e.gridModel,o=this._coordsList,s,u;if(r)s=r.coordinateSystem,Ge(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)u=this.getAxis("x",n.componentIndex);else if(i)u=this.getAxis("y",i.componentIndex);else if(a){var l=a.coordinateSystem;l===this&&(s=this._coordsList[0])}return{cartesian:s,axis:u}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},u={x:0,y:0};if(r.eachComponent("xAxis",l("x"),this),r.eachComponent("yAxis",l("y"),this),!u.x||!u.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,N(s.x,function(f,c){N(s.y,function(h,d){var p="x"+c+"y"+d,g=new g$(p);g.master=i,g.model=e,i._coordsMap[p]=g,i._coordsList.push(g),g.addAxis(f),g.addAxis(h)})});function l(f){return function(c,h){if(Sm(c,e)){var d=c.get("position");f==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new m$(f,IH(c),[0,0],c.get("type"),d),g=p.type==="category";p.onBand=g&&c.get("boundaryGap"),p.inverse=c.get("inverse"),c.axis=p,p.model=c,p.grid=a,p.index=h,a._axesList.push(p),s[f][h]=p,u[f]++}}}},t.prototype._updateScale=function(e,r){N(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(ZA(i)){var a=JA(i),o=a.xAxisModel,s=a.yAxisModel;if(!Sm(o,r)||!Sm(s,r))return;var u=this.getCartesian(o.componentIndex,s.componentIndex),l=i.getData(),f=u.getAxis("x"),c=u.getAxis("y");n(l,f),n(l,c)}},this);function n(i,a){N(zH(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],n=[];return N(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);Ge(r,a)<0&&r.push(a),Ge(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},t.create=function(e,r){var n=[];return e.eachComponent("grid",function(i,a){var o=new t(i,e,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){if(ZA(i)){var a=JA(i),o=a.xAxisModel,s=a.yAxisModel,u=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+Da(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var l=u.coordinateSystem;i.coordinateSystem=l.getCartesian(o.componentIndex,s.componentIndex)}}),n},t.dimensions=_m,t}();function Sm(t,e){return t.getCoordSysModel()===e}function QA(t,e,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=t[e],a,o=r.model,s=o.get(["axisLine","onZero"]),u=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(u!=null)eT(i[u])&&(a=i[u]);else for(var l in i)if(i.hasOwnProperty(l)&&eT(i[l])&&!n[f(i[l])]){a=i[l];break}a&&(n[f(a)]=!0);function f(c){return c.dim+"_"+c.index}}function eT(t){return t&&t.type!=="category"&&t.type!=="time"&&RH(t)}function C$(t,e){var r=t.getExtent(),n=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return n-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}var qi=Math.PI,Yi=function(){function t(e,r){this.group=new It,this.opt=r,this.axisModel=e,je(r,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new It({x:r.position[0],y:r.position[1],rotation:r.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(e){return!!tT[e]},t.prototype.add=function(e){tT[e](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(e,r,n){var i=oD(r-e),a,o;return Zf(i)?(o=n>0?"top":"bottom",a="center"):Zf(i-qi)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<qi?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),tT={axisLine:function(t,e,r,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&t.handleAutoShown&&(i=t.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],u=[a[1],0],l=s[0]>u[0];o&&(jr(s,s,o),jr(u,u,o));var f=oe({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Ni({shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:f,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Bu(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);be(h)&&(h=[h,h]),(be(d)||nt(d))&&(d=[d,d]);var p=LE(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],v=d[1];N([{rotate:t.rotation+Math.PI/2,offset:p[0],r:0},{rotate:t.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var b=hs(h[y],-g/2,-v/2,g,v,f.stroke,!0),w=m.r+m.offset,C=l?u:s;b.attr({rotation:m.rotate,x:C[0]+w*Math.cos(t.rotation),y:C[1]-w*Math.sin(t.rotation),silent:!0,z2:11}),r.add(b)}})}}},axisTickLabel:function(t,e,r,n){var i=D$(r,n,e,t),a=S$(r,n,e,t);if(_$(e,a,i),x$(r,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=lA(ye(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));hA(o)}},axisName:function(t,e,r,n){var i=_a(t.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),u=e.get("nameGap")||0,l=e.axis.getExtent(),f=l[0]>l[1]?-1:1,c=[a==="start"?l[0]-f*u:a==="end"?l[1]+f*u:(l[0]+l[1])/2,nT(a)?t.labelOffset+o*u:0],h,d=e.get("nameRotate");d!=null&&(d=d*qi/180);var p;nT(a)?h=Yi.innerTextLayout(t.rotation,d??t.rotation,o):(h=w$(t.rotation,a,d||0,l),p=t.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var g=s.getFont(),v=e.get("nameTruncate",!0)||{},m=v.ellipsis,y=_a(t.nameTruncateMaxWidth,v.maxWidth,p),b=new Ot({x:c[0],y:c[1],rotation:h.rotation,silent:Yi.isLabelSilent(e),style:ki(s,{text:i,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Oc({el:b,componentModel:e,itemName:i}),b.__fullText=i,b.anid="name",e.get("triggerEvent")){var w=Yi.makeAxisEventDataBase(e);w.targetType="axisName",w.name=i,He(b).eventData=w}n.add(b),b.updateTransform(),r.add(b),b.decomposeTransform()}}};function w$(t,e,r,n){var i=oD(r-t),a,o,s=n[0]>n[1],u=e==="start"&&!s||e!=="start"&&s;return Zf(i-qi/2)?(o=u?"bottom":"top",a="center"):Zf(i-qi*1.5)?(o=u?"top":"bottom",a="center"):(o="middle",i<qi*1.5&&i>qi/2?a=u?"left":"right":a=u?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function _$(t,e,r){if(!q2(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),i=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var a=e[0],o=e[1],s=e[e.length-1],u=e[e.length-2],l=r[0],f=r[1],c=r[r.length-1],h=r[r.length-2];n===!1?(Qr(a),Qr(l)):rT(a,o)&&(n?(Qr(o),Qr(f)):(Qr(a),Qr(l))),i===!1?(Qr(s),Qr(c)):rT(u,s)&&(i?(Qr(u),Qr(h)):(Qr(s),Qr(c)))}}function Qr(t){t&&(t.ignore=!0)}function rT(t,e){var r=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!r||!n)){var i=wp([]);return Dp(i,i,-t.rotation),r.applyTransform(jo([],i,t.getLocalTransform())),n.applyTransform(jo([],i,e.getLocalTransform())),r.intersect(n)}}function nT(t){return t==="middle"||t==="center"}function iT(t,e,r,n,i){for(var a=[],o=[],s=[],u=0;u<t.length;u++){var l=t[u].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=r,e&&(jr(o,o,e),jr(s,s,e));var f=new Ni({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Bu(f.shape,f.style.lineWidth),f.anid=i+"_"+t[u].tickValue,a.push(f)}return a}function D$(t,e,r,n){var i=r.axis,a=r.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),u=n.tickDirection*a.get("length"),l=i.getTicksCoords(),f=iT(l,e.transform,u,je(s.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<f.length;c++)t.add(f[c]);return f}}function x$(t,e,r,n){var i=r.axis,a=r.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),u=n*a.get("length"),l=je(s.getLineStyle(),je(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var c=iT(o[f],e.transform,u,l,"minorticks_"+f),h=0;h<c.length;h++)t.add(c[h])}}function S$(t,e,r,n){var i=r.axis,a=_a(n.axisLabelShow,r.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=r.getModel("axisLabel"),s=o.get("margin"),u=i.getViewLabels(),l=(_a(n.labelRotate,o.get("rotate"))||0)*qi/180,f=Yi.innerTextLayout(n.rotation,l,n.labelDirection),c=r.getCategories&&r.getCategories(!0),h=[],d=Yi.isLabelSilent(r),p=r.get("triggerEvent");return N(u,function(g,v){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(g.tickValue):g.tickValue,y=g.formattedLabel,b=g.rawLabel,w=o;if(c&&c[m]){var C=c[m];we(C)&&C.textStyle&&(w=new Ct(C.textStyle,o,r.ecModel))}var _=w.getTextColor()||r.get(["axisLine","lineStyle","color"]),D=i.dataToCoord(m),x=w.getShallow("align",!0)||f.textAlign,S=Be(w.getShallow("alignMinLabel",!0),x),O=Be(w.getShallow("alignMaxLabel",!0),x),E=w.getShallow("verticalAlign",!0)||w.getShallow("baseline",!0)||f.textVerticalAlign,P=Be(w.getShallow("verticalAlignMinLabel",!0),E),F=Be(w.getShallow("verticalAlignMaxLabel",!0),E),B=new Ot({x:D,y:n.labelOffset+n.labelDirection*s,rotation:f.rotation,silent:d,z2:10+(g.level||0),style:ki(w,{text:y,align:v===0?S:v===u.length-1?O:x,verticalAlign:v===0?P:v===u.length-1?F:E,fill:De(_)?_(i.type==="category"?b:i.type==="value"?m+"":m,v):_})});if(B.anid="label_"+m,p){var M=Yi.makeAxisEventDataBase(r);M.targetType="axisLabel",M.value=b,M.tickIndex=v,i.type==="category"&&(M.dataIndex=m),He(B).eventData=M}e.add(B),B.updateTransform(),h.push(B),t.add(B),B.decomposeTransform()}),h}}function E$(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return A$(r,t,e),r.seriesInvolved&&O$(r,t),r}function A$(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];N(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var u=ul(s.model),l=t.coordSysAxesInfo[u]={};t.coordSysMap[u]=s;var f=s.model,c=f.getModel("tooltip",n);if(N(s.getAxes(),Dt(g,!1,null)),s.getTooltipAxes&&n&&c.get("show")){var h=c.get("trigger")==="axis",d=c.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(c.get(["axisPointer","axis"]));(h||d)&&N(p.baseAxes,Dt(g,d?"cross":!0,h)),d&&N(p.otherAxes,Dt(g,"cross",!1))}function g(v,m,y){var b=y.model.getModel("axisPointer",i),w=b.get("show");if(!(!w||w==="auto"&&!v&&!Tm(b))){m==null&&(m=b.get("triggerTooltip")),b=v?T$(y,c,i,e,v,m):b;var C=b.get("snap"),_=b.get("triggerEmphasis"),D=ul(y.model),x=m||C||y.type==="category",S=t.axesInfo[D]={key:D,axis:y,coordSys:s,axisPointerModel:b,triggerTooltip:m,triggerEmphasis:_,involveSeries:x,snap:C,useHandle:Tm(b),seriesModels:[],linkGroup:null};l[D]=S,t.seriesInvolved=t.seriesInvolved||x;var O=P$(a,y);if(O!=null){var E=o[O]||(o[O]={axesInfo:{}});E.axesInfo[D]=S,E.mapper=a[O].mapper,S.linkGroup=E}}}})}function T$(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],u={};N(s,function(h){u[h]=$e(o.get(h))}),u.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(u.type="line");var l=u.label||(u.label={});if(l.show==null&&(l.show=!1),i==="cross"){var f=o.get(["label","show"]);if(l.show=f??!0,!a){var c=u.lineStyle=o.get("crossStyle");c&&je(l,c.textStyle)}}return t.model.getModel("axisPointer",new Ct(u,r,n))}function O$(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||N(t.coordSysAxesInfo[ul(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function P$(t,e){for(var r=e.model,n=e.dim,i=0;i<t.length;i++){var a=t[i]||{};if(Em(a[n+"AxisId"],r.id)||Em(a[n+"AxisIndex"],r.componentIndex)||Em(a[n+"AxisName"],r.name))return i}}function Em(t,e){return t==="all"||he(t)&&Ge(t,e)>=0||t===e}function B$(t){var e=Am(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=Tm(r);a==null&&(i.status=s?"show":"hide");var u=n.getExtent().slice();u[0]>u[1]&&u.reverse(),(o==null||o>u[1])&&(o=u[1]),o<u[0]&&(o=u[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function Am(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[ul(t)]}function M$(t){var e=Am(t);return e&&e.axisPointerModel}function Tm(t){return!!t.get(["handle","show"])}function ul(t){return t.type+"||"+t.id}var Om={},aT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this.axisPointerClass&&B$(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},e.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},e.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(r,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=M$(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&Om[r])throw new Error("axisPointer "+r+" exists");Om[r]=n},e.getAxisPointerClass=function(r){return r&&Om[r]},e.type="axis",e}(Br),Pm=lt();function F$(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),u=n.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,clamp:!0});if(l.length){var f=s.length,c=Pm(t).splitAreaColors,h=Ae(),d=0;if(c)for(var p=0;p<l.length;p++){var g=c.get(l[p].tickValue);if(g!=null){d=(g+(f-1)*p)%f;break}}var v=i.toGlobalCoord(l[0].coord),m=o.getAreaStyle();s=he(s)?s:[s];for(var p=1;p<l.length;p++){var y=i.toGlobalCoord(l[p].coord),b=void 0,w=void 0,C=void 0,_=void 0;i.isHorizontal()?(b=v,w=u.y,C=y-b,_=u.height,v=b+C):(b=u.x,w=v,C=u.width,_=y-w,v=w+_);var D=l[p-1].tickValue;D!=null&&h.set(D,d),e.add(new St({anid:D!=null?"area_"+D:null,shape:{x:b,y:w,width:C,height:_},style:je({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%f}Pm(t).splitAreaColors=h}}}function L$(t){Pm(t).splitAreaColors=null}var I$=["axisLine","axisTickLabel","axisName"],R$=["splitArea","splitLine","minorSplitLine"],oT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new It,this.group.add(this._axisGroup),!!r.get("show")){var s=r.getCoordSysModel(),u=Dm(s,r),l=new Yi(r,oe({handleAutoShown:function(c){for(var h=s.coordinateSystem.getCartesians(),d=0;d<h.length;d++)if(Q0(h[d].getOtherAxis(r.axis).scale))return!0;return!1}},u));N(I$,l.add,l),this._axisGroup.add(l.getGroup()),N(R$,function(c){r.get([c,"show"])&&N$[c](this,this._axisGroup,r,s)},this);var f=a&&a.type==="changeAxisOrder"&&a.isInitSort;f||Nx(o,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)}},e.prototype.remove=function(){L$(this)},e.type="cartesianAxis",e}(aT),N$={splitLine:function(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=he(s)?s:[s];for(var u=n.coordinateSystem.getRect(),l=i.isHorizontal(),f=0,c=i.getTicksCoords({tickModel:a}),h=[],d=[],p=o.getLineStyle(),g=0;g<c.length;g++){var v=i.toGlobalCoord(c[g].coord);l?(h[0]=v,h[1]=u.y,d[0]=v,d[1]=u.y+u.height):(h[0]=u.x,h[1]=v,d[0]=u.x+u.width,d[1]=v);var m=f++%s.length,y=c[g].tickValue,b=new Ni({anid:y!=null?"line_"+c[g].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:je({stroke:s[m]},p),silent:!0});Bu(b.shape,p.lineWidth),e.add(b)}}},minorSplitLine:function(t,e,r,n){var i=r.axis,a=r.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),u=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var f=[],c=[],h=o.getLineStyle(),d=0;d<l.length;d++)for(var p=0;p<l[d].length;p++){var g=i.toGlobalCoord(l[d][p].coord);u?(f[0]=g,f[1]=s.y,c[0]=g,c[1]=s.y+s.height):(f[0]=s.x,f[1]=g,c[0]=s.x+s.width,c[1]=g);var v=new Ni({anid:"minor_line_"+l[d][p].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:h,silent:!0});Bu(v.shape,h.lineWidth),e.add(v)}},splitArea:function(t,e,r,n){F$(t,e,r,n)}},sT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e}(oT),k$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=sT.type,r}return e.type="yAxis",e}(oT),z$=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new St({shape:r.coordinateSystem.getRect(),style:je({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Br),uT={offset:0};function j$(t){t.registerComponentView(z$),t.registerComponentModel(l$),t.registerCoordinateSystem("cartesian2d",b$),YA(t,"x",Cm,uT),YA(t,"y",Cm,uT),t.registerComponentView(sT),t.registerComponentView(k$),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function V$(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||xe(t,"text")))}function H$(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},xe(n,"text")&&(o.text=n.text),xe(n,"rich")&&(o.rich=n.rich),xe(n,"textFill")&&(o.fill=n.textFill),xe(n,"textStroke")&&(o.stroke=n.textStroke),xe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),xe(n,"fontSize")&&(o.fontSize=n.fontSize),xe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),xe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=xe(n,"textPosition");i.position=s?n.textPosition:"inside",xe(n,"textPosition")&&(i.position=n.textPosition),xe(n,"textOffset")&&(i.offset=n.textOffset),xe(n,"textRotation")&&(i.rotation=n.textRotation),xe(n,"textDistance")&&(i.distance=n.textDistance)}return lT(o,t),N(o.rich,function(u){lT(u,u)}),{textConfig:i,textContent:a}}function lT(t,e){e&&(e.font=e.textFont||e.font,xe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),xe(e,"textAlign")&&(t.align=e.textAlign),xe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),xe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),xe(e,"textWidth")&&(t.width=e.textWidth),xe(e,"textHeight")&&(t.height=e.textHeight),xe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),xe(e,"textPadding")&&(t.padding=e.textPadding),xe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),xe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),xe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),xe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),xe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),xe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),xe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}var fT={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},cT=Ke(fT),Ph=ri(Tn,function(t,e){return t[e]=1,t},{}),hT=Tn.join(", "),Bh=["","style","shape","extra"],Cs=lt();function Bm(t,e,r,n,i){var a=t+"Animation",o=ts(t,n,i)||{},s=Cs(e).userDuring;return o.duration>0&&(o.during=s?dt(Y$,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),oe(o,r[a]),o}function Mm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),u=Cs(t),l=e.style;u.userDuring=e.during;var f={},c={};if(K$(t,e,c),pT("shape",e,c),pT("extra",e,c),!a&&s&&(X$(t,e,f),vT("shape",t,e,f),vT("extra",t,e,f),Z$(t,e,l,f)),c.style=l,$$(t,c,o),U$(t,e),s)if(a){var h={};N(Bh,function(p){var g=p?e[p]:e;g&&g.enterFrom&&(p&&(h[p]=h[p]||{}),oe(p?h[p]:h,g.enterFrom))});var d=Bm("enter",t,e,r,i);d.duration>0&&t.animateFrom(h,d)}else G$(t,e,i||0,r,f);dT(t,e),l?t.dirty():t.markRedraw()}function dT(t,e){for(var r=Cs(t).leaveToProps,n=0;n<Bh.length;n++){var i=Bh[n],a=i?e[i]:e;a&&a.leaveTo&&(r||(r=Cs(t).leaveToProps={}),i&&(r[i]=r[i]||{}),oe(i?r[i]:r,a.leaveTo))}}function W$(t,e,r,n){if(t){var i=t.parent,a=Cs(t).leaveToProps;if(a){var o=Bm("update",t,e,r,0);o.done=function(){i.remove(t)},t.animateTo(a,o)}else i.remove(t)}}function no(t){return t==="all"}function $$(t,e,r){var n=e.style;if(!t.isGroup&&n){if(r){t.useStyle({});for(var i=t.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(t.style)}}t.setStyle(n)}e&&(e.style=null,e&&t.attr(e),e.style=n)}function G$(t,e,r,n,i){if(i){var a=Bm("update",t,e,n,r);a.duration>0&&t.animateFrom(i,a)}}function U$(t,e){xe(e,"silent")&&(t.silent=e.silent),xe(e,"ignore")&&(t.ignore=e.ignore),t instanceof Fi&&xe(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ve&&xe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Vn={},q$={setTransform:function(t,e){return process.env.NODE_ENV!=="production"&&Ee(xe(Ph,t),"Only "+hT+" available in `setTransform`."),Vn.el[t]=e,this},getTransform:function(t){return process.env.NODE_ENV!=="production"&&Ee(xe(Ph,t),"Only "+hT+" available in `getTransform`."),Vn.el[t]},setShape:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.shape;if(e)return e[t]},setStyle:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el,n=r.style;return n&&(process.env.NODE_ENV!=="production"&&Fo(e)&&xt("style."+t+" must not be assigned with NaN."),n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.style;if(e)return e[t]},setExtra:function(t,e){process.env.NODE_ENV!=="production"&&ws(t);var r=Vn.el.extra||(Vn.el.extra={});return r[t]=e,this},getExtra:function(t){process.env.NODE_ENV!=="production"&&ws(t);var e=Vn.el.extra;if(e)return e[t]}};function ws(t){if(process.env.NODE_ENV!=="production"&&(t==="transition"||t==="enterFrom"||t==="leaveTo"))throw new Error('key must not be "'+t+'"')}function Y$(){var t=this,e=t.el;if(e){var r=Cs(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Vn.el=e,n(q$)}}function vT(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,u=i.transition;if(u)if(!o&&(o=n[t]={}),no(u))oe(o,a);else for(var l=gt(u),f=0;f<l.length;f++){var c=l[f],h=a[c];o[c]=h}else if(no(s)||Ge(s,t)>=0){!o&&(o=n[t]={});for(var d=Ke(a),f=0;f<d.length;f++){var c=d[f],h=a[c];J$(i[c],h)&&(o[c]=h)}}}}}function pT(t,e,r){var n=e[t];if(n)for(var i=r[t]={},a=Ke(n),o=0;o<a.length;o++){var s=a[o];i[s]=hu(n[s])}}function X$(t,e,r){for(var n=e.transition,i=no(n)?Tn:gt(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=t[o];process.env.NODE_ENV!=="production"&&gT(o,"el.transition"),r[o]=s}}}function K$(t,e,r){for(var n=0;n<cT.length;n++){var i=cT[n],a=fT[i],o=e[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<Tn.length;n++){var s=Tn[n];e[s]!=null&&(r[s]=e[s])}}function Z$(t,e,r,n){if(r){var i=t.style,a;if(i){var o=r.transition,s=e.transition;if(o&&!no(o)){var u=gt(o);!a&&(a=n.style={});for(var l=0;l<u.length;l++){var f=u[l],c=i[f];a[f]=c}}else if(t.getAnimationStyleProps&&(no(s)||no(o)||Ge(s,"style")>=0)){var h=t.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var p=Ke(r),l=0;l<p.length;l++){var f=p[l];if(d[f]){var c=i[f];a[f]=c}}}}}}}function J$(t,e){return Wt(t)?t!==e:t!=null&&isFinite(t)}var gT;process.env.NODE_ENV!=="production"&&(gT=function(t,e){xe(Ph,t)||xt("Prop `"+t+"` is not a permitted in `"+e+"`. Only `"+Ke(Ph).join("`, `")+"` are permitted.")});var mT=lt(),Q$=["percent","easing","shape","style","extra"];function eG(t){t.stopAnimation("keyframe"),t.attr(mT(t))}function Fm(t,e,r){if(!(!r.isAnimationEnabled()||!e)){if(he(e)){N(e,function(s){Fm(t,s,r)});return}var n=e.keyframes,i=e.duration;if(r&&i==null){var a=ts("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=mT(t);N(Bh,function(s){if(!(s&&!t[s])){var u,l=!1;n.sort(function(f,c){return f.percent-c.percent}),N(n,function(f){var c=t.animators,h=s?f[s]:f;if(process.env.NODE_ENV!=="production"&&f.percent>=1&&(l=!0),!!h){var d=Ke(h);if(s||(d=bt(d,function(v){return Ge(Q$,v)<0})),!!d.length){u||(u=t.animate(s,e.loop,!0),u.scope="keyframe");for(var p=0;p<c.length;p++)c[p]!==u&&c[p].targetName===u.targetName&&c[p].stopTracks(d);s&&(o[s]=o[s]||{});var g=s?o[s]:o;N(d,function(v){g[v]=((s?t[s]:t)||{})[v]}),u.whenWithKeys(i*f.percent,h,d,f.easing)}}}),u&&(process.env.NODE_ENV!=="production"&&(l||xt("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),u.delay(e.delay||0).duration(i).start(e.easing))}})}}}var io=lt(),yT=$e,Lm=dt,tG=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,u=this._handle;if(!o||o==="hide"){s&&s.hide(),u&&u.hide();return}s&&s.show(),u&&u.show();var l={};this.makeElOption(l,a,e,r,n);var f=l.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new It,this.createPointerEl(s,l,e,r),this.createLabelEl(s,l,e,r),n.getZr().add(s);else{var h=Dt(bT,r,c);this.updatePointerEl(s,l,h),this.updateLabelEl(s,l,h,r)}_T(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var u=Am(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/u>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=io(e).pointerEl=new b7[a.type](yT(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=io(e).labelEl=new Ot(yT(r.label));e.add(a),wT(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=io(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=io(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),wT(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Wg(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){v_(l.event)},onmousedown:Lm(this._onHandleDragMove,this,0,0),drift:Lm(this._onHandleDragMove,this),ondragend:Lm(this._onHandleDragEnd,this)}),n.add(i)),_T(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=a.get("size");he(u)||(u=[u,u]),i.scaleX=u[0]/2,i.scaleY=u[1]/2,CE(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){bT(this._axisPointerModel,!r&&this._moveAnimation,this._handle,Im(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Im(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Im(i)),io(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),S0(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function bT(t,e,r,n){CT(io(r).lastProp,n)||(io(r).lastProp=n,e?Ft(r,n,t):(r.stopAnimation(),r.attr(n)))}function CT(t,e){if(we(t)&&we(e)){var r=!0;return N(e,function(n,i){r=r&&CT(t[i],n)}),!!r}else return t===e}function wT(t,e){t[e.get(["label","show"])?"show":"hide"]()}function Im(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function _T(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function rG(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function nG(t,e,r,n,i){var a=r.get("value"),o=DT(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),u=Vc(s.get("padding")||0),l=s.getFont(),f=Yp(o,l),c=i.position,h=f.width+u[1]+u[3],d=f.height+u[0]+u[2],p=i.align;p==="right"&&(c[0]-=h),p==="center"&&(c[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(c[1]-=d),g==="middle"&&(c[1]-=d/2),iG(c,h,d,n);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:ki(s,{text:o,font:l,fill:s.getTextColor(),padding:u,backgroundColor:v}),z2:10}}function iG(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function DT(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:am(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};N(n,function(u){var l=r.getSeriesByIndex(u.seriesIndex),f=u.dataIndexInside,c=l&&l.getDataParams(f);c&&s.seriesData.push(c)}),be(o)?a=o.replace("{value}",a):De(o)&&(a=o(s))}return a}function xT(t,e,r){var n=zo();return Dp(n,n,r.rotation),_p(n,n,r.position),Hg([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function aG(t,e,r,n,i,a){var o=Yi.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),nG(e,n,i,a,{position:xT(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function oG(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function sG(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}var uG=function(t){ce(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,u=s.grid,l=a.get("type"),f=ST(u,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(l&&l!=="none"){var h=rG(a),d=lG[l](s,c,f);d.style=h,r.graphicKey=d.type,r.pointer=d}var p=Dm(u.model,i);aG(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Dm(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=xT(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,u=o.getGlobalExtent(!0),l=ST(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[r.x,r.y];c[f]+=n[f],c[f]=Math.min(u[1],c[f]),c[f]=Math.max(u[0],c[f]);var h=(l[1]+l[0])/2,d=[h,h];d[f]=c[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[f]}},e}(tG);function ST(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var lG={line:function(t,e,r){var n=oG([e,r[0]],[e,r[1]],ET(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:sG([e-n/2,r[0]],[n,i],ET(t))}}};function ET(t){return t.dim==="x"?0:1}var fG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Ze),pi=lt(),cG=N;function AT(t,e,r){if(!Pe.node){var n=e.getZr();pi(n).records||(pi(n).records={}),hG(n,e);var i=pi(n).records[t]||(pi(n).records[t]={});i.handler=r}}function hG(t,e){if(pi(t).initialized)return;pi(t).initialized=!0,r("click",Dt(TT,"click")),r("mousemove",Dt(TT,"mousemove")),r("globalout",vG);function r(n,i){t.on(n,function(a){var o=pG(e);cG(pi(t).records,function(s){s&&i(s,a,o.dispatchAction)}),dG(o.pendings,e)})}}function dG(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function vG(t,e,r){t.handler("leave",null,r)}function TT(t,e,r,n){e.handler(t,r,n)}function pG(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function Rm(t,e){if(!Pe.node){var r=e.getZr(),n=(pi(r).records||{})[t];n&&(pi(r).records[t]=null)}}var gG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";AT("axisPointer",i,function(s,u,l){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&l({type:"updateAxisPointer",currTrigger:s,x:u&&u.offsetX,y:u&&u.offsetY})})},e.prototype.remove=function(r,n){Rm("axisPointer",n)},e.prototype.dispose=function(r,n){Rm("axisPointer",n)},e.type="axisPointer",e}(Br);function OT(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Pa(a,t);if(o==null||o<0||he(o))return{point:[]};var s=a.getItemGraphicEl(o),u=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(u&&u.dataToPoint)if(t.isStacked){var l=u.getBaseAxis(),f=u.getOtherAxis(l),c=f.dim,h=l.dim,d=c==="x"||c==="radius"?1:0,p=a.mapDimension(h),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=u.dataToPoint(g)||[]}else r=u.dataToPoint(a.getValues(ye(u.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),r=[v.x+v.width/2,v.y+v.height/2]}return{point:r,el:s}}var PT=lt();function mG(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||dt(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Mh(i)&&(i=OT({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var u=Mh(i),l=a.axesInfo,f=s.axesInfo,c=n==="leave"||Mh(i),h={},d={},p={list:[],map:{}},g={showPointer:Dt(bG,d),showTooltip:Dt(CG,p)};N(s.coordSysMap,function(m,y){var b=u||m.containPoint(i);N(s.coordSysAxesInfo[y],function(w,C){var _=w.axis,D=xG(l,w);if(!c&&b&&(!l||D)){var x=D&&D.value;x==null&&!u&&(x=_.pointToData(i)),x!=null&&BT(w,x,g,!1,h)}})});var v={};return N(f,function(m,y){var b=m.linkGroup;b&&!d[y]&&N(b.axesInfo,function(w,C){var _=d[C];if(w!==m&&_){var D=_.value;b.mapper&&(D=m.axis.scale.parse(b.mapper(D,MT(w),MT(m)))),v[m.key]=D}})}),N(v,function(m,y){BT(f[y],m,g,!0,h)}),wG(d,f,h),_G(p,i,t,o),DG(f,o,r),h}}function BT(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=yG(e,t),s=o.payloadBatch,u=o.snapToValue;s[0]&&i.seriesIndex==null&&oe(i,s[0]),!n&&t.snap&&a.containData(u)&&u!=null&&(e=u),r.showPointer(t,e,s),r.showTooltip(t,o,u)}}function yG(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return N(e.seriesModels,function(u,l){var f=u.getData().mapDimensionsAll(n),c,h;if(u.getAxisTooltipData){var d=u.getAxisTooltipData(f,t,r);h=d.dataIndices,c=d.nestestValue}else{if(h=u.getData().indicesOfNearest(f[0],t,r.type==="category"?.5:null),!h.length)return;c=u.getData().get(f[0],h[0])}if(!(c==null||!isFinite(c))){var p=t-c,g=Math.abs(p);g<=o&&((g<o||p>=0&&s<0)&&(o=g,s=p,i=c,a.length=0),N(h,function(v){a.push({seriesIndex:u.seriesIndex,dataIndexInside:v,dataIndex:u.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:i}}function bG(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function CG(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var u=e.coordSys.model,l=ul(u),f=t.map[l];f||(f=t.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function wG(t,e,r){var n=r.axesInfo=[];N(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function _G(t,e,r,n){if(Mh(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function DG(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=PT(n)[i]||{},o=PT(n)[i]={};N(t,function(l,f){var c=l.axisPointerModel.option;c.status==="show"&&l.triggerEmphasis&&N(c.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],u=[];N(a,function(l,f){!o[f]&&u.push(l)}),N(o,function(l,f){!a[f]&&s.push(l)}),u.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function xG(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function MT(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function Mh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function FT(t){aT.registerAxisPointerClass("CartesianAxisPointer",uG),t.registerComponentModel(fG),t.registerComponentView(gG),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!he(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=E$(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},mG)}function SG(t){Wi(j$),Wi(FT)}function EG(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function LT(t,e){var r;return N(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function AG(t,e,r){var n=oe({},r),i=t[e],a=r.$action||"merge";if(a==="merge")if(i){if(process.env.NODE_ENV!=="production"){var o=r.type;Ee(!o||i.type===o,'Please set $action: "replace" to change `type`')}Qe(i,n,!0),qa(i,n,{ignoreSize:!0}),vS(r,i),Fh(r,i),Fh(r,i,"shape"),Fh(r,i,"style"),Fh(r,i,"extra"),r.clipPath=i.clipPath}else t[e]=n;else a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var IT=["transition","enterFrom","leaveTo"],TG=IT.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Fh(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?IT:TG,i=0;i<n.length;i++){var a=n[i];t[a]==null&&e[a]!=null&&(t[a]=e[a])}}function OG(t,e){if(t&&(t.hv=e.hv=[LT(e,["left","right"]),LT(e,["top","bottom"])],t.type==="group")){var r=t,n=e;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var PG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.mergeOption=function(r,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,r,n),this.option.elements=i},e.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var u=gD(o,s,"normalMerge"),l=this._elOptionsToUpdate=[];N(u,function(f,c){var h=f.newOption;process.env.NODE_ENV!=="production"&&Ee(we(h)||f.existing,"Empty graphic option definition"),h&&(l.push(h),EG(f,h),AG(o,c,h),OG(o[c],h))},this),i.elements=bt(o,function(f){return f&&delete f.$action,f!=null})},e.prototype._flatten=function(r,n,i){N(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},e.type="graphic",e.defaultOption={elements:[]},e}(Ze),RT={path:null,compoundPath:null,group:It,image:fi,text:Ot},en=lt(),BG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this._elMap=Ae()},e.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},e.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");N(n,function(u){var l=pr(u.id,null),f=l!=null?i.get(l):null,c=pr(u.parentId,null),h=c!=null?i.get(c):a,d=u.type,p=u.style;d==="text"&&p&&u.hv&&u.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var g=u.textContent,v=u.textConfig;if(p&&V$(p,d,!!v,!!g)){var m=H$(p,d);!v&&m.textConfig&&(v=u.textConfig=m.textConfig),!g&&m.textContent&&(g=m.textContent)}var y=MG(u);process.env.NODE_ENV!=="production"&&f&&Ee(h===f.parent,"Changing parent is not supported.");var b=u.$action||"merge",w=b==="merge",C=b==="replace";if(w){var _=!f,D=f;_?D=NT(l,h,u.type,i):(D&&(en(D).isNew=!1),eG(D)),D&&(Mm(D,y,r,{isInit:_}),kT(D,u,o,s))}else if(C){Lh(f,u,i,r);var x=NT(l,h,u.type,i);x&&(Mm(x,y,r,{isInit:!0}),kT(x,u,o,s))}else b==="remove"&&(dT(f,u),Lh(f,u,i,r));var S=i.get(l);if(S&&g)if(w){var O=S.getTextContent();O?O.attr(g):S.setTextContent(new Ot(g))}else C&&S.setTextContent(new Ot(g));if(S){var E=u.clipPath;if(E){var P=E.type,F=void 0,_=!1;if(w){var B=S.getClipPath();_=!B||en(B).type!==P,F=_?Nm(P):B}else C&&(_=!0,F=Nm(P));S.setClipPath(F),Mm(F,E,r,{isInit:_}),Fm(F,E.keyframeAnimation,r)}var M=en(S);S.setTextConfig(v),M.option=u,FG(S,r,u),Oc({el:S,componentModel:r,itemName:S.name,itemTooltipOption:u.tooltip}),Fm(S,u.keyframeAnimation,r)}})}},e.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),u=n.getHeight(),l=["x","y"],f=0;f<i.length;f++){var c=i[f],h=pr(c.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var p=d.parent,g=p===a,v=en(d),m=en(p);v.width=ut(v.option.width,g?s:m.width)||0,v.height=ut(v.option.height,g?u:m.height)||0}}for(var f=i.length-1;f>=0;f--){var c=i[f],h=pr(c.id,null),d=h!=null?o.get(h):null;if(d){var p=d.parent,m=en(p),y=p===a?{width:s,height:u}:{width:m.width,height:m.height},b={},w=$7(d,c,y,null,{hv:c.hv,boundingMode:c.bounding},b);if(!en(d).isNew&&w){for(var C=c.transition,_={},D=0;D<l.length;D++){var x=l[D],S=b[x];C&&(no(C)||Ge(C,x)>=0)?_[x]=S:d[x]=S}Ft(d,_,r,0)}else d.attr(b)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Lh(i,en(i).option,n,r._lastGraphicModel)}),this._elMap=Ae()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Br);function Nm(t){process.env.NODE_ENV!=="production"&&Ee(t,"graphic type MUST be set");var e=xe(RT,t)?RT[t]:Mx(t);process.env.NODE_ENV!=="production"&&Ee(e,"graphic type "+t+" can not be found");var r=new e({});return en(r).type=t,r}function NT(t,e,r,n){var i=Nm(r);return e.add(i),n.set(t,i),en(i).id=t,en(i).isNew=!0,i}function Lh(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Lh(a,e,r,n)}),W$(t,e,n),r.removeKey(en(t).id))}function kT(t,e,r,n){t.isGroup||N([["cursor",Fi.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];xe(e,a)?t[a]=Be(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),N(Ke(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=De(a)?a:null}}),xe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function MG(t){return t=oe({},t),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(dS),function(e){delete t[e]}),t}function FG(t,e,r){var n=He(t).eventData;!t.silent&&!t.ignore&&!n&&(n=He(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function LG(t){t.registerComponentModel(PG),t.registerComponentView(BG),t.registerPreprocessor(function(e){var r=e.graphic;he(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}function IG(t,e){var r=Vc(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new St({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),t}var RG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Ze);function zT(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function jT(t){if(Pe.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r<n;r++)if(t[r]in e)return t[r]}}var VT=jT(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),NG=jT(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function HT(t,e){if(!t)return e;e=lS(e,!0);var r=t.indexOf(e);return t=r===-1?e:"-"+t.slice(0,r)+"-"+e,t.toLowerCase()}function kG(t,e){var r=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return r?r[e]:null}var zG=HT(NG,"transition"),km=HT(VT,"transform"),jG="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Pe.transform3dSupported?"will-change:transform;":"");function VG(t){return t=t==="left"?"right":t==="right"?"left":t==="top"?"bottom":"top",t}function HG(t,e,r){if(!be(r)||r==="inside")return"";var n=t.get("backgroundColor"),i=t.get("borderWidth");e=Ga(e);var a=VG(r),o=Math.max(Math.round(i)*1.5,6),s="",u=km+":",l;Ge(["left","right"],a)>-1?(s+="top:50%",u+="translateY(-50%) rotate("+(l=a==="left"?-225:-45)+"deg)"):(s+="left:50%",u+="translateX(-50%) rotate("+(l=a==="top"?225:45)+"deg)");var f=l*Math.PI/180,c=o+i,h=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-c)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+u+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+g.join("")+'"></div>'}function WG(t,e){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+r,i="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+r,i+=Pe.transformSupported?","+km+n:",left"+n+",top"+n),zG+":"+i}function WT(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Pe.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Pe.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+km+":"+o+";":[["top",0],["left",0],[VT,o]]}function $G(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px");var i=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,o=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),N(["decoration","align"],function(u){var l=t.get(u);l&&e.push("text-"+u+":"+l)}),e.join(";")}function GG(t,e,r){var n=[],i=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.get("shadowBlur"),s=t.get("shadowColor"),u=t.get("shadowOffsetX"),l=t.get("shadowOffsetY"),f=t.getModel("textStyle"),c=hE(t,"html"),h=u+"px "+l+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i&&n.push(WG(i,r)),a&&n.push("background-color:"+a),N(["width","color","radius"],function(d){var p="border-"+d,g=lS(p),v=t.get(g);v!=null&&n.push(p+":"+v+(d==="color"?"":"px"))}),n.push($G(f)),c!=null&&n.push("padding:"+Vc(c).join("px ")+"px"),n.join(";")+";"}function $T(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&WN(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var UG=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Pe.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(be(a)?document.querySelector(a):Mo(a)?a:De(a)&&a(e.getDom()));$T(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(u){if(u=u||window.event,!s._enterable){var l=i.handler,f=i.painter.getViewportRoot();Vr(f,u,!0),l.dispatch("mousemove",u)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=kG(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=jG+GG(e,!this._firstShow,this._longHide)+WT(a[0],a[1],!0)+("border-color:"+Ga(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(be(a)&&n.get("trigger")==="item"&&!zT(n)&&(s=HG(n,i,a)),be(e))o.innerHTML=e+s;else if(e){o.innerHTML="",he(e)||(e=[e]);for(var u=0;u<e.length;u++)Mo(e[u])&&e[u].parentNode!==o&&o.appendChild(e[u]);if(s&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=s,o.appendChild(l)}}},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},t.prototype.moveTo=function(e,r){var n=this._styleCoord;if($T(n,this._zr,this._container,e,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=WT(n[0],n[1]);N(a,function(o){i[o[0]]=o[1]})}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){var e=this,r=this.el.style;r.visibility="hidden",r.opacity="0",Pe.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},t}(),qG=function(){function t(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),UT(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return t.prototype.update=function(e){var r=e.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(e,r,n,i,a){var o=this;we(e)&&qe(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Ot({style:{rich:r.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:hE(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),N(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(l){o.el.style[l]=n.get(l)}),N(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(l){o.el.style[l]=s.get(l)||0}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el,r=this.el.getBoundingRect(),n=GT(e.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},t.prototype.moveTo=function(e,r){var n=this.el;if(n){var i=this._styleCoord;UT(i,this._zr,e,r),e=i[0],r=i[1];var a=n.style,o=Xi(a.borderWidth||0),s=GT(a);n.x=e+o+s.left,n.y=r+o+s.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(dt(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function Xi(t){return Math.max(0,t)}function GT(t){var e=Xi(t.shadowBlur||0),r=Xi(t.shadowOffsetX||0),n=Xi(t.shadowOffsetY||0);return{left:Xi(e-r),right:Xi(e+r),top:Xi(e-n),bottom:Xi(e+n)}}function UT(t,e,r,n){t[0]=r,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var YG=new St({shape:{x:-1,y:-1,width:2,height:2}}),XG=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){if(!(Pe.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=d6(i.get("renderMode"));this._tooltipContent=a==="richText"?new qG(n):new UG(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(r,n,i){if(!(Pe.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?CE(this,"_updatePosition",50,"fixRate"):S0(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");AT("itemTooltip",this._api,dt(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Pe.node||!i.getDom())){var o=qT(a,i);this._ticket="";var s=a.dataByCoordSys,u=QG(a,n,i);if(u){var l=u.el.getBoundingRect().clone();l.applyTransform(u.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:u.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=YG;f.x=a.x,f.y=a.y,f.update(),He(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var c=OT(a,n),h=c.point[0],d=c.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(qT(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,u=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||u==null)){var l=n.getSeriesByIndex(o);if(l){var f=l.getData(),c=ll([f.getItemModel(s),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=He(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var u,l;Xu(i,function(f){if(He(f).dataIndex!=null)return u=f,!0;if(He(f).tooltipConfig!=null)return l=f,!0},!0),u?this._showSeriesItemTooltip(r,u,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=dt(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ll([n.tooltipOption],a),u=this._renderMode,l=[],f=Uu("section",{blocks:[],noHeader:!0}),c=[],h=new w0;N(r,function(y){N(y.dataByAxis,function(b){var w=i.getComponent(b.axisDim+"Axis",b.axisIndex),C=b.value;if(!(!w||C==null)){var _=DT(C,w.axis,i,b.seriesDataIndices,b.valueLabelOpt),D=Uu("section",{header:_,noHeader:!Sn(_),sortBlocks:!0,blocks:[]});f.blocks.push(D),N(b.seriesDataIndices,function(x){var S=i.getSeriesByIndex(x.seriesIndex),O=x.dataIndexInside,E=S.getDataParams(O);if(!(E.dataIndex<0)){E.axisDim=b.axisDim,E.axisIndex=b.axisIndex,E.axisType=b.axisType,E.axisId=b.axisId,E.axisValue=am(w.axis,{value:C}),E.axisValueLabel=_,E.marker=h.makeTooltipMarker("item",Ga(E.color),u);var P=qS(S.formatTooltip(O,!0,null)),F=P.frag;if(F){var B=ll([S],a).get("valueFormatter");D.blocks.push(B?oe({valueFormatter:B},F):F)}P.text&&c.push(P.text),l.push(E)}})}})}),f.blocks.reverse(),c.reverse();var d=n.position,p=s.get("order"),g=fE(f,h,u,p,i.get("useUTC"),s.get("textStyle"));g&&c.unshift(g);var v=u==="richText"?`
|
|
167
167
|
|
|
168
168
|
`:"<br/>",m=c.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,l)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(s,m,l,Math.random()+"",o[0],o[1],d,null,h)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=He(n),s=o.seriesIndex,u=a.getSeriesByIndex(s),l=o.dataModel||u,f=o.dataIndex,c=o.dataType,h=l.getData(c),d=this._renderMode,p=r.positionDefault,g=ll([h.getItemModel(f),l,u&&(u.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),v=g.get("trigger");if(!(v!=null&&v!=="item")){var m=l.getDataParams(f,c),y=new w0;m.marker=y.makeTooltipMarker("item",Ga(m.color),d);var b=qS(l.formatTooltip(f,!1,c)),w=g.get("order"),C=g.get("valueFormatter"),_=b.frag,D=_?fE(C?oe({valueFormatter:C},_):_,y,d,w,a.get("useUTC"),g.get("textStyle")):b.text,x="item_"+l.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,D,m,x,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=He(n),s=o.tooltipConfig,u=s.option||{},l=u.encodeHTMLContent;if(be(u)){var f=u;u={content:f,formatter:f},l=!0}l&&a&&u.content&&(u=$e(u),u.content=Tr(u.content));var c=[u],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&c.push(h),c.push({formatter:u.content});var d=r.positionDefault,p=ll(c,this._tooltipModel,d?{position:d}:null),g=p.get("content"),v=Math.random()+"",m=new w0;this._showOrMove(p,function(){var y=$e(p.get("formatterParams")||{});this._showTooltipContent(p,g,y,v,r.offsetX,r.offsetY,r.position,n,m)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,u,l,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var h=r.get("formatter");u=u||r.get("position");var d=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),g=p.color;if(h)if(be(h)){var v=r.ecModel.get("useUTC"),m=he(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=h,y&&(d=Rc(m.axisValue,d,v)),d=cS(d,i,!0)}else if(De(h)){var b=dt(function(w,C){w===this._ticket&&(c.setContent(C,f,r,g,u),this._updatePosition(r,u,o,s,c,i,l))},this);this._ticket=a,d=h(i,a,b)}else d=h;c.setContent(d,f,r,g,u),c.show(r,g),this._updatePosition(r,u,o,s,c,i,l)}},e.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||he(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!he(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,u){var l=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),h=r.get("align"),d=r.get("verticalAlign"),p=u&&u.getBoundingRect().clone();if(u&&p.applyTransform(u.transform),De(n)&&(n=n([i,a],s,o.el,p,{viewSize:[l,f],contentSize:c.slice()})),he(n))i=ut(n[0],l),a=ut(n[1],f);else if(we(n)){var g=n;g.width=c[0],g.height=c[1];var v=Ua(g,{width:l,height:f});i=v.x,a=v.y,h=null,d=null}else if(be(n)&&u){var m=JG(n,p,c,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=KG(i,a,o,l,f,h?null:20,d?null:20);i=m[0],a=m[1]}if(h&&(i-=YT(h)?c[0]/2:h==="right"?c[0]:0),d&&(a-=YT(d)?c[1]/2:d==="bottom"?c[1]:0),zT(r)){var m=ZG(i,a,o,l,f);i=m[0],a=m[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&N(i,function(s,u){var l=s.dataByAxis||[],f=r[u]||{},c=f.dataByAxis||[];o=o&&l.length===c.length,o&&N(l,function(h,d){var p=c[d]||{},g=h.seriesDataIndices||[],v=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&g.length===v.length,o&&N(g,function(m,y){var b=v[y];o=o&&m.seriesIndex===b.seriesIndex&&m.dataIndex===b.dataIndex}),a&&N(h.seriesDataIndices,function(m){var y=m.seriesIndex,b=n[y],w=a[y];b&&w&&w.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Pe.node||!n.getDom()||(S0(this,"_updatePosition"),this._tooltipContent.dispose(),Rm("itemTooltip",n))},e.type="tooltip",e}(Br);function ll(t,e,r){var n=e.ecModel,i;r?(i=new Ct(r,n,n),i=new Ct(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof Ct&&(o=o.get("tooltip",!0)),be(o)&&(o={formatter:o}),o&&(i=new Ct(o,i,n)))}return i}function qT(t,e){return t.dispatchAction||dt(e.dispatchAction,e)}function KG(t,e,r,n,i,a,o){var s=r.getSize(),u=s[0],l=s[1];return a!=null&&(t+u+a+2>n?t-=u+a:t+=a),o!=null&&(e+l+o>i?e-=l+o:e+=o),[t,e]}function ZG(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function JG(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,u=0,l=e.width,f=e.height;switch(t){case"inside":s=e.x+l/2-i/2,u=e.y+f/2-a/2;break;case"top":s=e.x+l/2-i/2,u=e.y-a-o;break;case"bottom":s=e.x+l/2-i/2,u=e.y+f+o;break;case"left":s=e.x-i-o,u=e.y+f/2-a/2;break;case"right":s=e.x+l+o,u=e.y+f/2-a/2}return[s,u]}function YT(t){return t==="center"||t==="middle"}function QG(t,e,r){var n=ag(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Cu(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),u;if(s.group.traverse(function(l){var f=He(l).tooltipConfig;if(f&&f.name===t.name)return u=l,!0}),u)return{componentMainType:i,componentIndex:o.componentIndex,el:u}}}}function eU(t){Wi(FT),t.registerComponentModel(RG),t.registerComponentView(XG),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},dr),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},dr)}var tU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Ze),rU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),u=r.get("textAlign"),l=Be(r.get("textBaseline"),r.get("textVerticalAlign")),f=new Ot({style:ki(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=r.get("subtext"),d=new Ot({style:ki(s,{text:h,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),v=r.get("triggerEvent",!0);f.silent=!p&&!v,d.silent=!g&&!v,p&&f.on("click",function(){hS(p,"_"+r.get("target"))}),g&&d.on("click",function(){hS(g,"_"+r.get("subtarget"))}),He(f).eventData=He(d).eventData=v?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),h&&a.add(d);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var b=Ua(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));u||(u=r.get("left")||r.get("right"),u==="middle"&&(u="center"),u==="right"?b.x+=b.width:u==="center"&&(b.x+=b.width/2)),l||(l=r.get("top")||r.get("bottom"),l==="center"&&(l="middle"),l==="bottom"?b.y+=b.height:l==="middle"&&(b.y+=b.height/2),l=l||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var w={align:u,verticalAlign:l};f.setStyle(w),d.setStyle(w),m=a.getBoundingRect();var C=b.margin,_=r.getItemStyle(["color","opacity"]);_.fill=r.get("backgroundColor");var D=new St({shape:{x:m.x-C[3],y:m.y-C[0],width:m.width+C[1]+C[3],height:m.height+C[0]+C[2],r:r.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});a.add(D)}},e.type="title",e}(Br);function nU(t){t.registerComponentModel(tU),t.registerComponentView(rU)}var iU=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},zm=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},e.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),he(n)&&N(n,function(a,o){be(a)&&(a={type:a}),n[o]=Qe(a,iU(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},e.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(u){var l=u.name;i.push(l);var f;if(u.legendVisualProvider){var c=u.legendVisualProvider,h=c.getAllNames();r.isSeriesFiltered(u)||(i=i.concat(h)),h.length?n=n.concat(h):f=!0}else f=!0;f&&ng(u)&&n.push(u.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ae(),s=ye(a,function(u){return(be(u)||nt(u))&&(u={name:u}),o.get(u.name)?null:(o.set(u.name,!0),new Ct(u,this,this.ecModel))},this);this._data=bt(s,function(u){return!!u})},e.prototype.getData=function(){return this._data},e.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;N(a,function(o){n[o.get("name")]=!1})}n[r]=!0},e.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},e.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},e.prototype.allSelect=function(){var r=this._data,n=this.option.selected;N(r,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;N(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Ge(this._availableNames,r)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Ze),_s=Dt,jm=N,Ih=It,XT=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Ih),this.group.add(this._selectorGroup=new Ih),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var u=r.get("selector",!0),l=r.get("selectorPosition",!0);u&&(!l||l==="auto")&&(l=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,u,s,l);var f=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},h=r.get("padding"),d=Ua(f,c,h),p=this.layoutInner(r,o,d,a,u,l),g=Ua(je({width:p.width,height:p.height},f),c,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=IG(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,u){var l=this.getContentGroup(),f=Ae(),c=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),jm(n.getData(),function(d,p){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
|
|
169
169
|
`)){var v=new Ih;v.newline=!0,l.add(v);return}var m=i.getSeriesByName(g)[0];if(!f.get(g)){if(m){var y=m.getData(),b=y.getVisual("legendLineStyle")||{},w=y.getVisual("legendIcon"),C=y.getVisual("style"),_=this._createItem(m,g,p,d,n,r,b,C,w,c,a);_.on("click",_s(KT,g,null,a,h)).on("mouseover",_s(Vm,m.name,null,a,h)).on("mouseout",_s(Hm,m.name,null,a,h)),i.ssr&&_.eachChild(function(D){var x=He(D);x.seriesIndex=m.seriesIndex,x.dataIndex=p,x.ssrType="legend"}),f.set(g,!0)}else i.eachRawSeries(function(D){if(!f.get(g)&&D.legendVisualProvider){var x=D.legendVisualProvider;if(!x.containName(g))return;var S=x.indexOfName(g),O=x.getItemVisual(S,"style"),E=x.getItemVisual(S,"legendIcon"),P=ni(O.fill);P&&P[3]===0&&(P[3]=.2,O=oe(oe({},O),{fill:jf(P,"rgba")}));var F=this._createItem(D,g,p,d,n,r,{},O,E,c,a);F.on("click",_s(KT,null,g,a,h)).on("mouseover",_s(Vm,null,g,a,h)).on("mouseout",_s(Hm,null,g,a,h)),i.ssr&&F.eachChild(function(B){var M=He(B);M.seriesIndex=D.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),f.set(g,!0)}},this);process.env.NODE_ENV!=="production"&&(f.get(g)||console.warn(g+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,a,s,u)},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();jm(r,function(l){var f=l.type,c=new Ot({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Mu(c,{normal:h,emphasis:d},{defaultText:l.title}),Og(c)})},e.prototype._createItem=function(r,n,i,a,o,s,u,l,f,c,h){var d=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),v=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),b=a.get("icon");f=b||f||"roundRect";var w=aU(f,a,u,l,d,v,h),C=new Ih,_=a.getModel("textStyle");if(De(r.getLegendIcon)&&(!b||b==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:f,iconRotate:m,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}));else{var D=b==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;C.add(oU({itemWidth:p,itemHeight:g,icon:f,iconRotate:D,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}))}var x=s==="left"?p+5:-5,S=s,O=o.get("formatter"),E=n;be(O)&&O?E=O.replace("{name}",n??""):De(O)&&(E=O(n));var P=v?_.getTextColor():a.get("inactiveColor");C.add(new Ot({style:ki(_,{text:E,x,y:g/2,fill:P,align:S,verticalAlign:"middle"},{inheritColor:P})}));var F=new St({shape:C.getBoundingRect(),style:{fill:"transparent"}}),B=a.getModel("tooltip");return B.get("show")&&Oc({el:F,componentModel:o,itemName:n,itemTooltipOption:B.option}),C.add(F),C.eachChild(function(M){M.silent=!0}),F.silent=!c,this.getContentGroup().add(C),Og(C),C.__legendDataIndex=i,C},e.prototype.layoutInner=function(r,n,i,a,o,s){var u=this.getContentGroup(),l=this.getSelectorGroup();Nu(r.get("orient"),u,r.get("itemGap"),i.width,i.height);var f=u.getBoundingRect(),c=[-f.x,-f.y];if(l.markRedraw(),u.markRedraw(),o){Nu("horizontal",l,r.get("selectorItemGap",!0));var h=l.getBoundingRect(),d=[-h.x,-h.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,v=g===0?"width":"height",m=g===0?"height":"width",y=g===0?"y":"x";s==="end"?d[g]+=f[v]+p:c[g]+=h[v]+p,d[1-g]+=f[m]/2-h[m]/2,l.x=d[0],l.y=d[1],u.x=c[0],u.y=c[1];var b={x:0,y:0};return b[v]=f[v]+p+h[v],b[m]=Math.max(f[m],h[m]),b[y]=Math.min(0,h[y]+d[1-g]),b}else return u.x=c[0],u.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Br);function aU(t,e,r,n,i,a,o){function s(v,m){v.lineWidth==="auto"&&(v.lineWidth=m.lineWidth>0?2:0),jm(v,function(y,b){v[b]==="inherit"&&(v[b]=m[b])})}var u=e.getModel("itemStyle"),l=u.getItemStyle(),f=t.lastIndexOf("empty",0)===0?"fill":"stroke",c=u.getShallow("decal");l.decal=!c||c==="inherit"?n.decal:B0(c,o),l.fill==="inherit"&&(l.fill=n[i]),l.stroke==="inherit"&&(l.stroke=n[f]),l.opacity==="inherit"&&(l.opacity=(i==="fill"?n:r).opacity),s(l,n);var h=e.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),l.fill==="auto"&&(l.fill=n.fill),l.stroke==="auto"&&(l.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=l[f];l.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:l.lineWidth,l.fill=e.get("inactiveColor"),l.stroke=e.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:l,lineStyle:d}}function oU(t){var e=t.icon||"roundRect",r=hs(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function KT(t,e,r,n){Hm(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),Vm(t,e,r,n)}function ZT(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;n<i&&!(r=e[n].states.emphasis);)n++;return r&&r.hoverLayer}function Vm(t,e,r,n){ZT(r)||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function Hm(t,e,r,n){ZT(r)||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function sU(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var n=0;n<e.length;n++)if(!e[n].isSelected(r.name))return!1;return!0})}function fl(t,e,r){var n={},i=t==="toggleSelected",a;return r.eachComponent("legend",function(o){i&&a!=null?o[a?"select":"unSelect"](e.name):t==="allSelect"||t==="inverseSelect"?o[t]():(o[t](e.name),a=o.isSelected(e.name));var s=o.getData();N(s,function(u){var l=u.get("name");if(!(l===`
|
|
@@ -175,4 +175,4 @@ echarts.use([`+P+"]);":"Unknown series "+E))}return}if(c==="tooltip"){if(b){proc
|
|
|
175
175
|
`,"Illegal config:",f,`.
|
|
176
176
|
`)),qe(n));var y=d?XS(d):null;d&&!y&&(process.env.NODE_ENV!=="production"&&(n=vr("Invalid parser name "+d+`.
|
|
177
177
|
`,"Illegal config:",f,`.
|
|
178
|
-
`)),qe(n)),a.push({dimIdx:m.index,parser:y,comparator:new ZS(h,p)})});var o=e.sourceFormat;o!==ir&&o!==Yr&&(process.env.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),qe(n));for(var s=[],u=0,l=e.count();u<l;u++)s.push(e.getRawDataItem(u));return s.sort(function(f,c){for(var h=0;h<a.length;h++){var d=a[h],p=e.retrieveValueFromItem(f,d.dimIdx),g=e.retrieveValueFromItem(c,d.dimIdx);d.parser&&(p=d.parser(p),g=d.parser(g));var v=d.comparator.evaluate(p,g);if(v!==0)return v}return 0}),{data:s}}};function EU(t){t.registerTransform(xU),t.registerTransform(SU)}var AU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.prototype.init=function(r,n,i){t.prototype.init.call(this,r,n,i),this._sourceManager=new nE(this),iE(this)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),iE(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Nn},e}(Ze),TU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.type="dataset",e}(Br);function OU(t){t.registerComponentModel(AU),t.registerComponentView(TU)}var Hn=ui.CMD;function Ds(t,e){return Math.abs(t-e)<1e-5}function qm(t){var e=t.data,r=t.len(),n=[],i,a=0,o=0,s=0,u=0;function l(F,B){i&&i.length>2&&n.push(i),i=[F,B]}function f(F,B,M,I){Ds(F,M)&&Ds(B,I)||i.push(F,B,M,I,M,I)}function c(F,B,M,I,j,z){var W=Math.abs(B-F),R=Math.tan(W/4)*4/3,U=B<F?-1:1,Z=Math.cos(F),ee=Math.sin(F),ne=Math.cos(B),q=Math.sin(B),L=Z*j+M,X=ee*z+I,V=ne*j+M,G=q*z+I,J=j*R*U,K=z*R*U;i.push(L-J*ee,X+K*Z,V+J*q,G-K*ne,V,G)}for(var h,d,p,g,v=0;v<r;){var m=e[v++],y=v===1;switch(y&&(a=e[v],o=e[v+1],s=a,u=o,(m===Hn.L||m===Hn.C||m===Hn.Q)&&(i=[s,u])),m){case Hn.M:a=s=e[v++],o=u=e[v++],l(s,u);break;case Hn.L:h=e[v++],d=e[v++],f(a,o,h,d),a=h,o=d;break;case Hn.C:i.push(e[v++],e[v++],e[v++],e[v++],a=e[v++],o=e[v++]);break;case Hn.Q:h=e[v++],d=e[v++],p=e[v++],g=e[v++],i.push(a+2/3*(h-a),o+2/3*(d-o),p+2/3*(h-p),g+2/3*(d-g),p,g),a=p,o=g;break;case Hn.A:var b=e[v++],w=e[v++],C=e[v++],_=e[v++],D=e[v++],x=e[v++]+D;v+=1;var S=!e[v++];h=Math.cos(D)*C+b,d=Math.sin(D)*_+w,y?(s=h,u=d,l(s,u)):f(a,o,h,d),a=Math.cos(x)*C+b,o=Math.sin(x)*_+w;for(var O=(S?-1:1)*Math.PI/2,E=D;S?E>x:E<x;E+=O){var P=S?Math.max(E+O,x):Math.min(E+O,x);c(E,P,b,w,C,_)}break;case Hn.R:s=a=e[v++],u=o=e[v++],h=s+e[v++],d=u+e[v++],l(h,u),f(h,u,h,d),f(h,d,s,d),f(s,d,s,u),f(s,u,h,u);break;case Hn.Z:i&&f(a,o,s,u),a=s,o=u;break}}return i&&i.length>2&&n.push(i),n}function Ym(t,e,r,n,i,a,o,s,u,l){if(Ds(t,r)&&Ds(e,n)&&Ds(i,o)&&Ds(a,s)){u.push(o,s);return}var f=2/l,c=f*f,h=o-t,d=s-e,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var g=r-t,v=n-e,m=i-o,y=a-s,b=g*g+v*v,w=m*m+y*y;if(b<c&&w<c){u.push(o,s);return}var C=h*g+d*v,_=-h*m-d*y,D=b-C*C,x=w-_*_;if(D<c&&C>=0&&x<c&&_>=0){u.push(o,s);return}var S=[],O=[];Oi(t,r,i,o,.5,S),Oi(e,n,a,s,.5,O),Ym(S[0],O[0],S[1],O[1],S[2],O[2],S[3],O[3],u,l),Ym(S[4],O[4],S[5],O[5],S[6],O[6],S[7],O[7],u,l)}function PU(t,e){var r=qm(t),n=[];e=e||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],u=a[1];o.push(s,u);for(var l=2;l<a.length;){var f=a[l++],c=a[l++],h=a[l++],d=a[l++],p=a[l++],g=a[l++];Ym(s,u,f,c,h,d,p,g,o,e),s=p,u=g}n.push(o)}return n}function iO(t,e,r){var n=t[e],i=t[1-e],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var u=[],l=0;l<o;l++)u.push(s);var f=o*s,c=r-f;if(c>0)for(var l=0;l<c;l++)u[l%o]+=1;return u}function aO(t,e,r){for(var n=t.r0,i=t.r,a=t.startAngle,o=t.endAngle,s=Math.abs(o-a),u=s*i,l=i-n,f=u>Math.abs(l),c=iO([u,l],f?0:1,e),h=(f?s:l)/c.length,d=0;d<c.length;d++)for(var p=(f?l:s)/c[d],g=0;g<c[d];g++){var v={};f?(v.startAngle=a+h*d,v.endAngle=a+h*(d+1),v.r0=n+p*g,v.r=n+p*(g+1)):(v.startAngle=a+p*g,v.endAngle=a+p*(g+1),v.r0=n+h*d,v.r=n+h*(d+1)),v.clockwise=t.clockwise,v.cx=t.cx,v.cy=t.cy,r.push(v)}}function BU(t,e,r){for(var n=t.width,i=t.height,a=n>i,o=iO([n,i],a?0:1,e),s=a?"width":"height",u=a?"height":"width",l=a?"x":"y",f=a?"y":"x",c=t[s]/o.length,h=0;h<o.length;h++)for(var d=t[u]/o[h],p=0;p<o[h];p++){var g={};g[l]=h*c,g[f]=p*d,g[s]=c,g[u]=d,g.x+=t.x,g.y+=t.y,r.push(g)}}function oO(t,e,r,n){return t*n-r*e}function MU(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=oO(f,c,u,l);if(Math.abs(h)<1e-6)return null;var d=t-i,p=e-a,g=oO(d,p,f,c)/h;return g<0||g>1?null:new _e(g*u+t,g*l+e)}function FU(t,e,r){var n=new _e;_e.sub(n,r,e),n.normalize();var i=new _e;_e.sub(i,t,e);var a=i.dot(n);return a}function xs(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function LU(t,e,r){for(var n=t.length,i=[],a=0;a<n;a++){var o=t[a],s=t[(a+1)%n],u=MU(o[0],o[1],s[0],s[1],e.x,e.y,r.x,r.y);u&&i.push({projPt:FU(u,e,r),pt:u,idx:a})}if(i.length<2)return[{points:t},{points:t}];i.sort(function(v,m){return v.projPt-m.projPt});var l=i[0],f=i[i.length-1];if(f.idx<l.idx){var c=l;l=f,f=c}for(var h=[l.pt.x,l.pt.y],d=[f.pt.x,f.pt.y],p=[h],g=[d],a=l.idx+1;a<=f.idx;a++)xs(p,t[a].slice());xs(p,d),xs(p,h);for(var a=f.idx+1;a<=l.idx+n;a++)xs(g,t[a%n].slice());return xs(g,h),xs(g,d),[{points:p},{points:g}]}function sO(t){var e=t.points,r=[],n=[];BD(e,r,n);var i=new Ue(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,u=i.y,l=new _e,f=new _e;return a>o?(l.x=f.x=s+a/2,l.y=u,f.y=u+o):(l.y=f.y=u+o/2,l.x=s,f.x=s+a),LU(e,l,f)}function Rh(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);Rh(t,a[0],i,n),Rh(t,a[1],r-i,n)}return n}function IU(t,e){for(var r=[],n=0;n<e;n++)r.push(Fg(t));return r}function RU(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function NU(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}function kU(t,e){var r=[],n=t.shape,i;switch(t.type){case"rect":BU(n,e,r),i=St;break;case"sector":aO(n,e,r),i=In;break;case"circle":aO({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,r),i=In;break;default:var a=t.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=ye(PU(t.getUpdatedPathProxy(),o),function(m){return NU(m)}),u=s.length;if(u===0)Rh(sO,{points:s[0]},e,r);else if(u===e)for(var l=0;l<u;l++)r.push({points:s[l]});else{var f=0,c=ye(s,function(m){var y=[],b=[];BD(m,y,b);var w=(b[1]-y[1])*(b[0]-y[0]);return f+=w,{poly:m,area:w}});c.sort(function(m,y){return y.area-m.area});for(var h=e,l=0;l<u;l++){var d=c[l];if(h<=0)break;var p=l===u-1?h:Math.ceil(d.area/f*e);p<0||(Rh(sO,{points:d.poly},p,r),h-=p)}}i=Cc;break}if(!i)return IU(t,e);for(var g=[],l=0;l<r.length;l++){var v=new i;v.setShape(r[l]),RU(t,v),g.push(v)}return g}function zU(t,e){var r=t.length,n=e.length;if(r===n)return[t,e];for(var i=[],a=[],o=r<n?t:e,s=Math.min(r,n),u=Math.abs(n-r)/6,l=(s-2)/6,f=Math.ceil(u/l)+1,c=[o[0],o[1]],h=u,d=2;d<s;){var p=o[d-2],g=o[d-1],v=o[d++],m=o[d++],y=o[d++],b=o[d++],w=o[d++],C=o[d++];if(h<=0){c.push(v,m,y,b,w,C);continue}for(var _=Math.min(h,f-1)+1,D=1;D<=_;D++){var x=D/_;Oi(p,v,y,w,x,i),Oi(g,m,b,C,x,a),p=i[3],g=a[3],c.push(i[1],a[1],i[2],a[2],p,g),v=i[5],m=a[5],y=i[6],b=a[6]}h-=_-1}return o===t?[c,e]:[t,c]}function uO(t,e){for(var r=t.length,n=t[r-2],i=t[r-1],a=[],o=0;o<e.length;)a[o++]=n,a[o++]=i;return a}function jU(t,e){for(var r,n,i,a=[],o=[],s=0;s<Math.max(t.length,e.length);s++){var u=t[s],l=e[s],f=void 0,c=void 0;u?l?(r=zU(u,l),f=r[0],c=r[1],n=f,i=c):(c=uO(i||u,u),f=u):(f=uO(n||l,l),c=l),a.push(f),o.push(c)}return[a,o]}function lO(t){for(var e=0,r=0,n=0,i=t.length,a=0,o=i-2;a<i;o=a,a+=2){var s=t[o],u=t[o+1],l=t[a],f=t[a+1],c=s*f-l*u;e+=c,r+=(s+l)*c,n+=(u+f)*c}return e===0?[t[0]||0,t[1]||0]:[r/e/3,n/e/3,e]}function VU(t,e,r,n){for(var i=(t.length-2)/6,a=1/0,o=0,s=t.length,u=s-2,l=0;l<i;l++){for(var f=l*6,c=0,h=0;h<s;h+=2){var d=h===0?f:(f+h-2)%u+2,p=t[d]-r[0],g=t[d+1]-r[1],v=e[h]-n[0],m=e[h+1]-n[1],y=v-p,b=m-g;c+=y*y+b*b}c<a&&(a=c,o=l)}return o}function HU(t){for(var e=[],r=t.length,n=0;n<r;n+=2)e[n]=t[r-n-2],e[n+1]=t[r-n-1];return e}function WU(t,e,r,n){for(var i=[],a,o=0;o<t.length;o++){var s=t[o],u=e[o],l=lO(s),f=lO(u);a==null&&(a=l[2]<0!=f[2]<0);var c=[],h=[],d=0,p=1/0,g=[],v=s.length;a&&(s=HU(s));for(var m=VU(s,u,l,f)*6,y=v-2,b=0;b<y;b+=2){var w=(m+b)%y+2;c[b+2]=s[w]-l[0],c[b+3]=s[w+1]-l[1]}c[0]=s[m]-l[0],c[1]=s[m+1]-l[1];for(var C=n/r,_=-n/2;_<=n/2;_+=C){for(var D=Math.sin(_),x=Math.cos(_),S=0,b=0;b<s.length;b+=2){var O=c[b],E=c[b+1],P=u[b]-f[0],F=u[b+1]-f[1],B=P*x-F*D,M=P*D+F*x;g[b]=B,g[b+1]=M;var I=B-O,j=M-E;S+=I*I+j*j}if(S<p){p=S,d=_;for(var z=0;z<g.length;z++)h[z]=g[z]}}i.push({from:c,to:h,fromCp:l,toCp:f,rotation:-d})}return i}function Nh(t){return t.__isCombineMorphing}var fO="__mOriginal_";function kh(t,e,r){var n=fO+e,i=t[n]||t[e];t[n]||(t[n]=t[e]);var a=r.replace,o=r.after,s=r.before;t[e]=function(){var u=arguments,l;return s&&s.apply(this,u),a?l=a.apply(this,u):l=i.apply(this,u),o&&o.apply(this,u),l}}function cl(t,e){var r=fO+e;t[r]&&(t[e]=t[r],t[r]=null)}function cO(t,e){for(var r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=e[0]*a+e[2]*o+e[4],n[i++]=e[1]*a+e[3]*o+e[5]}}function hO(t,e){var r=t.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),i=jU(qm(r),qm(n)),a=i[0],o=i[1],s=t.getComputedTransform(),u=e.getComputedTransform();function l(){this.transform=null}s&&cO(a,s),u&&cO(o,u),kh(e,"updateTransform",{replace:l}),e.transform=null;var f=WU(a,o,10,Math.PI),c=[];kh(e,"buildPath",{replace:function(h){for(var d=e.__morphT,p=1-d,g=[],v=0;v<f.length;v++){var m=f[v],y=m.from,b=m.to,w=m.rotation*d,C=m.fromCp,_=m.toCp,D=Math.sin(w),x=Math.cos(w);Af(g,C,_,d);for(var S=0;S<y.length;S+=2){var O=y[S],E=y[S+1],P=b[S],F=b[S+1],B=O*p+P*d,M=E*p+F*d;c[S]=B*x-M*D+g[0],c[S+1]=B*D+M*x+g[1]}var I=c[0],j=c[1];h.moveTo(I,j);for(var S=2;S<y.length;){var P=c[S++],F=c[S++],z=c[S++],W=c[S++],R=c[S++],U=c[S++];I===P&&j===F&&z===R&&W===U?h.lineTo(R,U):h.bezierCurveTo(P,F,z,W,R,U),I=R,j=U}}}})}function Xm(t,e,r){if(!t||!e)return e;var n=r.done,i=r.during;hO(t,e),e.__morphT=0;function a(){cl(e,"buildPath"),cl(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},je({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),e}function $U(t,e,r,n,i,a){var o=16;t=i===r?0:Math.round(32767*(t-r)/(i-r)),e=a===n?0:Math.round(32767*(e-n)/(a-n));for(var s=0,u,l=(1<<o)/2;l>0;l/=2){var f=0,c=0;(t&l)>0&&(f=1),(e&l)>0&&(c=1),s+=l*l*(3*f^c),c===0&&(f===1&&(t=l-1-t,e=l-1-e),u=t,t=e,e=u)}return s}function zh(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=ye(t,function(s){var u=s.getBoundingRect(),l=s.getComputedTransform(),f=u.x+u.width/2+(l?l[4]:0),c=u.y+u.height/2+(l?l[5]:0);return e=Math.min(f,e),r=Math.min(c,r),n=Math.max(f,n),i=Math.max(c,i),[f,c]}),o=ye(a,function(s,u){return{cp:s,z:$U(s[0],s[1],e,r,n,i),path:t[u]}});return o.sort(function(s,u){return s.z-u.z}).map(function(s){return s.path})}function dO(t){return kU(t.path,t.count)}function Km(){return{fromIndividuals:[],toIndividuals:[],count:0}}function GU(t,e,r){var n=[];function i(C){for(var _=0;_<C.length;_++){var D=C[_];Nh(D)?i(D.childrenRef()):D instanceof Ve&&n.push(D)}}i(t);var a=n.length;if(!a)return Km();var o=r.dividePath||dO,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),Km();n=zh(n),s=zh(s);for(var u=r.done,l=r.during,f=r.individualDelay,c=new pu,h=0;h<a;h++){var d=n[h],p=s[h];p.parent=e,p.copyTransform(c),f||hO(d,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function g(C){for(var _=0;_<s.length;_++)s[_].addSelfToZr(C)}kh(e,"addSelfToZr",{after:function(C){g(C)}}),kh(e,"removeSelfFromZr",{after:function(C){for(var _=0;_<s.length;_++)s[_].removeSelfFromZr(C)}});function v(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,cl(e,"addSelfToZr"),cl(e,"removeSelfFromZr")}var m=s.length;if(f)for(var y=m,b=function(){y--,y===0&&(v(),u&&u())},h=0;h<m;h++){var w=f?je({delay:(r.delay||0)+f(h,m,n[h],s[h]),done:b},r):r;Xm(n[h],s[h],w)}else e.__morphT=0,e.animateTo({__morphT:1},je({during:function(C){for(var _=0;_<m;_++){var D=s[_];D.__morphT=e.__morphT,D.dirtyShape()}l&&l(C)},done:function(){v();for(var C=0;C<t.length;C++)cl(t[C],"updateTransform");u&&u()}},r));return e.__zr&&g(e.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function UU(t,e,r){var n=e.length,i=[],a=r.dividePath||dO;function o(d){for(var p=0;p<d.length;p++){var g=d[p];Nh(g)?o(g.childrenRef()):g instanceof Ve&&i.push(g)}}if(Nh(t)){o(t.childrenRef());var s=i.length;if(s<n)for(var u=0,l=s;l<n;l++)i.push(Fg(i[u++%s]));i.length=n}else{i=a({path:t,count:n});for(var f=t.getComputedTransform(),l=0;l<i.length;l++)i[l].setLocalTransform(f);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Km()}i=zh(i),e=zh(e);for(var c=r.individualDelay,l=0;l<n;l++){var h=c?je({delay:(r.delay||0)+c(l,n,i[l],e[l])},r):r;Xm(i[l],e[l],h)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function vO(t){return he(t[0])}function pO(t,e){for(var r=[],n=t.length,i=0;i<n;i++)r.push({one:t[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(e[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var u=r[s].many;if(u.length<=1)if(s)s=0;else return r;var a=u.length,l=Math.ceil(a/2);r[i].many=u.slice(l,a),r[s].many=u.slice(0,l),s++}return r}var qU={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n<t.count;n++){var i=Fg(t.path);i.setStyle("opacity",r),e.push(i)}return e},split:null};function Zm(t,e,r,n,i,a){if(!t.length||!e.length)return;var o=ts("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},o),l,f;vO(t)&&(l=t,f=e),vO(e)&&(l=e,f=t);function c(m,y,b,w,C){var _=m.many,D=m.one;if(_.length===1&&!C){var x=y?_[0]:D,S=y?D:_[0];if(Nh(x))c({many:[x],one:S},!0,b,w,!0);else{var O=s?je({delay:s(b,w)},u):u;Xm(x,S,O),a(x,S,x,S,O)}}else for(var E=je({dividePath:qU[r],individualDelay:s&&function(j,z,W,R){return s(j+b,w)}},u),P=y?GU(_,D,E):UU(D,_,E),F=P.fromIndividuals,B=P.toIndividuals,M=F.length,I=0;I<M;I++){var O=s?je({delay:s(I,M)},u):u;a(F[I],B[I],y?_[I]:m.one,y?m.one:_[I],O)}}for(var h=l?l===t:t.length>e.length,d=l?pO(f,l):pO(h?e:t,[h?t:e]),p=0,g=0;g<d.length;g++)p+=d[g].many.length;for(var v=0,g=0;g<d.length;g++)c(d[g],h,v,p),v+=d[g].many.length}function ao(t){if(!t)return[];if(he(t)){for(var e=[],r=0;r<t.length;r++)e.push(ao(t[r]));return e}var n=[];return t.traverse(function(i){i instanceof Ve&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var gO=1e4,YU=0,mO=1,yO=2,XU=lt();function KU(t,e){for(var r=t.dimensions,n=0;n<r.length;n++){var i=t.getDimensionInfo(r[n]);if(i&&i.otherDims[e]===0)return r[n]}}function ZU(t,e,r){var n=t.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=t.get(n.name,e);return i&&i.categories[a]||a+""}}function bO(t,e,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=KU(t,i);if(a){var o=ZU(t,e,a);return o}var s=t.getRawDataItem(e),u=n?"childGroupId":"groupId";if(s&&s[u])return s[u]+"";if(!n)return r||t.getId(e)}function CO(t){var e=[];return N(t,function(r){var n=r.data,i=r.dataGroupId;if(n.count()>gO){process.env.NODE_ENV!=="production"&&xt("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),o=0;o<a.length;o++)e.push({data:n,groupId:bO(n,o,i,!1),childGroupId:bO(n,o,i,!0),divide:r.divide,dataIndex:o})}),e}function Jm(t,e,r){t.traverse(function(n){n instanceof Ve&&qt(n,{style:{opacity:0}},e,{dataIndex:r,isFrom:!0})})}function Qm(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function Ss(t){t.stopAnimation(),t.isGroup&&t.traverse(function(e){e.stopAnimation()})}function JU(t,e,r){var n=ts("update",r,e);n&&t.traverse(function(i){if(i instanceof Fi){var a=a7(i);a&&i.animateFrom({style:a},n)}})}function QU(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++){var i=t[n],a=e[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function wO(t,e,r){var n=CO(t),i=CO(e);function a(b,w,C,_,D){(C||b)&&w.animateFrom({style:C&&C!==b?oe(oe({},C.style),b.style):b.style},D)}var o=!1,s=YU,u=Ae(),l=Ae();n.forEach(function(b){b.groupId&&u.set(b.groupId,!0),b.childGroupId&&l.set(b.childGroupId,!0)});for(var f=0;f<i.length;f++){var c=i[f].groupId;if(l.get(c)){s=mO;break}var h=i[f].childGroupId;if(h&&u.get(h)){s=yO;break}}function d(b,w){return function(C){var _=C.data,D=C.dataIndex;return w?_.getId(D):b?s===mO?C.childGroupId:C.groupId:s===yO?C.childGroupId:C.groupId}}var p=QU(n,i),g={};if(!p)for(var f=0;f<i.length;f++){var v=i[f],m=v.data.getItemGraphicEl(v.dataIndex);m&&(g[m.id]=!0)}function y(b,w){var C=n[w],_=i[b],D=_.data.hostModel,x=C.data.getItemGraphicEl(C.dataIndex),S=_.data.getItemGraphicEl(_.dataIndex);if(x===S){S&&JU(S,_.dataIndex,D);return}x&&g[x.id]||S&&(Ss(S),x?(Ss(x),Qm(x),o=!0,Zm(ao(x),ao(S),_.divide,D,b,a)):Jm(S,D,b))}new q0(n,i,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(b,w){var C=i[b],_=C.data,D=_.hostModel,x=_.getItemGraphicEl(C.dataIndex),S=bt(ye(w,function(O){return n[O].data.getItemGraphicEl(n[O].dataIndex)}),function(O){return O&&O!==x&&!g[O.id]});x&&(Ss(x),S.length?(N(S,function(O){Ss(O),Qm(O)}),o=!0,Zm(ao(S),ao(x),C.divide,D,b,a)):Jm(x,D,C.dataIndex))}).updateOneToMany(function(b,w){var C=n[w],_=C.data.getItemGraphicEl(C.dataIndex);if(!(_&&g[_.id])){var D=bt(ye(b,function(S){return i[S].data.getItemGraphicEl(i[S].dataIndex)}),function(S){return S&&S!==_}),x=i[b[0]].data.hostModel;D.length&&(N(D,function(S){return Ss(S)}),_?(Ss(_),Qm(_),o=!0,Zm(ao(_),ao(D),C.divide,x,b[0],a)):N(D,function(S){return Jm(S,x,b[0])}))}}).updateManyToMany(function(b,w){new q0(w,b,function(C){return n[C].data.getId(n[C].dataIndex)},function(C){return i[C].data.getId(i[C].dataIndex)}).update(function(C,_){y(b[C],w[_])}).execute()}).execute(),o&&N(e,function(b){var w=b.data,C=w.hostModel,_=C&&r.getViewOfSeriesModel(C),D=ts("update",C,0);_&&C.isAnimationEnabled()&&D&&D.duration>0&&_.group.traverse(function(x){x instanceof Ve&&!x.animators.length&&x.animateFrom({style:{opacity:0}},D)})})}function _O(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function DO(t){return he(t)?t.sort().join(","):t}function Ki(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function eq(t,e){var r=Ae(),n=Ae(),i=Ae();N(t.oldSeries,function(o,s){var u=t.oldDataGroupIds[s],l=t.oldData[s],f=_O(o),c=DO(f);n.set(c,{dataGroupId:u,data:l}),he(f)&&N(f,function(h){i.set(h,{key:c,dataGroupId:u,data:l})})});function a(o){r.get(o)&&xt("Duplicated seriesKey in universalTransition "+o)}return N(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),u=o.getData(),l=_O(o),f=DO(l),c=n.get(f);if(c)process.env.NODE_ENV!=="production"&&a(f),r.set(f,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ki(c.data),data:c.data}],newSeries:[{dataGroupId:s,divide:Ki(u),data:u}]});else if(he(l)){process.env.NODE_ENV!=="production"&&a(f);var h=[];N(l,function(g){var v=n.get(g);v.data&&h.push({dataGroupId:v.dataGroupId,divide:Ki(v.data),data:v.data})}),h.length&&r.set(f,{oldSeries:h,newSeries:[{dataGroupId:s,data:u,divide:Ki(u)}]})}else{var d=i.get(l);if(d){var p=r.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Ki(d.data)}],newSeries:[]},r.set(d.key,p)),p.newSeries.push({dataGroupId:s,data:u,divide:Ki(u)})}}}}),r}function xO(t,e){for(var r=0;r<t.length;r++){var n=e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id;if(n)return r}}function tq(t,e,r,n){var i=[],a=[];N(gt(t.from),function(o){var s=xO(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ki(e.oldData[s]),groupIdDim:o.dimension})}),N(gt(t.to),function(o){var s=xO(r.updatedSeries,o);if(s>=0){var u=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:u,divide:Ki(u),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&wO(i,a,n)}function rq(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){N(gt(n.seriesTransition),function(i){N(gt(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Zc]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(e,r,n){var i=XU(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)N(gt(a),function(d){tq(d,i,n,r)});else{var o=eq(i,n);N(o.keys(),function(d){var p=o.get(d);wO(p.oldSeries,p.newSeries,r)})}N(n.updatedSeries,function(d){d[Zc]&&(d[Zc]=!1)})}for(var s=e.getSeries(),u=i.oldSeries=[],l=i.oldDataGroupIds=[],f=i.oldData=[],c=0;c<s.length;c++){var h=s[c].getData();h.count()<gO&&(u.push(s[c]),l.push(s[c].get("dataGroupId")),f.push(h))}})}function SO(t,e,r){var n=Po.createCanvas(),i=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=i*r,n.height=a*r,n}var ey=function(t){ce(e,t);function e(r,n,i){var a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Yf,typeof r=="string"?o=SO(r,n,i):we(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(u_(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=SO("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},e.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,u=!1,l=new Ue(0,0,0,0);function f(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var b=new Ue(0,0,0,0);b.copy(y),o.push(b)}else{for(var w=!1,C=1/0,_=0,D=0;D<o.length;++D){var x=o[D];if(x.intersect(y)){var S=new Ue(0,0,0,0);S.copy(x),S.union(y),o[D]=S,w=!0;break}else if(u){l.copy(y),l.union(x);var O=y.width*y.height,E=x.width*x.height,P=l.width*l.height,F=P-O-E;F<C&&(C=F,_=D)}}if(u&&(o[_].union(y),w=!0),!w){var b=new Ue(0,0,0,0);b.copy(y),o.push(b)}u||(u=o.length>=s)}}for(var c=this.__startIndex;c<this.__endIndex;++c){var h=r[c];if(h){var d=h.shouldBePainted(i,a,!0,!0),p=h.__isRendered&&(h.__dirty&Or||!d)?h.getPrevPaintRect():null;p&&f(p);var g=d&&(h.__dirty&Or||!h.__isRendered)?h.getPaintRect():null;g&&f(g)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h=n[c],d=h&&h.shouldBePainted(i,a,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var p=h.getPrevPaintRect();p&&f(p)}}var v;do{v=!1;for(var c=0;c<o.length;){if(o[c].isZero()){o.splice(c,1);continue}for(var m=c+1;m<o.length;)o[c].intersect(o[m])?(v=!0,o[c].union(o[m]),o.splice(m,1)):m++;c++}}while(v);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,u=a.height;n=n||this.clearColor;var l=this.motionBlur&&!r,f=this.lastFrameAlpha,c=this.dpr,h=this;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/c,u/c));var d=this.domBack;function p(g,v,m,y){if(o.clearRect(g,v,m,y),n&&n!=="transparent"){var b=void 0;if(xf(n)){var w=n.global||n.__width===m&&n.__height===y;b=w&&n.__canvasGradient||T0(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=b,n.__width=m,n.__height=y}else ON(n)&&(n.scaleX=n.scaleX||c,n.scaleY=n.scaleY||c,b=O0(o,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=b||n,o.fillRect(g,v,m,y),o.restore()}l&&(o.save(),o.globalAlpha=f,o.drawImage(d,g,v,m,y),o.restore())}!i||l?p(0,0,s,u):i.length&&N(i,function(g){p(g.x*c,g.y*c,g.width*c,g.height*c)})},e}(En),EO=1e5,oo=314159,jh=.01,nq=.001;function iq(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}function aq(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var oq=function(){function t(e,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=oe({},n||{}),this.dpr=n.devicePixelRatio||Yf,this._singleCanvas=a,this.root=e;var o=e.style;o&&(u_(e),e.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var u=this._layers;if(a){var f=e,c=f.width,h=f.height;n.width!=null&&(c=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,f.width=c*this.dpr,f.height=h*this.dpr,this._width=c,this._height=h;var d=new ey(f,this,this.dpr);d.__builtin__=!0,d.initContext(),u[oo]=d,d.zlevel=oo,s.push(oo),this._domRoot=e}else{this._width=nh(e,0,n),this._height=nh(e,1,n);var l=this._domRoot=aq(this._width,this._height);e.appendChild(l)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.refresh=function(e){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,e,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var u=a===0?this._backgroundColor:null;s.refresh(u)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(e){var r=e.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(EO)),a||(a=n.ctx,a.save()),Ja(a,s,i,o===r-1))}a&&a.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(EO)},t.prototype.paintOne=function(e,r){YE(e,r)},t.prototype._paintList=function(e,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(l){l.afterBrush&&l.afterBrush()});else{var u=this;Mf(function(){u._paintList(e,r,n,i)})}}},t.prototype._compositeManually=function(){var e=this.getLayer(oo).ctx,r=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,r,n)})},t.prototype._doPaintList=function(e,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var u=this._zlevelList[s],l=this._layers[u];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&a.push(l)}for(var f=!0,c=!1,h=function(g){var v=a[g],m=v.ctx,y=o&&v.createRepaintRects(e,r,d._width,d._height),b=n?v.__startIndex:v.__drawIndex,w=!n&&v.incremental&&Date.now,C=w&&Date.now(),_=v.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(v.__startIndex===v.__endIndex)v.clear(!1,_,y);else if(b===v.__startIndex){var D=e[b];(!D.incremental||!D.notClear||n)&&v.clear(!1,_,y)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=v.__startIndex);var x,S=function(F){var B={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(x=b;x<v.__endIndex;x++){var M=e[x];if(M.__inHover&&(c=!0),i._doPaintEl(M,v,o,F,B,x===v.__endIndex-1),w){var I=Date.now()-C;if(I>15)break}}B.prevElClipPaths&&m.restore()};if(y)if(y.length===0)x=v.__endIndex;else for(var O=d.dpr,E=0;E<y.length;++E){var P=y[E];m.save(),m.beginPath(),m.rect(P.x*O,P.y*O,P.width*O,P.height*O),m.clip(),S(P),m.restore()}else m.save(),S(),m.restore();v.__drawIndex=x,v.__drawIndex<v.__endIndex&&(f=!1)},d=this,p=0;p<a.length;p++)h(p);return Pe.wxa&&N(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:f,needsRefreshHover:c}},t.prototype._doPaintEl=function(e,r,n,i,a,o){var s=r.ctx;if(n){var u=e.getPaintRect();(!i||u&&u.intersect(i))&&(Ja(s,e,a,o),e.setPrevPaintRect(u))}else Ja(s,e,a,o)},t.prototype.getLayer=function(e,r){this._singleCanvas&&!this._needsManuallyCompositing&&(e=oo);var n=this._layers[e];return n||(n=new ey("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Qe(n,this._layerConfig[e],!0):this._layerConfig[e-jh]&&Qe(n,this._layerConfig[e-jh],!0),r&&(n.virtual=r),this.insertLayer(e,n),n.initContext()),n},t.prototype.insertLayer=function(e,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,u=-1;if(n[e]){process.env.NODE_ENV!=="production"&&wa("ZLevel "+e+" has been used already");return}if(!iq(r)){process.env.NODE_ENV!=="production"&&wa("Layer of zlevel "+e+" is not valid");return}if(a>0&&e>i[0]){for(u=0;u<a-1&&!(i[u]<e&&i[u+1]>e);u++);s=n[i[u]]}if(i.splice(u+1,0,e),n[e]=r,!r.virtual)if(s){var l=s.dom;l.nextSibling?o.insertBefore(r.dom,l.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];e.call(r,this._layers[a],a)}},t.prototype.eachBuiltinLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&e.call(r,o,a)}},t.prototype.eachOtherLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||e.call(r,o,a)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(c,h){c.__dirty=c.__used=!1});function r(c){a&&(a.__endIndex!==c&&(a.__dirty=!0),a.__endIndex=c)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var i=e[n];if(i.zlevel!==e[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,u;for(u=0;u<e.length;u++){var i=e[u],l=i.zlevel,f=void 0;s!==l&&(s=l,o=0),i.incremental?(f=this.getLayer(l+nq,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(l+(o>0?jh:0),this._needsManuallyCompositing),f.__builtin__||wa("ZLevel "+l+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==u&&(f.__dirty=!0),f.__startIndex=u,f.incremental?f.__drawIndex=-1:f.__drawIndex=u,r(u),a=f),i.__dirty&Or&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=u))}r(u),this.eachBuiltinLayer(function(c,h){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Qe(n[e],r,!0):n[e]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+jh){var o=this._layers[a];Qe(o,n[e],!0)}}}},t.prototype.delLayer=function(e){var r=this._layers,n=this._zlevelList,i=r[e];i&&(i.dom.parentNode.removeChild(i.dom),delete r[e],n.splice(Ge(n,e),1))},t.prototype.resize=function(e,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(e!=null&&(i.width=e),r!=null&&(i.height=r),e=nh(a,0,i),r=nh(a,1,i),n.style.display="",this._width!==e||r!==this._height){n.style.width=e+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,r);this.refresh(!0)}this._width=e,this._height=r}else{if(e==null||r==null)return;this._width=e,this._height=r,this.getLayer(oo).resize(e,r)}return this},t.prototype.clearLayer=function(e){var r=this._layers[e];r&&r.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[oo].dom;var r=new ey("image",this,e.pixelRatio||this.dpr);r.initContext(),r.clear(!1,e.backgroundColor||this._backgroundColor);var n=r.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(c){c.__builtin__?n.drawImage(c.dom,0,0,i,a):c.renderToCanvas&&(n.save(),c.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),u=0,l=s.length;u<l;u++){var f=s[u];Ja(n,f,o,u===l-1)}return r.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();function sq(t){t.registerPainter("canvas",oq)}Wi([LG,dU,nU,eU,SG,OU,EU,XW,LW,u$,fW,rq,sq]);const uq=k.memo(({type:t,options:e,echartRef:r})=>{const n=k.useRef(null),i=k.useRef(null);return k.useEffect(()=>(n.current&&(i.current=OV(n.current)),()=>{i.current&&i.current.dispose()}),[]),k.useEffect(()=>{i.current&&i.current.setOption({...e})},[t,e]),k.useImperativeHandle(r,()=>({resize:()=>{i.current&&i.current.resize()}})),A.jsx("div",{ref:n,style:{width:"100%",height:"100%"}})});var lq=typeof global=="object"&&global&&global.Object===Object&&global,fq=typeof self=="object"&&self&&self.Object===Object&&self,AO=lq||fq||Function("return this")(),Es=AO.Symbol,TO=Object.prototype,cq=TO.hasOwnProperty,hq=TO.toString,hl=Es?Es.toStringTag:void 0;function dq(t){var e=cq.call(t,hl),r=t[hl];try{t[hl]=void 0;var n=!0}catch{}var i=hq.call(t);return n&&(e?t[hl]=r:delete t[hl]),i}var vq=Object.prototype,pq=vq.toString;function gq(t){return pq.call(t)}var mq="[object Null]",yq="[object Undefined]",OO=Es?Es.toStringTag:void 0;function bq(t){return t==null?t===void 0?yq:mq:OO&&OO in Object(t)?dq(t):gq(t)}function Cq(t){return t!=null&&typeof t=="object"}var wq="[object Symbol]";function PO(t){return typeof t=="symbol"||Cq(t)&&bq(t)==wq}function _q(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Dq=Array.isArray,xq=1/0,BO=Es?Es.prototype:void 0,MO=BO?BO.toString:void 0;function FO(t){if(typeof t=="string")return t;if(Dq(t))return _q(t,FO)+"";if(PO(t))return MO?MO.call(t):"";var e=t+"";return e=="0"&&1/t==-xq?"-0":e}var Sq=/\s/;function Eq(t){for(var e=t.length;e--&&Sq.test(t.charAt(e)););return e}var Aq=/^\s+/;function Tq(t){return t&&t.slice(0,Eq(t)+1).replace(Aq,"")}function LO(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var IO=NaN,Oq=/^[-+]0x[0-9a-f]+$/i,Pq=/^0b[01]+$/i,Bq=/^0o[0-7]+$/i,Mq=parseInt;function RO(t){if(typeof t=="number")return t;if(PO(t))return IO;if(LO(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=LO(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Tq(t);var r=Pq.test(t);return r||Bq.test(t)?Mq(t.slice(2),r?2:8):Oq.test(t)?IO:+t}var NO=1/0,Fq=17976931348623157e292;function Lq(t){if(!t)return t===0?t:0;if(t=RO(t),t===NO||t===-NO){var e=t<0?-1:1;return e*Fq}return t===t?t:0}function Iq(t){var e=Lq(t),r=e%1;return e===e?r?e-r:e:0}function kO(t){return t==null?"":FO(t)}var Rq=AO.isFinite,Nq=Math.min;function kq(t){var e=Math[t];return function(r,n){if(r=RO(r),n=n==null?0:Nq(Iq(n),292),n&&Rq(r)){var i=(kO(r)+"e").split("e"),a=e(i[0]+"e"+(+i[1]+n));return i=(kO(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-n))}return e(r)}}var ty=kq("round");const zO=({moduleDataApi:t,customData:e,customeStyle:r,width:n=2,height:i=2})=>{const{globalData:a}=Oo(),[o,s]=k.useState(),[u,l]=k.useState(),[f,c]=k.useState(),h=k.useRef(),d=k.useCallback(async()=>{e?t==null||t({id:e==null?void 0:e.dataSourceId}).then(p=>{if(!p.success){Q.message.error(p.message);return}l(p.data)}):l([])},[e==null?void 0:e.dataSourceId,t]);return k.useEffect(()=>{e&&d()},[d,e==null?void 0:e.dataSourceId]),k.useEffect(()=>{var p,g,v,m,y,b,w,C,_,D,x,S,O,E,P;if(e&&u&&e.type){let F=[];c([]),F=u;const B={},M={};let I=0;if(e.yAxis==="recordTotal")F.forEach(ae=>{const ve=ae[e==null?void 0:e.xAxis];B[ve]=(B[ve]||0)+1,I+=1});else if(e.yAxis==="fieldValue"){F.forEach(ae=>{const ve=ae[e==null?void 0:e.xAxis],Le=ae[e==null?void 0:e.yAxisField],ft=typeof Le=="number"?Le:0;M[ve]=M[ve]||[],M[ve].push(ft),I+=1});for(const ae in M)switch(e==null?void 0:e.yAxisFieldType){case"sum":B[ae]=ty(M[ae].reduce((ve,Le)=>ve+Le,0),3);break;case"max":B[ae]=ty(Math.max(...M[ae]),3);break;case"min":B[ae]=ty(Math.min(...M[ae]),3);break;case"average":B[ae]=M[ae].length?M[ae].reduce((ve,Le)=>ve+Le,0)/M[ae].length:0;break;default:B[ae]=0}}const j={show:(p=e==null?void 0:e.chartOptions)==null?void 0:p.includes("label"),position:"top",formatter:"{c}"},z=Object.keys(B),W=Object.values(B),R={"chart-bar":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"bar",label:j}]},"chart-bar-pile":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"bar",label:j}]},"chart-bar-percentage":{xAxis:{type:"category",data:z},yAxis:{type:"value",max:100},series:[{data:z.map(ae=>B[ae]/I*100),type:"bar",label:j}]},"chart-line":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"line",label:j}]},"chart-line-smooth":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"line",smooth:!0,label:j}]},"chart-pie":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:W,type:"pie",radius:"50%",label:{...j,position:"outside"},labelLine:{normal:{show:!0}}}]},"chart-pie-circular":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:W,type:"pie",radius:["40%","70%"],label:{...j,position:"outside"},labelLine:{normal:{show:!0}}}]},"chart-strip-bar":{xAxis:{type:"value"},yAxis:{type:"category",data:z},series:[{data:W,type:"bar",label:j}]},"chart-strip-bar-pile":{xAxis:{type:"value"},yAxis:{type:"category",data:z},series:[{data:W,type:"bar",label:j}]},"chart-strip-bar-percentage":{xAxis:{type:"value",max:100},yAxis:{type:"category",data:z},series:[{data:z.map(ae=>B[ae]/I*100),type:"bar",label:j}]}},U=(g=e==null?void 0:e.chartOptions)==null?void 0:g.includes("legend"),Z=R[e.type]||{},ee=Z.series.map(ae=>{var ve;return{...ae,name:e.yAxis==="recordTotal"?"统计":(ve=o==null?void 0:o.find(Le=>Le.value===e.yAxisField))==null?void 0:ve.label}}),ne=ae=>{const ve=Math.max(...ae.map(Ie=>String(Ie.name).length)),Le=Math.max(...ae.flatMap(Ie=>Ie.data.map(at=>String(at).length))),ft=Math.max(...ae.flatMap(Ie=>Ie.data.length));return{maxNameLength:ve,maxValueLength:Le,maxArrLength:ft}},q=ae=>ae.reduce((ve,Le)=>{const ft=String(Le).length;return Math.max(ve,ft)},0);let L=18,X=18;const{maxNameLength:V,maxArrLength:G}=ne(ee),J=q((v=Z==null?void 0:Z.xAxis)==null?void 0:v.data);let K=0;G>3?(J>15&&(K=90),J>5&&(K=45),n<3&&(K=90)):(L=50,X=50);const Y=K===45?7:K===90?9:0,fe="50px",ue=`${(J>15?15:J)*Y+L}px`,Ce=`${(V>15?15:V)*Y+X}px`,Fe={legend:{left:"center",right:"center",top:"2px",show:U,data:ee==null?void 0:ee.map(ae=>ae==null?void 0:ae.name)},grid:{top:fe,bottom:ue,right:Ce,left:"70px"},graphic:{elements:[{type:"text",left:"center",bottom:"10px",style:{text:(r==null?void 0:r.xtitle)||"",fill:"#333",fontSize:12,fontWeight:"bold"}},{type:"text",left:"10px",top:"center",style:{text:(r==null?void 0:r.ytitle)||"",fill:"#333",fontSize:12,fontWeight:"bold"},rotation:Math.PI/2}]},xAxis:{...Z.xAxis,axisTick:{show:(m=e==null?void 0:e.chartOptions)==null?void 0:m.includes("axis")},axisLine:{show:((y=e==null?void 0:e.chartOptions)==null?void 0:y.includes("axis"))||((b=r==null?void 0:r.xchartOptions)==null?void 0:b.includes("axisLine"))},axisLabel:{show:((w=e==null?void 0:e.chartOptions)==null?void 0:w.includes("axis"))||((C=r==null?void 0:r.xchartOptions)==null?void 0:C.includes("label")),rotate:K,interval:0,formatter:ae=>ae.length>15?`${ae.slice(0,15)}...`:ae},splitLine:{show:(_=e==null?void 0:e.chartOptions)==null?void 0:_.includes("splitLine")}},yAxis:{...Z.yAxis,axisTick:{show:(D=e==null?void 0:e.chartOptions)==null?void 0:D.includes("axis")},axisLine:{show:((x=e==null?void 0:e.chartOptions)==null?void 0:x.includes("axis"))||((S=r==null?void 0:r.ychartOptions)==null?void 0:S.includes("axisLine"))},axisLabel:{show:((O=e==null?void 0:e.chartOptions)==null?void 0:O.includes("axis"))||((E=r==null?void 0:r.ychartOptions)==null?void 0:E.includes("label")),formatter:ae=>ae.length>15?`${ae.slice(0,15)}...`:ae},splitLine:{show:(P=e==null?void 0:e.chartOptions)==null?void 0:P.includes("splitLine")}},series:ee,tooltip:{trigger:"axis",axisPointer:{type:"shadow"}}};console.log("options",JSON.stringify(Fe)),c(Fe)}},[e,r,u,n,i]),k.useEffect(()=>{var p;a!=null&&a.sourceData&&(e!=null&&e.dataSourceId)&&s((p=a==null?void 0:a.sourceData.find(g=>g.value===(e==null?void 0:e.dataSourceId)))==null?void 0:p.fields)},[a,e]),k.useEffect(()=>{var p;(n||i)&&((p=h==null?void 0:h.current)==null||p.resize())},[n,i]),A.jsx("div",{style:{width:"100%",height:"100%"},children:A.jsx(uq,{echartRef:h,type:"bar",options:f})})},zq=k.memo(({module:t,onUpdate:e,moduleDataApi:r,rowWidth:n,rowHeight:i})=>{var a;return A.jsx("div",{className:"chart-content",children:A.jsxs("div",{className:"dashboard-grid-container",children:[t.type==="text"?A.jsx(v8,{defaultValue:t.customData.editor,onChange:o=>{t.id&&e(t.id,{type:"text",customData:{title:t.customData.title,editor:o}})}}):null,t.type==="statistics"?A.jsx(Hw,{customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r,width:t.w,height:t.h,rowWidth:n,rowHeight:i}):null,t.type==="calendar"?A.jsx(Jw,{customData:t.customData,moduleDataApi:r}):null,(a=t.type)!=null&&a.includes("chart")?A.jsx(zO,{width:t.w,height:t.h,customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r}):null]})})}),jO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"24",width:"6",height:"16",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"32",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),VO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M17 33.5L29.5 15L45 23L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),A.jsx("path",{d:"M16.5 15L30 31.5L45 28L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),HO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("circle",{cx:"16",cy:"16",r:"16",transform:"matrix(-1 0 0 1 52 8)",fill:"#5b65f4"}),A.jsx("path",{d:"M36 8.5C36 8.22386 36.224 7.99918 36.5 8.00781C40.5621 8.13468 44.4312 9.80377 47.3137 12.6863C50.3143 15.6869 52 19.7565 52 24C52 28.2435 50.3143 32.3131 47.3137 35.3137C44.4312 38.1962 40.5621 39.8653 36.5 39.9922C36.224 40.0008 36 39.7761 36 39.5L36 24V8.5Z",fill:"#959bee"}),A.jsx("path",{d:"M46.9602 34.9602C47.1554 35.1554 47.1559 35.4726 46.9547 35.6617C45.5468 36.9842 43.91 38.0418 42.1229 38.7821C40.3358 39.5223 38.4306 39.9318 36.4999 39.9922C36.2239 40.0008 36 39.7761 36 39.5L36 25.2071C36 24.7617 36.5386 24.5386 36.8536 24.8536L46.9602 34.9602Z",fill:"#cdcff9"})]}),WO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"31",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 31 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"44",y:"18",width:"4",height:"28",rx:"0.5",transform:"rotate(90 44 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"56",y:"25",width:"4",height:"40",rx:"0.5",transform:"rotate(90 56 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"36",y:"32",width:"4",height:"20",rx:"0.5",transform:"rotate(90 36 32)",fill:"#5b65f5"})]}),jq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M59.3348 27.8581C59.3348 28.6621 59.0708 29.2801 58.5428 29.7121C58.0268 30.1441 57.3848 30.3601 56.6168 30.3601C55.8488 30.3601 55.2008 30.1441 54.6728 29.7121C54.1568 29.2801 53.8988 28.6621 53.8988 27.8581V26.1481C53.8988 25.3441 54.1568 24.7261 54.6728 24.2941C55.2008 23.8621 55.8488 23.6461 56.6168 23.6461C57.3848 23.6461 58.0268 23.8621 58.5428 24.2941C59.0708 24.7261 59.3348 25.3441 59.3348 26.1481V27.8581ZM50.9648 21.5401C50.9648 22.3441 50.7008 22.9621 50.1728 23.3941C49.6568 23.8261 49.0148 24.0421 48.2468 24.0421C47.4788 24.0421 46.8308 23.8261 46.3028 23.3941C45.7868 22.9621 45.5288 22.3441 45.5288 21.5401V19.8301C45.5288 19.0261 45.7868 18.4081 46.3028 17.9761C46.8308 17.5441 47.4788 17.3281 48.2468 17.3281C49.0148 17.3281 49.6568 17.5441 50.1728 17.9761C50.7008 18.4081 50.9648 19.0261 50.9648 19.8301V21.5401ZM56.6168 17.4361L50.5148 30.2521H48.2468L54.3488 17.4361H56.6168ZM48.8768 21.4681V19.9021C48.8768 19.4341 48.6668 19.2001 48.2468 19.2001C47.8268 19.2001 47.6168 19.4341 47.6168 19.9021V21.4681C47.6168 21.9361 47.8268 22.1701 48.2468 22.1701C48.6668 22.1701 48.8768 21.9361 48.8768 21.4681ZM57.2468 27.7861V26.2201C57.2468 25.7521 57.0368 25.5181 56.6168 25.5181C56.1968 25.5181 55.9868 25.7521 55.9868 26.2201V27.7861C55.9868 28.2541 56.1968 28.4881 56.6168 28.4881C57.0368 28.4881 57.2468 28.2541 57.2468 27.7861Z",fill:"#5b65f4"}),A.jsx("path",{d:"M44.0049 26.4181C44.0049 27.6901 43.5969 28.6681 42.7809 29.3521C41.9649 30.0241 40.9509 30.3601 39.7389 30.3601C38.9829 30.3601 38.2929 30.2341 37.6689 29.9821C37.0569 29.7181 36.5349 29.2741 36.1029 28.6501C35.6829 28.0261 35.4729 27.2581 35.4729 26.3461H38.4249C38.4249 26.7781 38.5449 27.1141 38.7849 27.3541C39.0369 27.5821 39.3549 27.6961 39.7389 27.6961C40.1349 27.6961 40.4529 27.5821 40.6929 27.3541C40.9329 27.1141 41.0529 26.7721 41.0529 26.3281C41.0529 25.9441 40.9209 25.6261 40.6569 25.3741C40.4049 25.1101 40.0809 24.9781 39.6849 24.9781H39.2709V22.4221H39.6849C40.0929 22.4221 40.3989 22.3021 40.6029 22.0621C40.8069 21.8221 40.9089 21.5401 40.9089 21.2161C40.9089 20.8321 40.7949 20.5321 40.5669 20.3161C40.3389 20.1001 40.0629 19.9921 39.7389 19.9921C39.4149 19.9921 39.1389 20.1001 38.9109 20.3161C38.6829 20.5321 38.5689 20.8261 38.5689 21.1981H35.6169C35.6169 20.0221 36.0069 19.0861 36.7869 18.3901C37.5789 17.6821 38.5629 17.3281 39.7389 17.3281C40.9269 17.3281 41.9109 17.6881 42.6909 18.4081C43.4709 19.1161 43.8609 20.0221 43.8609 21.1261C43.8609 22.2301 43.4169 23.0641 42.5289 23.6281C43.5129 24.3121 44.0049 25.2421 44.0049 26.4181Z",fill:"#5b65f4"}),A.jsx("path",{d:"M33.9128 30.2521H25.6688V27.5881L30.3128 22.5481C30.7448 22.0801 30.9608 21.6241 30.9608 21.1801C30.9608 20.8201 30.8588 20.5321 30.6548 20.3161C30.4628 20.1001 30.1808 19.9921 29.8088 19.9921C29.4848 19.9921 29.2028 20.0881 28.9628 20.2801C28.7348 20.4721 28.6208 20.7901 28.6208 21.2341H25.6688C25.6688 20.0221 26.0648 19.0681 26.8568 18.3721C27.6608 17.6761 28.6448 17.3281 29.8088 17.3281C31.0208 17.3281 32.0048 17.6761 32.7608 18.3721C33.5288 19.0681 33.9128 20.0101 33.9128 21.1981C33.9128 21.8221 33.7928 22.3501 33.5528 22.7821C33.3128 23.2141 32.9048 23.7361 32.3288 24.3481L29.2688 27.5881H33.9128V30.2521Z",fill:"#5b65f4"}),A.jsx("path",{d:"M22.021 30.2525H19.069V20.5865L16.333 22.9625V19.8125L19.069 17.4365H22.021V30.2525Z",fill:"#5b65f4"})]}),Vq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"58",y:"25",width:"4",height:"44",rx:"0.5",transform:"rotate(90 58 25)",fill:"#5b65f4"}),A.jsx("rect",{x:"29.5",y:"33",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 29.5 33)",fill:"#959bee"}),A.jsx("path",{d:"M14.584 19L17.085 12.2832H18.8377L21.3008 19H19.7566L19.264 17.5695H16.5829L16.0808 19H14.584ZM17.0377 16.2716H18.8093L17.9282 13.7232L17.0377 16.2716ZM22.1459 19V12.2832H24.609C25.9259 12.2832 26.6933 13.0505 26.6933 14.0832C26.6933 14.7842 26.2575 15.3432 25.708 15.5232C26.3333 15.6747 26.9017 16.2432 26.9017 17.1053C26.9017 18.2042 26.068 19 24.808 19H22.1459ZM23.529 15.0116H24.3911C24.9406 15.0116 25.3006 14.7084 25.3006 14.2347C25.3006 13.7705 24.9785 13.4674 24.3722 13.4674H23.529V15.0116ZM23.529 17.8347H24.5143C25.1206 17.8347 25.4901 17.5126 25.4901 17.0105C25.4901 16.5179 25.1396 16.1768 24.5238 16.1768H23.529V17.8347ZM31.0425 19.1421C29.1383 19.1421 27.5751 17.7684 27.5751 15.6558C27.5751 13.5432 29.1762 12.1411 31.0236 12.1411C32.9751 12.1411 33.8941 13.3726 34.1309 14.3863L32.7951 14.8126C32.672 14.2726 32.1983 13.5147 31.0236 13.5147C30.0857 13.5147 29.0436 14.1968 29.0436 15.6558C29.0436 16.9821 30.0099 17.7305 31.0425 17.7305C32.2078 17.7305 32.7004 16.9726 32.8615 16.4232L34.2067 16.8211C33.9699 17.7968 33.0509 19.1421 31.0425 19.1421Z",fill:"#5b65f4"})]}),Hq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{width:"26",height:"19",rx:"1",transform:"matrix(1 0 0 -1 23 36.5)",fill:"#E9EAFB"}),A.jsx("rect",{width:"26",height:"3",rx:"1",transform:"matrix(1 0 0 -1 23 14.5)",fill:"#5b65f4"}),A.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 27 25.5)",fill:"#5b65f4"}),A.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 34 31.5)",fill:"#959bee"})]}),Wq=({onOk:t})=>{const{t:e}=zr(),r=[{title:e("add.t1"),child:[{title:e("add.t2"),type:"chart-bar",icon:A.jsx(jO,{})},{title:e("add.t3"),type:"chart-line",icon:A.jsx(VO,{})},{title:e("add.t4"),type:"chart-pie",icon:A.jsx(HO,{})},{title:e("add.t5"),type:"chart-strip-bar",icon:A.jsx(WO,{})}]},{title:e("add.t6"),child:[{title:e("add.t7"),type:"statistics",icon:A.jsx(jq,{})},{title:e("add.t8"),type:"text",icon:A.jsx(Vq,{})},{title:e("add.t9"),type:"calendar",icon:A.jsx(Hq,{})}]}],[n,i]=k.useState(!1),a=o=>{i(!1),t==null||t(o)};return A.jsx(A.Fragment,{children:A.jsx(Q.Popover,{placement:"bottomRight",open:n,onOpenChange:i,content:A.jsx("div",{className:"pivot-table-modal box-widget-popover-item-container",children:r.map((o,s)=>A.jsxs("div",{className:"box-widget-popover-item-group",children:[A.jsx("p",{className:"box-widget-popover-item-group-header",children:o.title}),A.jsx("div",{className:"box-widget-popover-item-group-content",children:o.child.map((u,l)=>A.jsxs("div",{onClick:()=>{a(u.type)},className:"box-widget-popover-item",children:[A.jsx("div",{className:"img",children:u.icon}),A.jsx("div",{className:"title",children:u.title})]},l))})]},s))}),trigger:"click",children:A.jsx(Q.Button,{children:e("add.t10")})})})},$q=[{label:"等于",value:"="},{label:"早于",value:"<"},{label:"晚于",value:">"},{label:"范围内",value:"contain"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],Gq=[{label:"等于",value:"="}],$O=[{label:"等于",value:"="},{label:"不等于",value:"!="},{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"小于",value:"<"},{label:"小于等于",value:"=<"},{label:"范围内",value:"contain"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],GO=[{label:"等于",value:"="},{label:"不等于",value:"!="},{label:"包含",value:"include"},{label:"不包含",value:"notinclude"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],Uq={int:$O,timestamp:$q,string:GO,bool:Gq,float:$O,enum:GO};let Vh;const UO=({open:t,onClose:e,onOk:r,fieldOptions:n,value:i,enumDataApi:a})=>{const[o]=Q.Form.useForm(),s=k.useRef(),{t:u}=zr(),l=k.useCallback(()=>{if(i!=null&&i.conditionList){const g=JSON.parse(JSON.stringify(i==null?void 0:i.conditionList));o.setFieldsValue({conditionList:g.map(v=>(v.type==="timestamp"&&(v.val&&(v.val=ti(v.val)),v.val2&&(v.val2=ti(v.val2))),(v.val===void 0||v.val==="")&&(v.val=""),(v.val2===void 0||v.val2==="")&&(v.val2=""),v)),conditionType:i.conditionType})}else o.setFieldsValue({conditionList:[],conditionType:"all"})},[i]),[f,c]=k.useState([]),h=({url:g,callback:v})=>{var m;(m=a==null?void 0:a(g))==null||m.then(y=>{v(y.data)})},d=g=>{Vh&&(clearTimeout(Vh),Vh=null),Vh=setTimeout(()=>{h(g)},300)},p=(g,v)=>{d({url:g,value:v,callback:c})};return k.useEffect(()=>{l()},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{title:u("setFilteringCriteria"),open:t,destroyOnClose:!0,width:"600px",onOk:()=>{const g=o.getFieldsValue(),v=g.conditionList?JSON.parse(JSON.stringify(g.conditionList)):"",m=g.conditionType,y={conditionList:v.map(b=>(b.type==="timestamp"&&(b.val&&(b.val=ti(b.val).format("YYYY-MM-DD")),b.val2&&(b.val2=b.val2?ti(b.val2).format("YYYY-MM-DD"):"")),b)),conditionType:m};s.current=y,e==null||e(),r==null||r(y)},onCancel:()=>{l(),e==null||e(),o.setFieldsValue(s.current)},children:A.jsxs(Q.Form,{name:"dynamicForm",form:o,initialValues:{conditionType:"all"},style:{maxWidth:600,marginTop:"30px"},children:[A.jsx(Q.Form.Item,{noStyle:!0,dependencies:["conditionList"],children:({getFieldValue:g})=>{var v;return((v=g("conditionList"))==null?void 0:v.length)>1?A.jsxs(Q.Flex,{align:"center",gap:5,style:{marginBottom:"20px"},children:[u("conformTo"),A.jsx(Q.Form.Item,{name:"conditionType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:[{label:u("all"),value:"all"},{label:u("everyone"),value:"any"}]})})," ",u("condition")]}):null}}),A.jsx(Q.Form.List,{name:"conditionList",children:(g,{add:v,remove:m})=>A.jsxs(A.Fragment,{children:[g.map(({key:y,name:b,...w})=>A.jsxs(Q.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[A.jsx(Q.Form.Item,{...w,name:[b,"field"],noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:n||[],onChange:C=>{const _=o.getFieldValue("conditionList"),D=n==null?void 0:n.find(S=>S.value===C);_[b].condition="=",_[b].type=D==null?void 0:D.type,_[b].val="",_[b].val2="",o.setFieldsValue({conditionList:_});const x=D==null?void 0:D.dynamic_call_enum_api;console.log("enumUrl",x),x&&h({url:x,value:"",callback:c})}})}),A.jsx(Q.Form.Item,{noStyle:!0,dependencies:[["conditionList",b,"field"]],children:({getFieldValue:C})=>{var D;const _=(D=n==null?void 0:n.find(x=>x.value===C(["conditionList",b,"field"])))==null?void 0:D.type;return A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"condition"],noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:_?Uq[_]:[]})})})}}),A.jsx(Q.Form.Item,{noStyle:!0,dependencies:[["conditionList",b,"field"],["conditionList",b,"condition"]],children:({getFieldValue:C})=>{var O,E,P;const _=(O=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:O.type,D=(E=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:E.enum,x=(P=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:P.dynamic_call_enum_api,S=C(["conditionList",b,"condition"]);return A.jsxs(A.Fragment,{children:[["int","float"].includes(_)&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.InputNumber,{style:{width:"100px"},placeholder:u("pleaseEnter")})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.InputNumber,{style:{width:"100px",marginLeft:"5px"},placeholder:u("pleaseEnter")})}):null]}):null,_==="timestamp"&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.DatePicker,{style:{width:"150px"}})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.DatePicker,{style:{width:"150px",marginLeft:"5px"}})}):null]}):null,["string"].includes(_)&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.Input,{style:{width:"150px"},placeholder:u("pleaseEnter")})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.Input,{style:{width:"150px",marginLeft:"5px"},placeholder:u("pleaseEnter")})}):null]}):null,["bool"].includes(_)?A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.Switch,{})})}):null,["enum"].includes(_)&&!["null","notnull"].includes(S)?A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:(D==null?void 0:D.length)>0?A.jsx(Q.Select,{style:{width:"150px"},options:D}):x?A.jsx(Q.Select,{style:{width:"150px"},showSearch:!0,defaultActiveFirstOption:!1,suffixIcon:null,filterOption:!1,onSearch:F=>{p(x,F)},notFoundContent:null,options:(f||[]).map(F=>({value:F.value,label:F.label}))}):null})}):null]})}}),A.jsx(ww,{onClick:()=>m(b)})]},y)),A.jsx(Q.Form.Item,{children:A.jsx(Q.Button,{type:"dashed",onClick:()=>{v({field:n==null?void 0:n[0].value,condition:"=",type:n==null?void 0:n[0].type})},block:!0,icon:A.jsx(Dw,{}),children:u("addCondition")})})]})})]})})})},qq=({selectModuleData:t,onAllValuesChange:e,enumDataApi:r})=>{const{globalData:n}=Oo(),[i]=Q.Form.useForm(),[a,o]=k.useState(),[s,u]=k.useState(!1),l=k.useRef(),[f,c]=k.useState(),[h,d]=k.useState(0),{t:p}=zr(),g={dataSourceId:"",statisticalMethod:"recordTotal",field:""},v=()=>{setTimeout(()=>{console.log("conditionDataRef.current",l.current),e==null||e({...i.getFieldsValue(),conditionData:l.current})})},m=b=>{var C,_;const w=(_=(C=n==null?void 0:n.sourceData)==null?void 0:C.find(D=>D.value===b))==null?void 0:_.fields;o(w)},y=b=>{var w;c(b),l.current=b,d(((w=b==null?void 0:b.conditionList)==null?void 0:w.length)||0)};return k.useEffect(()=>{var b,w;if(t!=null&&t.customData){const C=t.customData;i.setFieldsValue(C),o(C==null?void 0:C.dataSourceId),m(C==null?void 0:C.dataSourceId)}else{const C=(b=n==null?void 0:n.sourceData)==null?void 0:b[0];i.setFieldsValue({...g,dataSourceId:C==null?void 0:C.value}),m(C==null?void 0:C.value),v()}y((w=t==null?void 0:t.customData)==null?void 0:w.conditionData)},[t,n]),A.jsxs(A.Fragment,{children:[A.jsxs(Q.Form,{form:i,name:"customData",layout:"vertical",initialValues:g,children:[A.jsx(Q.Form.Item,{label:p("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:n==null?void 0:n.sourceData,onChange:b=>{i.setFieldsValue({statisticalMethod:"recordTotal"}),m(b),v()}})}),A.jsxs(Q.Form.Item,{label:p("dataRange"),children:[A.jsx(Q.Button,{style:{marginLeft:"-15px"},onClick:()=>{u(!0)},type:"link",children:p("filterData")}),h>0?`${p("selectNcondition",{n:h})}`:null]}),A.jsx(Q.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),A.jsx(Q.Form.Item,{label:p("statisticstMethods"),name:"statisticalMethod",children:A.jsx(Q.Select,{onChange:b=>{i.setFieldsValue({field:b==="fieldValue"?a==null?void 0:a[0].value:"",statisticalType:"sum"}),v()},options:[{value:"recordTotal",label:p("statisticstRecordNum")},{value:"fieldValue",label:p("statisticstFieldVal")}]})}),A.jsx(Q.Form.Item,{dependencies:["statisticalMethod"],children:({getFieldValue:b})=>b("statisticalMethod")==="fieldValue"?A.jsx(Q.Form.Item,{label:p("selectField"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{noStyle:!0,name:"field",children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{v()},options:a})}),A.jsx(Q.Form.Item,{name:"statisticalType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{v()},options:[{value:"sum",label:p("sumVal")},{value:"max",label:p("maxVal")},{value:"min",label:p("minVal")},{value:"average",label:p("averageVal")}]})})]})}):null})]}),A.jsx(UO,{open:s,value:f,fieldOptions:a,enumDataApi:r,onClose:()=>{u(!1)},onOk:b=>{y(b),v()}})]})},Yq=({value:t,onChange:e})=>{const[r,n]=k.useState(),i=["#373c43","#3370ff","#4954e6","#34c724","#14c0ff","#ffc60a","#f80","#f76964"];return k.useEffect(()=>{n(t)},[t]),A.jsx("div",{className:"pane-item-body item-body-column",children:A.jsx("div",{className:"panel-single-color-selector",children:i.map((a,o)=>A.jsxs("div",{className:"panel-single-color-selector-color-item",onClick:()=>{n(a),e==null||e(a)},children:[A.jsx("div",{className:"panel-single-color-selector-color-item-background",style:{background:a}}),r===a?A.jsx("span",{className:"panel-icon",children:A.jsx(mw,{})}):null]},o))})})},Xq=({selectModuleData:t,onAllValuesChange:e})=>{const[r]=Q.Form.useForm(),{t:n}=zr(),i={color:"#373c43",unit:"1",precision:"",desc:""},a=()=>{setTimeout(()=>{e==null||e(r.getFieldsValue())})};return k.useEffect(()=>{t!=null&&t.customeStyle?r.setFieldsValue(t.customeStyle):r.setFieldsValue(i)},[t]),A.jsxs(Q.Form,{form:r,name:"customeStyle",layout:"vertical",initialValues:i,children:[A.jsx(Q.Form.Item,{label:n("statistics.t1"),name:"color",children:A.jsx(Yq,{onChange:()=>{a()}})}),A.jsx(Q.Form.Item,{label:n("statistics.t2"),extra:n("statistics.t3"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{name:"precision",noStyle:!0,children:A.jsx(Q.InputNumber,{min:1,max:10,style:{width:"60%"},placeholder:n("statistics.t4"),onChange:()=>{a()}})}),A.jsx(Q.Form.Item,{name:"unit",noStyle:!0,children:A.jsxs(Q.Select,{onChange:()=>{a()},children:[A.jsx(Q.Select.Option,{value:"1",children:n("statistics.t5")}),A.jsx(Q.Select.Option,{value:"2",children:n("statistics.t6")}),A.jsx(Q.Select.Option,{value:"3",children:n("statistics.t7")}),A.jsx(Q.Select.Option,{value:"4",children:n("statistics.t8")}),A.jsx(Q.Select.Option,{value:"5",children:n("statistics.t9")})]})})]})}),A.jsx(Q.Form.Item,{label:n("statistics.t10"),name:"desc",children:A.jsx(Q.Input,{onChange:()=>{a()}})})]})},Kq=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i,enumDataApi:a})=>{const{t:o}=zr(),[s,u]=k.useState(),[l,f]=k.useState(),c=()=>{e==null||e()};return k.useEffect(()=>{i&&(u(i==null?void 0:i.customData),f(i==null?void 0:i.customeStyle))},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:o("statisticsText"),footer:null,open:t,onOk:c,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",children:A.jsx(Hw,{customData:s,customeStyle:l,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",children:A.jsx(Q.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:o("typeData"),children:A.jsx(qq,{selectModuleData:i,enumDataApi:a,onAllValuesChange:h=>{u(h)}})},{key:"2",label:o("customStyle"),children:A.jsx(Xq,{selectModuleData:i,onAllValuesChange:h=>{f(h)}})}]})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:s,customeStyle:l})},children:o("confirm")})})]})]})})})},Zq=({selectModuleData:t,onAllValuesChange:e})=>{const{globalData:r}=Oo(),[n]=Q.Form.useForm(),[i,a]=k.useState(),[o,s]=k.useState(),{t:u}=zr(),l={dataSourceId:"",startDateField:"",endDateField:"",titleField:""},f=()=>{setTimeout(()=>{e==null||e(n.getFieldsValue())})},c=h=>{var p,g;const d=(g=(p=r==null?void 0:r.sourceData)==null?void 0:p.find(v=>v.value===h))==null?void 0:g.fields;a(d),s(d==null?void 0:d.filter(v=>v.type==="timestamp"))};return k.useEffect(()=>{var h,d,p,g,v;if(t!=null&&t.customData)n.setFieldsValue(t.customData),c((h=t==null?void 0:t.customData)==null?void 0:h.dataSourceId);else{const m=(d=r==null?void 0:r.sourceData)==null?void 0:d[0],y=(p=m==null?void 0:m.fields)==null?void 0:p.filter(b=>b.type==="timestamp");n.setFieldsValue({...l,dataSourceId:m==null?void 0:m.value,titleField:(v=(g=m==null?void 0:m.fields)==null?void 0:g[0])==null?void 0:v.value,startDateField:y==null?void 0:y[0].value,endDateField:y==null?void 0:y[0].value}),c(m==null?void 0:m.value),f()}},[t,r]),A.jsxs(Q.Form,{form:n,name:"customData",labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:l,children:[A.jsx("div",{style:{fontSize:"14px",marginBottom:"5px"},children:u("data")}),A.jsx(Q.Form.Item,{label:u("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:r==null?void 0:r.sourceData,onChange:h=>{c(h),f()}})}),A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:u("calendar.t1")}),A.jsx(Q.Form.Item,{label:u("calendar.t2"),name:"startDateField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:o})}),A.jsx(Q.Form.Item,{label:u("calendar.t3"),name:"endDateField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:o})}),A.jsx(Q.Form.Item,{label:u("calendar.t4"),name:"titleField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:i})})]})},Jq=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=zr(),[o,s]=k.useState(),u=()=>{e==null||e()};return k.useEffect(()=>{i&&s(i==null?void 0:i.customData)},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:a("calendarText"),footer:null,open:t,onOk:u,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",style:{borderRight:"1px solid #e0e0e0"},children:A.jsx(Jw,{customData:o,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",style:{borderLeft:"none"},children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",style:{paddingTop:"20px"},children:A.jsx(Zq,{selectModuleData:i,onAllValuesChange:l=>{s(l)}})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:o})},children:a("confirm")})})]})]})})})},Qq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"8",width:"6",height:"15.5",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"17",y:"24.5",width:"6",height:"15.5",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"28",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),eY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"21",width:"6",height:"6",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"17",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"24",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"28",y:"34",width:"6",height:"6",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"50",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"})]}),tY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"58",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 58 11)",fill:"#959bee"}),A.jsx("rect",{x:"42",y:"11",width:"4",height:"28",rx:"0.5",transform:"rotate(90 42 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 58 18)",fill:"#959bee"}),A.jsx("rect",{x:"35.5",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 35.5 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 58 25)",fill:"#959bee"}),A.jsx("rect",{x:"23",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 23 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"32",width:"4",height:"17",rx:"0.5",transform:"rotate(90 58 32)",fill:"#959bee"}),A.jsx("rect",{x:"40",y:"32",width:"4",height:"26",rx:"0.5",transform:"rotate(90 40 32)",fill:"#5b65f5"})]}),rY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"40",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 40 11)",fill:"#959bee"}),A.jsx("rect",{x:"24",y:"11",width:"4",height:"8",rx:"0.5",transform:"rotate(90 24 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"48",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 48 18)",fill:"#959bee"}),A.jsx("rect",{x:"31.5",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 31.5 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"60",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 60 25)",fill:"#959bee"}),A.jsx("rect",{x:"25",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 25 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"43",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 43 32)",fill:"#959bee"}),A.jsx("rect",{x:"29",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 29 32)",fill:"#5b65f5"})]}),nY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M15.5 33.5C20.2023 32.3804 23.5007 28.5533 25.7095 24.6682C28.3082 20.0974 34.0857 17.3668 38.758 19.7783L39.8066 20.3195C42.9001 21.9162 46.671 21.329 49.1326 18.8674L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),A.jsx("path",{d:"M16.5 15L26.844 27.6427C28.7759 30.0039 31.8825 31.0607 34.8535 30.3675L42.3359 28.6216C44.0629 28.2187 45.8748 28.401 47.4869 29.1398L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),iY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M20 24C20 32.8366 27.1634 40 36 40C44.8366 40 52 32.8366 52 24C52 15.1634 44.8366 8 36 8C27.1634 8 20 15.1634 20 24ZM46.3944 24C46.3944 29.7407 41.7407 34.3944 36 34.3944C30.2593 34.3944 25.6056 29.7407 25.6056 24C25.6056 18.2593 30.2593 13.6056 36 13.6056C41.7407 13.6056 46.3944 18.2593 46.3944 24Z",fill:"#5b65f4"}),A.jsx("path",{d:"M52 24C52 19.7565 50.3143 15.6869 47.3137 12.6863C44.3131 9.68571 40.2435 8 36 8V13.6056C38.7568 13.6056 41.4006 14.7007 43.35 16.65C45.2993 18.5994 46.3944 21.2432 46.3944 24H52Z",fill:"#959bee"}),A.jsx("path",{d:"M52 24C52 20.9896 51.1507 18.0403 49.5497 15.4909L44.8026 18.4721C45.8427 20.1283 46.3944 22.0443 46.3944 24H52Z",fill:"#cdcff9"})]}),aY=({selectModuleData:t,onAllValuesChange:e,onValuesChange:r,enumDataApi:n})=>{const{globalData:i}=Oo(),[a]=Q.Form.useForm(),[o,s]=k.useState(),[u,l]=k.useState(!1),f=k.useRef(),[c,h]=k.useState(),[d,p]=k.useState(0),{t:g}=zr(),v=Q.Form.useWatch("type",a),m={dataSourceId:"",yAxis:"recordTotal",chartOptions:["legend","label","axis","splitLine"]},y=()=>{setTimeout(()=>{e==null||e({...a.getFieldsValue(),conditionData:f.current})})},b=C=>{var D,x,S;console.log(" globalData?.sourceData",i==null?void 0:i.sourceData),console.log(" globalData?.sourceData",C);const _=(x=(D=i==null?void 0:i.sourceData)==null?void 0:D.find(O=>O.value===C))==null?void 0:x.fields;console.log(" globalData?.sourceData3",_),a.setFieldsValue({xAxis:(S=_==null?void 0:_[0])==null?void 0:S.value}),s(_)},w=C=>{var _;h(C),f.current=C,p(((_=C==null?void 0:C.conditionList)==null?void 0:_.length)||0)};return k.useEffect(()=>{var C,_;if(t!=null&&t.customData){const D=t.customData;a.setFieldsValue(D),s(D==null?void 0:D.dataSourceId),b(D==null?void 0:D.dataSourceId)}else{const D=(C=i==null?void 0:i.sourceData)==null?void 0:C[0];a.setFieldsValue({...m,dataSourceId:D==null?void 0:D.value,type:t==null?void 0:t.type}),b(D==null?void 0:D.value),y()}w((_=t==null?void 0:t.customData)==null?void 0:_.conditionData)},[t,i]),A.jsxs("div",{style:{height:"50vh",overflowX:"auto"},children:[A.jsxs(Q.Form,{form:a,name:"customData",layout:"vertical",onValuesChange:r,initialValues:m,children:[A.jsx(Q.Form.Item,{label:g("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:i==null?void 0:i.sourceData,onChange:C=>{a.setFieldsValue({yAxis:"recordTotal"}),b(C),y()}})}),A.jsxs(Q.Form.Item,{label:g("dataRange"),children:[A.jsx(Q.Button,{style:{marginLeft:"-15px"},onClick:()=>{l(!0)},type:"link",children:g("filterData")}),d>0?`${g("selectNcondition",{n:d})}`:null]}),A.jsx(Q.Form.Item,{label:g("chart.t1"),name:"type",children:A.jsx(Q.Select,{onChange:()=>{y()},options:[{label:g("chart.t2"),value:"chart-bar",icon:A.jsx(jO,{})},{label:g("chart.t3"),value:"chart-bar-pile",icon:A.jsx(eY,{})},{label:g("chart.t4"),value:"chart-bar-percentage",icon:A.jsx(Qq,{})},{label:g("chart.t5"),value:"chart-strip-bar",icon:A.jsx(WO,{})},{label:g("chart.t6"),value:"chart-strip-bar-pile",icon:A.jsx(rY,{})},{label:g("chart.t7"),value:"chart-strip-bar-percentage",icon:A.jsx(tY,{})},{label:g("chart.t8"),value:"chart-line",icon:A.jsx(VO,{})},{label:g("chart.t9"),value:"chart-line-smooth",icon:A.jsx(nY,{})},{label:g("chart.t10"),value:"chart-pie",icon:A.jsx(HO,{})},{label:g("chart.t11"),value:"chart-pie-circular",icon:A.jsx(iY,{})}],optionRender:C=>A.jsxs(Q.Flex,{align:"center",children:[A.jsx("span",{role:"img",style:{marginTop:"5px"},"aria-label":C.data.label,children:C.data.icon}),C.data.label]})})}),A.jsx(Q.Form.Item,{name:"chartOptions",label:g("chart.t12"),children:A.jsxs(Q.Checkbox.Group,{onChange:()=>{y()},children:[A.jsx(Q.Checkbox,{value:"legend",style:{lineHeight:"32px"},children:g("chart.t13")}),A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:g("chart.t14")}),["chart-pie","chart-pie-circular"].includes(v)?null:A.jsxs(A.Fragment,{children:[A.jsx(Q.Checkbox,{value:"axis",style:{lineHeight:"32px"},children:g("chart.t15")}),A.jsx(Q.Checkbox,{value:"splitLine",style:{lineHeight:"32px"},children:g("chart.t16")})]})]})}),A.jsx(Q.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),A.jsx(Q.Form.Item,{label:v!=null&&v.includes("pie")?g("chart.t17"):g("chart.t18"),name:"xAxis",children:A.jsx(Q.Select,{onChange:()=>{y()},options:o})}),A.jsx(Q.Form.Item,{label:v!=null&&v.includes("pie")?g("chart.t19"):g("chart.t20"),name:"yAxis",children:A.jsx(Q.Select,{onChange:C=>{a.setFieldsValue({yAxisField:C==="fieldValue"?o==null?void 0:o[0].value:"",yAxisFieldType:"sum"}),y()},options:[{value:"recordTotal",label:g("statisticstRecordNum")},{value:"fieldValue",label:g("statisticstFieldVal")}]})}),A.jsx(Q.Form.Item,{dependencies:["yAxis"],children:({getFieldValue:C})=>C("yAxis")==="fieldValue"?A.jsx(Q.Form.Item,{label:g("selectField"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{noStyle:!0,name:"yAxisField",children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{y()},options:o})}),A.jsx(Q.Form.Item,{name:"yAxisFieldType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{y()},options:[{value:"sum",label:g("sumVal")},{value:"max",label:g("maxVal")},{value:"min",label:g("minVal")},{value:"average",label:g("averageVal")}]})})]})}):null})]}),A.jsx(UO,{open:u,value:c,fieldOptions:o,enumDataApi:n,onClose:()=>{l(!1)},onOk:C=>{w(C),y()}})]})},oY=({selectModuleData:t,onAllValuesChange:e,customeStylesRef:r})=>{const[n]=Q.Form.useForm(),{t:i}=zr(),a={xtitle:"",ytitle:"",xchartOptions:[],ychartOptions:[]},o=()=>{setTimeout(()=>{e==null||e(n.getFieldsValue())})};return k.useEffect(()=>{t!=null&&t.customeStyle?n.setFieldsValue(t.customeStyle):n.setFieldsValue(a)},[t]),k.useImperativeHandle(r,()=>({reset(){n.setFieldsValue(a),e==null||e(a)}})),A.jsx("div",{style:{height:"50vh",overflowX:"auto"},children:A.jsxs(Q.Form,{form:n,name:"customeStyle",layout:"vertical",initialValues:a,children:[A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:i("chart.t21")}),A.jsx(Q.Form.Item,{label:i("chart.t22"),name:"xtitle",children:A.jsx(Q.Input,{onChange:()=>{o()}})}),A.jsx(Q.Form.Item,{name:"xchartOptions",label:i("chart.t23"),children:A.jsx(Q.Checkbox.Group,{onChange:()=>{o()},children:A.jsxs(Q.Row,{children:[A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:i("chart.t24")})}),A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:i("chart.t25")})})]})})}),A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:i("chart.t26")}),A.jsx(Q.Form.Item,{label:i("chart.t27"),name:"ytitle",children:A.jsx(Q.Input,{onChange:()=>{o()}})}),A.jsx(Q.Form.Item,{name:"ychartOptions",label:i("chart.t28"),children:A.jsx(Q.Checkbox.Group,{onChange:()=>{o()},children:A.jsxs(Q.Row,{children:[A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:i("chart.t29")})}),A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:i("chart.t30")})})]})})})]})})},sY=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=zr(),[o,s]=k.useState(),[u,l]=k.useState(),f=k.useRef(),c=()=>{e==null||e()};return k.useEffect(()=>{i&&(s(i==null?void 0:i.customData),l(i==null?void 0:i.customeStyle))},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:a("chartText"),footer:null,open:t,onOk:c,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",children:A.jsx(zO,{customData:o,customeStyle:u,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",children:A.jsx(Q.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:a("typeData"),children:A.jsx(aY,{selectModuleData:i,onAllValuesChange:h=>{s(h)},onValuesChange:h=>{var d;Object.keys(h).includes("type")&&((d=f.current)==null||d.reset(),l({}))}})},{key:"2",label:a("customStyle"),children:A.jsx(oY,{customeStylesRef:f,selectModuleData:i,onAllValuesChange:h=>{l(h)}})}]})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,type:i==null?void 0:i.type,customData:o,customeStyle:u})},children:a("confirm")})})]})]})})})},Me=t=>typeof t=="string",dl=()=>{let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r},qO=t=>t==null?"":""+t,uY=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},lY=/###/g,YO=t=>t&&t.indexOf("###")>-1?t.replace(lY,"."):t,XO=t=>!t||Me(t),vl=(t,e,r)=>{const n=Me(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(XO(t))return{};const a=YO(n[i]);!t[a]&&r&&(t[a]=new r),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++i}return XO(t)?{}:{obj:t,k:YO(n[i])}},KO=(t,e,r)=>{const{obj:n,k:i}=vl(t,e,Object);if(n!==void 0||e.length===1){n[i]=r;return}let a=e[e.length-1],o=e.slice(0,e.length-1),s=vl(t,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=vl(t,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},fY=(t,e,r,n)=>{const{obj:i,k:a}=vl(t,e,Object);i[a]=i[a]||[],i[a].push(r)},Hh=(t,e)=>{const{obj:r,k:n}=vl(t,e);if(r)return r[n]},cY=(t,e,r)=>{const n=Hh(t,r);return n!==void 0?n:Hh(e,r)},ZO=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?Me(t[n])||t[n]instanceof String||Me(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):ZO(t[n],e[n],r):t[n]=e[n]);return t},As=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hY={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const dY=t=>Me(t)?t.replace(/[&<>"'\/]/g,e=>hY[e]):t;class vY{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const pY=[" ",",","?","!",";"],gY=new vY(20),mY=(t,e,r)=>{e=e||"",r=r||"";const n=pY.filter(o=>e.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=gY.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(t);if(!a){const o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a},ry=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(r);let i=t;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let u=a;u<n.length;++u)if(u!==a&&(s+=r),s+=n[u],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;a+=u-a+1;break}i=o}return i},Wh=t=>t&&t.replace("_","-"),yY={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class $h{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||yY,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,i){return i&&!this.debug?null:(Me(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new $h(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new $h(this.logger,e)}}var Wn=new $h;class Gh{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s.apply(s,[e,...n])})}}class JO extends Gh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,r],n&&(Array.isArray(n)?s.push(...n):Me(n)&&a?s.push(...n.split(a)):s.push(n)));const u=Hh(this.data,s);return!u&&!r&&!n&&e.indexOf(".")>-1&&(e=s[0],r=s[1],n=s.slice(2).join(".")),u||!o||!Me(n)?u:ry(this.data&&this.data[e]&&this.data[e][r],n,a)}addResource(e,r,n,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,r];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),i=r,r=s[1]),this.addNamespaces(r),KO(this.data,s,i),a.silent||this.emit("added",e,r,n,i)}addResources(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in n)(Me(n[a])||Array.isArray(n[a]))&&this.addResource(e,r,a,n[a],{silent:!0});i.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,r];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let u=Hh(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?ZO(u,n,a):u={...u,...n},KO(this.data,s,u),o.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var QO={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,i){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,r,n,i))}),e}};const eP={};class Uh extends Gh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),uY(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,r);return n&&n.res!==void 0}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!mY(e,n,i);if(o&&!s){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:a};const l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),e=l.join(i)}return Me(a)&&(a=[a]),{key:e,namespaces:a}}translate(e,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(e[e.length-1],r),u=s[s.length-1],l=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(f){const w=r.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${w}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${w}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:o}const c=this.resolve(e,r);let h=c&&c.res;const d=c&&c.usedKey||o,p=c&&c.exactUsedKey||o,g=Object.prototype.toString.apply(h),v=["[object Number]","[object Function]","[object RegExp]"],m=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=!Me(h)&&typeof h!="boolean"&&typeof h!="number";if(y&&h&&b&&v.indexOf(g)<0&&!(Me(m)&&Array.isArray(h))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,h,{...r,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(c.res=w,c.usedParams=this.getUsedParamsDetails(r),c):w}if(a){const w=Array.isArray(h),C=w?[]:{},_=w?p:d;for(const D in h)if(Object.prototype.hasOwnProperty.call(h,D)){const x=`${_}${a}${D}`;C[D]=this.translate(x,{...r,joinArrays:!1,ns:s}),C[D]===x&&(C[D]=h[D])}h=C}}else if(y&&Me(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,r,n));else{let w=!1,C=!1;const _=r.count!==void 0&&!Me(r.count),D=Uh.hasDefaultValue(r),x=_?this.pluralResolver.getSuffix(l,r.count,r):"",S=r.ordinal&&_?this.pluralResolver.getSuffix(l,r.count,{ordinal:!1}):"",O=_&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),E=O&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${S}`]||r.defaultValue;!this.isValidLookup(h)&&D&&(w=!0,h=E),this.isValidLookup(h)||(C=!0,h=o);const F=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,B=D&&E!==h&&this.options.updateMissing;if(C||w||B){if(this.logger.log(B?"updateKey":"missingKey",l,u,o,B?E:h),a){const z=this.resolve(o,{...r,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let M=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let z=0;z<I.length;z++)M.push(I[z]);else this.options.saveMissingTo==="all"?M=this.languageUtils.toResolveHierarchy(r.lng||this.language):M.push(r.lng||this.language);const j=(z,W,R)=>{const U=D&&R!==h?R:F;this.options.missingKeyHandler?this.options.missingKeyHandler(z,u,W,U,B,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,u,W,U,B,r),this.emit("missingKey",z,u,W,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?M.forEach(z=>{const W=this.pluralResolver.getSuffixes(z,r);O&&r[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(R=>{j([z],o+R,r[`defaultValue${R}`]||E)})}):j(M,o,E))}h=this.extendTranslation(h,e,r,c,n),C&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${o}`),(C||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,w?h:void 0):h=this.options.parseMissingKeyHandler(h))}return i?(c.res=h,c.usedParams=this.getUsedParamsDetails(r),c):h}extendTranslation(e,r,n,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=Me(e)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(l){const h=e.match(this.interpolator.nestingRegexp);f=h&&h.length}let c=n.replace&&!Me(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||i.usedLng,n),l){const h=e.match(this.interpolator.nestingRegexp),d=h&&h.length;f<d&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];return a&&a[0]===d[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${r[0]}`),null):o.translate(...d,r)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,u=Me(s)?[s]:s;return e!=null&&u&&u.length&&n.applyPostProcessor!==!1&&(e=QO.handle(u,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,a,o,s;return Me(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,r),f=l.key;i=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const h=r.count!==void 0&&!Me(r.count),d=h&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(Me(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);c.forEach(v=>{this.isValidLookup(n)||(s=v,!eP[`${g[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(eP[`${g[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(m=>{if(this.isValidLookup(n))return;o=m;const y=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,f,m,v,r);else{let w;h&&(w=this.pluralResolver.getSuffix(m,r.count,r));const C=`${this.options.pluralSeparator}zero`,_=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(y.push(f+w),r.ordinal&&w.indexOf(_)===0&&y.push(f+w.replace(_,this.options.pluralSeparator)),d&&y.push(f+C)),p){const D=`${f}${this.options.contextSeparator}${r.context}`;y.push(D),h&&(y.push(D+w),r.ordinal&&w.indexOf(_)===0&&y.push(D+w.replace(_,this.options.pluralSeparator)),d&&y.push(D+C))}}let b;for(;b=y.pop();)this.isValidLookup(n)||(a=b,n=this.getResource(m,v,b,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,n,i):this.resourceStore.getResource(e,r,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Me(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}const ny=t=>t.charAt(0).toUpperCase()+t.slice(1);class tP{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wn.create("languageUtils")}getScriptPartFromCode(e){if(e=Wh(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Wh(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(Me(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ny(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ny(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=ny(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),Me(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],e),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Me(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Me(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let bY=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],CY={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const wY=["v1","v2","v3"],_Y=["v4"],rP={zero:0,one:1,two:2,few:3,many:4,other:5},DY=()=>{const t={};return bY.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:CY[e.fc]}})}),t};class xY{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=Wn.create("pluralResolver"),(!this.options.compatibilityJSON||_Y.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=DY(),this.pluralRulesCache={}}addRule(e,r){this.rules[e]=r}clearCache(){this.pluralRulesCache={}}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Wh(e==="dev"?"en":e),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const o=new Intl.PluralRules(n,{type:i});return this.pluralRulesCache[a]=o,o}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${r}${i}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,a)=>rP[i]-rP[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,r)):[]}getSuffix(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){const n=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!wY.includes(this.options.compatibilityJSON)}}const nP=function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=cY(t,e,r);return!a&&i&&Me(r)&&(a=ry(t,r,n),a===void 0&&(a=ry(e,r,n))),a},iy=t=>t.replace(/\$/g,"$$$$");class SY{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wn.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=r!==void 0?r:dY,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?As(a):o||"{{",this.suffix=s?As(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=h?As(h):d||As("$t("),this.nestingSuffix=p?As(p):g||As(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,n,i){let a,o,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=d=>{if(d.indexOf(this.formatSeparator)<0){const m=nP(r,u,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,n,{...i,...r,interpolationkey:d}):m}const p=d.split(this.formatSeparator),g=p.shift().trim(),v=p.join(this.formatSeparator).trim();return this.format(nP(r,u,g,this.options.keySeparator,this.options.ignoreJSONStructure),v,n,{...i,...r,interpolationkey:g})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,c=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>iy(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?iy(this.escape(d)):iy(d)}].forEach(d=>{for(s=0;a=d.regex.exec(e);){const p=a[1].trim();if(o=l(p),o===void 0)if(typeof f=="function"){const v=f(e,a,i);o=Me(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(c){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),o="";else!Me(o)&&!this.useRawValueToEscape&&(o=qO(o));const g=d.safeValue(o);if(e=e.replace(a[0],g),c?(d.regex.lastIndex+=o.length,d.regex.lastIndex-=a[0].length):d.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;const s=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${f}[ ]*{`));let h=`{${c[1]}`;u=c[0],h=this.interpolate(h,o);const d=h.match(/'/g),p=h.match(/"/g);(d&&d.length%2===0&&!p||p.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),l&&(o={...l,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,g),`${u}${f}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;i=this.nestingRegexp.exec(e);){let u=[];o={...n},o=o.replace&&!Me(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(c=>c.trim());i[1]=f.shift(),u=f,l=!0}if(a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===e&&!Me(a))return a;Me(a)||(a=qO(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),l&&(a=u.reduce((f,c)=>this.format(f,c,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const EY=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=s.trim();r[f]||(r[f]=l),l==="false"&&(r[f]=!1),l==="true"&&(r[f]=!0),isNaN(l)||(r[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:r}},Ts=t=>{const e={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=e[o];return s||(s=t(Wh(n),i),e[o]=s),s(r)}};class AY{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wn.create("formatter"),this.options=e,this.formats={number:Ts((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return a=>i.format(a)}),currency:Ts((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return a=>i.format(a)}),datetime:Ts((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return a=>i.format(a)}),relativetime:Ts((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return a=>i.format(a,n.range||"day")}),list:Ts((r,n)=>{const i=new Intl.ListFormat(r,{...n});return a=>i.format(a)})},this.init(e)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=Ts(r)}format(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,u)=>{const{formatName:l,formatOptions:f}=EY(u);if(this.formats[l]){let c=s;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},d=h.locale||h.lng||i.locale||i.lng||n;c=this.formats[l](s,d,{...f,...i,...h})}catch(h){this.logger.warn(h)}return c}else this.logger.warn(`there was no format function for ${l}`);return s},e)}}const TY=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class OY extends Gh{constructor(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Wn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,r,n,i){const a={},o={},s={},u={};return e.forEach(l=>{let f=!0;r.forEach(c=>{const h=`${l}|${c}`;!n.reload&&this.store.hasResourceBundle(l,c)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,f=!1,o[h]===void 0&&(o[h]=!0),a[h]===void 0&&(a[h]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(s[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(e,r,n){const i=e.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const s={};this.queue.forEach(u=>{fY(u.loaded,[a],o),TY(u,e),r&&u.errors.push(r),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{s[l][c]===void 0&&(s[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,i+1,a*2,o)},a);return}o(l,f)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(e,r);l&&typeof l.then=="function"?l.then(f=>s(null,f)).catch(s):s(null,l)}catch(l){s(l)}return}return u(e,r,s)}prepareLoading(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Me(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Me(r)&&(r=[r]);const a=this.queueLoad(e,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(e,o,s)})}saveMissing(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const u={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let f;l.length===5?f=l(e,r,n,i,u):f=l(e,r,n,i),f&&typeof f.then=="function"?f.then(c=>s(null,c)).catch(s):s(null,f)}catch(f){s(f)}else l(e,r,n,i,s,u)}!e||!e[0]||this.store.addResource(e[0],r,n,i)}}}const iP=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Me(t[1])&&(e.defaultValue=t[1]),Me(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),aP=t=>(Me(t.ns)&&(t.ns=[t.ns]),Me(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Me(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),qh=()=>{},PY=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class pl extends Gh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=aP(e),this.services={},this.logger=Wn,this.modules={external:[]},PY(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(Me(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=iP();this.options={...i,...this.options,...aP(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const a=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Wn.init(a(this.modules.logger),this.options):Wn.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=AY);const c=new tP(this.options);this.store=new JO(this.options.resources,this.options);const h=this.services;h.logger=Wn,h.resourceStore=this.store,h.languageUtils=c,h.pluralResolver=new xY(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=a(f),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new SY(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new OY(a(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(d){for(var p=arguments.length,g=new Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];e.emit(d,...g)}),this.modules.languageDetector&&(h.languageDetector=a(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=a(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Uh(this.services,this.options),this.translator.on("*",function(d){for(var p=arguments.length,g=new Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];e.emit(d,...g)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,n||(n=qh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const u=dl(),l=()=>{const f=(c,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),n(c,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qh;const i=Me(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&a.indexOf(l)<0&&a.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(e,r,n){const i=dl();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=qh),this.services.backendConnector.reload(e,r,a=>{i.resolve(),n(a)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&QO.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,r){var n=this;this.isLanguageChangingTo=e;const i=dl();this.emit("languageChanging",e);const a=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,l)=>{l?(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(u,function(){return n.t(...arguments)})},s=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const l=Me(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||a(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,f=>{o(f,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,r,n){var i=this;const a=function(o,s){let u;if(typeof s!="object"){for(var l=arguments.length,f=new Array(l>2?l-2:0),c=2;c<l;c++)f[c-2]=arguments[c];u=i.options.overloadTranslationOptionHandler([o,s].concat(f))}else u={...s};u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs,u.ns=u.ns||a.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||a.keyPrefix);const h=i.options.keySeparator||".";let d;return u.keyPrefix&&Array.isArray(o)?d=o.map(p=>`${u.keyPrefix}${h}${p}`):d=u.keyPrefix?`${u.keyPrefix}${h}${o}`:o,i.t(d,u)};return Me(e)?a.lng=e:a.lngs=e,a.ns=r,a.keyPrefix=n,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(a,e)))}loadNamespaces(e,r){const n=dl();return this.options.ns?(Me(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=dl();Me(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new tP(iP());return r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new pl(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qh;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new pl(i);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new JO(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Uh(a.services,i),a.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),f=1;f<u;f++)l[f-1]=arguments[f];a.emit(s,...l)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=pl.createInstance();Kt.createInstance=pl.createInstance,Kt.createInstance,Kt.dir,Kt.init,Kt.loadResources,Kt.reloadResources,Kt.use,Kt.changeLanguage,Kt.getFixedT,Kt.t,Kt.exists,Kt.setDefaultNamespace,Kt.hasLoadedNamespace,Kt.loadNamespaces,Kt.loadLanguages;const BY={...{title:"仪表盘",text:"文本",confirm:"确定",pleaseEnter:"请输入",configuration:"配置",copy:"复制",delete:"删除",calendarText:"日历",chartText:"图表",promptTitle:"提示",promptContentDeleteComponents:"确认删除组件?",unnamedRecord:"未命名记录",setFilteringCriteria:"设置筛选条件",all:"所有",everyone:"任一",condition:"条件",addCondition:"添加条件",equalto:"等于",notequalto:"不等于",contain:"包含",notcontain:"不包含",null:"为空",notnull:"不为空",conformTo:"符合以下",statisticsText:"统计文字",typeData:"类型与数据",customStyle:"自定义样式",dataSource:"数据源",dataRange:"数据范围",data:"数据",filterData:"筛选数据",selectNcondition:"已选{{n}}个条件",allData:"全部数据",statisticstMethods:"统计方式",statisticstRecordNum:"统计记录总数",statisticstFieldVal:"统计字段数值",selectField:"选择字段",sumVal:"求和",maxVal:"最大值",minVal:"最小值",averageVal:"平均值"},pb:{text:"文本"},statistics:{t1:"配色方案",t2:"数值设置",t3:"小数位数与格式",t4:"请输入小数位数",t5:"数字(千分位)",t6:"数字",t7:"百分比",t8:"人名币",t9:"美元",t10:"统计数值说明",t11:"",t12:"",t13:""},chart:{t1:"图表类型",t2:"基础柱状图",t3:"堆积柱状图",t4:"百分比柱状图",t5:"基础条形图",t6:"堆积条形图",t7:"百分比堆积条形图",t8:"折线图",t9:"平滑折线图",t10:"饼图",t11:"环形图",t12:"图标选项",t13:"图例",t14:"数据标签",t15:"坐标轴",t16:"网格线",t17:"扇形分区",t18:"横轴(类别)",t19:"扇形数值",t20:"纵轴(字段)",t21:"横轴",t22:"横轴标题",t23:"坐标轴选项",t24:"显示标签",t25:"显示轴线",t26:"纵轴",t27:"纵轴标题",t28:"坐标轴选项",t29:"显示标签",t30:"显示轴线"},calendar:{t1:"视图配置",t2:"开始日期",t3:"结束日期",t4:"标题展示"},add:{t1:"图表",t2:"柱状图",t3:"折线图",t4:"饼图",t5:"条形图",t6:"其他",t7:"统计数字",t8:"文本",t9:"日历",t10:"添加组件"}},MY={...{title:"Dashboard",text:"Text",confirm:"Confirm",pleaseEnter:"Please enter",configuration:"Configuration",copy:"Copy",delete:"Delete",calendarText:"Calendar",chartText:"Chart",promptTitle:"Prompt",promptContentDeleteComponents:"Are you sure you want to delete this component?",unnamedRecord:"Unnamed Record",setFilteringCriteria:"Set filtering criteria",all:"All",everyone:"Anyone",condition:"Condition",addCondition:"Add condition",equalto:"Equal to",notequalto:"Not equal to",contain:"Contains",notcontain:"Does not contain",null:"Is empty",notnull:"Is not empty",conformTo:"Conform to the following",statisticsText:"Statistics Text",typeData:"Type and Data",customStyle:"Custom Style",dataSource:"Data Source",dataRange:"Data Range",data:"Data",filterData:"Filter Data",selectNcondition:"Selected {{n}} conditions",allData:"All Data",statisticstMethods:"Statistical Methods",statisticstRecordNum:"Total Number of Records",statisticstFieldVal:"Statistical Field Values",selectField:"Select Field",sumVal:"Sum",maxVal:"Maximum Value",minVal:"Minimum Value",averageVal:"Average Value"},pb:{text:"Text"},statistics:{t1:"Color Scheme",t2:"Value Settings",t3:"Decimal Places and Format",t4:"Please enter decimal places",t5:"Number (Thousand Separator)",t6:"Number",t7:"Percentage",t8:"Renminbi",t9:"Dollar",t10:"Statistical Value Description",t11:"",t12:"",t13:""},chart:{t1:"Chart Type",t2:"Basic Bar Chart",t3:"Stacked Bar Chart",t4:"Percentage Bar Chart",t5:"Basic Horizontal Bar Chart",t6:"Stacked Horizontal Bar Chart",t7:"Percentage Stacked Horizontal Bar Chart",t8:"Line Chart",t9:"Smooth Line Chart",t10:"Pie Chart",t11:"Doughnut Chart",t12:"Chart Options",t13:"Legend",t14:"Data Label",t15:"Axis",t16:"Grid Line",t17:"Sector Division",t18:"Horizontal Axis (Category)",t19:"Sector Value",t20:"Vertical Axis (Field)",t21:"Horizontal Axis",t22:"Horizontal Axis Title",t23:"Axis Options",t24:"Show Labels",t25:"Show Axis Line",t26:"Vertical Axis",t27:"Vertical Axis Title",t28:"Axis Options",t29:"Show Labels",t30:"Show Axis Line"},calendar:{t1:"View Configuration",t2:"Start Date",t3:"End Date",t4:"Title Display"},add:{t1:"Chart",t2:"Bar Chart",t3:"Line Chart",t4:"Pie Chart",t5:"Horizontal Bar Chart",t6:"Other",t7:"Statistical Number",t8:"Text",t9:"Calendar",t10:"Add Component"}};Kt.use(lN).init({resources:{"zh-CN":{translation:BY},"en-US":{translation:MY}},lng:"zh-CN",fallbackLng:"zh-CN",interpolation:{escapeValue:!1}});const FY=()=>A.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"MoreVerticalOutlined",children:A.jsx("path",{d:"M12 5.5A1.75 1.75 0 1 1 12 2a1.75 1.75 0 0 1 0 3.5Zm0 8.225a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5ZM12 22a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5Z",fill:"currentColor"})}),LY=()=>A.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"DragOutlined",children:A.jsx("path",{d:"M8.25 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm0 7.25a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm1.75 5.5a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM14.753 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5ZM16.5 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0Zm-1.747 9a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Z",fill:"#999"})}),IY=({defaultValue:t,onChange:e})=>{const[r,n]=k.useState(!1),[i,a]=k.useState(""),o=Ew(s=>{e==null||e(s)},300);return k.useEffect(()=>{a(i)},[t]),A.jsx("span",{className:"handle title",children:A.jsx("span",{className:"title-child",onDoubleClick:()=>{n(!0)},children:r?A.jsx(Q.Input,{defaultValue:t,onBlur:()=>{n(!1)},onChange:s=>{a(s.target.value),o(s.target.value)}}):t})})},RY=E1.WidthProvider(E1.Responsive),NY=({sourceData:t,moduleConfigData:e,fieldMap:r,moduleDataApi:n,enumDataApi:i,onCreateModule:a,onUpdateModule:o,onDeleteModule:s,lang:u,onLayoutChange:l,className:f="layout",cols:c={lg:12,md:10,sm:6,xs:4,xxs:2},rowHeight:h=79})=>{const d=[10,10],{setGlobalData:p}=Oo(),[g,v]=k.useState([]),[m,y]=k.useState(0),[b,w]=k.useState(),[C,_]=k.useState(),[D,x]=k.useState(!1),{i18n:S,t:O}=zr(),[E,P]=k.useState(!1),[F,B]=k.useState(!1),[M,I]=k.useState(!1),j={text:O("pb.text"),calendar:O("calendarText"),statistics:O("chartText")},[,z]=k.useState(c.lg),W=async q=>{const L=q.type==="calendar"?5:4,X=q.type==="calendar"?5:3;if(Array.isArray(g)&&q.type){const V={x:0,y:0,w:L,h:X,title:q.type.includes("chart")?O("chartText"):j[q.type],...q,type:q.type};await(a==null?void 0:a(V).then(G=>{var J,K;if(!G.success){Q.message.error(G.message);return}v([...g,{...V,i:(J=G.data)==null?void 0:J.id,id:(K=G.data)==null?void 0:K.id}])}))}},R=async(q,L)=>{if(g!=null&&g.length){const X={...g.find(G=>G.id===q),...L},V=g.map(G=>G.id===q?X:G);v(V),await(o==null?void 0:o(X).then(G=>{if(!G.success){Q.message.error(G.message);return}}))}},U=async q=>{g!=null&&g.length&&(v(g.filter(L=>L.id!==q)),await(s==null?void 0:s(q||"")))},Z=q=>{l==null||l(q)},ee=(q,L)=>{z(L)},ne=q=>{if(q==="text"){const L={type:q,customData:{title:O("text"),editor:[{type:"paragraph",children:[{text:O("pleaseEnter")}]}]}};W(L)}else q==="statistics"?P(!0):q==="calendar"?B(!0):q!=null&&q.includes("chart")&&I(!0);_({title:"",type:q,w:0,h:0,x:0,y:0})};return k.useEffect(()=>{console.log("modules:",JSON.stringify(g))},[g]),k.useEffect(()=>{p({fieldMap:r,sourceData:t})},[r,p,t]),k.useEffect(()=>{v(e||[])},[e]),k.useEffect(()=>{S.changeLanguage(u||"zh_CN")},[S,u]),A.jsxs("div",{className:"pivot-table",children:[A.jsxs("div",{className:"bitable-block-dashboard",children:[A.jsx("div",{className:"bitable-block-dashboard-toolbar bitable-toolbar",children:A.jsxs("div",{className:"bitable-block-dashboard-toolbar--left",children:[A.jsx("div",{className:"bitable-block-name",children:A.jsx("div",{children:O("title")})}),A.jsx(Wq,{onOk:q=>{ne(q)}})]})}),A.jsx("div",{className:"bitable-block-dashboard__mount",children:A.jsx("div",{className:"dashboard-container",children:A.jsx("div",{className:"dashboard-content-container",children:A.jsx(RY,{onLayoutChange:Z,onBreakpointChange:ee,className:f,compactType:"vertical",cols:c,margin:d,rowHeight:h,draggableHandle:".handle",onWidthChange:(q,L,X)=>{y(q/X-1)},onDragStart:()=>{x(!0)},onDragStop:(q,L,X)=>{R(X.i,{...X}),x(!1)},onResizeStart:()=>{x(!0)},onResizeStop:(q,L,X)=>{R(X.i,{...X}),x(!1)},style:{backgroundSize:`${m}px ${h+d[0]}px`,backgroundImage:D?"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAABPCAYAAAAp8KG9AAAAAXNSR0IArs4c6QAAAlpJREFUeF7t3UFu01AYReGYfaBCuxDUnXVniIUArdgHrVwpJIPgPv3Skc7gMEKqfd/N/TADZ9Dt5++Xp9PBn4evd4c/P99aztGKpxO5z6rR3nD79fzn+/6X19e/P25VXg0jP9B1r/pcHtBt+/Rt3+b+y+fH439ul59uZ6jVIVeDu45fYGIXOO+CnRA4Nq0zOHCnC9YqcGxaZ3DgThesVeDYtM7gEbjzo9SKWmCjgst1LhC40wVrFTg2rTM4cKcL1ipwbFpncOBOF6xV4Ni0zuC+LXO6LLUavXiZ3LTUpovwBSZ2PeE4C3dA4Ny2yuTAlSxcqcC5bZXJgStZuFKBc9sqk0fgyk9SKWyB3rRh0zqDA3e6YK0Cx6Z1BgfudMFaBY5N6wwO3OmCtQocm9YZ3LdlTpelVqMXL5Obltp0Eb7AxK4nHGfhDgic21aZHLiShSsVOLetMjlwJQtXKnBuW2XyCFz5SSqFLdCbNmxaZ3DgThesVeDYtM7gwJ0uWKvAsWmdwYE7XbBWgWPTOoP7tszpstRq9OJlctNSmy7CF5jY9YTjLNwBgXPbKpMDV7JwpQLntlUmB65k4UoFzm2rTB6BKz9JpbAFetOGTesMDtzpgrUKHJvWGRy40wVrFTg2rTM4cKcL1ipwbFpncN+WOV2WWo1evExuWmrTRfgCE7t/T/j/2q3+Ivnz4eXcXoDcZ9Vobxb4B88hCXV99CrarT6r976D4//vdIBqgcBVHHyZwPmNVScEruLgywTOb6w6IXAVB18mcH5j1QmBqzj4MoHzG6tOCFzFwZd5Azm6fF+PNKX9AAAAAElFTkSuQmCC)":void 0,backgroundPosition:`${d[0]}px ${d[0]}px`,minHeight:"100vh"},children:g==null?void 0:g.map(q=>A.jsxs("div",{className:`box-dashboard ${b===q.id?"active":""}`,onClick:()=>{w(q.id)},"data-grid":{i:q.id,x:q.x,y:q.y,w:q.w,h:q.h,minW:2,minH:2},children:[A.jsxs("div",{className:"layout-item-head isCanDrag",children:[A.jsxs("div",{className:"head-inner",children:[A.jsx(IY,{defaultValue:q.title,onChange:L=>R(q.id,{title:L})}),A.jsx("div",{className:"menu-slot",children:A.jsx(Q.Dropdown,{trigger:["click"],menu:{items:[q.type!=="text"?{label:O("configuration"),key:"edit"}:null,{label:O("copy"),key:"copy"},{key:"delete",danger:!0,label:O("delete")}],onClick:({key:L})=>{var X;if(L==="edit")w(q.id),_(q),q.type==="statistics"&&P(!0),(X=q.type)!=null&&X.includes("chart")&&I(!0),q.type==="calendar"&&B(!0);else if(L==="delete")Q.Modal.confirm({title:O("promptTitle"),icon:A.jsx(bw,{}),content:O("promptContentDeleteComponents"),onOk(){U(q.id)}});else if(L==="copy"){const V=JSON.parse(JSON.stringify(q));delete V.id,delete V.i,W(V)}}},children:A.jsx("button",{type:"button",className:"dashboard-grid-menu-button",children:A.jsx("span",{className:"universe-icon",children:A.jsx(FY,{})})})})})]}),A.jsx("div",{className:"handle drag isCanDrag",children:A.jsx("span",{className:"universe-icon drag-icon",children:A.jsx(LY,{})})})]}),A.jsx(zq,{module:q,onUpdate:R,moduleDataApi:n,activeId:b,onClick:()=>{w(q.id)},rowWidth:m,rowHeight:h,onEdit:()=>{var L;w(q.id),_(q),q.type==="statistics"&&P(!0),(L=q.type)!=null&&L.includes("chart")&&I(!0),q.type==="calendar"&&B(!0)},onDelete:()=>{U(q.id)},onCopy:()=>{const L=JSON.parse(JSON.stringify(q));delete L.id,delete L.i,W(L)},onStartDragOrResize:()=>{x(!0)},onStopDragOrResize:()=>{x(!1)}})]},q.id))})})})})]}),A.jsx(Kq,{open:E,selectModuleData:C,onClose:()=>{P(!1)},onOk:({id:q,customData:L,customeStyle:X})=>{q?R(q,{type:"statistics",customData:L,customeStyle:X}):W({type:"statistics",customData:L,customeStyle:X}),P(!1)},moduleDataApi:n,enumDataApi:i}),A.jsx(Jq,{open:F,selectModuleData:C,onClose:()=>{B(!1)},onOk:({id:q,customData:L})=>{q?R(q,{type:"calendar",customData:L}):W({type:"calendar",customData:L}),B(!1)},moduleDataApi:n,enumDataApi:i}),A.jsx(sY,{open:M,selectModuleData:C,onClose:()=>{I(!1)},onOk:({id:q,type:L,customData:X,customeStyle:V})=>{q?R(q,{type:L,customData:X,customeStyle:V}):W({type:L,customData:X,customeStyle:V}),I(!1)},moduleDataApi:n,enumDataApi:i})]})},kY=t=>A.jsx(J8,{children:A.jsx(NY,{...t})});Gn.PivotTable=kY,Object.defineProperty(Gn,Symbol.toStringTag,{value:"Module"})});
|
|
178
|
+
`)),qe(n)),a.push({dimIdx:m.index,parser:y,comparator:new ZS(h,p)})});var o=e.sourceFormat;o!==ir&&o!==Yr&&(process.env.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),qe(n));for(var s=[],u=0,l=e.count();u<l;u++)s.push(e.getRawDataItem(u));return s.sort(function(f,c){for(var h=0;h<a.length;h++){var d=a[h],p=e.retrieveValueFromItem(f,d.dimIdx),g=e.retrieveValueFromItem(c,d.dimIdx);d.parser&&(p=d.parser(p),g=d.parser(g));var v=d.comparator.evaluate(p,g);if(v!==0)return v}return 0}),{data:s}}};function EU(t){t.registerTransform(xU),t.registerTransform(SU)}var AU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.prototype.init=function(r,n,i){t.prototype.init.call(this,r,n,i),this._sourceManager=new nE(this),iE(this)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),iE(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Nn},e}(Ze),TU=function(t){ce(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.type="dataset",e}(Br);function OU(t){t.registerComponentModel(AU),t.registerComponentView(TU)}var Hn=ui.CMD;function Ds(t,e){return Math.abs(t-e)<1e-5}function qm(t){var e=t.data,r=t.len(),n=[],i,a=0,o=0,s=0,u=0;function l(F,B){i&&i.length>2&&n.push(i),i=[F,B]}function f(F,B,M,I){Ds(F,M)&&Ds(B,I)||i.push(F,B,M,I,M,I)}function c(F,B,M,I,j,z){var W=Math.abs(B-F),R=Math.tan(W/4)*4/3,U=B<F?-1:1,Z=Math.cos(F),ee=Math.sin(F),ne=Math.cos(B),q=Math.sin(B),L=Z*j+M,X=ee*z+I,V=ne*j+M,G=q*z+I,J=j*R*U,K=z*R*U;i.push(L-J*ee,X+K*Z,V+J*q,G-K*ne,V,G)}for(var h,d,p,g,v=0;v<r;){var m=e[v++],y=v===1;switch(y&&(a=e[v],o=e[v+1],s=a,u=o,(m===Hn.L||m===Hn.C||m===Hn.Q)&&(i=[s,u])),m){case Hn.M:a=s=e[v++],o=u=e[v++],l(s,u);break;case Hn.L:h=e[v++],d=e[v++],f(a,o,h,d),a=h,o=d;break;case Hn.C:i.push(e[v++],e[v++],e[v++],e[v++],a=e[v++],o=e[v++]);break;case Hn.Q:h=e[v++],d=e[v++],p=e[v++],g=e[v++],i.push(a+2/3*(h-a),o+2/3*(d-o),p+2/3*(h-p),g+2/3*(d-g),p,g),a=p,o=g;break;case Hn.A:var b=e[v++],w=e[v++],C=e[v++],_=e[v++],D=e[v++],x=e[v++]+D;v+=1;var S=!e[v++];h=Math.cos(D)*C+b,d=Math.sin(D)*_+w,y?(s=h,u=d,l(s,u)):f(a,o,h,d),a=Math.cos(x)*C+b,o=Math.sin(x)*_+w;for(var O=(S?-1:1)*Math.PI/2,E=D;S?E>x:E<x;E+=O){var P=S?Math.max(E+O,x):Math.min(E+O,x);c(E,P,b,w,C,_)}break;case Hn.R:s=a=e[v++],u=o=e[v++],h=s+e[v++],d=u+e[v++],l(h,u),f(h,u,h,d),f(h,d,s,d),f(s,d,s,u),f(s,u,h,u);break;case Hn.Z:i&&f(a,o,s,u),a=s,o=u;break}}return i&&i.length>2&&n.push(i),n}function Ym(t,e,r,n,i,a,o,s,u,l){if(Ds(t,r)&&Ds(e,n)&&Ds(i,o)&&Ds(a,s)){u.push(o,s);return}var f=2/l,c=f*f,h=o-t,d=s-e,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var g=r-t,v=n-e,m=i-o,y=a-s,b=g*g+v*v,w=m*m+y*y;if(b<c&&w<c){u.push(o,s);return}var C=h*g+d*v,_=-h*m-d*y,D=b-C*C,x=w-_*_;if(D<c&&C>=0&&x<c&&_>=0){u.push(o,s);return}var S=[],O=[];Oi(t,r,i,o,.5,S),Oi(e,n,a,s,.5,O),Ym(S[0],O[0],S[1],O[1],S[2],O[2],S[3],O[3],u,l),Ym(S[4],O[4],S[5],O[5],S[6],O[6],S[7],O[7],u,l)}function PU(t,e){var r=qm(t),n=[];e=e||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],u=a[1];o.push(s,u);for(var l=2;l<a.length;){var f=a[l++],c=a[l++],h=a[l++],d=a[l++],p=a[l++],g=a[l++];Ym(s,u,f,c,h,d,p,g,o,e),s=p,u=g}n.push(o)}return n}function iO(t,e,r){var n=t[e],i=t[1-e],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var u=[],l=0;l<o;l++)u.push(s);var f=o*s,c=r-f;if(c>0)for(var l=0;l<c;l++)u[l%o]+=1;return u}function aO(t,e,r){for(var n=t.r0,i=t.r,a=t.startAngle,o=t.endAngle,s=Math.abs(o-a),u=s*i,l=i-n,f=u>Math.abs(l),c=iO([u,l],f?0:1,e),h=(f?s:l)/c.length,d=0;d<c.length;d++)for(var p=(f?l:s)/c[d],g=0;g<c[d];g++){var v={};f?(v.startAngle=a+h*d,v.endAngle=a+h*(d+1),v.r0=n+p*g,v.r=n+p*(g+1)):(v.startAngle=a+p*g,v.endAngle=a+p*(g+1),v.r0=n+h*d,v.r=n+h*(d+1)),v.clockwise=t.clockwise,v.cx=t.cx,v.cy=t.cy,r.push(v)}}function BU(t,e,r){for(var n=t.width,i=t.height,a=n>i,o=iO([n,i],a?0:1,e),s=a?"width":"height",u=a?"height":"width",l=a?"x":"y",f=a?"y":"x",c=t[s]/o.length,h=0;h<o.length;h++)for(var d=t[u]/o[h],p=0;p<o[h];p++){var g={};g[l]=h*c,g[f]=p*d,g[s]=c,g[u]=d,g.x+=t.x,g.y+=t.y,r.push(g)}}function oO(t,e,r,n){return t*n-r*e}function MU(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=oO(f,c,u,l);if(Math.abs(h)<1e-6)return null;var d=t-i,p=e-a,g=oO(d,p,f,c)/h;return g<0||g>1?null:new _e(g*u+t,g*l+e)}function FU(t,e,r){var n=new _e;_e.sub(n,r,e),n.normalize();var i=new _e;_e.sub(i,t,e);var a=i.dot(n);return a}function xs(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function LU(t,e,r){for(var n=t.length,i=[],a=0;a<n;a++){var o=t[a],s=t[(a+1)%n],u=MU(o[0],o[1],s[0],s[1],e.x,e.y,r.x,r.y);u&&i.push({projPt:FU(u,e,r),pt:u,idx:a})}if(i.length<2)return[{points:t},{points:t}];i.sort(function(v,m){return v.projPt-m.projPt});var l=i[0],f=i[i.length-1];if(f.idx<l.idx){var c=l;l=f,f=c}for(var h=[l.pt.x,l.pt.y],d=[f.pt.x,f.pt.y],p=[h],g=[d],a=l.idx+1;a<=f.idx;a++)xs(p,t[a].slice());xs(p,d),xs(p,h);for(var a=f.idx+1;a<=l.idx+n;a++)xs(g,t[a%n].slice());return xs(g,h),xs(g,d),[{points:p},{points:g}]}function sO(t){var e=t.points,r=[],n=[];BD(e,r,n);var i=new Ue(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,u=i.y,l=new _e,f=new _e;return a>o?(l.x=f.x=s+a/2,l.y=u,f.y=u+o):(l.y=f.y=u+o/2,l.x=s,f.x=s+a),LU(e,l,f)}function Rh(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);Rh(t,a[0],i,n),Rh(t,a[1],r-i,n)}return n}function IU(t,e){for(var r=[],n=0;n<e;n++)r.push(Fg(t));return r}function RU(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function NU(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}function kU(t,e){var r=[],n=t.shape,i;switch(t.type){case"rect":BU(n,e,r),i=St;break;case"sector":aO(n,e,r),i=In;break;case"circle":aO({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,r),i=In;break;default:var a=t.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=ye(PU(t.getUpdatedPathProxy(),o),function(m){return NU(m)}),u=s.length;if(u===0)Rh(sO,{points:s[0]},e,r);else if(u===e)for(var l=0;l<u;l++)r.push({points:s[l]});else{var f=0,c=ye(s,function(m){var y=[],b=[];BD(m,y,b);var w=(b[1]-y[1])*(b[0]-y[0]);return f+=w,{poly:m,area:w}});c.sort(function(m,y){return y.area-m.area});for(var h=e,l=0;l<u;l++){var d=c[l];if(h<=0)break;var p=l===u-1?h:Math.ceil(d.area/f*e);p<0||(Rh(sO,{points:d.poly},p,r),h-=p)}}i=Cc;break}if(!i)return IU(t,e);for(var g=[],l=0;l<r.length;l++){var v=new i;v.setShape(r[l]),RU(t,v),g.push(v)}return g}function zU(t,e){var r=t.length,n=e.length;if(r===n)return[t,e];for(var i=[],a=[],o=r<n?t:e,s=Math.min(r,n),u=Math.abs(n-r)/6,l=(s-2)/6,f=Math.ceil(u/l)+1,c=[o[0],o[1]],h=u,d=2;d<s;){var p=o[d-2],g=o[d-1],v=o[d++],m=o[d++],y=o[d++],b=o[d++],w=o[d++],C=o[d++];if(h<=0){c.push(v,m,y,b,w,C);continue}for(var _=Math.min(h,f-1)+1,D=1;D<=_;D++){var x=D/_;Oi(p,v,y,w,x,i),Oi(g,m,b,C,x,a),p=i[3],g=a[3],c.push(i[1],a[1],i[2],a[2],p,g),v=i[5],m=a[5],y=i[6],b=a[6]}h-=_-1}return o===t?[c,e]:[t,c]}function uO(t,e){for(var r=t.length,n=t[r-2],i=t[r-1],a=[],o=0;o<e.length;)a[o++]=n,a[o++]=i;return a}function jU(t,e){for(var r,n,i,a=[],o=[],s=0;s<Math.max(t.length,e.length);s++){var u=t[s],l=e[s],f=void 0,c=void 0;u?l?(r=zU(u,l),f=r[0],c=r[1],n=f,i=c):(c=uO(i||u,u),f=u):(f=uO(n||l,l),c=l),a.push(f),o.push(c)}return[a,o]}function lO(t){for(var e=0,r=0,n=0,i=t.length,a=0,o=i-2;a<i;o=a,a+=2){var s=t[o],u=t[o+1],l=t[a],f=t[a+1],c=s*f-l*u;e+=c,r+=(s+l)*c,n+=(u+f)*c}return e===0?[t[0]||0,t[1]||0]:[r/e/3,n/e/3,e]}function VU(t,e,r,n){for(var i=(t.length-2)/6,a=1/0,o=0,s=t.length,u=s-2,l=0;l<i;l++){for(var f=l*6,c=0,h=0;h<s;h+=2){var d=h===0?f:(f+h-2)%u+2,p=t[d]-r[0],g=t[d+1]-r[1],v=e[h]-n[0],m=e[h+1]-n[1],y=v-p,b=m-g;c+=y*y+b*b}c<a&&(a=c,o=l)}return o}function HU(t){for(var e=[],r=t.length,n=0;n<r;n+=2)e[n]=t[r-n-2],e[n+1]=t[r-n-1];return e}function WU(t,e,r,n){for(var i=[],a,o=0;o<t.length;o++){var s=t[o],u=e[o],l=lO(s),f=lO(u);a==null&&(a=l[2]<0!=f[2]<0);var c=[],h=[],d=0,p=1/0,g=[],v=s.length;a&&(s=HU(s));for(var m=VU(s,u,l,f)*6,y=v-2,b=0;b<y;b+=2){var w=(m+b)%y+2;c[b+2]=s[w]-l[0],c[b+3]=s[w+1]-l[1]}c[0]=s[m]-l[0],c[1]=s[m+1]-l[1];for(var C=n/r,_=-n/2;_<=n/2;_+=C){for(var D=Math.sin(_),x=Math.cos(_),S=0,b=0;b<s.length;b+=2){var O=c[b],E=c[b+1],P=u[b]-f[0],F=u[b+1]-f[1],B=P*x-F*D,M=P*D+F*x;g[b]=B,g[b+1]=M;var I=B-O,j=M-E;S+=I*I+j*j}if(S<p){p=S,d=_;for(var z=0;z<g.length;z++)h[z]=g[z]}}i.push({from:c,to:h,fromCp:l,toCp:f,rotation:-d})}return i}function Nh(t){return t.__isCombineMorphing}var fO="__mOriginal_";function kh(t,e,r){var n=fO+e,i=t[n]||t[e];t[n]||(t[n]=t[e]);var a=r.replace,o=r.after,s=r.before;t[e]=function(){var u=arguments,l;return s&&s.apply(this,u),a?l=a.apply(this,u):l=i.apply(this,u),o&&o.apply(this,u),l}}function cl(t,e){var r=fO+e;t[r]&&(t[e]=t[r],t[r]=null)}function cO(t,e){for(var r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=e[0]*a+e[2]*o+e[4],n[i++]=e[1]*a+e[3]*o+e[5]}}function hO(t,e){var r=t.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),i=jU(qm(r),qm(n)),a=i[0],o=i[1],s=t.getComputedTransform(),u=e.getComputedTransform();function l(){this.transform=null}s&&cO(a,s),u&&cO(o,u),kh(e,"updateTransform",{replace:l}),e.transform=null;var f=WU(a,o,10,Math.PI),c=[];kh(e,"buildPath",{replace:function(h){for(var d=e.__morphT,p=1-d,g=[],v=0;v<f.length;v++){var m=f[v],y=m.from,b=m.to,w=m.rotation*d,C=m.fromCp,_=m.toCp,D=Math.sin(w),x=Math.cos(w);Af(g,C,_,d);for(var S=0;S<y.length;S+=2){var O=y[S],E=y[S+1],P=b[S],F=b[S+1],B=O*p+P*d,M=E*p+F*d;c[S]=B*x-M*D+g[0],c[S+1]=B*D+M*x+g[1]}var I=c[0],j=c[1];h.moveTo(I,j);for(var S=2;S<y.length;){var P=c[S++],F=c[S++],z=c[S++],W=c[S++],R=c[S++],U=c[S++];I===P&&j===F&&z===R&&W===U?h.lineTo(R,U):h.bezierCurveTo(P,F,z,W,R,U),I=R,j=U}}}})}function Xm(t,e,r){if(!t||!e)return e;var n=r.done,i=r.during;hO(t,e),e.__morphT=0;function a(){cl(e,"buildPath"),cl(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},je({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),e}function $U(t,e,r,n,i,a){var o=16;t=i===r?0:Math.round(32767*(t-r)/(i-r)),e=a===n?0:Math.round(32767*(e-n)/(a-n));for(var s=0,u,l=(1<<o)/2;l>0;l/=2){var f=0,c=0;(t&l)>0&&(f=1),(e&l)>0&&(c=1),s+=l*l*(3*f^c),c===0&&(f===1&&(t=l-1-t,e=l-1-e),u=t,t=e,e=u)}return s}function zh(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=ye(t,function(s){var u=s.getBoundingRect(),l=s.getComputedTransform(),f=u.x+u.width/2+(l?l[4]:0),c=u.y+u.height/2+(l?l[5]:0);return e=Math.min(f,e),r=Math.min(c,r),n=Math.max(f,n),i=Math.max(c,i),[f,c]}),o=ye(a,function(s,u){return{cp:s,z:$U(s[0],s[1],e,r,n,i),path:t[u]}});return o.sort(function(s,u){return s.z-u.z}).map(function(s){return s.path})}function dO(t){return kU(t.path,t.count)}function Km(){return{fromIndividuals:[],toIndividuals:[],count:0}}function GU(t,e,r){var n=[];function i(C){for(var _=0;_<C.length;_++){var D=C[_];Nh(D)?i(D.childrenRef()):D instanceof Ve&&n.push(D)}}i(t);var a=n.length;if(!a)return Km();var o=r.dividePath||dO,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),Km();n=zh(n),s=zh(s);for(var u=r.done,l=r.during,f=r.individualDelay,c=new pu,h=0;h<a;h++){var d=n[h],p=s[h];p.parent=e,p.copyTransform(c),f||hO(d,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function g(C){for(var _=0;_<s.length;_++)s[_].addSelfToZr(C)}kh(e,"addSelfToZr",{after:function(C){g(C)}}),kh(e,"removeSelfFromZr",{after:function(C){for(var _=0;_<s.length;_++)s[_].removeSelfFromZr(C)}});function v(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,cl(e,"addSelfToZr"),cl(e,"removeSelfFromZr")}var m=s.length;if(f)for(var y=m,b=function(){y--,y===0&&(v(),u&&u())},h=0;h<m;h++){var w=f?je({delay:(r.delay||0)+f(h,m,n[h],s[h]),done:b},r):r;Xm(n[h],s[h],w)}else e.__morphT=0,e.animateTo({__morphT:1},je({during:function(C){for(var _=0;_<m;_++){var D=s[_];D.__morphT=e.__morphT,D.dirtyShape()}l&&l(C)},done:function(){v();for(var C=0;C<t.length;C++)cl(t[C],"updateTransform");u&&u()}},r));return e.__zr&&g(e.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function UU(t,e,r){var n=e.length,i=[],a=r.dividePath||dO;function o(d){for(var p=0;p<d.length;p++){var g=d[p];Nh(g)?o(g.childrenRef()):g instanceof Ve&&i.push(g)}}if(Nh(t)){o(t.childrenRef());var s=i.length;if(s<n)for(var u=0,l=s;l<n;l++)i.push(Fg(i[u++%s]));i.length=n}else{i=a({path:t,count:n});for(var f=t.getComputedTransform(),l=0;l<i.length;l++)i[l].setLocalTransform(f);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Km()}i=zh(i),e=zh(e);for(var c=r.individualDelay,l=0;l<n;l++){var h=c?je({delay:(r.delay||0)+c(l,n,i[l],e[l])},r):r;Xm(i[l],e[l],h)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function vO(t){return he(t[0])}function pO(t,e){for(var r=[],n=t.length,i=0;i<n;i++)r.push({one:t[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(e[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var u=r[s].many;if(u.length<=1)if(s)s=0;else return r;var a=u.length,l=Math.ceil(a/2);r[i].many=u.slice(l,a),r[s].many=u.slice(0,l),s++}return r}var qU={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n<t.count;n++){var i=Fg(t.path);i.setStyle("opacity",r),e.push(i)}return e},split:null};function Zm(t,e,r,n,i,a){if(!t.length||!e.length)return;var o=ts("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},o),l,f;vO(t)&&(l=t,f=e),vO(e)&&(l=e,f=t);function c(m,y,b,w,C){var _=m.many,D=m.one;if(_.length===1&&!C){var x=y?_[0]:D,S=y?D:_[0];if(Nh(x))c({many:[x],one:S},!0,b,w,!0);else{var O=s?je({delay:s(b,w)},u):u;Xm(x,S,O),a(x,S,x,S,O)}}else for(var E=je({dividePath:qU[r],individualDelay:s&&function(j,z,W,R){return s(j+b,w)}},u),P=y?GU(_,D,E):UU(D,_,E),F=P.fromIndividuals,B=P.toIndividuals,M=F.length,I=0;I<M;I++){var O=s?je({delay:s(I,M)},u):u;a(F[I],B[I],y?_[I]:m.one,y?m.one:_[I],O)}}for(var h=l?l===t:t.length>e.length,d=l?pO(f,l):pO(h?e:t,[h?t:e]),p=0,g=0;g<d.length;g++)p+=d[g].many.length;for(var v=0,g=0;g<d.length;g++)c(d[g],h,v,p),v+=d[g].many.length}function ao(t){if(!t)return[];if(he(t)){for(var e=[],r=0;r<t.length;r++)e.push(ao(t[r]));return e}var n=[];return t.traverse(function(i){i instanceof Ve&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var gO=1e4,YU=0,mO=1,yO=2,XU=lt();function KU(t,e){for(var r=t.dimensions,n=0;n<r.length;n++){var i=t.getDimensionInfo(r[n]);if(i&&i.otherDims[e]===0)return r[n]}}function ZU(t,e,r){var n=t.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=t.get(n.name,e);return i&&i.categories[a]||a+""}}function bO(t,e,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=KU(t,i);if(a){var o=ZU(t,e,a);return o}var s=t.getRawDataItem(e),u=n?"childGroupId":"groupId";if(s&&s[u])return s[u]+"";if(!n)return r||t.getId(e)}function CO(t){var e=[];return N(t,function(r){var n=r.data,i=r.dataGroupId;if(n.count()>gO){process.env.NODE_ENV!=="production"&&xt("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),o=0;o<a.length;o++)e.push({data:n,groupId:bO(n,o,i,!1),childGroupId:bO(n,o,i,!0),divide:r.divide,dataIndex:o})}),e}function Jm(t,e,r){t.traverse(function(n){n instanceof Ve&&qt(n,{style:{opacity:0}},e,{dataIndex:r,isFrom:!0})})}function Qm(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function Ss(t){t.stopAnimation(),t.isGroup&&t.traverse(function(e){e.stopAnimation()})}function JU(t,e,r){var n=ts("update",r,e);n&&t.traverse(function(i){if(i instanceof Fi){var a=a7(i);a&&i.animateFrom({style:a},n)}})}function QU(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++){var i=t[n],a=e[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function wO(t,e,r){var n=CO(t),i=CO(e);function a(b,w,C,_,D){(C||b)&&w.animateFrom({style:C&&C!==b?oe(oe({},C.style),b.style):b.style},D)}var o=!1,s=YU,u=Ae(),l=Ae();n.forEach(function(b){b.groupId&&u.set(b.groupId,!0),b.childGroupId&&l.set(b.childGroupId,!0)});for(var f=0;f<i.length;f++){var c=i[f].groupId;if(l.get(c)){s=mO;break}var h=i[f].childGroupId;if(h&&u.get(h)){s=yO;break}}function d(b,w){return function(C){var _=C.data,D=C.dataIndex;return w?_.getId(D):b?s===mO?C.childGroupId:C.groupId:s===yO?C.childGroupId:C.groupId}}var p=QU(n,i),g={};if(!p)for(var f=0;f<i.length;f++){var v=i[f],m=v.data.getItemGraphicEl(v.dataIndex);m&&(g[m.id]=!0)}function y(b,w){var C=n[w],_=i[b],D=_.data.hostModel,x=C.data.getItemGraphicEl(C.dataIndex),S=_.data.getItemGraphicEl(_.dataIndex);if(x===S){S&&JU(S,_.dataIndex,D);return}x&&g[x.id]||S&&(Ss(S),x?(Ss(x),Qm(x),o=!0,Zm(ao(x),ao(S),_.divide,D,b,a)):Jm(S,D,b))}new q0(n,i,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(b,w){var C=i[b],_=C.data,D=_.hostModel,x=_.getItemGraphicEl(C.dataIndex),S=bt(ye(w,function(O){return n[O].data.getItemGraphicEl(n[O].dataIndex)}),function(O){return O&&O!==x&&!g[O.id]});x&&(Ss(x),S.length?(N(S,function(O){Ss(O),Qm(O)}),o=!0,Zm(ao(S),ao(x),C.divide,D,b,a)):Jm(x,D,C.dataIndex))}).updateOneToMany(function(b,w){var C=n[w],_=C.data.getItemGraphicEl(C.dataIndex);if(!(_&&g[_.id])){var D=bt(ye(b,function(S){return i[S].data.getItemGraphicEl(i[S].dataIndex)}),function(S){return S&&S!==_}),x=i[b[0]].data.hostModel;D.length&&(N(D,function(S){return Ss(S)}),_?(Ss(_),Qm(_),o=!0,Zm(ao(_),ao(D),C.divide,x,b[0],a)):N(D,function(S){return Jm(S,x,b[0])}))}}).updateManyToMany(function(b,w){new q0(w,b,function(C){return n[C].data.getId(n[C].dataIndex)},function(C){return i[C].data.getId(i[C].dataIndex)}).update(function(C,_){y(b[C],w[_])}).execute()}).execute(),o&&N(e,function(b){var w=b.data,C=w.hostModel,_=C&&r.getViewOfSeriesModel(C),D=ts("update",C,0);_&&C.isAnimationEnabled()&&D&&D.duration>0&&_.group.traverse(function(x){x instanceof Ve&&!x.animators.length&&x.animateFrom({style:{opacity:0}},D)})})}function _O(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function DO(t){return he(t)?t.sort().join(","):t}function Ki(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function eq(t,e){var r=Ae(),n=Ae(),i=Ae();N(t.oldSeries,function(o,s){var u=t.oldDataGroupIds[s],l=t.oldData[s],f=_O(o),c=DO(f);n.set(c,{dataGroupId:u,data:l}),he(f)&&N(f,function(h){i.set(h,{key:c,dataGroupId:u,data:l})})});function a(o){r.get(o)&&xt("Duplicated seriesKey in universalTransition "+o)}return N(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),u=o.getData(),l=_O(o),f=DO(l),c=n.get(f);if(c)process.env.NODE_ENV!=="production"&&a(f),r.set(f,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ki(c.data),data:c.data}],newSeries:[{dataGroupId:s,divide:Ki(u),data:u}]});else if(he(l)){process.env.NODE_ENV!=="production"&&a(f);var h=[];N(l,function(g){var v=n.get(g);v.data&&h.push({dataGroupId:v.dataGroupId,divide:Ki(v.data),data:v.data})}),h.length&&r.set(f,{oldSeries:h,newSeries:[{dataGroupId:s,data:u,divide:Ki(u)}]})}else{var d=i.get(l);if(d){var p=r.get(d.key);p||(p={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Ki(d.data)}],newSeries:[]},r.set(d.key,p)),p.newSeries.push({dataGroupId:s,data:u,divide:Ki(u)})}}}}),r}function xO(t,e){for(var r=0;r<t.length;r++){var n=e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id;if(n)return r}}function tq(t,e,r,n){var i=[],a=[];N(gt(t.from),function(o){var s=xO(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ki(e.oldData[s]),groupIdDim:o.dimension})}),N(gt(t.to),function(o){var s=xO(r.updatedSeries,o);if(s>=0){var u=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:u,divide:Ki(u),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&wO(i,a,n)}function rq(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){N(gt(n.seriesTransition),function(i){N(gt(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Zc]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(e,r,n){var i=XU(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)N(gt(a),function(d){tq(d,i,n,r)});else{var o=eq(i,n);N(o.keys(),function(d){var p=o.get(d);wO(p.oldSeries,p.newSeries,r)})}N(n.updatedSeries,function(d){d[Zc]&&(d[Zc]=!1)})}for(var s=e.getSeries(),u=i.oldSeries=[],l=i.oldDataGroupIds=[],f=i.oldData=[],c=0;c<s.length;c++){var h=s[c].getData();h.count()<gO&&(u.push(s[c]),l.push(s[c].get("dataGroupId")),f.push(h))}})}function SO(t,e,r){var n=Po.createCanvas(),i=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=i*r,n.height=a*r,n}var ey=function(t){ce(e,t);function e(r,n,i){var a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Yf,typeof r=="string"?o=SO(r,n,i):we(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(u_(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=SO("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},e.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,u=!1,l=new Ue(0,0,0,0);function f(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var b=new Ue(0,0,0,0);b.copy(y),o.push(b)}else{for(var w=!1,C=1/0,_=0,D=0;D<o.length;++D){var x=o[D];if(x.intersect(y)){var S=new Ue(0,0,0,0);S.copy(x),S.union(y),o[D]=S,w=!0;break}else if(u){l.copy(y),l.union(x);var O=y.width*y.height,E=x.width*x.height,P=l.width*l.height,F=P-O-E;F<C&&(C=F,_=D)}}if(u&&(o[_].union(y),w=!0),!w){var b=new Ue(0,0,0,0);b.copy(y),o.push(b)}u||(u=o.length>=s)}}for(var c=this.__startIndex;c<this.__endIndex;++c){var h=r[c];if(h){var d=h.shouldBePainted(i,a,!0,!0),p=h.__isRendered&&(h.__dirty&Or||!d)?h.getPrevPaintRect():null;p&&f(p);var g=d&&(h.__dirty&Or||!h.__isRendered)?h.getPaintRect():null;g&&f(g)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h=n[c],d=h&&h.shouldBePainted(i,a,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var p=h.getPrevPaintRect();p&&f(p)}}var v;do{v=!1;for(var c=0;c<o.length;){if(o[c].isZero()){o.splice(c,1);continue}for(var m=c+1;m<o.length;)o[c].intersect(o[m])?(v=!0,o[c].union(o[m]),o.splice(m,1)):m++;c++}}while(v);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,u=a.height;n=n||this.clearColor;var l=this.motionBlur&&!r,f=this.lastFrameAlpha,c=this.dpr,h=this;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/c,u/c));var d=this.domBack;function p(g,v,m,y){if(o.clearRect(g,v,m,y),n&&n!=="transparent"){var b=void 0;if(xf(n)){var w=n.global||n.__width===m&&n.__height===y;b=w&&n.__canvasGradient||T0(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=b,n.__width=m,n.__height=y}else ON(n)&&(n.scaleX=n.scaleX||c,n.scaleY=n.scaleY||c,b=O0(o,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=b||n,o.fillRect(g,v,m,y),o.restore()}l&&(o.save(),o.globalAlpha=f,o.drawImage(d,g,v,m,y),o.restore())}!i||l?p(0,0,s,u):i.length&&N(i,function(g){p(g.x*c,g.y*c,g.width*c,g.height*c)})},e}(En),EO=1e5,oo=314159,jh=.01,nq=.001;function iq(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}function aq(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var oq=function(){function t(e,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=oe({},n||{}),this.dpr=n.devicePixelRatio||Yf,this._singleCanvas=a,this.root=e;var o=e.style;o&&(u_(e),e.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var u=this._layers;if(a){var f=e,c=f.width,h=f.height;n.width!=null&&(c=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,f.width=c*this.dpr,f.height=h*this.dpr,this._width=c,this._height=h;var d=new ey(f,this,this.dpr);d.__builtin__=!0,d.initContext(),u[oo]=d,d.zlevel=oo,s.push(oo),this._domRoot=e}else{this._width=nh(e,0,n),this._height=nh(e,1,n);var l=this._domRoot=aq(this._width,this._height);e.appendChild(l)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.refresh=function(e){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,e,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var u=a===0?this._backgroundColor:null;s.refresh(u)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(e){var r=e.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(EO)),a||(a=n.ctx,a.save()),Ja(a,s,i,o===r-1))}a&&a.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(EO)},t.prototype.paintOne=function(e,r){YE(e,r)},t.prototype._paintList=function(e,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(l){l.afterBrush&&l.afterBrush()});else{var u=this;Mf(function(){u._paintList(e,r,n,i)})}}},t.prototype._compositeManually=function(){var e=this.getLayer(oo).ctx,r=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,r,n)})},t.prototype._doPaintList=function(e,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var u=this._zlevelList[s],l=this._layers[u];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&a.push(l)}for(var f=!0,c=!1,h=function(g){var v=a[g],m=v.ctx,y=o&&v.createRepaintRects(e,r,d._width,d._height),b=n?v.__startIndex:v.__drawIndex,w=!n&&v.incremental&&Date.now,C=w&&Date.now(),_=v.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(v.__startIndex===v.__endIndex)v.clear(!1,_,y);else if(b===v.__startIndex){var D=e[b];(!D.incremental||!D.notClear||n)&&v.clear(!1,_,y)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=v.__startIndex);var x,S=function(F){var B={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(x=b;x<v.__endIndex;x++){var M=e[x];if(M.__inHover&&(c=!0),i._doPaintEl(M,v,o,F,B,x===v.__endIndex-1),w){var I=Date.now()-C;if(I>15)break}}B.prevElClipPaths&&m.restore()};if(y)if(y.length===0)x=v.__endIndex;else for(var O=d.dpr,E=0;E<y.length;++E){var P=y[E];m.save(),m.beginPath(),m.rect(P.x*O,P.y*O,P.width*O,P.height*O),m.clip(),S(P),m.restore()}else m.save(),S(),m.restore();v.__drawIndex=x,v.__drawIndex<v.__endIndex&&(f=!1)},d=this,p=0;p<a.length;p++)h(p);return Pe.wxa&&N(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:f,needsRefreshHover:c}},t.prototype._doPaintEl=function(e,r,n,i,a,o){var s=r.ctx;if(n){var u=e.getPaintRect();(!i||u&&u.intersect(i))&&(Ja(s,e,a,o),e.setPrevPaintRect(u))}else Ja(s,e,a,o)},t.prototype.getLayer=function(e,r){this._singleCanvas&&!this._needsManuallyCompositing&&(e=oo);var n=this._layers[e];return n||(n=new ey("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Qe(n,this._layerConfig[e],!0):this._layerConfig[e-jh]&&Qe(n,this._layerConfig[e-jh],!0),r&&(n.virtual=r),this.insertLayer(e,n),n.initContext()),n},t.prototype.insertLayer=function(e,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,u=-1;if(n[e]){process.env.NODE_ENV!=="production"&&wa("ZLevel "+e+" has been used already");return}if(!iq(r)){process.env.NODE_ENV!=="production"&&wa("Layer of zlevel "+e+" is not valid");return}if(a>0&&e>i[0]){for(u=0;u<a-1&&!(i[u]<e&&i[u+1]>e);u++);s=n[i[u]]}if(i.splice(u+1,0,e),n[e]=r,!r.virtual)if(s){var l=s.dom;l.nextSibling?o.insertBefore(r.dom,l.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];e.call(r,this._layers[a],a)}},t.prototype.eachBuiltinLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&e.call(r,o,a)}},t.prototype.eachOtherLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||e.call(r,o,a)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(c,h){c.__dirty=c.__used=!1});function r(c){a&&(a.__endIndex!==c&&(a.__dirty=!0),a.__endIndex=c)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var i=e[n];if(i.zlevel!==e[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,u;for(u=0;u<e.length;u++){var i=e[u],l=i.zlevel,f=void 0;s!==l&&(s=l,o=0),i.incremental?(f=this.getLayer(l+nq,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(l+(o>0?jh:0),this._needsManuallyCompositing),f.__builtin__||wa("ZLevel "+l+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==u&&(f.__dirty=!0),f.__startIndex=u,f.incremental?f.__drawIndex=-1:f.__drawIndex=u,r(u),a=f),i.__dirty&Or&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=u))}r(u),this.eachBuiltinLayer(function(c,h){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Qe(n[e],r,!0):n[e]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+jh){var o=this._layers[a];Qe(o,n[e],!0)}}}},t.prototype.delLayer=function(e){var r=this._layers,n=this._zlevelList,i=r[e];i&&(i.dom.parentNode.removeChild(i.dom),delete r[e],n.splice(Ge(n,e),1))},t.prototype.resize=function(e,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(e!=null&&(i.width=e),r!=null&&(i.height=r),e=nh(a,0,i),r=nh(a,1,i),n.style.display="",this._width!==e||r!==this._height){n.style.width=e+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,r);this.refresh(!0)}this._width=e,this._height=r}else{if(e==null||r==null)return;this._width=e,this._height=r,this.getLayer(oo).resize(e,r)}return this},t.prototype.clearLayer=function(e){var r=this._layers[e];r&&r.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[oo].dom;var r=new ey("image",this,e.pixelRatio||this.dpr);r.initContext(),r.clear(!1,e.backgroundColor||this._backgroundColor);var n=r.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(c){c.__builtin__?n.drawImage(c.dom,0,0,i,a):c.renderToCanvas&&(n.save(),c.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),u=0,l=s.length;u<l;u++){var f=s[u];Ja(n,f,o,u===l-1)}return r.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();function sq(t){t.registerPainter("canvas",oq)}Wi([LG,dU,nU,eU,SG,OU,EU,XW,LW,u$,fW,rq,sq]);const uq=k.memo(({type:t,options:e,echartRef:r})=>{const n=k.useRef(null),i=k.useRef(null);return k.useEffect(()=>(n.current&&(i.current=OV(n.current)),()=>{i.current&&i.current.dispose()}),[]),k.useEffect(()=>{i.current&&i.current.setOption({...e})},[t,e]),k.useImperativeHandle(r,()=>({resize:()=>{i.current&&i.current.resize()}})),A.jsx("div",{ref:n,style:{width:"100%",height:"100%"}})});var lq=typeof global=="object"&&global&&global.Object===Object&&global,fq=typeof self=="object"&&self&&self.Object===Object&&self,AO=lq||fq||Function("return this")(),Es=AO.Symbol,TO=Object.prototype,cq=TO.hasOwnProperty,hq=TO.toString,hl=Es?Es.toStringTag:void 0;function dq(t){var e=cq.call(t,hl),r=t[hl];try{t[hl]=void 0;var n=!0}catch{}var i=hq.call(t);return n&&(e?t[hl]=r:delete t[hl]),i}var vq=Object.prototype,pq=vq.toString;function gq(t){return pq.call(t)}var mq="[object Null]",yq="[object Undefined]",OO=Es?Es.toStringTag:void 0;function bq(t){return t==null?t===void 0?yq:mq:OO&&OO in Object(t)?dq(t):gq(t)}function Cq(t){return t!=null&&typeof t=="object"}var wq="[object Symbol]";function PO(t){return typeof t=="symbol"||Cq(t)&&bq(t)==wq}function _q(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Dq=Array.isArray,xq=1/0,BO=Es?Es.prototype:void 0,MO=BO?BO.toString:void 0;function FO(t){if(typeof t=="string")return t;if(Dq(t))return _q(t,FO)+"";if(PO(t))return MO?MO.call(t):"";var e=t+"";return e=="0"&&1/t==-xq?"-0":e}var Sq=/\s/;function Eq(t){for(var e=t.length;e--&&Sq.test(t.charAt(e)););return e}var Aq=/^\s+/;function Tq(t){return t&&t.slice(0,Eq(t)+1).replace(Aq,"")}function LO(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var IO=NaN,Oq=/^[-+]0x[0-9a-f]+$/i,Pq=/^0b[01]+$/i,Bq=/^0o[0-7]+$/i,Mq=parseInt;function RO(t){if(typeof t=="number")return t;if(PO(t))return IO;if(LO(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=LO(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Tq(t);var r=Pq.test(t);return r||Bq.test(t)?Mq(t.slice(2),r?2:8):Oq.test(t)?IO:+t}var NO=1/0,Fq=17976931348623157e292;function Lq(t){if(!t)return t===0?t:0;if(t=RO(t),t===NO||t===-NO){var e=t<0?-1:1;return e*Fq}return t===t?t:0}function Iq(t){var e=Lq(t),r=e%1;return e===e?r?e-r:e:0}function kO(t){return t==null?"":FO(t)}var Rq=AO.isFinite,Nq=Math.min;function kq(t){var e=Math[t];return function(r,n){if(r=RO(r),n=n==null?0:Nq(Iq(n),292),n&&Rq(r)){var i=(kO(r)+"e").split("e"),a=e(i[0]+"e"+(+i[1]+n));return i=(kO(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-n))}return e(r)}}var ty=kq("round");const zO=({moduleDataApi:t,customData:e,customeStyle:r,width:n=2,height:i=2})=>{const{globalData:a}=Oo(),[o,s]=k.useState(),[u,l]=k.useState(),[f,c]=k.useState(),h=k.useRef(),d=k.useCallback(async()=>{e?t==null||t({id:e==null?void 0:e.dataSourceId}).then(p=>{if(!p.success){Q.message.error(p.message);return}l(p.data)}):l([])},[e==null?void 0:e.dataSourceId,t]);return k.useEffect(()=>{e&&d()},[d,e==null?void 0:e.dataSourceId]),k.useEffect(()=>{var p,g,v,m,y,b,w,C,_,D,x,S,O,E,P;if(e&&u&&e.type){let F=[];c([]),F=u;const B={},M={};let I=0;if(e.yAxis==="recordTotal")F.forEach(ie=>{const ve=ie[e==null?void 0:e.xAxis];B[ve]=(B[ve]||0)+1,I+=1});else if(e.yAxis==="fieldValue"){F.forEach(ie=>{const ve=ie[e==null?void 0:e.xAxis],Le=ie[e==null?void 0:e.yAxisField],ft=typeof Le=="number"?Le:0;M[ve]=M[ve]||[],M[ve].push(ft),I+=1});for(const ie in M)switch(e==null?void 0:e.yAxisFieldType){case"sum":B[ie]=ty(M[ie].reduce((ve,Le)=>ve+Le,0),3);break;case"max":B[ie]=ty(Math.max(...M[ie]),3);break;case"min":B[ie]=ty(Math.min(...M[ie]),3);break;case"average":B[ie]=M[ie].length?M[ie].reduce((ve,Le)=>ve+Le,0)/M[ie].length:0;break;default:B[ie]=0}}const j={show:(p=e==null?void 0:e.chartOptions)==null?void 0:p.includes("label"),position:"top",formatter:"{c}"},z=Object.keys(B),W=Object.values(B),R={"chart-bar":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"bar",label:j}]},"chart-bar-pile":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"bar",label:j}]},"chart-bar-percentage":{xAxis:{type:"category",data:z},yAxis:{type:"value",max:100},series:[{data:z.map(ie=>B[ie]/I*100),type:"bar",label:j}]},"chart-line":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"line",label:j}]},"chart-line-smooth":{xAxis:{type:"category",data:z},yAxis:{type:"value"},series:[{data:W,type:"line",smooth:!0,label:j}]},"chart-pie":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:W,type:"pie",radius:"50%",label:{...j,position:"outside"},labelLine:{normal:{show:!0}}}]},"chart-pie-circular":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:W,type:"pie",radius:["40%","70%"],label:{...j,position:"outside"},labelLine:{normal:{show:!0}}}]},"chart-strip-bar":{xAxis:{type:"value"},yAxis:{type:"category",data:z},series:[{data:W,type:"bar",label:j}]},"chart-strip-bar-pile":{xAxis:{type:"value"},yAxis:{type:"category",data:z},series:[{data:W,type:"bar",label:j}]},"chart-strip-bar-percentage":{xAxis:{type:"value",max:100},yAxis:{type:"category",data:z},series:[{data:z.map(ie=>B[ie]/I*100),type:"bar",label:j}]}},U=(g=e==null?void 0:e.chartOptions)==null?void 0:g.includes("legend"),Z=R[e.type]||{},ee=Z.series.map(ie=>{var ve;return{...ie,name:e.yAxis==="recordTotal"?"统计":(ve=o==null?void 0:o.find(Le=>Le.value===e.yAxisField))==null?void 0:ve.label}}),ne=ie=>{const ve=Math.max(...(ie==null?void 0:ie.map(Ie=>String(Ie.name).length))||[]),Le=Math.max(...(ie==null?void 0:ie.flatMap(Ie=>Ie.data.map(at=>String(at).length)))||[]),ft=Math.max(...(ie==null?void 0:ie.flatMap(Ie=>Ie.data.length))||[]);return{maxNameLength:ve,maxValueLength:Le,maxArrLength:ft}},q=ie=>ie==null?void 0:ie.reduce((ve,Le)=>{const ft=String(Le).length;return Math.max(ve,ft)},0);let L=18,X=18;const{maxNameLength:V,maxArrLength:G}=ne(ee),J=q((v=Z==null?void 0:Z.xAxis)==null?void 0:v.data);let K=0;G>3?(J>15&&(K=90),J>5&&(K=45),n<3&&(K=90)):(L=50,X=50);const Y=K===45?7:K===90?9:0,fe="50px",ue=`${(J>15?15:J)*Y+L}px`,Ce=`${(V>15?15:V)*Y+X}px`,Fe={legend:{left:"center",right:"center",top:"2px",show:U,data:ee==null?void 0:ee.map(ie=>ie==null?void 0:ie.name)},grid:{top:fe,bottom:ue,right:Ce,left:"70px"},graphic:{elements:[{type:"text",left:"center",bottom:"10px",style:{text:(r==null?void 0:r.xtitle)||"",fill:"#333",fontSize:12,fontWeight:"bold"}},{type:"text",left:"10px",top:"center",style:{text:(r==null?void 0:r.ytitle)||"",fill:"#333",fontSize:12,fontWeight:"bold"},rotation:Math.PI/2}]},xAxis:{...Z.xAxis,axisTick:{show:(m=e==null?void 0:e.chartOptions)==null?void 0:m.includes("axis")},axisLine:{show:((y=e==null?void 0:e.chartOptions)==null?void 0:y.includes("axis"))||((b=r==null?void 0:r.xchartOptions)==null?void 0:b.includes("axisLine"))},axisLabel:{show:((w=e==null?void 0:e.chartOptions)==null?void 0:w.includes("axis"))||((C=r==null?void 0:r.xchartOptions)==null?void 0:C.includes("label")),rotate:K,interval:0,formatter:ie=>ie.length>15?`${ie.slice(0,15)}...`:ie},splitLine:{show:(_=e==null?void 0:e.chartOptions)==null?void 0:_.includes("splitLine")}},yAxis:{...Z.yAxis,axisTick:{show:(D=e==null?void 0:e.chartOptions)==null?void 0:D.includes("axis")},axisLine:{show:((x=e==null?void 0:e.chartOptions)==null?void 0:x.includes("axis"))||((S=r==null?void 0:r.ychartOptions)==null?void 0:S.includes("axisLine"))},axisLabel:{show:((O=e==null?void 0:e.chartOptions)==null?void 0:O.includes("axis"))||((E=r==null?void 0:r.ychartOptions)==null?void 0:E.includes("label")),formatter:ie=>ie.length>15?`${ie.slice(0,15)}...`:ie},splitLine:{show:(P=e==null?void 0:e.chartOptions)==null?void 0:P.includes("splitLine")}},series:ee,tooltip:{trigger:"axis",axisPointer:{type:"shadow"}}};console.log("options",JSON.stringify(Fe)),c(Fe)}},[e,r,u,n,i]),k.useEffect(()=>{var p;a!=null&&a.sourceData&&(e!=null&&e.dataSourceId)&&s((p=a==null?void 0:a.sourceData.find(g=>g.value===(e==null?void 0:e.dataSourceId)))==null?void 0:p.fields)},[a,e]),k.useEffect(()=>{var p;(n||i)&&((p=h==null?void 0:h.current)==null||p.resize())},[n,i]),A.jsx("div",{style:{width:"100%",height:"100%"},children:A.jsx(uq,{echartRef:h,type:"bar",options:f})})},zq=k.memo(({module:t,onUpdate:e,moduleDataApi:r,rowWidth:n,rowHeight:i})=>{var a;return A.jsx("div",{className:"chart-content",children:A.jsxs("div",{className:"dashboard-grid-container",children:[t.type==="text"?A.jsx(v8,{defaultValue:t.customData.editor,onChange:o=>{t.id&&e(t.id,{type:"text",customData:{title:t.customData.title,editor:o}})}}):null,t.type==="statistics"?A.jsx(Hw,{customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r,width:t.w,height:t.h,rowWidth:n,rowHeight:i}):null,t.type==="calendar"?A.jsx(Jw,{customData:t.customData,moduleDataApi:r}):null,(a=t.type)!=null&&a.includes("chart")?A.jsx(zO,{width:t.w,height:t.h,customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r}):null]})})}),jO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"24",width:"6",height:"16",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"32",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),VO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M17 33.5L29.5 15L45 23L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),A.jsx("path",{d:"M16.5 15L30 31.5L45 28L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),HO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("circle",{cx:"16",cy:"16",r:"16",transform:"matrix(-1 0 0 1 52 8)",fill:"#5b65f4"}),A.jsx("path",{d:"M36 8.5C36 8.22386 36.224 7.99918 36.5 8.00781C40.5621 8.13468 44.4312 9.80377 47.3137 12.6863C50.3143 15.6869 52 19.7565 52 24C52 28.2435 50.3143 32.3131 47.3137 35.3137C44.4312 38.1962 40.5621 39.8653 36.5 39.9922C36.224 40.0008 36 39.7761 36 39.5L36 24V8.5Z",fill:"#959bee"}),A.jsx("path",{d:"M46.9602 34.9602C47.1554 35.1554 47.1559 35.4726 46.9547 35.6617C45.5468 36.9842 43.91 38.0418 42.1229 38.7821C40.3358 39.5223 38.4306 39.9318 36.4999 39.9922C36.2239 40.0008 36 39.7761 36 39.5L36 25.2071C36 24.7617 36.5386 24.5386 36.8536 24.8536L46.9602 34.9602Z",fill:"#cdcff9"})]}),WO=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"31",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 31 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"44",y:"18",width:"4",height:"28",rx:"0.5",transform:"rotate(90 44 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"56",y:"25",width:"4",height:"40",rx:"0.5",transform:"rotate(90 56 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"36",y:"32",width:"4",height:"20",rx:"0.5",transform:"rotate(90 36 32)",fill:"#5b65f5"})]}),jq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M59.3348 27.8581C59.3348 28.6621 59.0708 29.2801 58.5428 29.7121C58.0268 30.1441 57.3848 30.3601 56.6168 30.3601C55.8488 30.3601 55.2008 30.1441 54.6728 29.7121C54.1568 29.2801 53.8988 28.6621 53.8988 27.8581V26.1481C53.8988 25.3441 54.1568 24.7261 54.6728 24.2941C55.2008 23.8621 55.8488 23.6461 56.6168 23.6461C57.3848 23.6461 58.0268 23.8621 58.5428 24.2941C59.0708 24.7261 59.3348 25.3441 59.3348 26.1481V27.8581ZM50.9648 21.5401C50.9648 22.3441 50.7008 22.9621 50.1728 23.3941C49.6568 23.8261 49.0148 24.0421 48.2468 24.0421C47.4788 24.0421 46.8308 23.8261 46.3028 23.3941C45.7868 22.9621 45.5288 22.3441 45.5288 21.5401V19.8301C45.5288 19.0261 45.7868 18.4081 46.3028 17.9761C46.8308 17.5441 47.4788 17.3281 48.2468 17.3281C49.0148 17.3281 49.6568 17.5441 50.1728 17.9761C50.7008 18.4081 50.9648 19.0261 50.9648 19.8301V21.5401ZM56.6168 17.4361L50.5148 30.2521H48.2468L54.3488 17.4361H56.6168ZM48.8768 21.4681V19.9021C48.8768 19.4341 48.6668 19.2001 48.2468 19.2001C47.8268 19.2001 47.6168 19.4341 47.6168 19.9021V21.4681C47.6168 21.9361 47.8268 22.1701 48.2468 22.1701C48.6668 22.1701 48.8768 21.9361 48.8768 21.4681ZM57.2468 27.7861V26.2201C57.2468 25.7521 57.0368 25.5181 56.6168 25.5181C56.1968 25.5181 55.9868 25.7521 55.9868 26.2201V27.7861C55.9868 28.2541 56.1968 28.4881 56.6168 28.4881C57.0368 28.4881 57.2468 28.2541 57.2468 27.7861Z",fill:"#5b65f4"}),A.jsx("path",{d:"M44.0049 26.4181C44.0049 27.6901 43.5969 28.6681 42.7809 29.3521C41.9649 30.0241 40.9509 30.3601 39.7389 30.3601C38.9829 30.3601 38.2929 30.2341 37.6689 29.9821C37.0569 29.7181 36.5349 29.2741 36.1029 28.6501C35.6829 28.0261 35.4729 27.2581 35.4729 26.3461H38.4249C38.4249 26.7781 38.5449 27.1141 38.7849 27.3541C39.0369 27.5821 39.3549 27.6961 39.7389 27.6961C40.1349 27.6961 40.4529 27.5821 40.6929 27.3541C40.9329 27.1141 41.0529 26.7721 41.0529 26.3281C41.0529 25.9441 40.9209 25.6261 40.6569 25.3741C40.4049 25.1101 40.0809 24.9781 39.6849 24.9781H39.2709V22.4221H39.6849C40.0929 22.4221 40.3989 22.3021 40.6029 22.0621C40.8069 21.8221 40.9089 21.5401 40.9089 21.2161C40.9089 20.8321 40.7949 20.5321 40.5669 20.3161C40.3389 20.1001 40.0629 19.9921 39.7389 19.9921C39.4149 19.9921 39.1389 20.1001 38.9109 20.3161C38.6829 20.5321 38.5689 20.8261 38.5689 21.1981H35.6169C35.6169 20.0221 36.0069 19.0861 36.7869 18.3901C37.5789 17.6821 38.5629 17.3281 39.7389 17.3281C40.9269 17.3281 41.9109 17.6881 42.6909 18.4081C43.4709 19.1161 43.8609 20.0221 43.8609 21.1261C43.8609 22.2301 43.4169 23.0641 42.5289 23.6281C43.5129 24.3121 44.0049 25.2421 44.0049 26.4181Z",fill:"#5b65f4"}),A.jsx("path",{d:"M33.9128 30.2521H25.6688V27.5881L30.3128 22.5481C30.7448 22.0801 30.9608 21.6241 30.9608 21.1801C30.9608 20.8201 30.8588 20.5321 30.6548 20.3161C30.4628 20.1001 30.1808 19.9921 29.8088 19.9921C29.4848 19.9921 29.2028 20.0881 28.9628 20.2801C28.7348 20.4721 28.6208 20.7901 28.6208 21.2341H25.6688C25.6688 20.0221 26.0648 19.0681 26.8568 18.3721C27.6608 17.6761 28.6448 17.3281 29.8088 17.3281C31.0208 17.3281 32.0048 17.6761 32.7608 18.3721C33.5288 19.0681 33.9128 20.0101 33.9128 21.1981C33.9128 21.8221 33.7928 22.3501 33.5528 22.7821C33.3128 23.2141 32.9048 23.7361 32.3288 24.3481L29.2688 27.5881H33.9128V30.2521Z",fill:"#5b65f4"}),A.jsx("path",{d:"M22.021 30.2525H19.069V20.5865L16.333 22.9625V19.8125L19.069 17.4365H22.021V30.2525Z",fill:"#5b65f4"})]}),Vq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"58",y:"25",width:"4",height:"44",rx:"0.5",transform:"rotate(90 58 25)",fill:"#5b65f4"}),A.jsx("rect",{x:"29.5",y:"33",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 29.5 33)",fill:"#959bee"}),A.jsx("path",{d:"M14.584 19L17.085 12.2832H18.8377L21.3008 19H19.7566L19.264 17.5695H16.5829L16.0808 19H14.584ZM17.0377 16.2716H18.8093L17.9282 13.7232L17.0377 16.2716ZM22.1459 19V12.2832H24.609C25.9259 12.2832 26.6933 13.0505 26.6933 14.0832C26.6933 14.7842 26.2575 15.3432 25.708 15.5232C26.3333 15.6747 26.9017 16.2432 26.9017 17.1053C26.9017 18.2042 26.068 19 24.808 19H22.1459ZM23.529 15.0116H24.3911C24.9406 15.0116 25.3006 14.7084 25.3006 14.2347C25.3006 13.7705 24.9785 13.4674 24.3722 13.4674H23.529V15.0116ZM23.529 17.8347H24.5143C25.1206 17.8347 25.4901 17.5126 25.4901 17.0105C25.4901 16.5179 25.1396 16.1768 24.5238 16.1768H23.529V17.8347ZM31.0425 19.1421C29.1383 19.1421 27.5751 17.7684 27.5751 15.6558C27.5751 13.5432 29.1762 12.1411 31.0236 12.1411C32.9751 12.1411 33.8941 13.3726 34.1309 14.3863L32.7951 14.8126C32.672 14.2726 32.1983 13.5147 31.0236 13.5147C30.0857 13.5147 29.0436 14.1968 29.0436 15.6558C29.0436 16.9821 30.0099 17.7305 31.0425 17.7305C32.2078 17.7305 32.7004 16.9726 32.8615 16.4232L34.2067 16.8211C33.9699 17.7968 33.0509 19.1421 31.0425 19.1421Z",fill:"#5b65f4"})]}),Hq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{width:"26",height:"19",rx:"1",transform:"matrix(1 0 0 -1 23 36.5)",fill:"#E9EAFB"}),A.jsx("rect",{width:"26",height:"3",rx:"1",transform:"matrix(1 0 0 -1 23 14.5)",fill:"#5b65f4"}),A.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 27 25.5)",fill:"#5b65f4"}),A.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 34 31.5)",fill:"#959bee"})]}),Wq=({onOk:t})=>{const{t:e}=zr(),r=[{title:e("add.t1"),child:[{title:e("add.t2"),type:"chart-bar",icon:A.jsx(jO,{})},{title:e("add.t3"),type:"chart-line",icon:A.jsx(VO,{})},{title:e("add.t4"),type:"chart-pie",icon:A.jsx(HO,{})},{title:e("add.t5"),type:"chart-strip-bar",icon:A.jsx(WO,{})}]},{title:e("add.t6"),child:[{title:e("add.t7"),type:"statistics",icon:A.jsx(jq,{})},{title:e("add.t8"),type:"text",icon:A.jsx(Vq,{})},{title:e("add.t9"),type:"calendar",icon:A.jsx(Hq,{})}]}],[n,i]=k.useState(!1),a=o=>{i(!1),t==null||t(o)};return A.jsx(A.Fragment,{children:A.jsx(Q.Popover,{placement:"bottomRight",open:n,onOpenChange:i,content:A.jsx("div",{className:"pivot-table-modal box-widget-popover-item-container",children:r.map((o,s)=>A.jsxs("div",{className:"box-widget-popover-item-group",children:[A.jsx("p",{className:"box-widget-popover-item-group-header",children:o.title}),A.jsx("div",{className:"box-widget-popover-item-group-content",children:o.child.map((u,l)=>A.jsxs("div",{onClick:()=>{a(u.type)},className:"box-widget-popover-item",children:[A.jsx("div",{className:"img",children:u.icon}),A.jsx("div",{className:"title",children:u.title})]},l))})]},s))}),trigger:"click",children:A.jsx(Q.Button,{children:e("add.t10")})})})},$q=[{label:"等于",value:"="},{label:"早于",value:"<"},{label:"晚于",value:">"},{label:"范围内",value:"contain"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],Gq=[{label:"等于",value:"="}],$O=[{label:"等于",value:"="},{label:"不等于",value:"!="},{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"小于",value:"<"},{label:"小于等于",value:"=<"},{label:"范围内",value:"contain"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],GO=[{label:"等于",value:"="},{label:"不等于",value:"!="},{label:"包含",value:"include"},{label:"不包含",value:"notinclude"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],Uq={int:$O,timestamp:$q,string:GO,bool:Gq,float:$O,enum:GO};let Vh;const UO=({open:t,onClose:e,onOk:r,fieldOptions:n,value:i,enumDataApi:a})=>{const[o]=Q.Form.useForm(),s=k.useRef(),{t:u}=zr(),l=k.useCallback(()=>{if(i!=null&&i.conditionList){const g=JSON.parse(JSON.stringify(i==null?void 0:i.conditionList));o.setFieldsValue({conditionList:g.map(v=>(v.type==="timestamp"&&(v.val&&(v.val=ti(v.val)),v.val2&&(v.val2=ti(v.val2))),(v.val===void 0||v.val==="")&&(v.val=""),(v.val2===void 0||v.val2==="")&&(v.val2=""),v)),conditionType:i.conditionType})}else o.setFieldsValue({conditionList:[],conditionType:"all"})},[i]),[f,c]=k.useState([]),h=({url:g,callback:v})=>{var m;(m=a==null?void 0:a(g))==null||m.then(y=>{v(y.data)})},d=g=>{Vh&&(clearTimeout(Vh),Vh=null),Vh=setTimeout(()=>{h(g)},300)},p=(g,v)=>{d({url:g,value:v,callback:c})};return k.useEffect(()=>{l()},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{title:u("setFilteringCriteria"),open:t,destroyOnClose:!0,width:"600px",onOk:()=>{const g=o.getFieldsValue(),v=g.conditionList?JSON.parse(JSON.stringify(g.conditionList)):"",m=g.conditionType,y={conditionList:v.map(b=>(b.type==="timestamp"&&(b.val&&(b.val=ti(b.val).format("YYYY-MM-DD")),b.val2&&(b.val2=b.val2?ti(b.val2).format("YYYY-MM-DD"):"")),b)),conditionType:m};s.current=y,e==null||e(),r==null||r(y)},onCancel:()=>{l(),e==null||e(),o.setFieldsValue(s.current)},children:A.jsxs(Q.Form,{name:"dynamicForm",form:o,initialValues:{conditionType:"all"},style:{maxWidth:600,marginTop:"30px"},children:[A.jsx(Q.Form.Item,{noStyle:!0,dependencies:["conditionList"],children:({getFieldValue:g})=>{var v;return((v=g("conditionList"))==null?void 0:v.length)>1?A.jsxs(Q.Flex,{align:"center",gap:5,style:{marginBottom:"20px"},children:[u("conformTo"),A.jsx(Q.Form.Item,{name:"conditionType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:[{label:u("all"),value:"all"},{label:u("everyone"),value:"any"}]})})," ",u("condition")]}):null}}),A.jsx(Q.Form.List,{name:"conditionList",children:(g,{add:v,remove:m})=>A.jsxs(A.Fragment,{children:[g.map(({key:y,name:b,...w})=>A.jsxs(Q.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[A.jsx(Q.Form.Item,{...w,name:[b,"field"],noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:n||[],onChange:C=>{const _=o.getFieldValue("conditionList"),D=n==null?void 0:n.find(S=>S.value===C);_[b].condition="=",_[b].type=D==null?void 0:D.type,_[b].val="",_[b].val2="",o.setFieldsValue({conditionList:_});const x=D==null?void 0:D.dynamic_call_enum_api;console.log("enumUrl",x),x&&h({url:x,value:"",callback:c})}})}),A.jsx(Q.Form.Item,{noStyle:!0,dependencies:[["conditionList",b,"field"]],children:({getFieldValue:C})=>{var D;const _=(D=n==null?void 0:n.find(x=>x.value===C(["conditionList",b,"field"])))==null?void 0:D.type;return A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"condition"],noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},options:_?Uq[_]:[]})})})}}),A.jsx(Q.Form.Item,{noStyle:!0,dependencies:[["conditionList",b,"field"],["conditionList",b,"condition"]],children:({getFieldValue:C})=>{var O,E,P;const _=(O=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:O.type,D=(E=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:E.enum,x=(P=n==null?void 0:n.find(F=>F.value===C(["conditionList",b,"field"])))==null?void 0:P.dynamic_call_enum_api,S=C(["conditionList",b,"condition"]);return A.jsxs(A.Fragment,{children:[["int","float"].includes(_)&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.InputNumber,{style:{width:"100px"},placeholder:u("pleaseEnter")})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.InputNumber,{style:{width:"100px",marginLeft:"5px"},placeholder:u("pleaseEnter")})}):null]}):null,_==="timestamp"&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.DatePicker,{style:{width:"150px"}})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.DatePicker,{style:{width:"150px",marginLeft:"5px"}})}):null]}):null,["string"].includes(_)&&!["null","notnull"].includes(S)?A.jsxs(A.Fragment,{children:[A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.Input,{style:{width:"150px"},placeholder:u("pleaseEnter")})}),S==="contain"?A.jsx(Q.Form.Item,{...w,name:[b,"val2"],noStyle:!0,children:A.jsx(Q.Input,{style:{width:"150px",marginLeft:"5px"},placeholder:u("pleaseEnter")})}):null]}):null,["bool"].includes(_)?A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:A.jsx(Q.Switch,{})})}):null,["enum"].includes(_)&&!["null","notnull"].includes(S)?A.jsx(A.Fragment,{children:A.jsx(Q.Form.Item,{...w,name:[b,"val"],noStyle:!0,children:(D==null?void 0:D.length)>0?A.jsx(Q.Select,{style:{width:"150px"},options:D}):x?A.jsx(Q.Select,{style:{width:"150px"},showSearch:!0,defaultActiveFirstOption:!1,suffixIcon:null,filterOption:!1,onSearch:F=>{p(x,F)},notFoundContent:null,options:(f||[]).map(F=>({value:F.value,label:F.label}))}):null})}):null]})}}),A.jsx(ww,{onClick:()=>m(b)})]},y)),A.jsx(Q.Form.Item,{children:A.jsx(Q.Button,{type:"dashed",onClick:()=>{v({field:n==null?void 0:n[0].value,condition:"=",type:n==null?void 0:n[0].type})},block:!0,icon:A.jsx(Dw,{}),children:u("addCondition")})})]})})]})})})},qq=({selectModuleData:t,onAllValuesChange:e,enumDataApi:r})=>{const{globalData:n}=Oo(),[i]=Q.Form.useForm(),[a,o]=k.useState(),[s,u]=k.useState(!1),l=k.useRef(),[f,c]=k.useState(),[h,d]=k.useState(0),{t:p}=zr(),g={dataSourceId:"",statisticalMethod:"recordTotal",field:""},v=()=>{setTimeout(()=>{console.log("conditionDataRef.current",l.current),e==null||e({...i.getFieldsValue(),conditionData:l.current})})},m=b=>{var C,_;const w=(_=(C=n==null?void 0:n.sourceData)==null?void 0:C.find(D=>D.value===b))==null?void 0:_.fields;o(w)},y=b=>{var w;c(b),l.current=b,d(((w=b==null?void 0:b.conditionList)==null?void 0:w.length)||0)};return k.useEffect(()=>{var b,w;if(t!=null&&t.customData){const C=t.customData;i.setFieldsValue(C),o(C==null?void 0:C.dataSourceId),m(C==null?void 0:C.dataSourceId)}else{const C=(b=n==null?void 0:n.sourceData)==null?void 0:b[0];i.setFieldsValue({...g,dataSourceId:C==null?void 0:C.value}),m(C==null?void 0:C.value),v()}y((w=t==null?void 0:t.customData)==null?void 0:w.conditionData)},[t,n]),A.jsxs(A.Fragment,{children:[A.jsxs(Q.Form,{form:i,name:"customData",layout:"vertical",initialValues:g,children:[A.jsx(Q.Form.Item,{label:p("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:n==null?void 0:n.sourceData,onChange:b=>{i.setFieldsValue({statisticalMethod:"recordTotal"}),m(b),v()}})}),A.jsxs(Q.Form.Item,{label:p("dataRange"),children:[A.jsx(Q.Button,{style:{marginLeft:"-15px"},onClick:()=>{u(!0)},type:"link",children:p("filterData")}),h>0?`${p("selectNcondition",{n:h})}`:null]}),A.jsx(Q.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),A.jsx(Q.Form.Item,{label:p("statisticstMethods"),name:"statisticalMethod",children:A.jsx(Q.Select,{onChange:b=>{i.setFieldsValue({field:b==="fieldValue"?a==null?void 0:a[0].value:"",statisticalType:"sum"}),v()},options:[{value:"recordTotal",label:p("statisticstRecordNum")},{value:"fieldValue",label:p("statisticstFieldVal")}]})}),A.jsx(Q.Form.Item,{dependencies:["statisticalMethod"],children:({getFieldValue:b})=>b("statisticalMethod")==="fieldValue"?A.jsx(Q.Form.Item,{label:p("selectField"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{noStyle:!0,name:"field",children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{v()},options:a})}),A.jsx(Q.Form.Item,{name:"statisticalType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{v()},options:[{value:"sum",label:p("sumVal")},{value:"max",label:p("maxVal")},{value:"min",label:p("minVal")},{value:"average",label:p("averageVal")}]})})]})}):null})]}),A.jsx(UO,{open:s,value:f,fieldOptions:a,enumDataApi:r,onClose:()=>{u(!1)},onOk:b=>{y(b),v()}})]})},Yq=({value:t,onChange:e})=>{const[r,n]=k.useState(),i=["#373c43","#3370ff","#4954e6","#34c724","#14c0ff","#ffc60a","#f80","#f76964"];return k.useEffect(()=>{n(t)},[t]),A.jsx("div",{className:"pane-item-body item-body-column",children:A.jsx("div",{className:"panel-single-color-selector",children:i.map((a,o)=>A.jsxs("div",{className:"panel-single-color-selector-color-item",onClick:()=>{n(a),e==null||e(a)},children:[A.jsx("div",{className:"panel-single-color-selector-color-item-background",style:{background:a}}),r===a?A.jsx("span",{className:"panel-icon",children:A.jsx(mw,{})}):null]},o))})})},Xq=({selectModuleData:t,onAllValuesChange:e})=>{const[r]=Q.Form.useForm(),{t:n}=zr(),i={color:"#373c43",unit:"1",precision:"",desc:""},a=()=>{setTimeout(()=>{e==null||e(r.getFieldsValue())})};return k.useEffect(()=>{t!=null&&t.customeStyle?r.setFieldsValue(t.customeStyle):r.setFieldsValue(i)},[t]),A.jsxs(Q.Form,{form:r,name:"customeStyle",layout:"vertical",initialValues:i,children:[A.jsx(Q.Form.Item,{label:n("statistics.t1"),name:"color",children:A.jsx(Yq,{onChange:()=>{a()}})}),A.jsx(Q.Form.Item,{label:n("statistics.t2"),extra:n("statistics.t3"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{name:"precision",noStyle:!0,children:A.jsx(Q.InputNumber,{min:1,max:10,style:{width:"60%"},placeholder:n("statistics.t4"),onChange:()=>{a()}})}),A.jsx(Q.Form.Item,{name:"unit",noStyle:!0,children:A.jsxs(Q.Select,{onChange:()=>{a()},children:[A.jsx(Q.Select.Option,{value:"1",children:n("statistics.t5")}),A.jsx(Q.Select.Option,{value:"2",children:n("statistics.t6")}),A.jsx(Q.Select.Option,{value:"3",children:n("statistics.t7")}),A.jsx(Q.Select.Option,{value:"4",children:n("statistics.t8")}),A.jsx(Q.Select.Option,{value:"5",children:n("statistics.t9")})]})})]})}),A.jsx(Q.Form.Item,{label:n("statistics.t10"),name:"desc",children:A.jsx(Q.Input,{onChange:()=>{a()}})})]})},Kq=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i,enumDataApi:a})=>{const{t:o}=zr(),[s,u]=k.useState(),[l,f]=k.useState(),c=()=>{e==null||e()};return k.useEffect(()=>{i&&(u(i==null?void 0:i.customData),f(i==null?void 0:i.customeStyle))},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:o("statisticsText"),footer:null,open:t,onOk:c,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",children:A.jsx(Hw,{customData:s,customeStyle:l,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",children:A.jsx(Q.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:o("typeData"),children:A.jsx(qq,{selectModuleData:i,enumDataApi:a,onAllValuesChange:h=>{u(h)}})},{key:"2",label:o("customStyle"),children:A.jsx(Xq,{selectModuleData:i,onAllValuesChange:h=>{f(h)}})}]})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:s,customeStyle:l})},children:o("confirm")})})]})]})})})},Zq=({selectModuleData:t,onAllValuesChange:e})=>{const{globalData:r}=Oo(),[n]=Q.Form.useForm(),[i,a]=k.useState(),[o,s]=k.useState(),{t:u}=zr(),l={dataSourceId:"",startDateField:"",endDateField:"",titleField:""},f=()=>{setTimeout(()=>{e==null||e(n.getFieldsValue())})},c=h=>{var p,g;const d=(g=(p=r==null?void 0:r.sourceData)==null?void 0:p.find(v=>v.value===h))==null?void 0:g.fields;a(d),s(d==null?void 0:d.filter(v=>v.type==="timestamp"))};return k.useEffect(()=>{var h,d,p,g,v;if(t!=null&&t.customData)n.setFieldsValue(t.customData),c((h=t==null?void 0:t.customData)==null?void 0:h.dataSourceId);else{const m=(d=r==null?void 0:r.sourceData)==null?void 0:d[0],y=(p=m==null?void 0:m.fields)==null?void 0:p.filter(b=>b.type==="timestamp");n.setFieldsValue({...l,dataSourceId:m==null?void 0:m.value,titleField:(v=(g=m==null?void 0:m.fields)==null?void 0:g[0])==null?void 0:v.value,startDateField:y==null?void 0:y[0].value,endDateField:y==null?void 0:y[0].value}),c(m==null?void 0:m.value),f()}},[t,r]),A.jsxs(Q.Form,{form:n,name:"customData",labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:l,children:[A.jsx("div",{style:{fontSize:"14px",marginBottom:"5px"},children:u("data")}),A.jsx(Q.Form.Item,{label:u("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:r==null?void 0:r.sourceData,onChange:h=>{c(h),f()}})}),A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:u("calendar.t1")}),A.jsx(Q.Form.Item,{label:u("calendar.t2"),name:"startDateField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:o})}),A.jsx(Q.Form.Item,{label:u("calendar.t3"),name:"endDateField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:o})}),A.jsx(Q.Form.Item,{label:u("calendar.t4"),name:"titleField",children:A.jsx(Q.Select,{onChange:()=>{f()},options:i})})]})},Jq=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=zr(),[o,s]=k.useState(),u=()=>{e==null||e()};return k.useEffect(()=>{i&&s(i==null?void 0:i.customData)},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:a("calendarText"),footer:null,open:t,onOk:u,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",style:{borderRight:"1px solid #e0e0e0"},children:A.jsx(Jw,{customData:o,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",style:{borderLeft:"none"},children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",style:{paddingTop:"20px"},children:A.jsx(Zq,{selectModuleData:i,onAllValuesChange:l=>{s(l)}})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:o})},children:a("confirm")})})]})]})})})},Qq=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"8",width:"6",height:"15.5",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"17",y:"24.5",width:"6",height:"15.5",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"28",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),eY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"17",y:"21",width:"6",height:"6",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"17",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"28",y:"24",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"28",y:"34",width:"6",height:"6",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),A.jsx("rect",{x:"50",y:"18",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),A.jsx("rect",{x:"50",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"})]}),tY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"58",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 58 11)",fill:"#959bee"}),A.jsx("rect",{x:"42",y:"11",width:"4",height:"28",rx:"0.5",transform:"rotate(90 42 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 58 18)",fill:"#959bee"}),A.jsx("rect",{x:"35.5",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 35.5 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 58 25)",fill:"#959bee"}),A.jsx("rect",{x:"23",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 23 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"58",y:"32",width:"4",height:"17",rx:"0.5",transform:"rotate(90 58 32)",fill:"#959bee"}),A.jsx("rect",{x:"40",y:"32",width:"4",height:"26",rx:"0.5",transform:"rotate(90 40 32)",fill:"#5b65f5"})]}),rY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("rect",{x:"40",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 40 11)",fill:"#959bee"}),A.jsx("rect",{x:"24",y:"11",width:"4",height:"8",rx:"0.5",transform:"rotate(90 24 11)",fill:"#5b65f5"}),A.jsx("rect",{x:"48",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 48 18)",fill:"#959bee"}),A.jsx("rect",{x:"31.5",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 31.5 18)",fill:"#5b65f5"}),A.jsx("rect",{x:"60",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 60 25)",fill:"#959bee"}),A.jsx("rect",{x:"25",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 25 25)",fill:"#5b65f5"}),A.jsx("rect",{x:"43",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 43 32)",fill:"#959bee"}),A.jsx("rect",{x:"29",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 29 32)",fill:"#5b65f5"})]}),nY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M15.5 33.5C20.2023 32.3804 23.5007 28.5533 25.7095 24.6682C28.3082 20.0974 34.0857 17.3668 38.758 19.7783L39.8066 20.3195C42.9001 21.9162 46.671 21.329 49.1326 18.8674L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),A.jsx("path",{d:"M16.5 15L26.844 27.6427C28.7759 30.0039 31.8825 31.0607 34.8535 30.3675L42.3359 28.6216C44.0629 28.2187 45.8748 28.401 47.4869 29.1398L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),iY=()=>A.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[A.jsx("path",{d:"M20 24C20 32.8366 27.1634 40 36 40C44.8366 40 52 32.8366 52 24C52 15.1634 44.8366 8 36 8C27.1634 8 20 15.1634 20 24ZM46.3944 24C46.3944 29.7407 41.7407 34.3944 36 34.3944C30.2593 34.3944 25.6056 29.7407 25.6056 24C25.6056 18.2593 30.2593 13.6056 36 13.6056C41.7407 13.6056 46.3944 18.2593 46.3944 24Z",fill:"#5b65f4"}),A.jsx("path",{d:"M52 24C52 19.7565 50.3143 15.6869 47.3137 12.6863C44.3131 9.68571 40.2435 8 36 8V13.6056C38.7568 13.6056 41.4006 14.7007 43.35 16.65C45.2993 18.5994 46.3944 21.2432 46.3944 24H52Z",fill:"#959bee"}),A.jsx("path",{d:"M52 24C52 20.9896 51.1507 18.0403 49.5497 15.4909L44.8026 18.4721C45.8427 20.1283 46.3944 22.0443 46.3944 24H52Z",fill:"#cdcff9"})]}),aY=({selectModuleData:t,onAllValuesChange:e,onValuesChange:r,enumDataApi:n})=>{const{globalData:i}=Oo(),[a]=Q.Form.useForm(),[o,s]=k.useState(),[u,l]=k.useState(!1),f=k.useRef(),[c,h]=k.useState(),[d,p]=k.useState(0),{t:g}=zr(),v=Q.Form.useWatch("type",a),m={dataSourceId:"",yAxis:"recordTotal",chartOptions:["legend","label","axis","splitLine"]},y=()=>{setTimeout(()=>{e==null||e({...a.getFieldsValue(),conditionData:f.current})})},b=C=>{var D,x,S;console.log(" globalData?.sourceData",i==null?void 0:i.sourceData),console.log(" globalData?.sourceData",C);const _=(x=(D=i==null?void 0:i.sourceData)==null?void 0:D.find(O=>O.value===C))==null?void 0:x.fields;console.log(" globalData?.sourceData3",_),a.setFieldsValue({xAxis:(S=_==null?void 0:_[0])==null?void 0:S.value}),s(_)},w=C=>{var _;h(C),f.current=C,p(((_=C==null?void 0:C.conditionList)==null?void 0:_.length)||0)};return k.useEffect(()=>{var C,_;if(t!=null&&t.customData){const D=t.customData;a.setFieldsValue(D),s(D==null?void 0:D.dataSourceId),b(D==null?void 0:D.dataSourceId)}else{const D=(C=i==null?void 0:i.sourceData)==null?void 0:C[0];a.setFieldsValue({...m,dataSourceId:D==null?void 0:D.value,type:t==null?void 0:t.type}),b(D==null?void 0:D.value),y()}w((_=t==null?void 0:t.customData)==null?void 0:_.conditionData)},[t,i]),A.jsxs("div",{style:{height:"50vh",overflowX:"auto"},children:[A.jsxs(Q.Form,{form:a,name:"customData",layout:"vertical",onValuesChange:r,initialValues:m,children:[A.jsx(Q.Form.Item,{label:g("dataSource"),name:"dataSourceId",children:A.jsx(Q.Select,{options:i==null?void 0:i.sourceData,onChange:C=>{a.setFieldsValue({yAxis:"recordTotal"}),b(C),y()}})}),A.jsxs(Q.Form.Item,{label:g("dataRange"),children:[A.jsx(Q.Button,{style:{marginLeft:"-15px"},onClick:()=>{l(!0)},type:"link",children:g("filterData")}),d>0?`${g("selectNcondition",{n:d})}`:null]}),A.jsx(Q.Form.Item,{label:g("chart.t1"),name:"type",children:A.jsx(Q.Select,{onChange:()=>{y()},options:[{label:g("chart.t2"),value:"chart-bar",icon:A.jsx(jO,{})},{label:g("chart.t3"),value:"chart-bar-pile",icon:A.jsx(eY,{})},{label:g("chart.t4"),value:"chart-bar-percentage",icon:A.jsx(Qq,{})},{label:g("chart.t5"),value:"chart-strip-bar",icon:A.jsx(WO,{})},{label:g("chart.t6"),value:"chart-strip-bar-pile",icon:A.jsx(rY,{})},{label:g("chart.t7"),value:"chart-strip-bar-percentage",icon:A.jsx(tY,{})},{label:g("chart.t8"),value:"chart-line",icon:A.jsx(VO,{})},{label:g("chart.t9"),value:"chart-line-smooth",icon:A.jsx(nY,{})},{label:g("chart.t10"),value:"chart-pie",icon:A.jsx(HO,{})},{label:g("chart.t11"),value:"chart-pie-circular",icon:A.jsx(iY,{})}],optionRender:C=>A.jsxs(Q.Flex,{align:"center",children:[A.jsx("span",{role:"img",style:{marginTop:"5px"},"aria-label":C.data.label,children:C.data.icon}),C.data.label]})})}),A.jsx(Q.Form.Item,{name:"chartOptions",label:g("chart.t12"),children:A.jsxs(Q.Checkbox.Group,{onChange:()=>{y()},children:[A.jsx(Q.Checkbox,{value:"legend",style:{lineHeight:"32px"},children:g("chart.t13")}),A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:g("chart.t14")}),["chart-pie","chart-pie-circular"].includes(v)?null:A.jsxs(A.Fragment,{children:[A.jsx(Q.Checkbox,{value:"axis",style:{lineHeight:"32px"},children:g("chart.t15")}),A.jsx(Q.Checkbox,{value:"splitLine",style:{lineHeight:"32px"},children:g("chart.t16")})]})]})}),A.jsx(Q.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),A.jsx(Q.Form.Item,{label:v!=null&&v.includes("pie")?g("chart.t17"):g("chart.t18"),name:"xAxis",children:A.jsx(Q.Select,{onChange:()=>{y()},options:o})}),A.jsx(Q.Form.Item,{label:v!=null&&v.includes("pie")?g("chart.t19"):g("chart.t20"),name:"yAxis",children:A.jsx(Q.Select,{onChange:C=>{a.setFieldsValue({yAxisField:C==="fieldValue"?o==null?void 0:o[0].value:"",yAxisFieldType:"sum"}),y()},options:[{value:"recordTotal",label:g("statisticstRecordNum")},{value:"fieldValue",label:g("statisticstFieldVal")}]})}),A.jsx(Q.Form.Item,{dependencies:["yAxis"],children:({getFieldValue:C})=>C("yAxis")==="fieldValue"?A.jsx(Q.Form.Item,{label:g("selectField"),children:A.jsxs(Q.Space.Compact,{children:[A.jsx(Q.Form.Item,{noStyle:!0,name:"yAxisField",children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{y()},options:o})}),A.jsx(Q.Form.Item,{name:"yAxisFieldType",noStyle:!0,children:A.jsx(Q.Select,{style:{width:"100px"},onChange:()=>{y()},options:[{value:"sum",label:g("sumVal")},{value:"max",label:g("maxVal")},{value:"min",label:g("minVal")},{value:"average",label:g("averageVal")}]})})]})}):null})]}),A.jsx(UO,{open:u,value:c,fieldOptions:o,enumDataApi:n,onClose:()=>{l(!1)},onOk:C=>{w(C),y()}})]})},oY=({selectModuleData:t,onAllValuesChange:e,customeStylesRef:r})=>{const[n]=Q.Form.useForm(),{t:i}=zr(),a={xtitle:"",ytitle:"",xchartOptions:[],ychartOptions:[]},o=()=>{setTimeout(()=>{e==null||e(n.getFieldsValue())})};return k.useEffect(()=>{t!=null&&t.customeStyle?n.setFieldsValue(t.customeStyle):n.setFieldsValue(a)},[t]),k.useImperativeHandle(r,()=>({reset(){n.setFieldsValue(a),e==null||e(a)}})),A.jsx("div",{style:{height:"50vh",overflowX:"auto"},children:A.jsxs(Q.Form,{form:n,name:"customeStyle",layout:"vertical",initialValues:a,children:[A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:i("chart.t21")}),A.jsx(Q.Form.Item,{label:i("chart.t22"),name:"xtitle",children:A.jsx(Q.Input,{onChange:()=>{o()}})}),A.jsx(Q.Form.Item,{name:"xchartOptions",label:i("chart.t23"),children:A.jsx(Q.Checkbox.Group,{onChange:()=>{o()},children:A.jsxs(Q.Row,{children:[A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:i("chart.t24")})}),A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:i("chart.t25")})})]})})}),A.jsx(Q.Divider,{orientation:"left",orientationMargin:"0",children:i("chart.t26")}),A.jsx(Q.Form.Item,{label:i("chart.t27"),name:"ytitle",children:A.jsx(Q.Input,{onChange:()=>{o()}})}),A.jsx(Q.Form.Item,{name:"ychartOptions",label:i("chart.t28"),children:A.jsx(Q.Checkbox.Group,{onChange:()=>{o()},children:A.jsxs(Q.Row,{children:[A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"label",style:{lineHeight:"32px"},children:i("chart.t29")})}),A.jsx(Q.Col,{span:12,children:A.jsx(Q.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:i("chart.t30")})})]})})})]})})},sY=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=zr(),[o,s]=k.useState(),[u,l]=k.useState(),f=k.useRef(),c=()=>{e==null||e()};return k.useEffect(()=>{i&&(s(i==null?void 0:i.customData),l(i==null?void 0:i.customeStyle))},[i]),A.jsx(A.Fragment,{children:A.jsx(Q.Modal,{width:"65%",title:a("chartText"),footer:null,open:t,onOk:c,onCancel:e,closeIcon:A.jsx(pf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:A.jsxs("div",{className:"config-widget-dialog-container",children:[A.jsx("div",{className:"config-widget-dialog-content",children:A.jsx("div",{className:"config-widget-dialog-preview",children:A.jsx(zO,{customData:o,customeStyle:u,moduleDataApi:n})})}),A.jsxs("div",{className:"config-widget-dialog-panel",children:[A.jsx("div",{className:"bitable-dashboard edit-panel-container",children:A.jsx(Q.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:a("typeData"),children:A.jsx(aY,{selectModuleData:i,onAllValuesChange:h=>{s(h)},onValuesChange:h=>{var d;Object.keys(h).includes("type")&&((d=f.current)==null||d.reset(),l({}))}})},{key:"2",label:a("customStyle"),children:A.jsx(oY,{customeStylesRef:f,selectModuleData:i,onAllValuesChange:h=>{l(h)}})}]})}),A.jsx("div",{className:"button-container",children:A.jsx(Q.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,type:i==null?void 0:i.type,customData:o,customeStyle:u})},children:a("confirm")})})]})]})})})},Me=t=>typeof t=="string",dl=()=>{let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r},qO=t=>t==null?"":""+t,uY=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},lY=/###/g,YO=t=>t&&t.indexOf("###")>-1?t.replace(lY,"."):t,XO=t=>!t||Me(t),vl=(t,e,r)=>{const n=Me(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(XO(t))return{};const a=YO(n[i]);!t[a]&&r&&(t[a]=new r),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++i}return XO(t)?{}:{obj:t,k:YO(n[i])}},KO=(t,e,r)=>{const{obj:n,k:i}=vl(t,e,Object);if(n!==void 0||e.length===1){n[i]=r;return}let a=e[e.length-1],o=e.slice(0,e.length-1),s=vl(t,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=vl(t,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},fY=(t,e,r,n)=>{const{obj:i,k:a}=vl(t,e,Object);i[a]=i[a]||[],i[a].push(r)},Hh=(t,e)=>{const{obj:r,k:n}=vl(t,e);if(r)return r[n]},cY=(t,e,r)=>{const n=Hh(t,r);return n!==void 0?n:Hh(e,r)},ZO=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?Me(t[n])||t[n]instanceof String||Me(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):ZO(t[n],e[n],r):t[n]=e[n]);return t},As=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hY={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const dY=t=>Me(t)?t.replace(/[&<>"'\/]/g,e=>hY[e]):t;class vY{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const pY=[" ",",","?","!",";"],gY=new vY(20),mY=(t,e,r)=>{e=e||"",r=r||"";const n=pY.filter(o=>e.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=gY.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(t);if(!a){const o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a},ry=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(r);let i=t;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let u=a;u<n.length;++u)if(u!==a&&(s+=r),s+=n[u],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;a+=u-a+1;break}i=o}return i},Wh=t=>t&&t.replace("_","-"),yY={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class $h{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||yY,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,i){return i&&!this.debug?null:(Me(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new $h(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new $h(this.logger,e)}}var Wn=new $h;class Gh{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s.apply(s,[e,...n])})}}class JO extends Gh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,r],n&&(Array.isArray(n)?s.push(...n):Me(n)&&a?s.push(...n.split(a)):s.push(n)));const u=Hh(this.data,s);return!u&&!r&&!n&&e.indexOf(".")>-1&&(e=s[0],r=s[1],n=s.slice(2).join(".")),u||!o||!Me(n)?u:ry(this.data&&this.data[e]&&this.data[e][r],n,a)}addResource(e,r,n,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,r];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),i=r,r=s[1]),this.addNamespaces(r),KO(this.data,s,i),a.silent||this.emit("added",e,r,n,i)}addResources(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in n)(Me(n[a])||Array.isArray(n[a]))&&this.addResource(e,r,a,n[a],{silent:!0});i.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,r];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let u=Hh(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?ZO(u,n,a):u={...u,...n},KO(this.data,s,u),o.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var QO={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,i){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,r,n,i))}),e}};const eP={};class Uh extends Gh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),uY(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,r);return n&&n.res!==void 0}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!mY(e,n,i);if(o&&!s){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:a};const l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),e=l.join(i)}return Me(a)&&(a=[a]),{key:e,namespaces:a}}translate(e,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(e[e.length-1],r),u=s[s.length-1],l=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(f){const w=r.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${w}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${w}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:o}const c=this.resolve(e,r);let h=c&&c.res;const d=c&&c.usedKey||o,p=c&&c.exactUsedKey||o,g=Object.prototype.toString.apply(h),v=["[object Number]","[object Function]","[object RegExp]"],m=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=!Me(h)&&typeof h!="boolean"&&typeof h!="number";if(y&&h&&b&&v.indexOf(g)<0&&!(Me(m)&&Array.isArray(h))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,h,{...r,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(c.res=w,c.usedParams=this.getUsedParamsDetails(r),c):w}if(a){const w=Array.isArray(h),C=w?[]:{},_=w?p:d;for(const D in h)if(Object.prototype.hasOwnProperty.call(h,D)){const x=`${_}${a}${D}`;C[D]=this.translate(x,{...r,joinArrays:!1,ns:s}),C[D]===x&&(C[D]=h[D])}h=C}}else if(y&&Me(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,r,n));else{let w=!1,C=!1;const _=r.count!==void 0&&!Me(r.count),D=Uh.hasDefaultValue(r),x=_?this.pluralResolver.getSuffix(l,r.count,r):"",S=r.ordinal&&_?this.pluralResolver.getSuffix(l,r.count,{ordinal:!1}):"",O=_&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),E=O&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${S}`]||r.defaultValue;!this.isValidLookup(h)&&D&&(w=!0,h=E),this.isValidLookup(h)||(C=!0,h=o);const F=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,B=D&&E!==h&&this.options.updateMissing;if(C||w||B){if(this.logger.log(B?"updateKey":"missingKey",l,u,o,B?E:h),a){const z=this.resolve(o,{...r,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let M=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let z=0;z<I.length;z++)M.push(I[z]);else this.options.saveMissingTo==="all"?M=this.languageUtils.toResolveHierarchy(r.lng||this.language):M.push(r.lng||this.language);const j=(z,W,R)=>{const U=D&&R!==h?R:F;this.options.missingKeyHandler?this.options.missingKeyHandler(z,u,W,U,B,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,u,W,U,B,r),this.emit("missingKey",z,u,W,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?M.forEach(z=>{const W=this.pluralResolver.getSuffixes(z,r);O&&r[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(R=>{j([z],o+R,r[`defaultValue${R}`]||E)})}):j(M,o,E))}h=this.extendTranslation(h,e,r,c,n),C&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${o}`),(C||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,w?h:void 0):h=this.options.parseMissingKeyHandler(h))}return i?(c.res=h,c.usedParams=this.getUsedParamsDetails(r),c):h}extendTranslation(e,r,n,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=Me(e)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(l){const h=e.match(this.interpolator.nestingRegexp);f=h&&h.length}let c=n.replace&&!Me(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||i.usedLng,n),l){const h=e.match(this.interpolator.nestingRegexp),d=h&&h.length;f<d&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];return a&&a[0]===d[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${r[0]}`),null):o.translate(...d,r)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,u=Me(s)?[s]:s;return e!=null&&u&&u.length&&n.applyPostProcessor!==!1&&(e=QO.handle(u,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,a,o,s;return Me(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,r),f=l.key;i=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const h=r.count!==void 0&&!Me(r.count),d=h&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(Me(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);c.forEach(v=>{this.isValidLookup(n)||(s=v,!eP[`${g[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(eP[`${g[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(m=>{if(this.isValidLookup(n))return;o=m;const y=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,f,m,v,r);else{let w;h&&(w=this.pluralResolver.getSuffix(m,r.count,r));const C=`${this.options.pluralSeparator}zero`,_=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(y.push(f+w),r.ordinal&&w.indexOf(_)===0&&y.push(f+w.replace(_,this.options.pluralSeparator)),d&&y.push(f+C)),p){const D=`${f}${this.options.contextSeparator}${r.context}`;y.push(D),h&&(y.push(D+w),r.ordinal&&w.indexOf(_)===0&&y.push(D+w.replace(_,this.options.pluralSeparator)),d&&y.push(D+C))}}let b;for(;b=y.pop();)this.isValidLookup(n)||(a=b,n=this.getResource(m,v,b,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,n,i):this.resourceStore.getResource(e,r,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Me(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}const ny=t=>t.charAt(0).toUpperCase()+t.slice(1);class tP{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wn.create("languageUtils")}getScriptPartFromCode(e){if(e=Wh(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Wh(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(Me(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ny(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=ny(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=ny(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),Me(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],e),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Me(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Me(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let bY=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],CY={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const wY=["v1","v2","v3"],_Y=["v4"],rP={zero:0,one:1,two:2,few:3,many:4,other:5},DY=()=>{const t={};return bY.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:CY[e.fc]}})}),t};class xY{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=Wn.create("pluralResolver"),(!this.options.compatibilityJSON||_Y.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=DY(),this.pluralRulesCache={}}addRule(e,r){this.rules[e]=r}clearCache(){this.pluralRulesCache={}}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Wh(e==="dev"?"en":e),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const o=new Intl.PluralRules(n,{type:i});return this.pluralRulesCache[a]=o,o}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${r}${i}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,a)=>rP[i]-rP[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,r)):[]}getSuffix(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){const n=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!wY.includes(this.options.compatibilityJSON)}}const nP=function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=cY(t,e,r);return!a&&i&&Me(r)&&(a=ry(t,r,n),a===void 0&&(a=ry(e,r,n))),a},iy=t=>t.replace(/\$/g,"$$$$");class SY{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wn.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=r!==void 0?r:dY,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?As(a):o||"{{",this.suffix=s?As(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=h?As(h):d||As("$t("),this.nestingSuffix=p?As(p):g||As(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,n,i){let a,o,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=d=>{if(d.indexOf(this.formatSeparator)<0){const m=nP(r,u,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,n,{...i,...r,interpolationkey:d}):m}const p=d.split(this.formatSeparator),g=p.shift().trim(),v=p.join(this.formatSeparator).trim();return this.format(nP(r,u,g,this.options.keySeparator,this.options.ignoreJSONStructure),v,n,{...i,...r,interpolationkey:g})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,c=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>iy(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?iy(this.escape(d)):iy(d)}].forEach(d=>{for(s=0;a=d.regex.exec(e);){const p=a[1].trim();if(o=l(p),o===void 0)if(typeof f=="function"){const v=f(e,a,i);o=Me(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(c){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),o="";else!Me(o)&&!this.useRawValueToEscape&&(o=qO(o));const g=d.safeValue(o);if(e=e.replace(a[0],g),c?(d.regex.lastIndex+=o.length,d.regex.lastIndex-=a[0].length):d.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;const s=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${f}[ ]*{`));let h=`{${c[1]}`;u=c[0],h=this.interpolate(h,o);const d=h.match(/'/g),p=h.match(/"/g);(d&&d.length%2===0&&!p||p.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),l&&(o={...l,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,g),`${u}${f}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;i=this.nestingRegexp.exec(e);){let u=[];o={...n},o=o.replace&&!Me(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(c=>c.trim());i[1]=f.shift(),u=f,l=!0}if(a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===e&&!Me(a))return a;Me(a)||(a=qO(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),l&&(a=u.reduce((f,c)=>this.format(f,c,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const EY=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=s.trim();r[f]||(r[f]=l),l==="false"&&(r[f]=!1),l==="true"&&(r[f]=!0),isNaN(l)||(r[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:r}},Ts=t=>{const e={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=e[o];return s||(s=t(Wh(n),i),e[o]=s),s(r)}};class AY{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wn.create("formatter"),this.options=e,this.formats={number:Ts((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return a=>i.format(a)}),currency:Ts((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return a=>i.format(a)}),datetime:Ts((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return a=>i.format(a)}),relativetime:Ts((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return a=>i.format(a,n.range||"day")}),list:Ts((r,n)=>{const i=new Intl.ListFormat(r,{...n});return a=>i.format(a)})},this.init(e)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=Ts(r)}format(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,u)=>{const{formatName:l,formatOptions:f}=EY(u);if(this.formats[l]){let c=s;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},d=h.locale||h.lng||i.locale||i.lng||n;c=this.formats[l](s,d,{...f,...i,...h})}catch(h){this.logger.warn(h)}return c}else this.logger.warn(`there was no format function for ${l}`);return s},e)}}const TY=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class OY extends Gh{constructor(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Wn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,r,n,i){const a={},o={},s={},u={};return e.forEach(l=>{let f=!0;r.forEach(c=>{const h=`${l}|${c}`;!n.reload&&this.store.hasResourceBundle(l,c)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,f=!1,o[h]===void 0&&(o[h]=!0),a[h]===void 0&&(a[h]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(s[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(e,r,n){const i=e.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const s={};this.queue.forEach(u=>{fY(u.loaded,[a],o),TY(u,e),r&&u.errors.push(r),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{s[l][c]===void 0&&(s[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,i+1,a*2,o)},a);return}o(l,f)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(e,r);l&&typeof l.then=="function"?l.then(f=>s(null,f)).catch(s):s(null,l)}catch(l){s(l)}return}return u(e,r,s)}prepareLoading(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Me(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Me(r)&&(r=[r]);const a=this.queueLoad(e,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(e,o,s)})}saveMissing(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const u={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let f;l.length===5?f=l(e,r,n,i,u):f=l(e,r,n,i),f&&typeof f.then=="function"?f.then(c=>s(null,c)).catch(s):s(null,f)}catch(f){s(f)}else l(e,r,n,i,s,u)}!e||!e[0]||this.store.addResource(e[0],r,n,i)}}}const iP=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Me(t[1])&&(e.defaultValue=t[1]),Me(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),aP=t=>(Me(t.ns)&&(t.ns=[t.ns]),Me(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Me(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),qh=()=>{},PY=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class pl extends Gh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=aP(e),this.services={},this.logger=Wn,this.modules={external:[]},PY(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(Me(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=iP();this.options={...i,...this.options,...aP(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const a=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Wn.init(a(this.modules.logger),this.options):Wn.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=AY);const c=new tP(this.options);this.store=new JO(this.options.resources,this.options);const h=this.services;h.logger=Wn,h.resourceStore=this.store,h.languageUtils=c,h.pluralResolver=new xY(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=a(f),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new SY(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new OY(a(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(d){for(var p=arguments.length,g=new Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];e.emit(d,...g)}),this.modules.languageDetector&&(h.languageDetector=a(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=a(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Uh(this.services,this.options),this.translator.on("*",function(d){for(var p=arguments.length,g=new Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];e.emit(d,...g)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,n||(n=qh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const u=dl(),l=()=>{const f=(c,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),n(c,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qh;const i=Me(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&a.indexOf(l)<0&&a.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(e,r,n){const i=dl();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=qh),this.services.backendConnector.reload(e,r,a=>{i.resolve(),n(a)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&QO.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,r){var n=this;this.isLanguageChangingTo=e;const i=dl();this.emit("languageChanging",e);const a=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,l)=>{l?(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(u,function(){return n.t(...arguments)})},s=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const l=Me(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||a(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,f=>{o(f,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,r,n){var i=this;const a=function(o,s){let u;if(typeof s!="object"){for(var l=arguments.length,f=new Array(l>2?l-2:0),c=2;c<l;c++)f[c-2]=arguments[c];u=i.options.overloadTranslationOptionHandler([o,s].concat(f))}else u={...s};u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs,u.ns=u.ns||a.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||a.keyPrefix);const h=i.options.keySeparator||".";let d;return u.keyPrefix&&Array.isArray(o)?d=o.map(p=>`${u.keyPrefix}${h}${p}`):d=u.keyPrefix?`${u.keyPrefix}${h}${o}`:o,i.t(d,u)};return Me(e)?a.lng=e:a.lngs=e,a.ns=r,a.keyPrefix=n,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(a,e)))}loadNamespaces(e,r){const n=dl();return this.options.ns?(Me(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=dl();Me(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new tP(iP());return r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new pl(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qh;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new pl(i);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new JO(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Uh(a.services,i),a.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),f=1;f<u;f++)l[f-1]=arguments[f];a.emit(s,...l)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=pl.createInstance();Kt.createInstance=pl.createInstance,Kt.createInstance,Kt.dir,Kt.init,Kt.loadResources,Kt.reloadResources,Kt.use,Kt.changeLanguage,Kt.getFixedT,Kt.t,Kt.exists,Kt.setDefaultNamespace,Kt.hasLoadedNamespace,Kt.loadNamespaces,Kt.loadLanguages;const BY={...{title:"仪表盘",text:"文本",confirm:"确定",pleaseEnter:"请输入",configuration:"配置",copy:"复制",delete:"删除",calendarText:"日历",chartText:"图表",promptTitle:"提示",promptContentDeleteComponents:"确认删除组件?",unnamedRecord:"未命名记录",setFilteringCriteria:"设置筛选条件",all:"所有",everyone:"任一",condition:"条件",addCondition:"添加条件",equalto:"等于",notequalto:"不等于",contain:"包含",notcontain:"不包含",null:"为空",notnull:"不为空",conformTo:"符合以下",statisticsText:"统计文字",typeData:"类型与数据",customStyle:"自定义样式",dataSource:"数据源",dataRange:"数据范围",data:"数据",filterData:"筛选数据",selectNcondition:"已选{{n}}个条件",allData:"全部数据",statisticstMethods:"统计方式",statisticstRecordNum:"统计记录总数",statisticstFieldVal:"统计字段数值",selectField:"选择字段",sumVal:"求和",maxVal:"最大值",minVal:"最小值",averageVal:"平均值"},pb:{text:"文本"},statistics:{t1:"配色方案",t2:"数值设置",t3:"小数位数与格式",t4:"请输入小数位数",t5:"数字(千分位)",t6:"数字",t7:"百分比",t8:"人名币",t9:"美元",t10:"统计数值说明",t11:"",t12:"",t13:""},chart:{t1:"图表类型",t2:"基础柱状图",t3:"堆积柱状图",t4:"百分比柱状图",t5:"基础条形图",t6:"堆积条形图",t7:"百分比堆积条形图",t8:"折线图",t9:"平滑折线图",t10:"饼图",t11:"环形图",t12:"图标选项",t13:"图例",t14:"数据标签",t15:"坐标轴",t16:"网格线",t17:"扇形分区",t18:"横轴(类别)",t19:"扇形数值",t20:"纵轴(字段)",t21:"横轴",t22:"横轴标题",t23:"坐标轴选项",t24:"显示标签",t25:"显示轴线",t26:"纵轴",t27:"纵轴标题",t28:"坐标轴选项",t29:"显示标签",t30:"显示轴线"},calendar:{t1:"视图配置",t2:"开始日期",t3:"结束日期",t4:"标题展示"},add:{t1:"图表",t2:"柱状图",t3:"折线图",t4:"饼图",t5:"条形图",t6:"其他",t7:"统计数字",t8:"文本",t9:"日历",t10:"添加组件"}},MY={...{title:"Dashboard",text:"Text",confirm:"Confirm",pleaseEnter:"Please enter",configuration:"Configuration",copy:"Copy",delete:"Delete",calendarText:"Calendar",chartText:"Chart",promptTitle:"Prompt",promptContentDeleteComponents:"Are you sure you want to delete this component?",unnamedRecord:"Unnamed Record",setFilteringCriteria:"Set filtering criteria",all:"All",everyone:"Anyone",condition:"Condition",addCondition:"Add condition",equalto:"Equal to",notequalto:"Not equal to",contain:"Contains",notcontain:"Does not contain",null:"Is empty",notnull:"Is not empty",conformTo:"Conform to the following",statisticsText:"Statistics Text",typeData:"Type and Data",customStyle:"Custom Style",dataSource:"Data Source",dataRange:"Data Range",data:"Data",filterData:"Filter Data",selectNcondition:"Selected {{n}} conditions",allData:"All Data",statisticstMethods:"Statistical Methods",statisticstRecordNum:"Total Number of Records",statisticstFieldVal:"Statistical Field Values",selectField:"Select Field",sumVal:"Sum",maxVal:"Maximum Value",minVal:"Minimum Value",averageVal:"Average Value"},pb:{text:"Text"},statistics:{t1:"Color Scheme",t2:"Value Settings",t3:"Decimal Places and Format",t4:"Please enter decimal places",t5:"Number (Thousand Separator)",t6:"Number",t7:"Percentage",t8:"Renminbi",t9:"Dollar",t10:"Statistical Value Description",t11:"",t12:"",t13:""},chart:{t1:"Chart Type",t2:"Basic Bar Chart",t3:"Stacked Bar Chart",t4:"Percentage Bar Chart",t5:"Basic Horizontal Bar Chart",t6:"Stacked Horizontal Bar Chart",t7:"Percentage Stacked Horizontal Bar Chart",t8:"Line Chart",t9:"Smooth Line Chart",t10:"Pie Chart",t11:"Doughnut Chart",t12:"Chart Options",t13:"Legend",t14:"Data Label",t15:"Axis",t16:"Grid Line",t17:"Sector Division",t18:"Horizontal Axis (Category)",t19:"Sector Value",t20:"Vertical Axis (Field)",t21:"Horizontal Axis",t22:"Horizontal Axis Title",t23:"Axis Options",t24:"Show Labels",t25:"Show Axis Line",t26:"Vertical Axis",t27:"Vertical Axis Title",t28:"Axis Options",t29:"Show Labels",t30:"Show Axis Line"},calendar:{t1:"View Configuration",t2:"Start Date",t3:"End Date",t4:"Title Display"},add:{t1:"Chart",t2:"Bar Chart",t3:"Line Chart",t4:"Pie Chart",t5:"Horizontal Bar Chart",t6:"Other",t7:"Statistical Number",t8:"Text",t9:"Calendar",t10:"Add Component"}};Kt.use(lN).init({resources:{"zh-CN":{translation:BY},"en-US":{translation:MY}},lng:"zh-CN",fallbackLng:"zh-CN",interpolation:{escapeValue:!1}});const FY=()=>A.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"MoreVerticalOutlined",children:A.jsx("path",{d:"M12 5.5A1.75 1.75 0 1 1 12 2a1.75 1.75 0 0 1 0 3.5Zm0 8.225a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5ZM12 22a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5Z",fill:"currentColor"})}),LY=()=>A.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"DragOutlined",children:A.jsx("path",{d:"M8.25 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm0 7.25a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm1.75 5.5a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM14.753 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5ZM16.5 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0Zm-1.747 9a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Z",fill:"#999"})}),IY=({defaultValue:t,onChange:e})=>{const[r,n]=k.useState(!1),[i,a]=k.useState(""),o=Ew(s=>{e==null||e(s)},300);return k.useEffect(()=>{a(i)},[t]),A.jsx("span",{className:"handle title",children:A.jsx("span",{className:"title-child",onDoubleClick:()=>{n(!0)},children:r?A.jsx(Q.Input,{defaultValue:t,onBlur:()=>{n(!1)},onChange:s=>{a(s.target.value),o(s.target.value)}}):t})})},RY=E1.WidthProvider(E1.Responsive),NY=({sourceData:t,moduleConfigData:e,fieldMap:r,moduleDataApi:n,enumDataApi:i,onCreateModule:a,onUpdateModule:o,onDeleteModule:s,lang:u,onLayoutChange:l,className:f="layout",cols:c={lg:12,md:10,sm:6,xs:4,xxs:2},rowHeight:h=79})=>{const d=[10,10],{setGlobalData:p}=Oo(),[g,v]=k.useState([]),[m,y]=k.useState(0),[b,w]=k.useState(),[C,_]=k.useState(),[D,x]=k.useState(!1),{i18n:S,t:O}=zr(),[E,P]=k.useState(!1),[F,B]=k.useState(!1),[M,I]=k.useState(!1),j={text:O("pb.text"),calendar:O("calendarText"),statistics:O("chartText")},[,z]=k.useState(c.lg),W=async q=>{const L=q.type==="calendar"?5:4,X=q.type==="calendar"?5:3;if(Array.isArray(g)&&q.type){const V={x:0,y:0,w:L,h:X,title:q.type.includes("chart")?O("chartText"):j[q.type],...q,type:q.type};await(a==null?void 0:a(V).then(G=>{var J,K;if(!G.success){Q.message.error(G.message);return}v([...g,{...V,i:(J=G.data)==null?void 0:J.id,id:(K=G.data)==null?void 0:K.id}])}))}},R=async(q,L)=>{if(g!=null&&g.length){const X={...g.find(G=>G.id===q),...L},V=g.map(G=>G.id===q?X:G);v(V),await(o==null?void 0:o(X).then(G=>{if(!G.success){Q.message.error(G.message);return}}))}},U=async q=>{g!=null&&g.length&&(v(g.filter(L=>L.id!==q)),await(s==null?void 0:s(q||"")))},Z=q=>{l==null||l(q)},ee=(q,L)=>{z(L)},ne=q=>{if(q==="text"){const L={type:q,customData:{title:O("text"),editor:[{type:"paragraph",children:[{text:O("pleaseEnter")}]}]}};W(L)}else q==="statistics"?P(!0):q==="calendar"?B(!0):q!=null&&q.includes("chart")&&I(!0);_({title:"",type:q,w:0,h:0,x:0,y:0})};return k.useEffect(()=>{console.log("modules:",JSON.stringify(g))},[g]),k.useEffect(()=>{p({fieldMap:r,sourceData:t})},[r,p,t]),k.useEffect(()=>{v(e||[])},[e]),k.useEffect(()=>{S.changeLanguage(u||"zh_CN")},[S,u]),A.jsxs("div",{className:"pivot-table",children:[A.jsxs("div",{className:"bitable-block-dashboard",children:[A.jsx("div",{className:"bitable-block-dashboard-toolbar bitable-toolbar",children:A.jsxs("div",{className:"bitable-block-dashboard-toolbar--left",children:[A.jsx("div",{className:"bitable-block-name",children:A.jsx("div",{children:O("title")})}),A.jsx(Wq,{onOk:q=>{ne(q)}})]})}),A.jsx("div",{className:"bitable-block-dashboard__mount",children:A.jsx("div",{className:"dashboard-container",children:A.jsx("div",{className:"dashboard-content-container",children:A.jsx(RY,{onLayoutChange:Z,onBreakpointChange:ee,className:f,compactType:"vertical",cols:c,margin:d,rowHeight:h,draggableHandle:".handle",onWidthChange:(q,L,X)=>{y(q/X-1)},onDragStart:()=>{x(!0)},onDragStop:(q,L,X)=>{R(X.i,{...X}),x(!1)},onResizeStart:()=>{x(!0)},onResizeStop:(q,L,X)=>{R(X.i,{...X}),x(!1)},style:{backgroundSize:`${m}px ${h+d[0]}px`,backgroundImage:D?"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAABPCAYAAAAp8KG9AAAAAXNSR0IArs4c6QAAAlpJREFUeF7t3UFu01AYReGYfaBCuxDUnXVniIUArdgHrVwpJIPgPv3Skc7gMEKqfd/N/TADZ9Dt5++Xp9PBn4evd4c/P99aztGKpxO5z6rR3nD79fzn+/6X19e/P25VXg0jP9B1r/pcHtBt+/Rt3+b+y+fH439ul59uZ6jVIVeDu45fYGIXOO+CnRA4Nq0zOHCnC9YqcGxaZ3DgThesVeDYtM7gEbjzo9SKWmCjgst1LhC40wVrFTg2rTM4cKcL1ipwbFpncOBOF6xV4Ni0zuC+LXO6LLUavXiZ3LTUpovwBSZ2PeE4C3dA4Ny2yuTAlSxcqcC5bZXJgStZuFKBc9sqk0fgyk9SKWyB3rRh0zqDA3e6YK0Cx6Z1BgfudMFaBY5N6wwO3OmCtQocm9YZ3LdlTpelVqMXL5Obltp0Eb7AxK4nHGfhDgic21aZHLiShSsVOLetMjlwJQtXKnBuW2XyCFz5SSqFLdCbNmxaZ3DgThesVeDYtM7gwJ0uWKvAsWmdwYE7XbBWgWPTOoP7tszpstRq9OJlctNSmy7CF5jY9YTjLNwBgXPbKpMDV7JwpQLntlUmB65k4UoFzm2rTB6BKz9JpbAFetOGTesMDtzpgrUKHJvWGRy40wVrFTg2rTM4cKcL1ipwbFpncN+WOV2WWo1evExuWmrTRfgCE7t/T/j/2q3+Ivnz4eXcXoDcZ9Vobxb4B88hCXV99CrarT6r976D4//vdIBqgcBVHHyZwPmNVScEruLgywTOb6w6IXAVB18mcH5j1QmBqzj4MoHzG6tOCFzFwZd5Azm6fF+PNKX9AAAAAElFTkSuQmCC)":void 0,backgroundPosition:`${d[0]}px ${d[0]}px`,minHeight:"100vh"},children:g==null?void 0:g.map(q=>A.jsxs("div",{className:`box-dashboard ${b===q.id?"active":""}`,onClick:()=>{w(q.id)},"data-grid":{i:q.id,x:q.x,y:q.y,w:q.w,h:q.h,minW:2,minH:2},children:[A.jsxs("div",{className:"layout-item-head isCanDrag",children:[A.jsxs("div",{className:"head-inner",children:[A.jsx(IY,{defaultValue:q.title,onChange:L=>R(q.id,{title:L})}),A.jsx("div",{className:"menu-slot",children:A.jsx(Q.Dropdown,{trigger:["click"],menu:{items:[q.type!=="text"?{label:O("configuration"),key:"edit"}:null,{label:O("copy"),key:"copy"},{key:"delete",danger:!0,label:O("delete")}],onClick:({key:L})=>{var X;if(L==="edit")w(q.id),_(q),q.type==="statistics"&&P(!0),(X=q.type)!=null&&X.includes("chart")&&I(!0),q.type==="calendar"&&B(!0);else if(L==="delete")Q.Modal.confirm({title:O("promptTitle"),icon:A.jsx(bw,{}),content:O("promptContentDeleteComponents"),onOk(){U(q.id)}});else if(L==="copy"){const V=JSON.parse(JSON.stringify(q));delete V.id,delete V.i,W(V)}}},children:A.jsx("button",{type:"button",className:"dashboard-grid-menu-button",children:A.jsx("span",{className:"universe-icon",children:A.jsx(FY,{})})})})})]}),A.jsx("div",{className:"handle drag isCanDrag",children:A.jsx("span",{className:"universe-icon drag-icon",children:A.jsx(LY,{})})})]}),A.jsx(zq,{module:q,onUpdate:R,moduleDataApi:n,activeId:b,onClick:()=>{w(q.id)},rowWidth:m,rowHeight:h,onEdit:()=>{var L;w(q.id),_(q),q.type==="statistics"&&P(!0),(L=q.type)!=null&&L.includes("chart")&&I(!0),q.type==="calendar"&&B(!0)},onDelete:()=>{U(q.id)},onCopy:()=>{const L=JSON.parse(JSON.stringify(q));delete L.id,delete L.i,W(L)},onStartDragOrResize:()=>{x(!0)},onStopDragOrResize:()=>{x(!1)}})]},q.id))})})})})]}),A.jsx(Kq,{open:E,selectModuleData:C,onClose:()=>{P(!1)},onOk:({id:q,customData:L,customeStyle:X})=>{q?R(q,{type:"statistics",customData:L,customeStyle:X}):W({type:"statistics",customData:L,customeStyle:X}),P(!1)},moduleDataApi:n,enumDataApi:i}),A.jsx(Jq,{open:F,selectModuleData:C,onClose:()=>{B(!1)},onOk:({id:q,customData:L})=>{q?R(q,{type:"calendar",customData:L}):W({type:"calendar",customData:L}),B(!1)},moduleDataApi:n,enumDataApi:i}),A.jsx(sY,{open:M,selectModuleData:C,onClose:()=>{I(!1)},onOk:({id:q,type:L,customData:X,customeStyle:V})=>{q?R(q,{type:L,customData:X,customeStyle:V}):W({type:L,customData:X,customeStyle:V}),I(!1)},moduleDataApi:n,enumDataApi:i})]})},kY=t=>A.jsx(J8,{children:A.jsx(NY,{...t})});Gn.PivotTable=kY,Object.defineProperty(Gn,Symbol.toStringTag,{value:"Module"})});
|