diff --git a/internal/mcp/apps/overview.html b/internal/mcp/apps/overview.html index 783685563..ab8660f7b 100644 --- a/internal/mcp/apps/overview.html +++ b/internal/mcp/apps/overview.html @@ -8,7 +8,7 @@ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{be=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ye(n):``}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return ye(e.type);case 16:return ye(`Lazy`);case 13:return e.child!==t&&t!==null?ye(`Suspense Fallback`):ye(`Suspense`);case 19:return ye(`SuspenseList`);case 0:case 15:return xe(e.type,!1);case 11:return xe(e.type.render,!1);case 1:return xe(e.type,!0);case 31:return ye(`Activity`);default:return``}}function Ce(e){try{var t=``,n=null;do t+=Se(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var we=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,Re=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,qe=262144,Je=4194304;function Ye(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $e(){var e=Je;return Je<<=1,!(Je&62914560)&&(Je=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,"passive",{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e=F),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return Jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Yn&&er(e,t)?(e=vn(),_n=gn=hn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Bt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=fn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Bt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Ld(Nr,`onSelect`),0>=o,i-=o,Oi=1<<32-He(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Li&&Ai(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Li&&Ai(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Li&&Ai(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Li&&Ai(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ja(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ja(o),x(e,r,o,c)}if(A(o))return v(e,r,o,c);if(O(o)){if(l=O(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,La(o),c);if(o.$$typeof===b)return x(e,r,aa(e,o),c);za(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=x(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,L&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Yl&p)===p:(r&p)===p){p!==0&&p===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ua=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ru|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=j.T,s={};j.T=s,Bs(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,ya(c,r),Eu(e)):zs(e,t,r,Eu(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},Eu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=js(e).queue;Os(e,a,t,re,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},Eu())}function Ns(){return ia(cp)}function Ps(){return Io().memoizedState}function Fs(){return Io().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Eu();e=Ka(n);var r=qa(t,e,n);r!==null&&(Ou(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=Eu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=ii(e,t,n,r),n!==null&&(Ou(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,Eu())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),ql===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return Ou(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:Sd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&Ou(t,e,2)}function Vs(e){var t=e.alternate;return e===I||t!==null&&t===I}function Hs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var Ws={readContext:ia,use:zo,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useLayoutEffect:Eo,useInsertionEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useSyncExternalStore:Eo,useId:Eo,useHostTransitionStatus:Eo,useFormState:Eo,useActionState:Eo,useOptimistic:Eo,useMemoCache:Eo,useCacheRefresh:Eo};Ws.useEffectEvent=Eo;var Gs={readContext:ia,use:zo,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(xo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(xo){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ls.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Zo(e);var t=e.queue,n=Rs.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Fo(),e,t)},useTransition:function(){var e=Zo(!1);return e=Os.bind(null,I,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,a=Fo();if(Li){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));Yl&127||Ko(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,hs(Jo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,o,n,t),null),n},useId:function(){var e=Fo(),t=ql.identifierPrefix;if(Li){var n=ki,r=Oi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[dt]=t,o[ft]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&zc(t)}}return Wc(t),Bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=de.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Fi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Vi(t,!0)}else e=Qd(e).createTextNode(r),e[dt]=t,t.stateNode=e}return Wc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[dt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return Wc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[dt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),a=!1}else a=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Hc(t,t.updateQueue),Wc(t),null);case 4:return me(),e===null&&Nd(t.stateNode.containerInfo),Wc(t),null;case 10:return Qi(t.type),Wc(t),null;case 19:if(se(mo),r=t.memoizedState,r===null)return Wc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Uc(r,!1);else{if(nu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,Uc(r,!1),e=o.updateQueue,t.updateQueue=e,Hc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return ce(mo,mo.current&1|2),Li&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>mu&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Hc(t,e),Uc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Li)return Wc(t),null}else 2*Ae()-r.renderingStartTime>mu&&n!==536870912&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Wc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=mo.current,ce(mo,a?n&1|2:n&1),Li&&Ai(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Wc(t),t.subtreeFlags&6&&(t.flags|=8192)):Wc(t),n=t.updateQueue,n!==null&&Hc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&se(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),Wc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Kc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),me(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ge(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(mo),null;case 4:return me(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&se(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function qc(e,t){switch(Ni(t),t.tag){case 3:Qi(ua),me();break;case 26:case 27:case 5:ge(t);break;case 4:me();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:se(mo);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&se(xa);break;case 24:Qi(ua)}}function Jc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){rd(t,t.return,e)}}function Yc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){rd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){rd(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){rd(e,e.return,t)}}}function Zc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){rd(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){rd(e,t,n)}}function $c(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){rd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){rd(e,t,n)}else n.current=null}}function el(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){rd(e,e.return,t)}}function tl(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[ft]=t}catch(t){rd(e,e.return,t)}}function nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&lf(e.type)||e.tag===4}function rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&lf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[dt]=e,t[ft]=n}catch(t){rd(e,e.return,t)}}var sl=!1,cl=!1,ll=!1,ul=typeof WeakSet==`function`?WeakSet:Set,dl=null;function fl(e,t){if(e=e.containerInfo,Xd=_p,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},_p=!1,dl=t;dl!==null;)if(t=dl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,dl=e;else for(;dl!==null;){switch(t=dl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Kd(o,r,n),o[dt]=e,wt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,j.T=null,n=Su,Su=null;var o=vu,s=bu;if(_u=0,yu=vu=null,bu=0,L&6)throw Error(i(331));var c=L;if(L|=4,Hl(o.current),Pl(o,o.current,s,n),L=c,hd(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{M.p=a,j.T=r,$u(e,t)}}function nd(e,t,n){t=bi(n,t),t=ic(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(tt(e,2),B(e))}function rd(e,t,n){if(e.tag===3)nd(e,e,n);else for(;t!==null;){if(t.tag===3){nd(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gu===null||!gu.has(r))){e=bi(n,e),n=ac(2),r=qa(t,n,2),r!==null&&(oc(n,r,t,e),tt(r,2),B(r));break}}t=t.return}}function id(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Kl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(eu=!0,i.add(n),e=ad.bind(null,e,t,n),t.then(e,e))}function ad(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(Yl&n)===n&&(nu===4||nu===3&&(Yl&62914560)===Yl&&300>Ae()-du?!(L&2)&&Fu(e,0):au|=n,su===Yl&&(su=0)),B(e)}function od(e,t){t===0&&(t=$e()),e=ai(e,t),e!==null&&(tt(e,t),B(e))}function sd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),od(e,n)}function cd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),od(e,n)}function ld(e,t){return Ee(e,t)}var ud=null,dd=null,fd=!1,pd=!1,z=!1,md=0;function B(e){e!==dd&&e.next===null&&(dd===null?ud=dd=e:dd=dd.next=e),pd=!0,fd||(fd=!0,xd())}function hd(e,t){if(!z&&pd){z=!0;do for(var n=!1,r=ud;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=Yl,a=Xe(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,bd(r,a))}r=r.next}while(n);z=!1}}function gd(){_d()}function _d(){pd=fd=!1;var e=0;md!==0&&rf()&&(e=md);for(var t=Ae(),n=null,r=ud;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?ud=i:n.next=i,i===null&&(dd=n)):(n=r,(e!==0||a&3)&&(pd=!0)),r=i}_u!==0&&_u!==5||hd(e,!1),md!==0&&(md=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),wt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=Ct(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);wt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=Ct(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=Ct(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=de.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ht(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),wt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ht(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,wt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),wt(r),Kd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,wt(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,wt(a),a):(r=n,(a=wf.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),wt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,wt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=pu()}))(),hu=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],gu=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],_u=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],vu=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],yu=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],bu=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],xu={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Su={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},Cu={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:hu,brand:gu,ok:_u,warn:vu,bad:yu,info:bu},defaultRadius:`md`,fontFamily:Su.body,fontFamilyMonospace:Su.display,headings:{fontFamily:Su.body,fontWeight:`600`},cursorType:`pointer`},wu=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":xu.light.muted},dark:{}}),Tu=Gt(Cu);function Eu({dark:e,children:t}){return(0,N.jsx)(Wt,{theme:Tu,cssVariablesResolver:wu,forceColorScheme:e?`dark`:`light`,children:(0,N.jsx)(ls,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function Du({title:e,summary:t,onRefresh:n,disabled:r}){return(0,N.jsxs)(nc,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,N.jsxs)(F,{miw:0,children:[(0,N.jsx)(nu,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,N.jsx)(uc,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,N.jsx)(yl,{label:`Refresh this view`,children:(0,N.jsx)(Ks,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,N.jsx)(cu,{size:15,weight:`bold`})})})]})}function Ou({error:e,loading:t,retry:n}){return e?(0,N.jsx)(ac,{color:`bad`,m:`md`,radius:`md`,children:(0,N.jsxs)(nc,{justify:`space-between`,children:[(0,N.jsx)(uc,{size:`sm`,children:e}),n&&(0,N.jsx)(Sc,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,N.jsxs)(wc,{mih:160,p:`xl`,children:[(0,N.jsx)(Rs,{size:`sm`}),(0,N.jsx)(uc,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function ku({icon:e,title:t,children:n,tall:r=!1}){return(0,N.jsx)(wc,{mih:r?220:130,p:`xl`,children:(0,N.jsxs)(nc,{wrap:`nowrap`,children:[(0,N.jsx)(Yl,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,N.jsxs)(F,{children:[(0,N.jsx)(uc,{fw:700,size:`sm`,children:t}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function Au({left:e,right:t}){return(0,N.jsxs)(nc,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:e}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function ju({label:e,value:t,color:n}){return(0,N.jsxs)(ls,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:e}),(0,N.jsx)(uc,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function Mu(e,t=8){let[n,r]=(0,E.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,E.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function Nu({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,N.jsxs)(nc,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,N.jsxs)(uc,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,N.jsx)(Xc,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function Pu(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}var Fu=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function Iu(e){return`${(e*100).toFixed(e>=.1?1:2)}%`}function Lu(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(e>=100?0:1)}ms`}function Ru(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var zu=c({BIGINT_FORMAT_RANGES:()=>tf,CONSTANT_CATCH:()=>cf,Class:()=>rf,NUMBER_FORMAT_RANGES:()=>ef,aborted:()=>Cd,allowsEval:()=>Xd,assert:()=>Gu,assertEqual:()=>Bu,assertIs:()=>Uu,assertNever:()=>Wu,assertNotEqual:()=>Vu,assignProp:()=>ed,attachSchema:()=>Dd,base64ToUint8Array:()=>Pd,base64urlToUint8Array:()=>Id,cached:()=>Ju,captureStackTrace:()=>Yd,cleanEnum:()=>Nd,cleanRegex:()=>Xu,clone:()=>pd,cloneDef:()=>nd,codePointLength:()=>Ad,constantCatch:()=>qd,createTransparentProxy:()=>md,defineLazy:()=>Qu,defineLazyInternal:()=>Gd,esc:()=>od,escapeRegex:()=>fd,explicitlyAborted:()=>wd,extend:()=>vd,finalizeIssue:()=>Od,floatSafeRemainder:()=>Zu,getElementAtPath:()=>rd,getEnumValues:()=>Ku,getLengthableOrigin:()=>jd,getParsedType:()=>Zd,getSizableOrigin:()=>kd,hexToUint8Array:()=>Rd,hide:()=>Hd,installLazyProp:()=>Kd,isObject:()=>cd,isPlainObject:()=>ld,issue:()=>Md,joinValues:()=>R,jsonStringifyReplacer:()=>qu,members:()=>Bd,merge:()=>bd,mergeDefs:()=>td,normalizeParams:()=>z,nullish:()=>Yu,numKeys:()=>dd,objectClone:()=>$u,omit:()=>_d,optionalKeys:()=>hd,own:()=>Vd,parsedType:()=>V,partial:()=>xd,pick:()=>gd,prefixIssues:()=>Td,primitiveTypes:()=>$d,promiseAllObject:()=>id,propertyKeyTypes:()=>Qd,randomString:()=>ad,required:()=>Sd,safeExtend:()=>yd,shallowClone:()=>ud,slugify:()=>sd,stringifyPrimitive:()=>B,toZod:()=>Hu,uint8ArrayToBase64:()=>Fd,uint8ArrayToBase64url:()=>Ld,uint8ArrayToHex:()=>zd,unwrapMessage:()=>Ed});function Bu(e){return e}function Vu(e){return e}function Hu(){return e=>e}function Uu(e){}function Wu(e){throw Error(`Unexpected value in exhaustive check`)}function Gu(e){}function Ku(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function R(e,t=`|`){return e.map(e=>B(e)).join(t)}function qu(e,t){return typeof t==`bigint`?t.toString():t}function Ju(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Yu(e){return e==null}function Xu(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Zu(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function id(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function md(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function B(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function hd(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function gd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return pd(e,td(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&ed(e,r,n.shape[r])}return ed(this,`shape`,e),e},checks:[]}))}function _d(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return pd(e,td(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return ed(this,`shape`,r),r},checks:[]}))}function vd(e,t){if(!ld(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return pd(e,td(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ed(this,`shape`,n),n}}))}function yd(e,t){if(!ld(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return pd(e,td(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ed(this,`shape`,n),n}}))}function bd(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return pd(e,td(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return ed(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function xd(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return pd(t,td(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return ed(this,`shape`,i),i},checks:[]}))}function Sd(e,t,n){return pd(t,td(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return ed(this,`shape`,i),i}}))}function Cd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ed(e){return typeof e==`string`?e:e?.message}function Dd(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Pd(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function Bd(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ud(e,n,r.value)}}function Vd(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Hd(e,t,n){return Vd(e,t,n,!1)}function Ud(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Vd(this,t,n.bind(this))},set(e){Vd(this,t,e)}})}function Wd(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function Gd(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&af!==e._zod){af=void 0;return}af=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,sf);let e=of;of=!1;try{let r=n(this);return of?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),of||=e,r}catch(n){throw delete this[t],of||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Kd(e,t,n,r){let i=Wd(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function qd(e){let t=()=>e;return t[cf]=!0,t}var Jd,Yd,Xd,Zd,Qd,$d,ef,tf,nf,rf,af,of,sf,cf,H=o((()=>{yf(),Jd=Symbol(`evaluating`),Yd=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},Xd=Ju(()=>{if(vf.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Zd=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},Qd=new Set([`string`,`number`,`symbol`]),$d=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),ef={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},tf={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},nf=/[\uD800-\uDBFF]/,rf=class{constructor(...e){}},of=!1,sf={configurable:!0,get(){of=!0}},cf=`~constantCatch`}));function lf(e){let t=mf;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return mf=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){pf.value=new a(r);try{Object.defineProperty(n,"_zod",pf)}finally{pf.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Bd(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?lf(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function uf(e){return e&&Object.assign(vf,e),vf}var df,ff,pf,mf,hf,gf,_f,vf,yf=o((()=>{H(),ff=Object.freeze({status:`aborted`}),pf={value:void 0,enumerable:!1},mf=`captureStackTrace`in Error?Error:null,hf=Symbol(`zod_brand`),gf=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},_f=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(df=globalThis).__zod_globalConfig??(df.__zod_globalConfig={}),vf=globalThis.__zod_globalConfig}));function bf(){let e=this._zod;return e.message??=JSON.stringify(e.def,qu,2),e.message}function xf(e){this._zod.message=e}function Sf(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Cf(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Sf(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function wf(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Df(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${Ef(e.path)}`);return t.join(` +`).replace(Vd,``)}function Ud(e,t){return t=Hd(t),Hd(e)===t}function Wd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Jt(e,``+r);break;case`className`:Nt(e,`class`,r);break;case`tabIndex`:Nt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Nt(e,n,r);break;case`style`:Zt(e,r,o);break;case`data`:if(t!==`object`){Nt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Wd(e,t,`name`,a.name,a,null),Wd(e,t,`formEncType`,a.formEncType,a,null),Wd(e,t,`formMethod`,a.formMethod,a,null),Wd(e,t,`formTarget`,a.formTarget,a,null)):(Wd(e,t,`encType`,a.encType,a,null),Wd(e,t,`method`,a.method,a,null),Wd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=tn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:jd(`beforetoggle`,e),jd(`toggle`,e),Mt(e,`popover`,r);break;case`xlinkActuate`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Mt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),wt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=Ct(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);wt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=Ct(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=Ct(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=de.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ht(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),wt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ht(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,wt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),wt(r),Kd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,wt(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,wt(a),a):(r=n,(a=wf.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),wt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,wt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=pu()}))(),hu=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],gu=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],_u=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],vu=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],yu=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],bu=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],xu={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Su={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},Cu={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:hu,brand:gu,ok:_u,warn:vu,bad:yu,info:bu},defaultRadius:`md`,fontFamily:Su.body,fontFamilyMonospace:Su.display,headings:{fontFamily:Su.body,fontWeight:`600`},cursorType:`pointer`},wu=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":xu.light.muted},dark:{}}),Tu=Gt(Cu);function Eu({dark:e,children:t}){return(0,N.jsx)(Wt,{theme:Tu,cssVariablesResolver:wu,forceColorScheme:e?`dark`:`light`,children:(0,N.jsx)(ls,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function Du({title:e,summary:t,onRefresh:n,disabled:r}){return(0,N.jsxs)(nc,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,N.jsxs)(F,{miw:0,children:[(0,N.jsx)(nu,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,N.jsx)(uc,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,N.jsx)(yl,{label:`Refresh this view`,children:(0,N.jsx)(Ks,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,N.jsx)(cu,{size:15,weight:`bold`})})})]})}function Ou({error:e,loading:t,retry:n}){return e?(0,N.jsx)(ac,{color:`bad`,m:`md`,radius:`md`,children:(0,N.jsxs)(nc,{justify:`space-between`,children:[(0,N.jsx)(uc,{size:`sm`,children:e}),n&&(0,N.jsx)(Sc,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,N.jsxs)(wc,{mih:160,p:`xl`,children:[(0,N.jsx)(Rs,{size:`sm`}),(0,N.jsx)(uc,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function ku({icon:e,title:t,children:n,tall:r=!1}){return(0,N.jsx)(wc,{mih:r?220:130,p:`xl`,children:(0,N.jsxs)(nc,{wrap:`nowrap`,children:[(0,N.jsx)(Yl,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,N.jsxs)(F,{children:[(0,N.jsx)(uc,{fw:700,size:`sm`,children:t}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function Au({left:e,right:t}){return(0,N.jsxs)(nc,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:e}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function ju({label:e,value:t,color:n}){return(0,N.jsxs)(ls,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:e}),(0,N.jsx)(uc,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function Mu(e,t=8){let[n,r]=(0,E.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,E.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function Nu({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,N.jsxs)(nc,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,N.jsxs)(uc,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,N.jsx)(Xc,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function Pu(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}var Fu=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function Iu(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function Lu(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${Lu(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function Ru(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var zu=c({BIGINT_FORMAT_RANGES:()=>tf,CONSTANT_CATCH:()=>cf,Class:()=>rf,NUMBER_FORMAT_RANGES:()=>ef,aborted:()=>Cd,allowsEval:()=>Xd,assert:()=>Gu,assertEqual:()=>Bu,assertIs:()=>Uu,assertNever:()=>Wu,assertNotEqual:()=>Vu,assignProp:()=>ed,attachSchema:()=>Dd,base64ToUint8Array:()=>Pd,base64urlToUint8Array:()=>Id,cached:()=>Ju,captureStackTrace:()=>Yd,cleanEnum:()=>Nd,cleanRegex:()=>Xu,clone:()=>pd,cloneDef:()=>nd,codePointLength:()=>Ad,constantCatch:()=>qd,createTransparentProxy:()=>md,defineLazy:()=>Qu,defineLazyInternal:()=>Gd,esc:()=>od,escapeRegex:()=>fd,explicitlyAborted:()=>wd,extend:()=>vd,finalizeIssue:()=>Od,floatSafeRemainder:()=>Zu,getElementAtPath:()=>rd,getEnumValues:()=>Ku,getLengthableOrigin:()=>jd,getParsedType:()=>Zd,getSizableOrigin:()=>kd,hexToUint8Array:()=>Rd,hide:()=>Hd,installLazyProp:()=>Kd,isObject:()=>cd,isPlainObject:()=>ld,issue:()=>Md,joinValues:()=>R,jsonStringifyReplacer:()=>qu,members:()=>Bd,merge:()=>bd,mergeDefs:()=>td,normalizeParams:()=>z,nullish:()=>Yu,numKeys:()=>dd,objectClone:()=>$u,omit:()=>_d,optionalKeys:()=>hd,own:()=>Vd,parsedType:()=>V,partial:()=>xd,pick:()=>gd,prefixIssues:()=>Td,primitiveTypes:()=>$d,promiseAllObject:()=>id,propertyKeyTypes:()=>Qd,randomString:()=>ad,required:()=>Sd,safeExtend:()=>yd,shallowClone:()=>ud,slugify:()=>sd,stringifyPrimitive:()=>B,toZod:()=>Hu,uint8ArrayToBase64:()=>Fd,uint8ArrayToBase64url:()=>Ld,uint8ArrayToHex:()=>zd,unwrapMessage:()=>Ed});function Bu(e){return e}function Vu(e){return e}function Hu(){return e=>e}function Uu(e){}function Wu(e){throw Error(`Unexpected value in exhaustive check`)}function Gu(e){}function Ku(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function R(e,t=`|`){return e.map(e=>B(e)).join(t)}function qu(e,t){return typeof t==`bigint`?t.toString():t}function Ju(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Yu(e){return e==null}function Xu(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Zu(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function id(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function md(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function B(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function hd(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function gd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return pd(e,td(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&ed(e,r,n.shape[r])}return ed(this,`shape`,e),e},checks:[]}))}function _d(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return pd(e,td(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return ed(this,`shape`,r),r},checks:[]}))}function vd(e,t){if(!ld(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return pd(e,td(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ed(this,`shape`,n),n}}))}function yd(e,t){if(!ld(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return pd(e,td(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ed(this,`shape`,n),n}}))}function bd(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return pd(e,td(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return ed(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function xd(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return pd(t,td(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return ed(this,`shape`,i),i},checks:[]}))}function Sd(e,t,n){return pd(t,td(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return ed(this,`shape`,i),i}}))}function Cd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ed(e){return typeof e==`string`?e:e?.message}function Dd(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Pd(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function Bd(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ud(e,n,r.value)}}function Vd(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Hd(e,t,n){return Vd(e,t,n,!1)}function Ud(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Vd(this,t,n.bind(this))},set(e){Vd(this,t,e)}})}function Wd(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function Gd(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&af!==e._zod){af=void 0;return}af=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,sf);let e=of;of=!1;try{let r=n(this);return of?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),of||=e,r}catch(n){throw delete this[t],of||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Kd(e,t,n,r){let i=Wd(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function qd(e){let t=()=>e;return t[cf]=!0,t}var Jd,Yd,Xd,Zd,Qd,$d,ef,tf,nf,rf,af,of,sf,cf,H=o((()=>{yf(),Jd=Symbol(`evaluating`),Yd=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},Xd=Ju(()=>{if(vf.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Zd=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},Qd=new Set([`string`,`number`,`symbol`]),$d=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),ef={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},tf={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},nf=/[\uD800-\uDBFF]/,rf=class{constructor(...e){}},of=!1,sf={configurable:!0,get(){of=!0}},cf=`~constantCatch`}));function lf(e){let t=mf;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return mf=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){pf.value=new a(r);try{Object.defineProperty(n,"_zod",pf)}finally{pf.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Bd(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?lf(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function uf(e){return e&&Object.assign(vf,e),vf}var df,ff,pf,mf,hf,gf,_f,vf,yf=o((()=>{H(),ff=Object.freeze({status:`aborted`}),pf={value:void 0,enumerable:!1},mf=`captureStackTrace`in Error?Error:null,hf=Symbol(`zod_brand`),gf=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},_f=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(df=globalThis).__zod_globalConfig??(df.__zod_globalConfig={}),vf=globalThis.__zod_globalConfig}));function bf(){let e=this._zod;return e.message??=JSON.stringify(e.def,qu,2),e.message}function xf(e){this._zod.message=e}function Sf(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Cf(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Sf(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function wf(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Df(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${Ef(e.path)}`);return t.join(` `)}var Of,kf,Af,jf,Mf,Nf,Pf,Ff=o((()=>{yf(),H(),Of={get:bf,set:xf,enumerable:!0,configurable:!0},kf={value:void 0,enumerable:!1},Af={value:void 0,enumerable:!1},jf=new WeakSet([Object.prototype,Error.prototype]),Mf=(e,t)=>{e.name=`$ZodError`,kf.value=e._zod,Object.defineProperty(e,"_zod",kf),Af.value=t,Object.defineProperty(e,"issues",Af),kf.value=void 0,Af.value=void 0,Object.defineProperty(e,"message",Of);let n=Object.getPrototypeOf(e);jf.has(n)||(jf.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Nf=U(`$ZodError`,Mf),Pf=U(`$ZodError`,Mf,void 0,{Parent:Error})}));function If(e,t){return{callee:t?.callee??e,Err:t?.Err}}function Lf(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[qf]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new gf;return a.issues.length===0}var Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp=o((()=>{yf(),Ff(),H(),Rf=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new gf;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Od(e,o,uf())));throw Yd(n,a?.callee??t),n}return s.value};return t},zf=Rf(Pf),Bf=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Od(e,o,uf())));throw Yd(n,a?.callee??t),n}return s.value};return t},Vf=Bf(Pf),Hf=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new gf;return a.issues.length?{success:!1,error:new(e??Nf)(a.issues.map(e=>Od(e,i,uf())))}:{success:!0,data:a.value}},Uf=Hf(Pf),Wf=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Od(e,i,uf())))}:{success:!0,data:a.value}},Gf=Wf(Pf),Kf=Symbol.for(`zod.compile.invalid`),qf=Symbol.for(`zod.compile.fallback`),Jf=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==Kf||Lf(e,t,n)}),Yf=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Xf=e=>{let t=Rf(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,If(n,a))};return n},Zf=Xf(Pf),Qf=e=>{let t=Rf(e),n=(e,r,i,a)=>t(e,r,i,If(n,a));return n},$f=Qf(Pf),ep=e=>{let t=Bf(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,If(n,a))};return n},tp=ep(Pf),np=e=>{let t=Bf(e),n=async(e,r,i,a)=>await t(e,r,i,If(n,a));return n},rp=np(Pf),ip=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Hf(e)(t,n,i)},ap=ip(Pf),op=e=>(t,n,r)=>Hf(e)(t,n,r),sp=op(Pf),cp=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Wf(e)(t,n,i)},lp=cp(Pf),up=e=>async(t,n,r)=>Wf(e)(t,n,r),dp=up(Pf)})),pp=c({base64:()=>qp,base64url:()=>Jp,bigint:()=>rm,boolean:()=>om,browserEmail:()=>Bp,cidrv4:()=>Gp,cidrv6:()=>Kp,creditCard:()=>$p,cuid:()=>Sp,cuid2:()=>Cp,date:()=>tm,datetime:()=>yp,domain:()=>Xp,duration:()=>Op,e164:()=>Qp,email:()=>Fp,emoji:()=>hp,extendedDuration:()=>kp,guid:()=>Ap,hex:()=>dm,hostname:()=>Yp,html5Email:()=>Ip,httpProtocol:()=>Zp,idnEmail:()=>zp,integer:()=>im,ipv4:()=>Hp,ipv6:()=>Up,ksuid:()=>Ep,lowercase:()=>lm,mac:()=>Wp,md5_base64:()=>pm,md5_base64url:()=>mm,md5_hex:()=>fm,nanoid:()=>Dp,nanoidOfLength:()=>mp,null:()=>sm,number:()=>am,rfc5322Email:()=>Lp,sha1_base64:()=>gm,sha1_base64url:()=>_m,sha1_hex:()=>hm,sha256_base64:()=>ym,sha256_base64url:()=>bm,sha256_hex:()=>vm,sha384_base64:()=>Sm,sha384_base64url:()=>Cm,sha384_hex:()=>xm,sha512_base64:()=>Tm,sha512_base64url:()=>Em,sha512_hex:()=>wm,string:()=>nm,time:()=>vp,ulid:()=>wp,undefined:()=>cm,unicodeEmail:()=>Rp,uppercase:()=>um,uuid:()=>jp,uuid4:()=>Mp,uuid6:()=>Np,uuid7:()=>Pp,xid:()=>Tp});function mp(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function hp(){return new RegExp(Vp,`u`)}function gp(e){return RegExp(`^${e}$`)}function _p(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function vp(e){return RegExp(`^${_p(e)}$`)}function yp(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${_p({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${_p({precision:e.precision})}`:n;return RegExp(`^${em}T(?:${r})$`)}function bp(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function xp(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm=o((()=>{H(),Sp=/^[cC][0-9a-z]{6,}$/,Cp=/^[0-9a-z]+$/,wp=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Tp=/^[0-9a-vA-V]{20}$/,Ep=/^[A-Za-z0-9]{27}$/,Dp=/^[a-zA-Z0-9_-]{21}$/,Op=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kp=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ap=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,jp=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Mp=jp(4),Np=jp(6),Pp=jp(7),Fp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ip=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Lp=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Rp=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,zp=Rp,Bp=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Vp=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,Hp=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Up=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Wp=e=>{let t=fd(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Gp=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Kp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qp=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Jp=/^[A-Za-z0-9_-]*$/,Yp=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Xp=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Zp=/^https?$/,Qp=/^\+[1-9]\d{6,14}$/,$p=/^\d(?:[ -]?\d){11,18}$/,em=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,tm=gp(em),nm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},rm=/^-?\d+n?$/,im=/^-?\d+$/,am=/^-?\d+(?:\.\d+)?$/,om=/^(?:true|false)$/i,sm=/^null$/i,cm=/^undefined$/i,lm=/^[^A-Z]*$/,um=/^[^a-z]*$/,dm=/^[0-9a-fA-F]*$/,fm=/^[0-9a-fA-F]{32}$/,pm=bp(22,`==`),mm=xp(22),hm=/^[0-9a-fA-F]{40}$/,gm=bp(27,`=`),_m=xp(27),vm=/^[0-9a-fA-F]{64}$/,ym=bp(43,`=`),bm=xp(43),xm=/^[0-9a-fA-F]{96}$/,Sm=bp(64,``),Cm=xp(64),wm=/^[0-9a-fA-F]{128}$/,Tm=bp(86,`==`),Em=xp(86)}));function Om(e,t,n){e.issues.length&&t.issues.push(...Td(n,e.issues))}var km,Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm,Gm,Km,qm,Jm,Ym,Xm,Zm,Qm,$m,eh=o((()=>{yf(),Dm(),H(),km=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Am=e=>{let t=e.value;return!Yu(t)&&t.size!==void 0},jm=e=>{let t=e.value;return!Yu(t)&&t.length!==void 0},Mm={number:`number`,bigint:`bigint`,object:`date`},Nm=U(`$ZodCheckLessThan`,(e,t)=>{km.init(e,t);let n=Mm[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{km.init(e,t);let n=Mm[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Mm[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fm=U(`$ZodCheckMultipleOf`,(e,t)=>{km.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Zu(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Im=U(`$ZodCheckNumberFormat`,(e,t)=>{km.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ef[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=im)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Lm=U(`$ZodCheckBigIntFormat`,(e,t)=>{km.init(e,t);let[n,r]=tf[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Rm=U(`$ZodCheckMaxSize`,(e,t)=>{var n;km.init(e,t),(n=e._zod.def).when??(n.when=Am),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:kd(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zm=U(`$ZodCheckMinSize`,(e,t)=>{var n;km.init(e,t),(n=e._zod.def).when??(n.when=Am),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:kd(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bm=U(`$ZodCheckSizeEquals`,(e,t)=>{var n;km.init(e,t),(n=e._zod.def).when??(n.when=Am),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:kd(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Vm=U(`$ZodCheckMaxLength`,(e,t)=>{var n;km.init(e,t),(n=e._zod.def).when??(n.when=jm),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ad(r):i)<=t.maximum)return;let a=jd(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Hm=U(`$ZodCheckMinLength`,(e,t)=>{var n;km.init(e,t),(n=e._zod.def).when??(n.when=jm),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=jd(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Um=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;km.init(e,t),(n=e._zod.def).when??(n.when=jm),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ad(r):i;if(a===t.length)return;let o=jd(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Wm=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;km.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Gm=U(`$ZodCheckRegex`,(e,t)=>{Wm.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Km=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=lm,Wm.init(e,t)}),qm=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=um,Wm.init(e,t)}),Jm=U(`$ZodCheckIncludes`,(e,t)=>{km.init(e,t);let n=fd(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ym=U(`$ZodCheckStartsWith`,(e,t)=>{km.init(e,t);let n=RegExp(`^${fd(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Xm=U(`$ZodCheckEndsWith`,(e,t)=>{km.init(e,t);let n=RegExp(`.*${fd(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Zm=U(`$ZodCheckProperty`,(e,t)=>{km.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Om(n,e,t.property));Om(n,e,t.property)}}),Qm=U(`$ZodCheckMimeType`,(e,t)=>{km.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),$m=U(`$ZodCheckOverwrite`,(e,t)=>{km.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),th,nh=o((()=>{th=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` `)}\n};`)(...Object.values(this.closed))}}})),rh,ih=o((()=>{rh={major:4,minor:5,patch:4}}));function ah(e){return{validate:t=>{try{return Bh(Uf(e,t))}catch{return Gf(e,t).then(Bh)}},vendor:`zod`,version:1}}function oh(e,t){if(!t.normalize&&t.protocol?.source===Zp.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function sh(e){return e.replace(Kh,``)}function ch(e,t){return t.lastIndex=0,t.test(e.hostname)}function lh(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function uh(e){if(!og.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function dh(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:uh(n)}function fh(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function ph(e){if(!Jp.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return fh(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function mh(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function hh(e){return $p.test(e)?mh(e.replace(mg,``)):!1}function gh(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function _h(e,t,n){e.issues.length&&t.issues.push(...Td(n,e.issues)),t.value[n]=e.value}function vh(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Td(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function yh(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Mg,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=hd(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function bh(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>vh(e,n,i,t,u,d))):vh(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function xh(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Cd(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Od(e,r,uf())))}),t)}function Sh(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>Od(e,r,uf())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Ch(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function wh(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ld(e)&&ld(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=wh(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=wh(t.value,n.value);if(!c.valid){if(Cd(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function Eh(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Dh(e,t,n){e.issues.length&&t.issues.push(...Td(n,e.issues)),t.value[n]=e.value}function Oh(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...Td(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function kh(e,t,n,r,i,a,o){e.issues.length&&(Qd.has(typeof r)?n.issues.push(...Td(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>Od(e,o,uf()))})),t.issues.length&&(Qd.has(typeof r)?n.issues.push(...Td(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>Od(e,o,uf()))})),n.value.set(e.value,t.value)}function Ah(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function jh(e,t){return e.value=t.issues.length?void 0:t.value,e}function Mh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Nh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ph(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Od(e,r,uf()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function Fh(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function Ih(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>Lh(e,r,t.out,n)):Lh(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>Lh(e,r,t.in,n)):Lh(e,r,t.in,n)}}function Lh(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function Rh(e){return e.memo||(e.value=Object.freeze(e.value)),e}function zh(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Md(e))}}var W,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,Qh,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg,hg,gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg,Dg,Og,kg,Ag,jg,Mg,Ng,Pg,Fg,Ig,Lg,Rg,zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_,f_=o((()=>{eh(),yf(),nh(),fp(),Dm(),H(),ih(),W=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rh;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Cd(t),a;for(let o of n){if(o._zod.def.when){if(wd(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new gf;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Dd(t.issues,n,e),i||=Cd(t,n))});else{if(t.issues.length===n)continue;Dd(t.issues,n,e),i||=Cd(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Cd(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new gf;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new gf;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Hd(this,`~standard`,ah(this))},set"~standard"(e){Vd(this,`~standard`,e)}}),Bh=e=>e.success?{value:e.data}:{issues:e.error?.issues},Vh=U(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??nm(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Hh=U(`$ZodStringFormat`,(e,t)=>{Wm.init(e,t),Vh.init(e,t)}),Uh=U(`$ZodGUID`,(e,t)=>{t.pattern??=Ap,Hh.init(e,t)}),Wh=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=jp(e)}else t.pattern??=jp();Hh.init(e,t)}),Gh=U(`$ZodEmail`,(e,t)=>{t.pattern??=Fp,Hh.init(e,t)}),Kh=/[\t\n\r]/g,qh=U(`$ZodURL`,(e,t)=>{Hh.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=oh(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!ch(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!lh(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:sh(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Jh=U(`$ZodEmoji`,(e,t)=>{t.pattern??=hp(),Hh.init(e,t)}),Yh=U(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Dp:mp(t.length),Hh.init(e,t)}),Xh=U(`$ZodCUID`,(e,t)=>{t.pattern??=Sp,Hh.init(e,t)}),Zh=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Cp,Hh.init(e,t)}),Qh=U(`$ZodULID`,(e,t)=>{t.pattern??=wp,Hh.init(e,t)}),$h=U(`$ZodXID`,(e,t)=>{t.pattern??=Tp,Hh.init(e,t)}),eg=U(`$ZodKSUID`,(e,t)=>{t.pattern??=Ep,Hh.init(e,t)}),tg=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=yp(t),Hh.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),ng=U(`$ZodISODate`,(e,t)=>{t.pattern??=tm,Hh.init(e,t)}),rg=U(`$ZodISOTime`,(e,t)=>{t.pattern??=vp(t),Hh.init(e,t)}),ig=U(`$ZodISODuration`,(e,t)=>{t.pattern??=Op,Hh.init(e,t)}),ag=U(`$ZodIPv4`,(e,t)=>{t.pattern??=Hp,Hh.init(e,t),e._zod.bag.format=`ipv4`}),og=/^[0-9a-fA-F:.]+$/,sg=U(`$ZodIPv6`,(e,t)=>{t.pattern??=Up,Hh.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{uh(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),cg=U(`$ZodMAC`,(e,t)=>{t.pattern??=Wp(t.delimiter),Hh.init(e,t),e._zod.bag.format=`mac`}),lg=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Gp,Hh.init(e,t)}),ug=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Kp,Hh.init(e,t),e._zod.check=n=>{dh(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),dg=U(`$ZodBase64`,(e,t)=>{t.pattern??=qp,Hh.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{fh(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),fg=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=Jp,Hh.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{ph(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),pg=U(`$ZodE164`,(e,t)=>{t.pattern??=Qp,Hh.init(e,t)}),mg=/[- ]/g,hg=U(`$ZodCreditCard`,(e,t)=>{t.pattern??=$p,Hh.init(e,t),e._zod.check=n=>{hh(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),gg=U(`$ZodJWT`,(e,t)=>{Hh.init(e,t),e._zod.check=n=>{gh(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),_g=U(`$ZodCustomStringFormat`,(e,t)=>{Hh.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),vg=U(`$ZodNumber`,(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??am,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),yg=U(`$ZodNumberFormat`,(e,t)=>{Im.init(e,t),vg.init(e,t)}),bg=U(`$ZodBoolean`,(e,t)=>{W.init(e,t),e._zod.pattern=om,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),xg=U(`$ZodBigInt`,(e,t)=>{W.init(e,t),e._zod.pattern=rm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),Sg=U(`$ZodBigIntFormat`,(e,t)=>{Lm.init(e,t),xg.init(e,t)}),Cg=U(`$ZodSymbol`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),wg=U(`$ZodUndefined`,(e,t)=>{W.init(e,t),e._zod.pattern=cm,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Tg=U(`$ZodNull`,(e,t)=>{W.init(e,t),e._zod.pattern=sm,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Eg=U(`$ZodAny`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),Dg=U(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),Og=U(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),kg=U(`$ZodVoid`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),Ag=U(`$ZodDate`,(e,t)=>{W.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),jg=U(`$ZodArray`,(e,t)=>{W.init(e,t);let n=vf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;e_h(t,r,e))):_h(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),Mg=[],Ng=new WeakMap,Pg=U(`$ZodObject`,(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Ng.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),Ng.set(t,n),n}})}let n=Ju(()=>yh(t));Gd(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||ed(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=cd,i=t.catchall,a,o=vf.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>vh(n,t,e,c,r,i))):vh(a,t,e,c,r,i)}return i?bh(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),Fg=U(`$ZodObjectJIT`,(e,t)=>{Pg.init(e,t);let n=e._zod.parse,r=Ju(()=>yh(t)),i=vf.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new th([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` diff --git a/internal/mcp/apps/performance.html b/internal/mcp/apps/performance.html index 62d50bd2b..8f27072bf 100644 --- a/internal/mcp/apps/performance.html +++ b/internal/mcp/apps/performance.html @@ -5,13 +5,13 @@ `):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Dn(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)On(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=dn(l),S=0;S<_.length;S++)w=Math.max(_n(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var jn=function(){function e(){}return e}(),Mn=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Nn=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Pn(e,t,n,r,i){var a=new Nn,o=Un(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Tn.lastIndex=0,h;(h=Tn.exec(o))!=null;){var g=h.index;g>m&&Fn(a,o.substring(m,g),t,p),Fn(a,h[2],t,p,h[1]),m=Tn.lastIndex}md){var te=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` `),l=!0),r.accumWidth=m}else{var h=zn(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` `);for(var g=dn(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Ln=se(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Rn(e){return!In(e)||!!Ln[e]}function zn(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=dn(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Bn(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;tn.set(Vn,bn(n,o,i),xn(r,s,a),o,s),tn.intersect(t,Vn,null,Hn);var c=Hn.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=bn(c.x,c.width,i,!0),e.baseY=xn(c.y,c.height,a,!0)}}var Vn=new tn(0,0,0,0),Hn={outIntersectRect:{},clamp:!0};function Un(e){return e==null?e=``:e+=``}function Wn(e){var t=Un(e.text),n=e.font;return Gn(e,_n(dn(n),t),Sn(n),null)}function Gn(e,t,n,r){var i=new tn(bn(e.x||0,t,e.textAlign),xn(e.y||0,n,e.textBaseline),t,n),a=r??(Kn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Kn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var qn=vt,Jn=5e-5;function Yn(e){return e>Jn||e<-Jn}var Xn=[],Zn=[],Qn=_t(),$n=Math.abs,er=function(){function e(){}return e.prototype.getLocalTransform=function(e){return tr(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Yn(this.rotation)||Yn(this.x)||Yn(this.y)||Yn(this.scaleX-1)||Yn(this.scaleY-1)||Yn(this.skewX)||Yn(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(qn(n),this.invTransform=null);return}n||=_t(),t?this.getLocalTransform(n):qn(n),e&&(t?bt(n,e,n):yt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||_t(),wt(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Xn);var n=Xn[0]<0?-1:1,r=Xn[1]<0?-1:1,i=((Xn[0]-n)*t+n)/Xn[0]||0,a=((Xn[1]-r)*t+r)/Xn[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||_t(),bt(Zn,e.invTransform,t),t=Zn);var n=this.originX,r=this.originY;(n||r)&&(Qn[4]=n,Qn[5]=r,bt(Zn,t,Qn),Zn[4]-=n,Zn[5]-=r,t=Zn),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Rt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Rt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&$n(e[0]-1)>1e-10&&$n(e[3]-1)>1e-10?Math.sqrt($n(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){rr(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&St(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),tr=er.getLocalTransform,nr=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function rr(e,t){return ne(e,t,nr)}var ir={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ir.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ir.bounceIn(e*2)*.5:ir.bounceOut(e*2-1)*.5+.5}},ar=Math.pow,or=Math.sqrt,sr=1e-8,cr=1e-4,lr=or(3),ur=1/3,dr=Tt(),fr=Tt(),pr=Tt();function mr(e){return e>-sr&&esr||e<-sr}function gr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function _r(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function vr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(mr(u)&&mr(d)){if(mr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(mr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=or(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ar(-y,ur):ar(y,ur),b=b<0?-ar(-b,ur):ar(b,ur);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*or(u*u*u)),S=Math.acos(x)/3,C=or(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+lr*Math.sin(S)))/(3*o),T=(-s+C*(w-lr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function yr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(mr(o)){if(hr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(mr(u))i[0]=-a/(2*o);else if(u>0){var d=or(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function br(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function xr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;dr[0]=c,dr[1]=l;for(var v=0;v<1;v+=.05)fr[0]=gr(e,n,i,o,v),fr[1]=gr(t,r,a,s,v),g=Lt(dr,fr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(mr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=or(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Er(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Dr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Or(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;dr[0]=o,dr[1]=s;for(var f=0;f<1;f+=.05){fr[0]=Cr(e,n,i,f),fr[1]=Cr(t,r,a,f);var p=Lt(dr,fr);p=0&&p=1?1:vr(0,r,a,1,e,s)&&gr(0,i,o,1,s[0])}}}var Mr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ve,this.ondestroy=e.ondestroy||Ve,this.onrestart=e.onrestart||Ve,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:ir[e]||jr(e)},e}(),Nr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Pr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Fr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ir(e){return e<0?0:e>1?1:e}function Lr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Pr(parseFloat(t)/100*255):Pr(parseInt(t,10))}function Rr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ir(parseFloat(t)/100):Ir(parseFloat(t))}function zr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Br(e,t,n){return e+(t-e)*n}function Vr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Hr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ur=new dt(20),Wr=null;function Gr(e,t){Wr&&Hr(Wr,t),Wr=Ur.put(e,Wr||t.slice())}function Kr(e,t){if(e){t||=[];var n=Ur.get(e);if(n)return Hr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Nr)return Hr(t,Nr[r]),Gr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Vr(t,0,0,0,1);return}return Vr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Gr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Vr(t,0,0,0,1);return}return Vr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Gr(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Vr(t,+l[0],+l[1],+l[2],1):Vr(t,0,0,0,1);u=Rr(l.pop());case`rgb`:if(l.length>=3)return Vr(t,Lr(l[0]),Lr(l[1]),Lr(l[2]),l.length===3?u:Rr(l[3])),Gr(e,t),t;Vr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Vr(t,0,0,0,1);return}return l[3]=Rr(l[3]),qr(l,t),Gr(e,t),t;case`hsl`:if(l.length!==3){Vr(t,0,0,0,1);return}return qr(l,t),Gr(e,t),t;default:return}}Vr(t,0,0,0,1)}}function qr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Rr(e[1]),i=Rr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Vr(t,Pr(zr(o,a,n+1/3)*255),Pr(zr(o,a,n)*255),Pr(zr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Jr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Yr(e,t){var n=Kr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ei(n,n.length===4?`rgba`:`rgb`)}}function Xr(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Pr(Br(o[0],s[0],c)),n[1]=Pr(Br(o[1],s[1],c)),n[2]=Pr(Br(o[2],s[2],c)),n[3]=Ir(Br(o[3],s[3],c)),n}}function Zr(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Kr(t[i]),s=Kr(t[a]),c=r-i,l=ei([Pr(Br(o[0],s[0],c)),Pr(Br(o[1],s[1],c)),Pr(Br(o[2],s[2],c)),Ir(Br(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Qr(e,t,n,r){var i=Kr(e);if(e)return i=Jr(i),t!=null&&(i[0]=Fr(me(t)?t(i[0]):t)),n!=null&&(i[1]=Rr(me(n)?n(i[1]):n)),r!=null&&(i[2]=Rr(me(r)?r(i[2]):r)),ei(qr(i),`rgba`)}function $r(e,t){var n=Kr(e);if(n&&t!=null)return n[3]=Ir(t),ei(n,`rgba`)}function ei(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ti(e,t){var n=Kr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ni=new dt(100);function ri(e){if(V(e)){var t=ni.get(e);return t||(t=Yr(e,-.1),ni.put(e,t)),t}if(xe(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Yr(e.color,-.1)}}),n}return e}var ii=Math.round;function ai(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Kr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var oi=1e-4;function si(e){return e-oi}function ci(e){return ii(e*1e3)/1e3}function li(e){return ii(e*1e4)/1e4}function ui(e){return`matrix(`+ci(e[0])+`,`+ci(e[1])+`,`+ci(e[2])+`,`+ci(e[3])+`,`+li(e[4])+`,`+li(e[5])+`)`}var di={left:`start`,right:`end`,center:`middle`,middle:`middle`};function fi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function pi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function mi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function hi(e){return e&&!!e.image}function gi(e){return e&&!!e.svgElement}function _i(e){return hi(e)||gi(e)}function vi(e){return e.type===`linear`}function yi(e){return e.type===`radial`}function bi(e){return e&&(e.type===`linear`||e.type===`radial`)}function xi(e){return`url(#`+e+`)`}function Si(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Ci(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*He,i=we(e.scaleX,1),a=we(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ii(o*He)+`deg, `+ii(s*He)+`deg)`),c.join(` `)}var wi=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),Ti=Array.prototype.slice;function Ei(e,t,n){return(t-e)*n+e}function Di(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Hi,s=t;if(oe(t)){var c=Fi(t);o=c,(c===1&&!ge(t[0])||c===2&&!ge(t[0][0]))&&(a=!0)}else if(ge(t)&&!Se(t))o=Ii;else if(V(t)){if(!isNaN(+t))o=Ii;else{var l=Kr(t);l&&(s=l,o=zi)}}else if(xe(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Kr(e.color)}}),vi(t)?o=Bi:yi(t)&&(o=Vi),s=u}i===0?this.valType=o:(o!==this.valType||o===Hi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=me(n)?n:ir[n]||jr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Wi(r),c=Ui(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Gi:e[s];if((Wi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Wi(i))i===Li?Di(g,f[r],p[r],h):Oi(g,f[r],p[r],h);else if(Ui(i)){var _=f[r],v=p[r],y=i===Bi;e[s]={type:y?`linear`:`radial`,x:Ei(_.x,v.x,h),y:Ei(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ei(e.offset,n.offset,h),color:Pi(Di([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ei(_.x2,v.x2,h),e[s].y2=Ei(_.y2,v.y2,h)):e[s].r=Ei(_.r,v.r,h)}else if(c)Di(g,f[r],p[r],h),n||(e[s]=Pi(g));else{var b=Ei(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Ii?e[n]=e[n]+r:t===zi?(Kr(e[n],Gi),ki(Gi,Gi,r,1),e[n]=Pi(Gi)):t===Li?ki(e[n],e[n],r,1):t===Ri&&Ai(e[n],e[n],r,1)},e}(),qi=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){te(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ue(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Ni(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ni(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Ji=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?$i:Qi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Kr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,ei(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},I(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(_e(e))for(var n=ue(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(ta,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===ta;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(re(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){te(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ha(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,_a(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=re(r,e),a=re(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var va=`__zr_style_`+Math.round(Math.random()*10),ya={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ba={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ya[va]=!0;var xa=[`z`,`z2`,`invisible`],Sa=[`invisible`],Ca=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=ue(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Ma[0]=Aa(i)*n+e,Ma[1]=ka(i)*r+t,Na[0]=Aa(a)*n+e,Na[1]=ka(a)*r+t,l(s,Ma,Na),u(c,Ma,Na),i%=ja,i<0&&(i+=ja),a%=ja,a<0&&(a+=ja),i>a&&!o?a+=ja:ii&&(Pa[0]=Aa(p)*n+e,Pa[1]=ka(p)*r+t,l(s,Pa,s),u(c,Pa,c))}var Va={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ha=[],Ua=[],Wa=[],Ga=[],Ka=[],qa=[],Ja=Math.min,Ya=Math.max,Xa=Math.cos,Za=Math.sin,Qa=Math.abs,$a=Math.PI,eo=$a*2,to=typeof Float32Array<`u`,no=[];function ro(e){return Math.round(e/$a*1e8)/1e8%2*$a}function io(e,t){var n=ro(e[0]);n<0&&(n+=eo);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=eo?i=n+eo:t&&n-i>=eo?i=n-eo:!t&&n>i?i=n+(eo-ro(n-i)):t&&n0&&(this._ux=Qa(n/Xi/e)||0,this._uy=Qa(n/Xi/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Va.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Qa(e-this._xi),r=Qa(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Va.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Va.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Va.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),no[0]=r,no[1]=i,io(no,a),r=no[0],i=no[1];var o=i-r;return this.addData(Va.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Xa(i)*n+e,this._yi=Za(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Va.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Va.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&to&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Wa[0]=Wa[1]=Ka[0]=Ka[1]=Number.MAX_VALUE,Ga[0]=Ga[1]=qa[0]=qa[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Qa(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Va.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Sr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Va.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=kr(i,a,y,b,h,g,10),i=h,a=g;break;case Va.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Xa(D)*T+C,s=Za(D)*E+w),m=Ya(T,E)*Ja(eo,Math.abs(O)),i=Xa(k)*T+C,a=Za(k)*E+w;break;case Va.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Va.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Va.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Va.L:u=n[x++],d=n[x++];var w=Qa(u-c),T=Qa(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Va.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],M=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;br(c,k,j,M,D,Ha),br(l,A,ee,N,D,Ua),e.bezierCurveTo(Ha[1],Ua[1],Ha[2],Ua[2],Ha[3],Ua[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,M,N),c=M,l=N;break;case Va.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Dr(c,k,j,D,Ha),Dr(l,A,ee,D,Ua),e.quadraticCurveTo(Ha[1],Ua[1],Ha[2],Ua[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Va.A:var te=n[x++],P=n[x++],F=n[x++],I=n[x++],ne=n[x++],L=n[x++],re=n[x++],ie=!n[x++],ae=F>I?F:I,oe=Qa(F-I)>.001,R=ne+L,z=!1;if(f){var E=p[g++];h+E>_&&(R=ne+L*(_-h)/E,z=!0),h+=E}if(oe&&e.ellipse?e.ellipse(te,P,F,I,re,ne,R,ie):e.arc(te,P,ae,ne,R,ie),z)break lo;C&&(o=Xa(ne)*F+te,s=Za(ne)*I+P),c=Xa(R)*F+te,l=Za(R)*I+P;break;case Va.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var se=n[x++],ce=n[x++];if(f){var E=p[g++];if(h+E>_){var le=_-h;e.moveTo(u,d),e.lineTo(u+Ja(le,se),d),le-=se,le>0&&e.lineTo(u+se,d+Ja(le,ce)),le-=ce,le>0&&e.lineTo(u+Ya(se-le,0),d+ce),le-=se,le>0&&e.lineTo(u,d+Ya(ce-le,0));break lo}h+=E}e.rect(u,d,se,ce);break;case Va.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Va,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function oo(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=fo);var f=Math.atan2(c,s);return f<0&&(f+=fo),f>=r&&f<=i||f+fo>=r&&f+fo<=i}function mo(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var ho=ao.CMD,go=Math.PI*2,_o=1e-4;function vo(e,t){return Math.abs(e-t)<_o}var yo=[-1,-1,-1],bo=[-1,-1];function xo(){var e=bo[0];bo[0]=bo[1],bo[1]=e}function So(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l1&&xo(),p=gr(t,r,a,s,bo[0]),f>1&&(m=gr(t,r,a,s,bo[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Cr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);yo[0]=-c,yo[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=go-1e-4){r=0,i=go;var u=a?1:-1;return o>=yo[0]+e&&o<=yo[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=go,i+=go);for(var f=0,p=0;p<2;p++){var m=yo[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=go+h),(h>=r&&h<=i||h+go>=r&&h+go<=i)&&(h>Math.PI/2&&h1&&(n||(s+=mo(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case ho.M:u=a[m++],d=a[m++],c=u,l=d;break;case ho.L:if(n){if(oo(c,l,a[m],a[m+1],t,r,i))return!0}else s+=mo(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.C:if(n){if(so(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=So(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.Q:if(n){if(co(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Co(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=mo(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(po(_,v,b,x,x+S,C,t,w,i))return!0}else s+=wo(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case ho.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(oo(u,d,f,d,t,r,i)||oo(f,d,f,p,t,r,i)||oo(f,p,u,p,t,r,i)||oo(u,p,u,d,t,r,i))return!0}else s+=mo(f,d,f,p,r,i),s+=mo(u,p,u,d,r,i);break;case ho.Z:if(n){if(oo(c,l,u,d,t,r,i))return!0}else s+=mo(c,l,u,d,r,i);c=u,l=d}}return!n&&!vo(l,d)&&(s+=mo(c,l,u,d,r,i)||0),s!==0}function Eo(e,t,n){return To(e,0,!1,t,n)}function Do(e,t,n,r){return To(e,t,!0,n,r)}var Oo=L({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ya),ko={style:L({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ba.style)},Ao=nr.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),jo=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Qi:t>.2?ea:$i}if(e)return $i}return Qi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(V(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ti(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new ao(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Do(a,o/s,e,t)))return!0}if(this.hasFill())return Eo(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:I(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ze(Oo,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=I({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=I({},r.shape),I(c,n.shape)):(c=I({},i?this.shape:r.shape),I(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=I({},this.shape);for(var l={},u=ue(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var zo=Math.round;function Bo(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(zo(r*2)===zo(i*2)&&(e.x1=e.x2=Ho(r,s,!0)),zo(a*2)===zo(o*2)&&(e.y1=e.y2=Ho(a,s,!0)),e):e}}function Vo(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Ho(r,s,!0),e.y=Ho(i,s,!0),e.width=Math.max(Ho(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Ho(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Ho(e,t,n){if(!t)return e;var r=zo(e*2);return(r+zo(t))%2==0?r/2:(r+(n?1:-1))/2}var Uo=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Wo={},Go=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Uo},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Vo(Wo,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Ro(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(jo);Go.prototype.type=`rect`;var Ko={fill:`#000`},qo=2,Jo={},Yo={style:L({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ba.style)},Xo=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Ko,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&ls(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=ss(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(No),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=os(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=as(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=qo,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Te(s.opacity,t.opacity,1),ts(p,s),y&&(p.lineWidth=Te(s.lineWidth,t.lineWidth,g),p.lineDash=we(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Gn(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Go),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=we(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Lo),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=we(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Te(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return ns(e)&&(t=[e.fontStyle,e.fontWeight,es(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ke(t)||e.textFont||e.font},t}(Ca),Zo={left:!0,right:1,center:1},Qo={top:1,bottom:1,middle:1},$o=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function es(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function ts(e,t){for(var n=0;n<$o.length;n++){var r=$o[n],i=t[r];i!=null&&(e[r]=i)}}function ns(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function rs(e){return is(e),R(e.rich,is),e}function is(e){if(e){e.font=Xo.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Zo[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Qo[n]?n:`top`,e.padding&&=De(e.padding)}}function as(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function os(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function ss(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function cs(e){var t=e.text;return t!=null&&(t+=``),t}function ls(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var us=1e-4,ds=20;function fs(e){return e.replace(/^\s+|\s+$/g,``)}var ps=Math.min,ms=Math.max,hs=Math.abs,gs=Math.round,_s=Math.floor,vs=Math.ceil,ys=Math.pow,bs=Math.log,xs=Math.LN10,Ss=Math.PI,Cs=Math.random;function ws(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var Ts=Es;function Es(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Ds(e,t,n)}function Ds(e,t,n){return V(e)?Os(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Os(e){return!!fs(e).match(/%$/)}function ks(e,t,n){return isNaN(t)?n?``+e:+e:(t=ps(ms(0,t),ds),e=(+e).toFixed(t),n?e:+e)}function As(e){return e.sort(function(e,t){return e-t}),e}function js(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(gs(e*t)/t===e)return n}return Ms(e)}function Ms(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ms(0,(a<0?0:i-1-a)-r)}function Ns(e,t,n){var r=hs(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=bs(2*hs(n||1)*hs(r))/xs,a=bs(hs(t))/xs,o=ms(0,vs(-i+a));return isFinite(o)||(o=NaN),o}function Ps(e,t){var n=ms(js(e),js(t)),r=e+t;return n>ds?r:ks(r,n)}var Fs=ys(2,53)-1;function Is(e){var t=Ss*2;return(e%t+t)%t}function Ls(e){return e>-us&&e=10&&t++,t}function Hs(e,t){var n=Vs(e),r=ys(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,ks(e,-n)}function Us(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Lc(){return[1/0,-1/0]}function Rc(e,t){Hc(t)&&(te[1]&&(e[1]=t))}function zc(e,t){Hc(t)&&te[1]&&(e[1]=t)}function Vc(e,t){Uc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Hc(e){return e!=null&&isFinite(e)}function Uc(e,t){return Hc(e)&&Hc(t)&&e<=t}function Wc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Gc(e){Uc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Kc(){var e=`__ec_once_`+qc++;return function(t,n){Be(t,e)||(t[e]=1,n())}}var qc=Ks();function Jc(e,t,n){var r=Le(),i=0;R(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Yc(e){return e.value+``}function Xc(e){return e+``}function Zc(e,t){return we(t,!0)?e.seriesIndex+2:0}function Qc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function $c(e){return{overallReset:e}}var el=Ec(),tl=function(e,t,n,r){if(r){var i=el(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=el(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},nl=Le([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),rl=`original`,il=`arrayRows`,al=`objectRows`,ol=`keyedColumns`,sl=`typedArray`,cl=`unknown`,ll=`column`,ul=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],dl=function(){function e(e){R(ul,function(t){this[t]=fe(e[t],e)},this)}return e}();function fl(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var pl=1,ml={},hl=Ec(),gl=Ec(),_l=[`emphasis`,`blur`,`select`],vl=[`normal`,`emphasis`,`blur`,`select`],yl=`highlight`,bl=`downplay`,xl=`select`,Sl=`unselect`,Cl=`toggleSelect`,wl=`selectchanged`;function Tl(e){return e!=null&&e!==`none`}function El(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Dl(e){El(e,`emphasis`,2)}function Ol(e){e.hoverState===2&&El(e,`normal`,0)}function kl(e){El(e,`blur`,1)}function Al(e){e.hoverState===1&&El(e,`normal`,0)}function jl(e){e.selected=!0}function Ml(e){e.selected=!1}function Nl(e,t,n){t(e,n)}function Pl(e,t,n){Nl(e,t,n),e.isGroup&&e.traverse(function(e){Nl(e,t,n)})}function Fl(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Il(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof jo){var o=hl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Tl(s)||Tl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=I({},r),l=I({},l),l.fill=s):!Tl(l.fill)&&Tl(s)?(a=!0,r=I({},r),l=I({},l),l.fill=ri(s)):!Tl(l.stroke)&&Tl(c)&&(a||(r=I({},r),l=I({},l)),l.stroke=ri(c)),r.style=l}}if(r&&r.z2==null){a||(r=I({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Rl(e,t,n){if(n&&n.z2==null){n=I({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function zl(e,t,n){var r=re(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Il(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=I({},n),o=I({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Bl(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Ll(this,e,t,n);if(e===`blur`)return zl(this,e,n);if(e===`select`)return Rl(this,e,n)}return n}function Vl(e){e.stateProxy=Bl;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Bl),n&&(n.stateProxy=Bl)}function Hl(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Dl)}function Ul(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Ol)}function Wl(e,t){e.__highByOuter|=1<<(t||0),Pl(e,Dl)}function Gl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Pl(e,Ol)}function Kl(e){Pl(e,kl)}function ql(e){Pl(e,Al)}function Jl(e){Pl(e,jl)}function Yl(e){Pl(e,Ml)}function Xl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Zl(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=gl(i),o=fl(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Al(e)}),s&&n.push(i)),a.isBlured=!1}),R(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Ql(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function su(e,t,n){mu(e,!0),Pl(e,Vl),uu(e,t,n)}function cu(e){mu(e,!1)}function lu(e,t,n,r){r?cu(e):su(e,t,n)}function uu(e,t,n){var r=el(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var du=[`emphasis`,`blur`,`select`],fu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function pu(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Tu(m),s*=Tu(m));var h=(i===a?-1:1)*Tu((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Du(d)*g-Eu(d)*_,y=(t+r)/2+Eu(d)*g+Du(d)*_,b=ju([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=ju(x,S);if(Au(x,S)<=-1&&(C=Ou),Au(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Ou*1e6)/1e6;C=Ou*2+w%2*Ou}u.addData(l,v,y,o,s,b,C,d,a)}var Nu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Pu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Fu(e){var t=new ao;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=ao.CMD,c=e.match(Nu);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=re(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=re(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function od(e){var t;if(B(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function sd(e,t){var n,r=td(t.r,0),i=td(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=$u(c-s),p=f>Ju&&f%Ju;if(p>rd&&(f=p),!(r>rd))e.moveTo(l,u);else if(f>Ju-rd)e.moveTo(l+r*Xu(s),u+r*Yu(s)),e.arc(l,u,r,s,c,!d),i>rd&&(e.moveTo(l+i*Xu(c),u+i*Yu(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Xu(s),j=r*Yu(s),ee=i*Xu(c),M=i*Yu(c),N=f>rd;if(N){var te=t.cornerRadius;te&&(n=od(te),m=n[0],h=n[1],g=n[2],_=n[3]);var P=$u(r-i)/2;if(v=nd(P,g),y=nd(P,_),b=nd(P,m),x=nd(P,h),w=S=td(v,y),T=C=td(b,x),(S>rd||C>rd)&&(E=r*Xu(c),D=r*Yu(c),O=i*Xu(s),k=i*Yu(s),frd){var oe=nd(g,w),R=nd(_,w),z=ad(O,k,A,j,r,oe,d),se=ad(E,D,ee,M,r,R,d);e.moveTo(l+z.cx+z.x0,u+z.cy+z.y0),w0&&e.arc(l+z.cx,u+z.cy,oe,Qu(z.y0,z.x0),Qu(z.y1,z.x1),!d),e.arc(l,u,r,Qu(z.cy+z.y1,z.cx+z.x1),Qu(se.cy+se.y1,se.cx+se.x1),!d),R>0&&e.arc(l+se.cx,u+se.cy,R,Qu(se.y1,se.x1),Qu(se.y0,se.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>rd)||!N)e.lineTo(l+ee,u+M);else if(T>rd){var oe=nd(m,T),R=nd(h,T),z=ad(ee,M,E,D,i,-R,d),se=ad(A,j,O,k,i,-oe,d);e.lineTo(l+z.cx+z.x0,u+z.cy+z.y0),T0&&e.arc(l+z.cx,u+z.cy,R,Qu(z.y0,z.x0),Qu(z.y1,z.x1),!d),e.arc(l,u,i,Qu(z.cy+z.y1,z.cx+z.x1),Qu(se.cy+se.y1,se.cx+se.x1),d),oe>0&&e.arc(l+se.cx,u+se.cy,oe,Qu(se.y1,se.x1),Qu(se.y0,se.x0),!d))}else e.lineTo(l+ee,u+M),e.arc(l,u,i,c,s,d)}e.closePath()}}}var cd=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),ld=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new cd},t.prototype.buildPath=function(e,t){sd(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(jo);ld.prototype.type=`sector`;var ud=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),dd=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ud},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(jo);dd.prototype.type=`ring`;function fd(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=fd(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sFd[1]){if(i=!1,Id.negativeSize||n)return i;var s=Nd(Fd[0]-Pd[1]),c=Nd(Pd[0]-Fd[1]);jd(s,c)>Rd.len()&&(s=c||!Id.bidirectional)&&(Vt.scale(Ld,o,-c*r),Id.useDir&&Id.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Gd(e,t,n,r,i,a){Wd(`update`,e,t,n,r,i,a)}function Kd(e,t,n,r,i,a){Wd(`enter`,e,t,n,r,i,a)}function qd(e){if(!e.__zr)return!0;for(var t=0;tEd,BezierCurve:()=>wd,BoundingRect:()=>tn,Circle:()=>Wu,CompoundPath:()=>Dd,Ellipse:()=>Ku,Group:()=>Hu,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Lo,IncrementalDisplayable:()=>Vd,Line:()=>bd,LinearGradient:()=>kd,OrientedBoundingRect:()=>zd,Path:()=>jo,Point:()=>Vt,Polygon:()=>hd,Polyline:()=>_d,RadialGradient:()=>Ad,Rect:()=>Go,Ring:()=>dd,Sector:()=>ld,Text:()=>Xo,WH:()=>tf,XY:()=>ef,applyTransform:()=>_f,calcZ2Range:()=>Bf,clipPointsByRect:()=>Sf,clipRectByRect:()=>Cf,createIcon:()=>wf,decomposeTransform:()=>Wf,ensureCopyRect:()=>Lf,ensureCopyTransform:()=>Rf,expandOrShrinkRect:()=>kf,extendPath:()=>af,extendShape:()=>nf,getCurrentCanvasPainter:()=>Kf,getShapeClass:()=>sf,getTransform:()=>gf,groupTransition:()=>xf,initProps:()=>Kd,isBoundingRectAxisAligned:()=>Ff,isElementRemoved:()=>qd,lineLineIntersect:()=>Ef,linePolygonIntersect:()=>Tf,makeImage:()=>lf,makePath:()=>cf,mergePath:()=>df,payloadDisableAnimation:()=>Uf,registerShape:()=>of,removeElement:()=>Jd,removeElementWithFadeOut:()=>Xd,resizePath:()=>ff,retrieveZInfo:()=>zf,setTooltipConfig:()=>Mf,subPixelOptimize:()=>hf,subPixelOptimizeLine:()=>pf,subPixelOptimizeRect:()=>mf,transformDirection:()=>vf,traverseElements:()=>Pf,traverseUpdateZ:()=>Vf,updateProps:()=>Gd}),$d={},ef=[`x`,`y`],tf=[`width`,`height`];function nf(e){return jo.extend(e)}var rf=Bu;function af(e,t){return rf(e,t)}function of(e,t){$d[e]=t}function sf(e){if($d.hasOwnProperty(e))return $d[e]}function cf(e,t,n,r){var i=zu(e,t);return n&&(r===`center`&&(n=uf(n,i.getBoundingRect())),ff(i,n)),i}function lf(e,t,n){var r=new Lo({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(uf(t,i))}}});return r}function uf(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var df=Vu;function ff(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function pf(e,t){return Bo(e,e,{lineWidth:t}),e}function mf(e,t){return Vo(e,e,t),e}var hf=Ho;function gf(e,t){for(var n=vt([]);e&&e!==t;)bt(n,e.getLocalTransform(),n),e=e.parent;return n}function _f(e,t,n){return t&&!oe(t)&&(t=er.getLocalTransform(t)),n&&(t=wt([],t)),Rt([],e,t)}function vf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:hs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:hs(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=_f(a,t,n),hs(a[0])>hs(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function yf(e){return!e.isGroup}function bf(e){return e.shape!=null}function xf(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){yf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return bf(e)&&(t.shape=P(e.shape)),t}var a=r(e);t.traverse(function(e){if(yf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Gd(e,r,n,el(e).dataIndex)}}})}function Sf(e,t){return z(e,function(e){var n=e[0];n=ms(n,t.x),n=ps(n,t.x+t.width);var r=e[1];return r=ms(r,t.y),r=ps(r,t.y+t.height),[n,r]})}function Cf(e,t){var n=ms(e.x,t.x),r=ps(e.x+e.width,t.x+t.width),i=ms(e.y,t.y),a=ps(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function wf(e,t,n){var r=I({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),L(i,n),new Lo(r)):cf(e.replace(`path://`,``),r,n,`center`)}function Tf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Df(p,m,u,d)/f;return!(g<0||g>1)}function Df(e,t,n,r){return e*r-n*t}function Of(e){return e<=1e-6&&e>=-1e-6}function kf(e,t,n,r,i){return t==null?e:(ge(t)?Af[0]=Af[1]=Af[2]=Af[3]=t:(Af[0]=t[0],Af[1]=t[1],Af[2]=t[2],Af[3]=t[3]),r&&(Af[0]=ms(0,Af[0]),Af[1]=ms(0,Af[1]),Af[2]=ms(0,Af[2]),Af[3]=ms(0,Af[3])),n&&(Af[0]=-Af[0],Af[1]=-Af[1],Af[2]=-Af[2],Af[3]=-Af[3]),jf(e,Af,`x`,`width`,3,1,i&&i[0]||0),jf(e,Af,`y`,`height`,0,2,i&&i[1]||0),e)}var Af=[0,0,0,0];function jf(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ms(0,ps(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:hs(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Mf(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=V(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&R(ue(c),function(e){Be(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=el(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:L({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Nf(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Pf(e,t){if(e){if(B(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Vf(e,t,n){Hf(e,t,n,-1/0)}function Hf(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Kp=(e={},e[il+`_`+ll]={pure:!0,appendData:i},e[il+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[al]={pure:!0,appendData:i},e[ol]={pure:!0,appendData:function(e){var t=this._data;R(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[rl]={appendData:i},e[sl]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){ge(t)||tc(``),this._opFn=fm[e],this._rvalFloat=Ws(t)}return e.prototype.evaluate=function(e){return ge(e)?this._opFn(e,this._rvalFloat):this._opFn(Ws(e),this._rvalFloat)},e})();var nee=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=ge(e)?e:Ws(e),r=ge(t)?t:Ws(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=V(e),s=V(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ws(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Ws(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function ree(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function iee(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,oee=typeof Uint16Array>`u`?Array:Uint16Array,pm=typeof Int32Array>`u`?Array:Int32Array,mm=typeof Float64Array>`u`?Array:Float64Array,hm={float:mm,int:pm,ordinal:Array,number:Array,time:mm},gm;function _m(e){return e>65535?aee:oee}function vm(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function ym(e,t,n,r,i){var a=hm[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=z(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(_m(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return dm(e[r],this._dimensions[r])}gm={arrayRows:e,objectRows:function(e,t,n,r){return dm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return dm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),xm=Ec(),Sm={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Cm=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Em(this.source))},e.prototype.getSourceDimensionIndex=function(e){return we(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Vp(this.source),n=!Dm(e),r=``,i=[],a=0,o=0;a30}var Om=_e,km=z,Am=typeof Int32Array>`u`?Array:Int32Array,jm=`e\0\0`,Mm=-1,Nm=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Pm=[`_approximateExtent`],Fm,Im,Lm,Rm,zm,Bm,Vm,Hm=function(){function e(e,t){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`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;wm(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():Om(i)&&(i=I({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Om(t)?I(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Om(e)?I(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?I(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){tl(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){R(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:km(this.dimensions,this._getDimInfo,this),this.hostModel),zm(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ee(arguments)))})},e.internalField=function(){Fm=function(e){var t=e._invertedIndicesMap;R(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Am(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Um(e,t){Mp(e)||(e=Pp(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Le(),a=[],o=Wm(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Dm(o),c=r===e.dimensionsDefine,l=c?Em(e):Tm(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Le(u),f=new pm(o),p=0;p0&&(e.name+=t-1)}),new Cm({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Wm(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return R(t,function(e){var t;_e(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Gm(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Km={},qm={},Jm=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Km,!0),this._normalMasterList=n(qm,!1);function n(n,r){var i=[];return R(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){R(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Km[e]=t;return}qm[e]=t},e.get=function(e){return qm[e]||Km[e]},e}();function Ym(e){return!!Km[e]}var Xm=Le();function Zm(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=Xm.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function Qm(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!Ym(n)&&(i=0))}return{coordSysType:n,kind:i}}function $m(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=Qm(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var eh=function(){function e(e){this.coordSysDims=[],this.axisMap=Le(),this.categoryAxisMap=Le(),this.coordSysName=e}return e}();function th(e){var t=e.get(`coordinateSystem`),n=new eh(t),r=nh[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var nh={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Ac).models[0],a=e.getReferringComponents(`yAxis`,Ac).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),rh(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),rh(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Ac).models[0];t.coordSysDims=[`single`],n.set(`single`,i),rh(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Ac).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),rh(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),rh(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),rh(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Ac).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function rh(e){return e.get(`type`)===`category`}function ih(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;ah(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(R(a,function(e,t){V(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),R(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;R(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function ah(e){return!wm(e.schema)}function oh(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function sh(e,t){return oh(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function ch(e,t){var n=e.get(`coordinateSystem`),r=Jm.get(n),i;return t&&t.coordSysDims&&(i=z(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=cm(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function lh(e,t,n){var r,i;return n&&R(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function uh(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Pp(e)):(i=r.getSource(),a=i.sourceFormat===rl);var o=th(t),s=ch(t,o),c=n.useEncodeDefaulter,l=me(c)?c:c?pe(Ep,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Um(i,u),f=lh(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=ih(t,{schema:d,store:p}),h=new Hm(d,t);h.setCalculationInfo(m);var g=f!=null&&dh(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function dh(e){if(e.sourceFormat===`original`)return!B(cc(fh(e.data||[])))}function fh(e){for(var t=0;t=0&&n.push(e)}),n}}function _h(e,t){return F(F({},e,!0),t,!0)}var vh=Math.log(2);function yh(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){R(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function uee(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?bh(s,o):bh(o,s))}function wh(e){return e.nodeName.toUpperCase()===`CANVAS`}var dee=/([&<>"'])/g,fee={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Th(e){return e==null?``:(e+``).replace(dee,function(e,t){return fee[t]})}var pee={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},mee={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Eh=`ZH`,Dh=`EN`,Oh=Dh,kh={},Ah={},jh=We.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Oh).toUpperCase().indexOf(Eh)>-1?Eh:Oh}():Oh;function Mh(e,t){e=e.toUpperCase(),Ah[e]=new yp(t),kh[e]=t}function Nh(e){if(V(e)){var t=kh[e.toUpperCase()]||{};return e===Eh||e===Dh?P(t):F(P(t),P(kh[Oh]),!1)}return F(P(e),P(kh[Oh]),!1)}function Ph(e){return Ah[e]}function Fh(){return Ah[Oh]}Mh(Dh,pee),Mh(Eh,mee);var Ih=null;function Lh(){return Ih}function Rh(e,t){var n=Lh(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function zh(e){var t=e.brk;return t?t.breaks:[]}function Bh(e){var t=e.brk;return t?t.hasBreaks():!1}var Vh=1e3,Hh=Vh*60,Uh=Hh*60,Wh=Uh*24,Gh=Wh*365,Kh={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},qh={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},hee=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Jh=`{yyyy}-{MM}-{dd}`,Yh={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Jh,hour:Jh+` `+qh.hour,minute:Jh+` `+qh.minute,second:Jh+` `+qh.second,millisecond:hee},Xh=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Zh=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Qh(e){return!V(e)&&!me(e)?$h(e):e}function $h(e){e||={};var t={},n=!0;return R(Xh,function(t){n&&=e[t]==null}),R(Xh,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Xh[s],l=_e(a)&&!B(a)?a[c]:a,u=void 0;B(l)?(u=l.slice(),o=u[0]||``):V(l)?(o=l,u=[o]):(o==null?o=qh[r]:Kh[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function eg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function tg(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function ng(e){return e===tg(e)}function gee(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function rg(e,t,n,r){var i=zs(e),a=i[sg(n)](),o=i[cg(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[lg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[ug(n)](),d=(u-1)%12+1,f=i[dg(n)](),p=i[fg(n)](),m=i[pg(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof yp?r:Ph(r||jh)||Fh()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,eg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,eg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,eg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,eg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,eg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,eg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,eg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,eg(m,3)).replace(/{S}/g,m+``)}function ig(e,t,n,r,i){var a=null;if(V(n))a=n;else if(me(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Lh();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=ag(e.value,i);a=n[u][u][0]}}return rg(new Date(e.value),a,i,r)}function ag(e,t){var n=zs(e),r=n[cg(t)]()+1,i=n[lg(t)](),a=n[ug(t)](),o=n[dg(t)](),s=n[fg(t)](),c=n[pg(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function og(e,t,n){switch(t){case`year`:e[hg(n)](0);case`month`:e[gg(n)](1);case`day`:e[_g(n)](0);case`hour`:e[vg(n)](0);case`minute`:e[yg(n)](0);case`second`:e[bg(n)](0)}return e}function sg(e){return e?`getUTCFullYear`:`getFullYear`}function cg(e){return e?`getUTCMonth`:`getMonth`}function lg(e){return e?`getUTCDate`:`getDate`}function ug(e){return e?`getUTCHours`:`getHours`}function dg(e){return e?`getUTCMinutes`:`getMinutes`}function fg(e){return e?`getUTCSeconds`:`getSeconds`}function pg(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function mg(e){return e?`setUTCFullYear`:`setFullYear`}function hg(e){return e?`setUTCMonth`:`setMonth`}function gg(e){return e?`setUTCDate`:`setDate`}function _g(e){return e?`setUTCHours`:`setHours`}function vg(e){return e?`setUTCMinutes`:`setMinutes`}function yg(e){return e?`setUTCSeconds`:`setSeconds`}function bg(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function xg(e){if(!Gs(e))return V(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function Sg(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Cg=De;function wg(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ke(e)?e:`-`}function a(e){return Ys(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?zs(e):e;if(!isNaN(+c))return rg(c,r,n);if(s)return`-`}if(t===`ordinal`)return he(e)?i(e):ge(e)&&a(e)?e+``:`-`;var l=Ws(e);return a(l)?xg(l):he(e)?i(e):typeof e==`boolean`?e+``:`-`}var Tg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Eg=function(e,t){return`{`+e+(t??``)+`}`};function Dg(e,t,n){B(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function kg(e,t){return t||=`transparent`,V(e)?e:_e(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Ag=R,jg=[`left`,`right`,`top`,`bottom`,`width`,`height`],Mg=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function Ng(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var Pg=Ng;pe(Ng,`vertical`),pe(Ng,`horizontal`);function _ee(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function Fg(e,t,n){n=Cg(n||0);var r=t.width,i=t.height,a=Ts(e.left,r),o=Ts(e.top,i),s=Ts(e.right,r),c=Ts(e.bottom,i),l=Ts(e.width,r),u=Ts(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new tn((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var Ig={rect:1,point:2};function Lg(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=Zm(e),l=c.coord,u=c.from;if(o.dataToLayout){a=Ig.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Ig.point,s=u,i=o.dataToPoint(l))}return a??=Ig.rect,a===Ig.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function vee(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new tn(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=Fg(L({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function Rg(e){var t=e.layoutMode||e.constructor.layoutMode;return _e(t)?t:t?{type:t}:null}function zg(e,t,n){var r=n&&n.ignoreSize;!B(r)&&(r=[r,r]);var i=o(Mg[0],0),a=o(Mg[1],1);c(Mg[0],e,i),c(Mg[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(Ag(n,function(t){c[t]=e[t]}),Ag(n,function(e){Be(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d=0;o--)a=F(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return jc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return _ee(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(yp);et(Vg,yp),at(Vg),hh(Vg),gh(Vg,Hg);function Hg(e){var t=[];return R(Vg.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=z(t,function(e){return Ye(e).main}),e!==`dataset`&&re(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Ug=Ec(),Wg=Ec(),Gg=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=ac(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return Jg(this,Ug,r,i,e,t,n)},e.prototype.clearColorPalette=function(){Yg(this,Ug)},e}();function Kg(e,t,n,r){return Jg(e,Wg,ac(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function qg(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function Jg(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:qg(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function Yg(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Xg=/\{@(.+?)\}/g,Zg=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&B(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),me(i))return s.status=t,s.dimensionIndex=r,i(s);if(V(i))return Dg(i,s).replace(Xg,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=am(o,e,i);if(a&&B(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return am(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Qg(e){var t,n;return _e(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function $g(e){return new e_(e)}var e_=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(m_(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ye(o)?sl:rl,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=we(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=we(u.sourceHeader,d.sourceHeader),m=we(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Np(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Np(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&h_(``);var i,a=[],o=[];return R(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&h_(``),a.push(t),o.push(e._getVersionSign())}),n?i=u_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Fp(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;tn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Bn(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;tn.set(Vn,bn(n,o,i),xn(r,s,a),o,s),tn.intersect(t,Vn,null,Hn);var c=Hn.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=bn(c.x,c.width,i,!0),e.baseY=xn(c.y,c.height,a,!0)}}var Vn=new tn(0,0,0,0),Hn={outIntersectRect:{},clamp:!0};function Un(e){return e==null?e=``:e+=``}function Wn(e){var t=Un(e.text),n=e.font;return Gn(e,_n(dn(n),t),Sn(n),null)}function Gn(e,t,n,r){var i=new tn(bn(e.x||0,t,e.textAlign),xn(e.y||0,n,e.textBaseline),t,n),a=r??(Kn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Kn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var qn=vt,Jn=5e-5;function Yn(e){return e>Jn||e<-Jn}var Xn=[],Zn=[],Qn=_t(),$n=Math.abs,er=function(){function e(){}return e.prototype.getLocalTransform=function(e){return tr(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Yn(this.rotation)||Yn(this.x)||Yn(this.y)||Yn(this.scaleX-1)||Yn(this.scaleY-1)||Yn(this.skewX)||Yn(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(qn(n),this.invTransform=null);return}n||=_t(),t?this.getLocalTransform(n):qn(n),e&&(t?bt(n,e,n):yt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||_t(),wt(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Xn);var n=Xn[0]<0?-1:1,r=Xn[1]<0?-1:1,i=((Xn[0]-n)*t+n)/Xn[0]||0,a=((Xn[1]-r)*t+r)/Xn[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||_t(),bt(Zn,e.invTransform,t),t=Zn);var n=this.originX,r=this.originY;(n||r)&&(Qn[4]=n,Qn[5]=r,bt(Zn,t,Qn),Zn[4]-=n,Zn[5]-=r,t=Zn),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Rt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Rt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&$n(e[0]-1)>1e-10&&$n(e[3]-1)>1e-10?Math.sqrt($n(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){rr(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&St(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),tr=er.getLocalTransform,nr=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function rr(e,t){return ne(e,t,nr)}var ir={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ir.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ir.bounceIn(e*2)*.5:ir.bounceOut(e*2-1)*.5+.5}},ar=Math.pow,or=Math.sqrt,sr=1e-8,cr=1e-4,lr=or(3),ur=1/3,dr=Tt(),fr=Tt(),pr=Tt();function mr(e){return e>-sr&&esr||e<-sr}function gr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function _r(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function vr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(mr(u)&&mr(d)){if(mr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(mr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=or(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ar(-y,ur):ar(y,ur),b=b<0?-ar(-b,ur):ar(b,ur);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*or(u*u*u)),S=Math.acos(x)/3,C=or(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+lr*Math.sin(S)))/(3*o),T=(-s+C*(w-lr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function yr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(mr(o)){if(hr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(mr(u))i[0]=-a/(2*o);else if(u>0){var d=or(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function br(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function xr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;dr[0]=c,dr[1]=l;for(var v=0;v<1;v+=.05)fr[0]=gr(e,n,i,o,v),fr[1]=gr(t,r,a,s,v),g=Lt(dr,fr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(mr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=or(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Er(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Dr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Or(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;dr[0]=o,dr[1]=s;for(var f=0;f<1;f+=.05){fr[0]=Cr(e,n,i,f),fr[1]=Cr(t,r,a,f);var p=Lt(dr,fr);p=0&&p=1?1:vr(0,r,a,1,e,s)&&gr(0,i,o,1,s[0])}}}var Mr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ve,this.ondestroy=e.ondestroy||Ve,this.onrestart=e.onrestart||Ve,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:ir[e]||jr(e)},e}(),Nr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Pr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Fr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ir(e){return e<0?0:e>1?1:e}function Lr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Pr(parseFloat(t)/100*255):Pr(parseInt(t,10))}function Rr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ir(parseFloat(t)/100):Ir(parseFloat(t))}function zr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Br(e,t,n){return e+(t-e)*n}function Vr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Hr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ur=new dt(20),Wr=null;function Gr(e,t){Wr&&Hr(Wr,t),Wr=Ur.put(e,Wr||t.slice())}function Kr(e,t){if(e){t||=[];var n=Ur.get(e);if(n)return Hr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Nr)return Hr(t,Nr[r]),Gr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Vr(t,0,0,0,1);return}return Vr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Gr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Vr(t,0,0,0,1);return}return Vr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Gr(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Vr(t,+l[0],+l[1],+l[2],1):Vr(t,0,0,0,1);u=Rr(l.pop());case`rgb`:if(l.length>=3)return Vr(t,Lr(l[0]),Lr(l[1]),Lr(l[2]),l.length===3?u:Rr(l[3])),Gr(e,t),t;Vr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Vr(t,0,0,0,1);return}return l[3]=Rr(l[3]),qr(l,t),Gr(e,t),t;case`hsl`:if(l.length!==3){Vr(t,0,0,0,1);return}return qr(l,t),Gr(e,t),t;default:return}}Vr(t,0,0,0,1)}}function qr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Rr(e[1]),i=Rr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Vr(t,Pr(zr(o,a,n+1/3)*255),Pr(zr(o,a,n)*255),Pr(zr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Jr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Yr(e,t){var n=Kr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ei(n,n.length===4?`rgba`:`rgb`)}}function Xr(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Pr(Br(o[0],s[0],c)),n[1]=Pr(Br(o[1],s[1],c)),n[2]=Pr(Br(o[2],s[2],c)),n[3]=Ir(Br(o[3],s[3],c)),n}}function Zr(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Kr(t[i]),s=Kr(t[a]),c=r-i,l=ei([Pr(Br(o[0],s[0],c)),Pr(Br(o[1],s[1],c)),Pr(Br(o[2],s[2],c)),Ir(Br(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Qr(e,t,n,r){var i=Kr(e);if(e)return i=Jr(i),t!=null&&(i[0]=Fr(me(t)?t(i[0]):t)),n!=null&&(i[1]=Rr(me(n)?n(i[1]):n)),r!=null&&(i[2]=Rr(me(r)?r(i[2]):r)),ei(qr(i),`rgba`)}function $r(e,t){var n=Kr(e);if(n&&t!=null)return n[3]=Ir(t),ei(n,`rgba`)}function ei(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ti(e,t){var n=Kr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ni=new dt(100);function ri(e){if(V(e)){var t=ni.get(e);return t||(t=Yr(e,-.1),ni.put(e,t)),t}if(xe(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Yr(e.color,-.1)}}),n}return e}var ii=Math.round;function ai(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Kr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var oi=1e-4;function si(e){return e-oi}function ci(e){return ii(e*1e3)/1e3}function li(e){return ii(e*1e4)/1e4}function ui(e){return`matrix(`+ci(e[0])+`,`+ci(e[1])+`,`+ci(e[2])+`,`+ci(e[3])+`,`+li(e[4])+`,`+li(e[5])+`)`}var di={left:`start`,right:`end`,center:`middle`,middle:`middle`};function fi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function pi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function mi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function hi(e){return e&&!!e.image}function gi(e){return e&&!!e.svgElement}function _i(e){return hi(e)||gi(e)}function vi(e){return e.type===`linear`}function yi(e){return e.type===`radial`}function bi(e){return e&&(e.type===`linear`||e.type===`radial`)}function xi(e){return`url(#`+e+`)`}function Si(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Ci(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*He,i=we(e.scaleX,1),a=we(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ii(o*He)+`deg, `+ii(s*He)+`deg)`),c.join(` `)}var wi=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),Ti=Array.prototype.slice;function Ei(e,t,n){return(t-e)*n+e}function Di(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Hi,s=t;if(oe(t)){var c=Fi(t);o=c,(c===1&&!ge(t[0])||c===2&&!ge(t[0][0]))&&(a=!0)}else if(ge(t)&&!Se(t))o=Ii;else if(V(t)){if(!isNaN(+t))o=Ii;else{var l=Kr(t);l&&(s=l,o=zi)}}else if(xe(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Kr(e.color)}}),vi(t)?o=Bi:yi(t)&&(o=Vi),s=u}i===0?this.valType=o:(o!==this.valType||o===Hi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=me(n)?n:ir[n]||jr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Wi(r),c=Ui(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Gi:e[s];if((Wi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Wi(i))i===Li?Di(g,f[r],p[r],h):Oi(g,f[r],p[r],h);else if(Ui(i)){var _=f[r],v=p[r],y=i===Bi;e[s]={type:y?`linear`:`radial`,x:Ei(_.x,v.x,h),y:Ei(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ei(e.offset,n.offset,h),color:Pi(Di([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ei(_.x2,v.x2,h),e[s].y2=Ei(_.y2,v.y2,h)):e[s].r=Ei(_.r,v.r,h)}else if(c)Di(g,f[r],p[r],h),n||(e[s]=Pi(g));else{var b=Ei(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Ii?e[n]=e[n]+r:t===zi?(Kr(e[n],Gi),ki(Gi,Gi,r,1),e[n]=Pi(Gi)):t===Li?ki(e[n],e[n],r,1):t===Ri&&Ai(e[n],e[n],r,1)},e}(),qi=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){te(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ue(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Ni(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ni(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Ji=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?$i:Qi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Kr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,ei(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},I(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(_e(e))for(var n=ue(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(ta,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===ta;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(re(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){te(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ha(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,_a(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=re(r,e),a=re(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var va=`__zr_style_`+Math.round(Math.random()*10),ya={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ba={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ya[va]=!0;var xa=[`z`,`z2`,`invisible`],Sa=[`invisible`],Ca=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=ue(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Ma[0]=Aa(i)*n+e,Ma[1]=ka(i)*r+t,Na[0]=Aa(a)*n+e,Na[1]=ka(a)*r+t,l(s,Ma,Na),u(c,Ma,Na),i%=ja,i<0&&(i+=ja),a%=ja,a<0&&(a+=ja),i>a&&!o?a+=ja:ii&&(Pa[0]=Aa(p)*n+e,Pa[1]=ka(p)*r+t,l(s,Pa,s),u(c,Pa,c))}var Va={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ha=[],Ua=[],Wa=[],Ga=[],Ka=[],qa=[],Ja=Math.min,Ya=Math.max,Xa=Math.cos,Za=Math.sin,Qa=Math.abs,$a=Math.PI,eo=$a*2,to=typeof Float32Array<`u`,no=[];function ro(e){return Math.round(e/$a*1e8)/1e8%2*$a}function io(e,t){var n=ro(e[0]);n<0&&(n+=eo);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=eo?i=n+eo:t&&n-i>=eo?i=n-eo:!t&&n>i?i=n+(eo-ro(n-i)):t&&n0&&(this._ux=Qa(n/Xi/e)||0,this._uy=Qa(n/Xi/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Va.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Qa(e-this._xi),r=Qa(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Va.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Va.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Va.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),no[0]=r,no[1]=i,io(no,a),r=no[0],i=no[1];var o=i-r;return this.addData(Va.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Xa(i)*n+e,this._yi=Za(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Va.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Va.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&to&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Wa[0]=Wa[1]=Ka[0]=Ka[1]=Number.MAX_VALUE,Ga[0]=Ga[1]=qa[0]=qa[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Qa(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Va.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Sr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Va.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=kr(i,a,y,b,h,g,10),i=h,a=g;break;case Va.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Xa(D)*T+C,s=Za(D)*E+w),m=Ya(T,E)*Ja(eo,Math.abs(O)),i=Xa(k)*T+C,a=Za(k)*E+w;break;case Va.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Va.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Va.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Va.L:u=n[x++],d=n[x++];var w=Qa(u-c),T=Qa(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Va.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],M=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;br(c,k,j,M,D,Ha),br(l,A,ee,N,D,Ua),e.bezierCurveTo(Ha[1],Ua[1],Ha[2],Ua[2],Ha[3],Ua[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,M,N),c=M,l=N;break;case Va.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Dr(c,k,j,D,Ha),Dr(l,A,ee,D,Ua),e.quadraticCurveTo(Ha[1],Ua[1],Ha[2],Ua[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Va.A:var te=n[x++],P=n[x++],F=n[x++],I=n[x++],ne=n[x++],L=n[x++],re=n[x++],ie=!n[x++],ae=F>I?F:I,oe=Qa(F-I)>.001,R=ne+L,z=!1;if(f){var E=p[g++];h+E>_&&(R=ne+L*(_-h)/E,z=!0),h+=E}if(oe&&e.ellipse?e.ellipse(te,P,F,I,re,ne,R,ie):e.arc(te,P,ae,ne,R,ie),z)break lo;C&&(o=Xa(ne)*F+te,s=Za(ne)*I+P),c=Xa(R)*F+te,l=Za(R)*I+P;break;case Va.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var se=n[x++],ce=n[x++];if(f){var E=p[g++];if(h+E>_){var le=_-h;e.moveTo(u,d),e.lineTo(u+Ja(le,se),d),le-=se,le>0&&e.lineTo(u+se,d+Ja(le,ce)),le-=ce,le>0&&e.lineTo(u+Ya(se-le,0),d+ce),le-=se,le>0&&e.lineTo(u,d+Ya(ce-le,0));break lo}h+=E}e.rect(u,d,se,ce);break;case Va.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Va,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function oo(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=fo);var f=Math.atan2(c,s);return f<0&&(f+=fo),f>=r&&f<=i||f+fo>=r&&f+fo<=i}function mo(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var ho=ao.CMD,go=Math.PI*2,_o=1e-4;function vo(e,t){return Math.abs(e-t)<_o}var yo=[-1,-1,-1],bo=[-1,-1];function xo(){var e=bo[0];bo[0]=bo[1],bo[1]=e}function So(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l1&&xo(),p=gr(t,r,a,s,bo[0]),f>1&&(m=gr(t,r,a,s,bo[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Cr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);yo[0]=-c,yo[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=go-1e-4){r=0,i=go;var u=a?1:-1;return o>=yo[0]+e&&o<=yo[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=go,i+=go);for(var f=0,p=0;p<2;p++){var m=yo[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=go+h),(h>=r&&h<=i||h+go>=r&&h+go<=i)&&(h>Math.PI/2&&h1&&(n||(s+=mo(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case ho.M:u=a[m++],d=a[m++],c=u,l=d;break;case ho.L:if(n){if(oo(c,l,a[m],a[m+1],t,r,i))return!0}else s+=mo(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.C:if(n){if(so(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=So(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.Q:if(n){if(co(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Co(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=mo(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(po(_,v,b,x,x+S,C,t,w,i))return!0}else s+=wo(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case ho.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(oo(u,d,f,d,t,r,i)||oo(f,d,f,p,t,r,i)||oo(f,p,u,p,t,r,i)||oo(u,p,u,d,t,r,i))return!0}else s+=mo(f,d,f,p,r,i),s+=mo(u,p,u,d,r,i);break;case ho.Z:if(n){if(oo(c,l,u,d,t,r,i))return!0}else s+=mo(c,l,u,d,r,i);c=u,l=d}}return!n&&!vo(l,d)&&(s+=mo(c,l,u,d,r,i)||0),s!==0}function Eo(e,t,n){return To(e,0,!1,t,n)}function Do(e,t,n,r){return To(e,t,!0,n,r)}var Oo=L({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ya),ko={style:L({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ba.style)},Ao=nr.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),jo=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Qi:t>.2?ea:$i}if(e)return $i}return Qi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(V(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ti(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new ao(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Do(a,o/s,e,t)))return!0}if(this.hasFill())return Eo(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:I(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ze(Oo,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=I({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=I({},r.shape),I(c,n.shape)):(c=I({},i?this.shape:r.shape),I(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=I({},this.shape);for(var l={},u=ue(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var zo=Math.round;function Bo(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(zo(r*2)===zo(i*2)&&(e.x1=e.x2=Ho(r,s,!0)),zo(a*2)===zo(o*2)&&(e.y1=e.y2=Ho(a,s,!0)),e):e}}function Vo(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Ho(r,s,!0),e.y=Ho(i,s,!0),e.width=Math.max(Ho(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Ho(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Ho(e,t,n){if(!t)return e;var r=zo(e*2);return(r+zo(t))%2==0?r/2:(r+(n?1:-1))/2}var Uo=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Wo={},Go=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Uo},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Vo(Wo,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Ro(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(jo);Go.prototype.type=`rect`;var Ko={fill:`#000`},qo=2,Jo={},Yo={style:L({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ba.style)},Xo=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Ko,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&ls(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=ss(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(No),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=os(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=as(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=qo,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Te(s.opacity,t.opacity,1),ts(p,s),y&&(p.lineWidth=Te(s.lineWidth,t.lineWidth,g),p.lineDash=we(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Gn(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Go),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=we(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Lo),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=we(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Te(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return ns(e)&&(t=[e.fontStyle,e.fontWeight,es(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ke(t)||e.textFont||e.font},t}(Ca),Zo={left:!0,right:1,center:1},Qo={top:1,bottom:1,middle:1},$o=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function es(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function ts(e,t){for(var n=0;n<$o.length;n++){var r=$o[n],i=t[r];i!=null&&(e[r]=i)}}function ns(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function rs(e){return is(e),R(e.rich,is),e}function is(e){if(e){e.font=Xo.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Zo[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Qo[n]?n:`top`,e.padding&&=De(e.padding)}}function as(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function os(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function ss(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function cs(e){var t=e.text;return t!=null&&(t+=``),t}function ls(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var us=1e-4,ds=20;function fs(e){return e.replace(/^\s+|\s+$/g,``)}var ps=Math.min,ms=Math.max,hs=Math.abs,gs=Math.round,_s=Math.floor,vs=Math.ceil,ys=Math.pow,bs=Math.log,xs=Math.LN10,Ss=Math.PI,Cs=Math.random;function ws(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var Ts=Es;function Es(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Ds(e,t,n)}function Ds(e,t,n){return V(e)?Os(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Os(e){return!!fs(e).match(/%$/)}function ks(e,t,n){return isNaN(t)?n?``+e:+e:(t=ps(ms(0,t),ds),e=(+e).toFixed(t),n?e:+e)}function As(e){return e.sort(function(e,t){return e-t}),e}function js(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(gs(e*t)/t===e)return n}return Ms(e)}function Ms(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ms(0,(a<0?0:i-1-a)-r)}function Ns(e,t,n){var r=hs(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=bs(2*hs(n||1)*hs(r))/xs,a=bs(hs(t))/xs,o=ms(0,vs(-i+a));return isFinite(o)||(o=NaN),o}function Ps(e,t){var n=ms(js(e),js(t)),r=e+t;return n>ds?r:ks(r,n)}var Fs=ys(2,53)-1;function Is(e){var t=Ss*2;return(e%t+t)%t}function Ls(e){return e>-us&&e=10&&t++,t}function Hs(e,t){var n=Vs(e),r=ys(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,ks(e,-n)}function Us(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Lc(){return[1/0,-1/0]}function Rc(e,t){Hc(t)&&(te[1]&&(e[1]=t))}function zc(e,t){Hc(t)&&te[1]&&(e[1]=t)}function Vc(e,t){Uc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Hc(e){return e!=null&&isFinite(e)}function Uc(e,t){return Hc(e)&&Hc(t)&&e<=t}function Wc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Gc(e){Uc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Kc(){var e=`__ec_once_`+qc++;return function(t,n){Be(t,e)||(t[e]=1,n())}}var qc=Ks();function Jc(e,t,n){var r=Le(),i=0;R(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Yc(e){return e.value+``}function Xc(e){return e+``}function Zc(e,t){return we(t,!0)?e.seriesIndex+2:0}function Qc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function $c(e){return{overallReset:e}}var el=Ec(),tl=function(e,t,n,r){if(r){var i=el(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=el(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},nl=Le([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),rl=`original`,il=`arrayRows`,al=`objectRows`,ol=`keyedColumns`,sl=`typedArray`,cl=`unknown`,ll=`column`,ul=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],dl=function(){function e(e){R(ul,function(t){this[t]=fe(e[t],e)},this)}return e}();function fl(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var pl=1,ml={},hl=Ec(),gl=Ec(),_l=[`emphasis`,`blur`,`select`],vl=[`normal`,`emphasis`,`blur`,`select`],yl=`highlight`,bl=`downplay`,xl=`select`,Sl=`unselect`,Cl=`toggleSelect`,wl=`selectchanged`;function Tl(e){return e!=null&&e!==`none`}function El(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Dl(e){El(e,`emphasis`,2)}function Ol(e){e.hoverState===2&&El(e,`normal`,0)}function kl(e){El(e,`blur`,1)}function Al(e){e.hoverState===1&&El(e,`normal`,0)}function jl(e){e.selected=!0}function Ml(e){e.selected=!1}function Nl(e,t,n){t(e,n)}function Pl(e,t,n){Nl(e,t,n),e.isGroup&&e.traverse(function(e){Nl(e,t,n)})}function Fl(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Il(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof jo){var o=hl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Tl(s)||Tl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=I({},r),l=I({},l),l.fill=s):!Tl(l.fill)&&Tl(s)?(a=!0,r=I({},r),l=I({},l),l.fill=ri(s)):!Tl(l.stroke)&&Tl(c)&&(a||(r=I({},r),l=I({},l)),l.stroke=ri(c)),r.style=l}}if(r&&r.z2==null){a||(r=I({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Rl(e,t,n){if(n&&n.z2==null){n=I({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function zl(e,t,n){var r=re(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Il(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=I({},n),o=I({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Bl(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Ll(this,e,t,n);if(e===`blur`)return zl(this,e,n);if(e===`select`)return Rl(this,e,n)}return n}function Vl(e){e.stateProxy=Bl;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Bl),n&&(n.stateProxy=Bl)}function Hl(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Dl)}function Ul(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Ol)}function Wl(e,t){e.__highByOuter|=1<<(t||0),Pl(e,Dl)}function Gl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Pl(e,Ol)}function Kl(e){Pl(e,kl)}function ql(e){Pl(e,Al)}function Jl(e){Pl(e,jl)}function Yl(e){Pl(e,Ml)}function Xl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Zl(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=gl(i),o=fl(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Al(e)}),s&&n.push(i)),a.isBlured=!1}),R(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Ql(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function su(e,t,n){mu(e,!0),Pl(e,Vl),uu(e,t,n)}function cu(e){mu(e,!1)}function lu(e,t,n,r){r?cu(e):su(e,t,n)}function uu(e,t,n){var r=el(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var du=[`emphasis`,`blur`,`select`],fu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function pu(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Tu(m),s*=Tu(m));var h=(i===a?-1:1)*Tu((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Du(d)*g-Eu(d)*_,y=(t+r)/2+Eu(d)*g+Du(d)*_,b=ju([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=ju(x,S);if(Au(x,S)<=-1&&(C=Ou),Au(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Ou*1e6)/1e6;C=Ou*2+w%2*Ou}u.addData(l,v,y,o,s,b,C,d,a)}var Nu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Pu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Fu(e){var t=new ao;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=ao.CMD,c=e.match(Nu);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=re(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=re(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function od(e){var t;if(B(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function sd(e,t){var n,r=td(t.r,0),i=td(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=$u(c-s),p=f>Ju&&f%Ju;if(p>rd&&(f=p),!(r>rd))e.moveTo(l,u);else if(f>Ju-rd)e.moveTo(l+r*Xu(s),u+r*Yu(s)),e.arc(l,u,r,s,c,!d),i>rd&&(e.moveTo(l+i*Xu(c),u+i*Yu(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Xu(s),j=r*Yu(s),ee=i*Xu(c),M=i*Yu(c),N=f>rd;if(N){var te=t.cornerRadius;te&&(n=od(te),m=n[0],h=n[1],g=n[2],_=n[3]);var P=$u(r-i)/2;if(v=nd(P,g),y=nd(P,_),b=nd(P,m),x=nd(P,h),w=S=td(v,y),T=C=td(b,x),(S>rd||C>rd)&&(E=r*Xu(c),D=r*Yu(c),O=i*Xu(s),k=i*Yu(s),frd){var oe=nd(g,w),R=nd(_,w),z=ad(O,k,A,j,r,oe,d),se=ad(E,D,ee,M,r,R,d);e.moveTo(l+z.cx+z.x0,u+z.cy+z.y0),w0&&e.arc(l+z.cx,u+z.cy,oe,Qu(z.y0,z.x0),Qu(z.y1,z.x1),!d),e.arc(l,u,r,Qu(z.cy+z.y1,z.cx+z.x1),Qu(se.cy+se.y1,se.cx+se.x1),!d),R>0&&e.arc(l+se.cx,u+se.cy,R,Qu(se.y1,se.x1),Qu(se.y0,se.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>rd)||!N)e.lineTo(l+ee,u+M);else if(T>rd){var oe=nd(m,T),R=nd(h,T),z=ad(ee,M,E,D,i,-R,d),se=ad(A,j,O,k,i,-oe,d);e.lineTo(l+z.cx+z.x0,u+z.cy+z.y0),T0&&e.arc(l+z.cx,u+z.cy,R,Qu(z.y0,z.x0),Qu(z.y1,z.x1),!d),e.arc(l,u,i,Qu(z.cy+z.y1,z.cx+z.x1),Qu(se.cy+se.y1,se.cx+se.x1),d),oe>0&&e.arc(l+se.cx,u+se.cy,oe,Qu(se.y1,se.x1),Qu(se.y0,se.x0),!d))}else e.lineTo(l+ee,u+M),e.arc(l,u,i,c,s,d)}e.closePath()}}}var cd=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),ld=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new cd},t.prototype.buildPath=function(e,t){sd(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(jo);ld.prototype.type=`sector`;var ud=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),dd=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ud},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(jo);dd.prototype.type=`ring`;function fd(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=fd(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sFd[1]){if(i=!1,Id.negativeSize||n)return i;var s=Nd(Fd[0]-Pd[1]),c=Nd(Pd[0]-Fd[1]);jd(s,c)>Rd.len()&&(s=c||!Id.bidirectional)&&(Vt.scale(Ld,o,-c*r),Id.useDir&&Id.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Gd(e,t,n,r,i,a){Wd(`update`,e,t,n,r,i,a)}function Kd(e,t,n,r,i,a){Wd(`enter`,e,t,n,r,i,a)}function qd(e){if(!e.__zr)return!0;for(var t=0;tEd,BezierCurve:()=>wd,BoundingRect:()=>tn,Circle:()=>Wu,CompoundPath:()=>Dd,Ellipse:()=>Ku,Group:()=>Hu,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Lo,IncrementalDisplayable:()=>Vd,Line:()=>bd,LinearGradient:()=>kd,OrientedBoundingRect:()=>zd,Path:()=>jo,Point:()=>Vt,Polygon:()=>hd,Polyline:()=>_d,RadialGradient:()=>Ad,Rect:()=>Go,Ring:()=>dd,Sector:()=>ld,Text:()=>Xo,WH:()=>tf,XY:()=>ef,applyTransform:()=>_f,calcZ2Range:()=>Bf,clipPointsByRect:()=>Sf,clipRectByRect:()=>Cf,createIcon:()=>wf,decomposeTransform:()=>Wf,ensureCopyRect:()=>Lf,ensureCopyTransform:()=>Rf,expandOrShrinkRect:()=>kf,extendPath:()=>af,extendShape:()=>nf,getCurrentCanvasPainter:()=>Kf,getShapeClass:()=>sf,getTransform:()=>gf,groupTransition:()=>xf,initProps:()=>Kd,isBoundingRectAxisAligned:()=>Ff,isElementRemoved:()=>qd,lineLineIntersect:()=>Ef,linePolygonIntersect:()=>Tf,makeImage:()=>lf,makePath:()=>cf,mergePath:()=>df,payloadDisableAnimation:()=>Uf,registerShape:()=>of,removeElement:()=>Jd,removeElementWithFadeOut:()=>Xd,resizePath:()=>ff,retrieveZInfo:()=>zf,setTooltipConfig:()=>Mf,subPixelOptimize:()=>hf,subPixelOptimizeLine:()=>pf,subPixelOptimizeRect:()=>mf,transformDirection:()=>vf,traverseElements:()=>Pf,traverseUpdateZ:()=>Vf,updateProps:()=>Gd}),$d={},ef=[`x`,`y`],tf=[`width`,`height`];function nf(e){return jo.extend(e)}var rf=Bu;function af(e,t){return rf(e,t)}function of(e,t){$d[e]=t}function sf(e){if($d.hasOwnProperty(e))return $d[e]}function cf(e,t,n,r){var i=zu(e,t);return n&&(r===`center`&&(n=uf(n,i.getBoundingRect())),ff(i,n)),i}function lf(e,t,n){var r=new Lo({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(uf(t,i))}}});return r}function uf(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var df=Vu;function ff(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function pf(e,t){return Bo(e,e,{lineWidth:t}),e}function mf(e,t){return Vo(e,e,t),e}var hf=Ho;function gf(e,t){for(var n=vt([]);e&&e!==t;)bt(n,e.getLocalTransform(),n),e=e.parent;return n}function _f(e,t,n){return t&&!oe(t)&&(t=er.getLocalTransform(t)),n&&(t=wt([],t)),Rt([],e,t)}function vf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:hs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:hs(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=_f(a,t,n),hs(a[0])>hs(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function yf(e){return!e.isGroup}function bf(e){return e.shape!=null}function xf(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){yf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return bf(e)&&(t.shape=P(e.shape)),t}var a=r(e);t.traverse(function(e){if(yf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Gd(e,r,n,el(e).dataIndex)}}})}function Sf(e,t){return z(e,function(e){var n=e[0];n=ms(n,t.x),n=ps(n,t.x+t.width);var r=e[1];return r=ms(r,t.y),r=ps(r,t.y+t.height),[n,r]})}function Cf(e,t){var n=ms(e.x,t.x),r=ps(e.x+e.width,t.x+t.width),i=ms(e.y,t.y),a=ps(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function wf(e,t,n){var r=I({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),L(i,n),new Lo(r)):cf(e.replace(`path://`,``),r,n,`center`)}function Tf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Df(p,m,u,d)/f;return!(g<0||g>1)}function Df(e,t,n,r){return e*r-n*t}function Of(e){return e<=1e-6&&e>=-1e-6}function kf(e,t,n,r,i){return t==null?e:(ge(t)?Af[0]=Af[1]=Af[2]=Af[3]=t:(Af[0]=t[0],Af[1]=t[1],Af[2]=t[2],Af[3]=t[3]),r&&(Af[0]=ms(0,Af[0]),Af[1]=ms(0,Af[1]),Af[2]=ms(0,Af[2]),Af[3]=ms(0,Af[3])),n&&(Af[0]=-Af[0],Af[1]=-Af[1],Af[2]=-Af[2],Af[3]=-Af[3]),jf(e,Af,`x`,`width`,3,1,i&&i[0]||0),jf(e,Af,`y`,`height`,0,2,i&&i[1]||0),e)}var Af=[0,0,0,0];function jf(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ms(0,ps(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:hs(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Mf(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=V(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&R(ue(c),function(e){Be(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=el(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:L({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Nf(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Pf(e,t){if(e){if(B(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Vf(e,t,n){Hf(e,t,n,-1/0)}function Hf(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Kp=(e={},e[il+`_`+ll]={pure:!0,appendData:i},e[il+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[al]={pure:!0,appendData:i},e[ol]={pure:!0,appendData:function(e){var t=this._data;R(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[rl]={appendData:i},e[sl]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){ge(t)||tc(``),this._opFn=fm[e],this._rvalFloat=Ws(t)}return e.prototype.evaluate=function(e){return ge(e)?this._opFn(e,this._rvalFloat):this._opFn(Ws(e),this._rvalFloat)},e})();var nee=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=ge(e)?e:Ws(e),r=ge(t)?t:Ws(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=V(e),s=V(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ws(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Ws(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function ree(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function iee(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,oee=typeof Uint16Array>`u`?Array:Uint16Array,pm=typeof Int32Array>`u`?Array:Int32Array,mm=typeof Float64Array>`u`?Array:Float64Array,hm={float:mm,int:pm,ordinal:Array,number:Array,time:mm},gm;function _m(e){return e>65535?aee:oee}function vm(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function ym(e,t,n,r,i){var a=hm[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=z(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(_m(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return dm(e[r],this._dimensions[r])}gm={arrayRows:e,objectRows:function(e,t,n,r){return dm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return dm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),xm=Ec(),Sm={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Cm=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Em(this.source))},e.prototype.getSourceDimensionIndex=function(e){return we(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Vp(this.source),n=!Dm(e),r=``,i=[],a=0,o=0;a30}var Om=_e,km=z,Am=typeof Int32Array>`u`?Array:Int32Array,jm=`e\0\0`,Mm=-1,Nm=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Pm=[`_approximateExtent`],Fm,Im,Lm,Rm,zm,Bm,Vm,Hm=function(){function e(e,t){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`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;wm(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():Om(i)&&(i=I({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Om(t)?I(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Om(e)?I(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?I(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){tl(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){R(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:km(this.dimensions,this._getDimInfo,this),this.hostModel),zm(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ee(arguments)))})},e.internalField=function(){Fm=function(e){var t=e._invertedIndicesMap;R(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Am(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Um(e,t){Mp(e)||(e=Pp(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Le(),a=[],o=Wm(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Dm(o),c=r===e.dimensionsDefine,l=c?Em(e):Tm(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Le(u),f=new pm(o),p=0;p0&&(e.name+=t-1)}),new Cm({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Wm(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return R(t,function(e){var t;_e(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Gm(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Km={},qm={},Jm=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Km,!0),this._normalMasterList=n(qm,!1);function n(n,r){var i=[];return R(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){R(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Km[e]=t;return}qm[e]=t},e.get=function(e){return qm[e]||Km[e]},e}();function Ym(e){return!!Km[e]}var Xm=Le();function Zm(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=Xm.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function Qm(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!Ym(n)&&(i=0))}return{coordSysType:n,kind:i}}function $m(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=Qm(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var eh=function(){function e(e){this.coordSysDims=[],this.axisMap=Le(),this.categoryAxisMap=Le(),this.coordSysName=e}return e}();function th(e){var t=e.get(`coordinateSystem`),n=new eh(t),r=nh[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var nh={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Ac).models[0],a=e.getReferringComponents(`yAxis`,Ac).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),rh(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),rh(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Ac).models[0];t.coordSysDims=[`single`],n.set(`single`,i),rh(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Ac).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),rh(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),rh(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),rh(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Ac).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function rh(e){return e.get(`type`)===`category`}function ih(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;ah(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(R(a,function(e,t){V(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),R(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;R(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function ah(e){return!wm(e.schema)}function oh(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function sh(e,t){return oh(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function ch(e,t){var n=e.get(`coordinateSystem`),r=Jm.get(n),i;return t&&t.coordSysDims&&(i=z(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=cm(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function lh(e,t,n){var r,i;return n&&R(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function uh(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Pp(e)):(i=r.getSource(),a=i.sourceFormat===rl);var o=th(t),s=ch(t,o),c=n.useEncodeDefaulter,l=me(c)?c:c?pe(Ep,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Um(i,u),f=lh(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=ih(t,{schema:d,store:p}),h=new Hm(d,t);h.setCalculationInfo(m);var g=f!=null&&dh(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function dh(e){if(e.sourceFormat===`original`)return!B(cc(fh(e.data||[])))}function fh(e){for(var t=0;t=0&&n.push(e)}),n}}function _h(e,t){return F(F({},e,!0),t,!0)}var vh=Math.log(2);function yh(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){R(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function uee(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?bh(s,o):bh(o,s))}function wh(e){return e.nodeName.toUpperCase()===`CANVAS`}var dee=/([&<>"'])/g,fee={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Th(e){return e==null?``:(e+``).replace(dee,function(e,t){return fee[t]})}var pee={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},mee={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Eh=`ZH`,Dh=`EN`,Oh=Dh,kh={},Ah={},jh=We.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Oh).toUpperCase().indexOf(Eh)>-1?Eh:Oh}():Oh;function Mh(e,t){e=e.toUpperCase(),Ah[e]=new yp(t),kh[e]=t}function Nh(e){if(V(e)){var t=kh[e.toUpperCase()]||{};return e===Eh||e===Dh?P(t):F(P(t),P(kh[Oh]),!1)}return F(P(e),P(kh[Oh]),!1)}function Ph(e){return Ah[e]}function Fh(){return Ah[Oh]}Mh(Dh,pee),Mh(Eh,mee);var Ih=null;function Lh(){return Ih}function Rh(e,t){var n=Lh(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function zh(e){var t=e.brk;return t?t.breaks:[]}function Bh(e){var t=e.brk;return t?t.hasBreaks():!1}var Vh=1e3,Hh=Vh*60,Uh=Hh*60,Wh=Uh*24,Gh=Wh*365,Kh={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},qh={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},hee=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Jh=`{yyyy}-{MM}-{dd}`,Yh={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Jh,hour:Jh+` `+qh.hour,minute:Jh+` `+qh.minute,second:Jh+` `+qh.second,millisecond:hee},Xh=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Zh=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Qh(e){return!V(e)&&!me(e)?$h(e):e}function $h(e){e||={};var t={},n=!0;return R(Xh,function(t){n&&=e[t]==null}),R(Xh,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Xh[s],l=_e(a)&&!B(a)?a[c]:a,u=void 0;B(l)?(u=l.slice(),o=u[0]||``):V(l)?(o=l,u=[o]):(o==null?o=qh[r]:Kh[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function eg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function tg(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function ng(e){return e===tg(e)}function gee(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function rg(e,t,n,r){var i=zs(e),a=i[sg(n)](),o=i[cg(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[lg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[ug(n)](),d=(u-1)%12+1,f=i[dg(n)](),p=i[fg(n)](),m=i[pg(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof yp?r:Ph(r||jh)||Fh()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,eg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,eg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,eg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,eg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,eg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,eg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,eg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,eg(m,3)).replace(/{S}/g,m+``)}function ig(e,t,n,r,i){var a=null;if(V(n))a=n;else if(me(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Lh();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=ag(e.value,i);a=n[u][u][0]}}return rg(new Date(e.value),a,i,r)}function ag(e,t){var n=zs(e),r=n[cg(t)]()+1,i=n[lg(t)](),a=n[ug(t)](),o=n[dg(t)](),s=n[fg(t)](),c=n[pg(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function og(e,t,n){switch(t){case`year`:e[hg(n)](0);case`month`:e[gg(n)](1);case`day`:e[_g(n)](0);case`hour`:e[vg(n)](0);case`minute`:e[yg(n)](0);case`second`:e[bg(n)](0)}return e}function sg(e){return e?`getUTCFullYear`:`getFullYear`}function cg(e){return e?`getUTCMonth`:`getMonth`}function lg(e){return e?`getUTCDate`:`getDate`}function ug(e){return e?`getUTCHours`:`getHours`}function dg(e){return e?`getUTCMinutes`:`getMinutes`}function fg(e){return e?`getUTCSeconds`:`getSeconds`}function pg(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function mg(e){return e?`setUTCFullYear`:`setFullYear`}function hg(e){return e?`setUTCMonth`:`setMonth`}function gg(e){return e?`setUTCDate`:`setDate`}function _g(e){return e?`setUTCHours`:`setHours`}function vg(e){return e?`setUTCMinutes`:`setMinutes`}function yg(e){return e?`setUTCSeconds`:`setSeconds`}function bg(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function xg(e){if(!Gs(e))return V(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function Sg(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Cg=De;function wg(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ke(e)?e:`-`}function a(e){return Ys(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?zs(e):e;if(!isNaN(+c))return rg(c,r,n);if(s)return`-`}if(t===`ordinal`)return he(e)?i(e):ge(e)&&a(e)?e+``:`-`;var l=Ws(e);return a(l)?xg(l):he(e)?i(e):typeof e==`boolean`?e+``:`-`}var Tg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Eg=function(e,t){return`{`+e+(t??``)+`}`};function Dg(e,t,n){B(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function kg(e,t){return t||=`transparent`,V(e)?e:_e(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Ag=R,jg=[`left`,`right`,`top`,`bottom`,`width`,`height`],Mg=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function Ng(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var Pg=Ng;pe(Ng,`vertical`),pe(Ng,`horizontal`);function _ee(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function Fg(e,t,n){n=Cg(n||0);var r=t.width,i=t.height,a=Ts(e.left,r),o=Ts(e.top,i),s=Ts(e.right,r),c=Ts(e.bottom,i),l=Ts(e.width,r),u=Ts(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new tn((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var Ig={rect:1,point:2};function Lg(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=Zm(e),l=c.coord,u=c.from;if(o.dataToLayout){a=Ig.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Ig.point,s=u,i=o.dataToPoint(l))}return a??=Ig.rect,a===Ig.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function vee(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new tn(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=Fg(L({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function Rg(e){var t=e.layoutMode||e.constructor.layoutMode;return _e(t)?t:t?{type:t}:null}function zg(e,t,n){var r=n&&n.ignoreSize;!B(r)&&(r=[r,r]);var i=o(Mg[0],0),a=o(Mg[1],1);c(Mg[0],e,i),c(Mg[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(Ag(n,function(t){c[t]=e[t]}),Ag(n,function(e){Be(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d=0;o--)a=F(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return jc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return _ee(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(yp);et(Vg,yp),at(Vg),hh(Vg),gh(Vg,xee);function xee(e){var t=[];return R(Vg.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=z(t,function(e){return Ye(e).main}),e!==`dataset`&&re(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Hg=Ec(),Ug=Ec(),Wg=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=ac(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return qg(this,Hg,r,i,e,t,n)},e.prototype.clearColorPalette=function(){Jg(this,Hg)},e}();function Gg(e,t,n,r){return qg(e,Ug,ac(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function Kg(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function qg(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:Kg(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function Jg(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Yg=/\{@(.+?)\}/g,Xg=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&B(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),me(i))return s.status=t,s.dimensionIndex=r,i(s);if(V(i))return Dg(i,s).replace(Yg,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=am(o,e,i);if(a&&B(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return am(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Zg(e){var t,n;return _e(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function Qg(e){return new $g(e)}var $g=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(p_(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ye(o)?sl:rl,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=we(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=we(u.sourceHeader,d.sourceHeader),m=we(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Np(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Np(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&m_(``);var i,a=[],o=[];return R(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&m_(``),a.push(t),o.push(e._getVersionSign())}),n?i=l_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Fp(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return R(e.blocks,function(e){var n=E_(e);n>=t&&(t=n+ +(r&&(!n||w_(e)&&!e.noHeader)))}),t}return 0}function Cee(e,t,n,r){var i=t.noHeader,a=Tee(E_(t)),o=[],s=t.blocks||[];Oe(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Be(l,c)){var u=new nee(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}R(s,function(n,i){var s=t.valueFormatter,c=T_(n)(s?I(I({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):O_(r,o.join(``),i?n:a.html);if(i)return d;var f=wg(t.header,`ordinal`,e.useUTC),p=S_(r,e.renderMode).nameStyle,m=x_(r);return e.renderMode===`richText`?k_(e,f,p)+a.richText+d:O_(r,`
`+Th(f)+`
`+d,n)}function wee(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=B(e)?e:[e],z(e,function(e,t){return wg(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||g_.color.secondary,i),f=a?``:wg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=S_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:k_(e,f,v))+(o?``:Oee(e,m,h,g,y)):O_(r,(s?``:d)+(a?``:Eee(f,!s,v))+(o?``:Dee(m,h,g,y)),n)}}function D_(e,t,n,r,i,a){if(e)return T_(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function Tee(e){return{html:xee[e],richText:See[e]}}function O_(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=x_(e);return`
`+t+r+`
`}function Eee(e,t,n){var r=t?`margin-left:2px`:``;return``+Th(e)+``}function Dee(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=B(e)?e:[e],``+z(e,function(e){return Th(e)}).join(`  `)+``}function k_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Oee(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(` `):t,a)}function kee(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return kg(n)}function A_(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var j_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Ks()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=Og({color:t,type:e,renderMode:n,markerId:r});return V(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};B(t)?R(t,function(e){return I(n,e)}):I(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function Aee(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=B(s),l=kee(t,n),u,d,f,p;if(o>1||c&&!o){var m=jee(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=am(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=bc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return C_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[C_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ke(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function jee(e,t,n,r,i){var a=t.getData(),o=se(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?R(r,function(e){u(am(a,n,e),e)}):R(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(C_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var M_=Ec();function N_(e,t){return e.getName(t)||e.getId(t)}var P_=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=$g({count:Nee,reset:Pee}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(M_(this).sourceManager=new p_(this)).prepareSource();var r=this.getInitialData(e,n);I_(r,this),this.dataTask.context.data=r,M_(this).dataBeforeProcessed=r,F_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Rg(this),r=n?Bg(e):{},i=this.subType;Vg.hasClass(i)&&(i+=`Series`),F(e,t.getTheme().get(this.subType)),F(e,this.getDefaultOption()),oc(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&zg(e,r,n)},t.prototype.mergeOption=function(e,t){e=F(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Rg(this);n&&zg(this.option,e,n);var r=M_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);I_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,M_(this).dataBeforeProcessed=i,F_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ye(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return Aee({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(We.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Gg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[N_(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){_e(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Vg.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Vg);ae(P_,Zg),ae(P_,Gg),et(P_,Vg);function F_(e){var t=e.name;bc(e)||(e.name=Mee(e)||t)}function Mee(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return R(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Nee(e){return e.model.getRawData().count()}function Pee(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Fee}function Fee(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function I_(e,t){R(Re(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,pe(Iee,t))})}function Iee(e,t){var n=L_(e);return n&&n.setOutputEnd((t||this).count()),t}function L_(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Lee=jo.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Ree={line:bd,rect:Go,roundRect:Go,square:Go,circle:Wu,diamond:jo.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:jo.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:jo.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Lee},zee={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},R_={};R(Ree,function(e,t){R_[t]=new e});var Bee=jo.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=wn(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=R_[r];i||=(r=`rect`,R_[r]),zee[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Vee(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||g_.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function z_(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?lf(e.slice(8),new tn(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?cf(e.slice(7),{},new tn(t,n,r,i),o?`center`:`cover`):new Bee({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Vee,a&&c.setColor(a),c}function Hee(e){return B(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function B_(e,t){if(e!=null)return B(e)||(e=[e,e]),[Ts(e[0],t[0])||0,Ts(we(e[1],e[0]),t[1])||0]}var Uee=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return uh(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Hu,n=z_(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=z_(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=g_.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(P_);function V_(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=am(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var H_=function(e){p(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=z_(e,-1,-1,2,2,null,a);o.attr({z2:we(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Gee,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Wl(this.childAt(0))},t.prototype.downplay=function(){Gl(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Gd(f,p,o,n),Zd(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Kd(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Zf(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=B_(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Lo){var S=a.style;a.useStyle(I({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(I({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Xf(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):V_(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),lu(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=el(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Jd(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Jd(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Hee(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Hu);function Gee(e,t){this.parent.drift(e,t)}function U_(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function W_(e){return e!=null&&!_e(e)&&(e={isIgnore:e}),e||{}}function G_(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Zf(t),cursorStyle:t.get(`cursor`)}}function K_(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Kee=function(){function e(e){this.group=new Hu,this._SymbolCtor=e||H_}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=W_(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=G_(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);U_(e,i,r,t)&&K_(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!U_(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Gd(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function J_(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Y_(e,t){return!isFinite(e)||!isFinite(t)}var X_=typeof Float32Array<`u`?Float32Array:void 0;function Z_(e){return Q_({ctor:X_},e).arr}function Q_(e,t){var n=e.arr,r=e.ctor;if(t>Fs&&(t=Fs),!n||e.typed&&n.length=i||h<0)break;if(Y_(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||Y_(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,M=C-v,N=void 0,te=void 0;if(s===`x`){N=Math.abs(A),te=Math.abs(j);var P=E>0?1:-1;p=_-P*N*o,m=v,O=_+P*te*o,k=v}else if(s===`y`){N=Math.abs(ee),te=Math.abs(M);var F=D>0?1:-1;p=_,m=v-F*N*o,O=_,k=v+F*te*o}else N=Math.sqrt(A*A+ee*ee),te=Math.sqrt(j*j+M*M),T=te/(te+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=tv(O,nv(S,_)),k=tv(k,nv(C,v)),O=nv(O,tv(S,_)),k=nv(k,tv(C,v)),E=O-_,D=k-v,p=_-E*N/te,m=v-D*N/te,p=tv(p,nv(l,_)),m=tv(m,nv(u,v)),p=nv(p,tv(l,_)),m=nv(m,tv(u,v)),E=_-p,D=v-m,O=_+E*te/N,k=v+D*te/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var iv=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),av=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:g_.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new iv},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Y_(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?vr(i,u,f,m,e,s):vr(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?gr(a,d,p,h,b):gr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(jo),ov=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(iv),sv=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new ov},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Y_(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Fv(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Fv(r,e,t,n)},freeze:function(){}};function Fv(e,t,n,r){Uc(n,r)&&(e[t][0]=n,e[t][1]=r)}function Iv(e){return Lv(e)||zv(e)}function Lv(e){return e.type===`interval`}function Rv(e){return e.type===`time`}function zv(e){return e.type===`log`}function Bv(e){return e.type===`ordinal`}function Vv(e){var t=Vs(e),n=ys(10,t),r=gs(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,ks(r*n,-t)}function Hv(e){return js(e)+2}function Uv(e,t){return bs(e)/bs(t)}function Wv(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var Yv=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Dv(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Cv({}),B(i)&&(i=new Cv({categories:z(i,function(e){return _e(e)?e.value:e})})),r._ordinalMeta=i;var a=Ev(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Ov(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:V(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=gs(e),e},t.prototype.getTicks=function(){var e=[];return Jv(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=ps(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=ps(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=ks(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=ks(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?ks(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return Xv(this,e,zh(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=js(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),xg(ks(e.value,n,!0))},t.type=`interval`,t}(xv);xv.registerClass(Zv);var Qv=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ry(e){var t=30*Wh;return e/=t,e>6?6:e>3?3:e>2?2:1}function iy(e){return e/=Uh,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function ay(e,t){return e/=t?Hh:Vh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function oy(e){return ms(Hs(e,!0),1)}function sy(e,t,n){var r=Math.max(0,re(Xh,t)-1);return og(new Date(e),Xh[r],n).getTime()}function cy(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function ly(e,t,n,r,i,a){var o=Zh,s=0;function c(e,t,n,i,o,c,l){for(var u=cy(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!ty(tg(e),r[0],r[1],n)){s&&(i=[{value:sy(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=ce(z(u,function(e){return ce(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=ey.length,l=Math.min(Qv(ey,a,0,c),c-1),u=ey[l][1],d=ey[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};xv.registerClass($v);var dy=0,fy=1,py=2,my=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=Zv.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[dy]=i[fy]=a[dy]=a[fy]=NaN,Dv(r,t.mapperMethods);var s=Lh(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},py,l),r.powStub=new Zv({breakParsed:l.original}),r.intervalStub=new Zv({breakParsed:l.transformed}),Ov(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Lh(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return z(i.getTicks(e||{}),function(e){var i=e.value,o=Wv(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,zh(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return Xv(this,e,zh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Uv(e,this.base))},scale:function(e){return Wv(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Uv(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return hy.depth=n,gy.lookup=this._lookup,Wv(n===2?e:this.intervalStub.transformOut(e,hy),this.base,gy)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Uc(t,n)||t<=0||n<=0)){var r=_y,i=_y;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[dy]=t,r[fy]=n);var o=this.base;this.intervalStub.setExtent2(e,i[dy]=Uv(t,o),i[fy]=Uv(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Uc(t[0],t[1])&&Ys(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(xv);xv.registerClass(my);var hy={},gy={},_y=[],vy={value:1,category:1,time:1,log:1},yy=Ec();function by(e){var t=e.get(`type`);return(t==null||!Be(vy,t)&&!xv.getClass(t))&&(t=`value`),t}function xy(e,t,n){var r=Lh(),i;switch(r&&(i=My(e,t,n)),t){case`category`:return new Yv({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Lc()});case`time`:return new $v({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new my({logBase:e.get(`logBase`),breakOption:i});case`value`:return new Zv({breakOption:i});default:return new((xv.getClass(t))||Zv)({})}}function Sy(e,t,n){var r=n?Av(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Uc(i,a)?i===t||a===t?2:it?1:3:3}function Cy(e){yy(e).noOnMyZero=!0}function wy(e){return yy(e).noOnMyZero}function Ty(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Qh(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(V(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(me(t)){if(e.type===`category`)return function(n,r){return t(Ey(e,n),n.value-e.scale.getExtent()[0],null)};var r=Lh();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Ey(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Ey(e,t){var n=e.scale;return Bv(n)?n.getLabel(t):t.value}function Dy(e){return e.get(`interval`)??`auto`}function Oy(e){return e.type===`category`&&Dy(e.getLabelModel())===0}function ky(e,t){var n={};return R(e.mapDimensionsAll(t),function(t){n[sh(e,t)]=!0}),ue(n)}function Ay(e){return e===`middle`||e===`center`}function jy(e){return e.getShallow(`show`)}function My(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Lh()||!n||!Ny(t)?void 0:r}function Ny(e){return e!==`category`}function Py(e,t,n,r,i,a){var o=zv(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=Kv(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Fy(e,t){return Bv(e)?e.getRawOrdinalNumber(t.value):t.value}function Iy(e,t){return Bv(e)&&!!t.get(`boundaryGap`)}function Ly(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Wy(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=z(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=Uy(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;R(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new kd(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function Gy(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&Ky(a,t))){var o=t.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(e){e.tick.offInterval||(s[Fy(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Ky(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function qy(e){for(var t=e.length/2;t>0&&Y_(e[t*2-2],e[t*2-1]);t--);return t-1}function Jy(e,t){return[e[t*2],e[t*2+1]]}function Yy(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function Xy(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<_l.length;t++)if(e.get([_l[t],`endLabel`,`show`]))return!0;return!1}function Zy(e,t,n,r){if(yv(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=Xy(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=_v(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return vv(t,n,r)}function Qy(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var $y=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Hu,t=new Kee;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=fe(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=q_(r,a,_),y=g&&Vy(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Gy(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Wy(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=Hy(y,c,r,w,x),c=Hy(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,kg(E)),m.setClipPath(Zy(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,kg(E));var D=m.getClipPath();D?Kd(D,{shape:Zy(this,r,!1,e).shape},e):m.setClipPath(Zy(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!Ly(this._stackedOnPoints,y)||!Ly(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Hy(y,c,r,w,x),c=Hy(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(L(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),pu(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}el(f).seriesIndex=e.seriesIndex,lu(f,k,A,j);var M=By(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:M,smoothMonotone:N,connectNulls:x}),p){var te=a.getCalculationInfo(`stackedOnSeries`),P=0;p.useStyle(L(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),te&&(P=By(te.get(`smooth`))),p.setShape({smooth:M,stackedOnSmooth:P,smoothMonotone:N,connectNulls:x}),pu(p,e,`areaStyle`),el(p).seriesIndex=e.seriesIndex,lu(p,k,A,j)}var F=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var I=e.get(`triggerEvent`),ne=e.get(`triggerLineEvent`),re=ne===!0||I===!0||I===`line`,ie=ne===!0||I===!0||I===`area`;this.packEventData(e,f,re),p&&this.packEventData(e,p,ie)},t.prototype.packEventData=function(e,t,n){el(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Tc(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Y_(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new H_(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else dv.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Tc(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else dv.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Fl(this._polyline,e),t&&Fl(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new av({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new sv({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);me(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=me(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=me(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(Xy(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Xo({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=qy(o);c>=0&&(Xf(a,Zf(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?V_(i,e):Wee(i,n)},enableTextSetter:!0},Qy(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=Yy(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=Jy(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Ic(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=Jy(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=sp(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=ev(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=Hy(u.stackedOnCurrent,u.current,n,i,o),d=Hy(u.current,null,n,i,o),m=Hy(u.stackedOnNext,u.next,n,i,o),p=Hy(u.next,null,n,i,o)),zy(d,p)>3e3||c&&zy(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Gd(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Gd(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;V(i)?p=tb[i]:me(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,nb))}}}}}function ib(e){e.registerChartView($y),e.registerSeriesModel(Uee),e.registerLayout(eb(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,rb(`line`))}var ab=Ec(),ob=Ec(),sb={estimate:1,determine:2};function cb(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function lb(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:z(db(n,r),function(t,n){return{formattedLabel:Ty(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?fb(e,t):hb(e)}function ub(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:db(i,r)}:e.type===`category`?mb(e,t):{ticks:r.getTicks(n)}}function db(e,t){var n=t.getExtent(),r=[];return R(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Jc(r,Xc,null),As(r),z(r,function(e){return{value:e}})}function fb(e,t){var n=e.getLabelModel(),r=pb(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function pb(e,t,n){var r=_b(e),i=Dy(t),a=n.kind===sb.estimate;if(!a){var o=yb(r,i);if(o)return o}var s,c;me(i)?s=Eb(e,i,!1):(c=i===`auto`?xb(e,n):i,s=Eb(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return bb(r,i,l),!0}):bb(r,i,l),l}function mb(e,t){var n=gb(e),r=Dy(t),i=yb(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),me(r))a=Eb(e,r,!0);else if(r===`auto`){var s=pb(e,e.getLabelModel(),cb(sb.determine));o=s.labelCategoryInterval,a=z(s.labels,function(e){return e.tick})}else o=r,a=Eb(e,o,!0);return bb(n,r,{ticks:a,tickCategoryInterval:o})}function hb(e){var t=e.scale.getTicks(),n=Ty(e);return{labels:z(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var gb=vb(`axisTick`),_b=vb(`axisLabel`);function vb(e){return function(t){return ob(t)[e]||(ob(t)[e]={list:[]})}}function yb(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=yn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===sb.estimate?(t.out.noPxChangeTryDetermine.push(fe(Cb,null,e,S,c)),S):wb(e,S,c)??S}function Cb(e,t,n){return wb(e,t,n)==null}function wb(e,t,n){var r=ab(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function Tb(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Eb(e,t,n){var r=Ty(e),i=e.scale,a=[],o=me(t);return Jv(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Db=Ec();function Ob(e){Db(e).prepare={}}function kb(e){Db(e).fullUpdate={}}function Ab(e){return Db(e).fullUpdate}Kc();var jb=Ec();Ec();function Mb(e,t){var n=e.model,r=jb(Ab(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Nb(e,t){return Ib(Mb(e,t))}function Pb(e,t){var n=[];return Fb(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Ys(n)&&n>0&&Ys(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*Jee,e.w2=e.w*n/r)}var Wb=[0,1],Zee=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),ws(e,Wb,Gb(this),t)},e.prototype.coordToData=function(e,t){var n=ws(e,Gb(this),Wb,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=z(ub(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Fy(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Qee(this,n,r);return z(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Bv(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),z(this.scale.getMinorTicks(e),function(e){return z(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=cb(sb.determine),lb(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Ub(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=cb(sb.determine),Sb(this,e)},e}();function Gb(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Qee(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Ub(e).w;if(!i)return!1;R(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var $ee=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Zee),Kb=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],ete=1,qb=2,Jb=ete|qb;function Yb(e,t,n){n||=Jb,t?e.dirty|=n:e.dirty&=~n}function Xb(e,t){return t||=Jb,e.dirty==null||!!(e.dirty&t)}function Zb(e){if(e)return Xb(e)&&tte(e,e.label,e),e}function tte(e,t,n){var r=t.getComputedTransform();e.transform=Rf(e.transform,r);var i=e.localRect=Lf(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=cp.textMargin);for(var d=0;d<4;d++)Qb[d]=u===cp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===cp.textMargin&&kf(i,Qb,!1,!1);var f=e.rect=Lf(e.rect,i);return r&&f.applyTransform(r),u===cp.minMargin&&kf(f,Qb,!1,!1),e.axisAligned=Ff(r),(e.label=e.label||{}).ignore=t.ignore,Yb(e,!1),Yb(e,!0,qb),e}var Qb=[0,0,0,0];function nte(e,t,n){return e.transform=Rf(e.transform,n),e.localRect=Lf(e.localRect,t),e.rect=Lf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Ff(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function rte(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function $b(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new tn(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var sx=_t(),cx=new tn(0,0,0,0),lx=function(e,t,n,r,i,a){if(Ay(e.nameLocation)){var o=a.stOccupiedRect;o&&ux(nte({},o,a.transGroup.transform),r,i)}else dx(a.labelInfoList,a.dirVec,r,i)};function ux(e,t,n){var r=new Vt;tx(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&rte(t,r)}function dx(e,t,n,r){for(var i=Vt.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Ls(r-rx)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),ute=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],dte={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Rt(u,u,l),Rt(d,d,l));var p=I({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Bh(r.axis.scale))nx().buildAxisBreakLine(r,i,a,m);else{var h=new bd(I({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));pf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);V(g)&&(g=[g,g]),(V(_)||ge(_))&&(_=[_,_]);var v=B_(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];R([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=z_(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){gx(t,i,s)&&px(e,t,n,r,i,a,o,sb.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){gx(t,i,s)&&px(e,t,n,r,i,a,o,sb.determine);var c=hte(e,i,a,r);mte(e,t.labelLayoutList,c),gte(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(bx(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Vt(0,0),_=new Vt(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=_t();_.transform(St(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*rx/180);var b,x;Ay(u)?b=fx.innerTextLayout(e.rotation,y??e.rotation,d):(b=fte(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Ce(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Xo({x:g.x,y:g.y,rotation:b.rotation,silent:fx.isLabelSilent(r),style:Qf(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Mf({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=fx.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,el(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=Zb({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Ay(u)?ste[E]:cte[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function px(e,t,n,r,i,a,o,s){_x(t)||_te(e,t,i,s,r,o);var c=t.labelLayoutList;vte(e,r,c,a),xte(r,e.rotation,c);var l=e.optionHideOverlap;pte(r,c,l),l&&ite(ce(c,function(e){return e&&!e.label.ignore})),lte(e,n,r,c)}function fte(e,t,n,r){var i=Is(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ls(i-rx/2)?(o=c?`bottom`:`top`,a=`center`):Ls(i-rx*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=irx/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function pte(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Oy(r))return;function a(e,a,o){var s=Zb(t[a]),c=Zb(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=ix(s.label).labelInfo.tick;if(Rv(l)&&u.notNice||Bv(l)&&u.offInterval){mx(s.label);return}}if(e===!1||s.suggestIgnore){mx(s.label);return}if(c.suggestIgnore){mx(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=$b({marginForce:f},s),c=$b({marginForce:f},c)}tx(s,c,null,{touchThreshold:d})&&mx(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function mte(e,t,n){e.showMinorTicks||R(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=Tx(e,t.get(`startValue`,!0)),x=b!=null;!Ys(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Ys(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),Cx(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),Cx(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function Cx(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Gc(t))}function Tx(e,t){return t==null?null:Se(t)?NaN:e.parse(t)}function Dte(e,t){var n;if(Bv(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[Ex(n[0]),Ex(n[1])]}function Ex(e){return Cn(typeof e==`boolean`?0:e,1)||0}function Dx(e){var t=Tte(e.scale);return t.extent||=Lc(),t}function Ote(e,t){Dx(e).dimIdxInCoord=t.get(e.dim)}function kte(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Ate(n,e,i,r,t)}function Ate(e,t,n,r,i){var a=Dx(t),o=a.extent,s=!1;Lb(t,function(r){if(r.boxCoordinateSystem){var i=Zm(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&Rc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;R(ky(u,n),function(e){Vc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Mte(e,t,r);Ox(e,new Sx(e,r,o,s,c),i),a.extent=null}function jte(e,t){var n=e.scale;Ox(n,new Sx(n,e.model,t,!1,!1),Ete)}function Ox(e,t,n){e.rawExtentInfo=t,t.from=n}var kx=Le();function Ax(e,t,n,r,i){e.rawExtentInfo||jte({scale:e,model:t},i||Lc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Mte(e,t,n){var r=Iy(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return zb(t,function(e){a=!!kx.get(e)||a}),a}function Nte(e,t,n,r){if(n.ctnShp){var i;if(zb(e,function(t){var n=kx.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],zc(i,a[0]),Bc(i,a[1]),Cy(e))}}),i){var a=t.getExtent();if(Bv(t))e.onBand||t.setExtent2(1,ps(a[0],a[0]+i[0]),ms(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=ps(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ms(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}var jx={left:0,right:0,top:0,bottom:0},Mx=[`25%`,`25%`],Nx=`cartesian2d`,Pte=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Bg(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&zg(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&zg(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:jx,outerBoundsContain:`all`,outerBoundsClampWidth:Mx[0],outerBoundsClampHeight:Mx[1],backgroundColor:g_.color.transparent,borderWidth:1,borderColor:g_.color.neutral30},t}(Vg),Px=`\0__throttleOriginMethod`,Fx=`\0__throttleRate`,Ix=`\0__throttleType`;function Lx(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Rx(e,t,n,r){var i=e[t];if(i){var a=i[Px]||i,o=i[Ix];if(i[Fx]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Lx(a,n,r===`debounce`),i[Px]=a,i[Ix]=r,i[Fx]=n}return i}}function zx(e,t){var n=e[t];n&&n[Px]&&(n.clear&&n.clear(),e[t]=n[Px])}function Bx(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Ux(e,i,t,n)}else{Ux(e,t,t,n);var a=zte(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Lte.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function zte(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Bte(e,t,n,r){e.addEventListener(t,n,r)}function Vte(e,t,n,r){e.removeEventListener(t,n,r)}var qx=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},Hte=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=Jx(r)/Jx(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Ute(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},Xx=`silent`;function Wte(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Gte}}function Gte(){qx(this.event)}var Kte=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ji),Zx=function(){function e(e,t){this.x=e,this.y=t}return e}(),qte=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Qx=new tn(0,0,0,0),$x=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new Zx(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new Kte,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Ite(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(qte,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=tS(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new Zx(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new Zx(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=Wte(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Zx(e,t);if(eS(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new tn(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(Qx.copy(u.getBoundingRect()),u.transform&&Qx.applyTransform(u.transform),Qx.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Jte(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||Xx}return!1}function eS(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Jte(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Xx)){t.target=o;break}}}function tS(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var nS=32,rS=7;function Yte(e){for(var t=0;e>=nS;)t|=e&1,e>>=1;return e+t}function iS(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function Xte(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function oS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function sS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Zte(e,t){var n=rS,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=rS||m>=rS);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-oS(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=rS||g>=rS);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),aS(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var lS=!1;function uS(){lS||(lS=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function dS(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var fS=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=dS}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),pS=We.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function mS(){return new Date().getTime()}var Qte=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=mS()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(pS(t),!e._paused&&e.update())}pS(t)},t.prototype.start=function(){this._running||(this._time=mS(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=mS(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=mS()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new qi(e,t.loop);return this.addAnimator(n),n},t}(Ji),hS=300,gS=We.domSupported,_S=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),vS={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},yS=!1;function bS(e){var t=e.pointerType;return t===`pen`||t===`touch`}function xS(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function SS(e){e&&(e.zrByTouch=!0)}function CS(e,t){return Kx(e.dom,new TS(e,t),!0)}function wS(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var TS=function(){function e(e,t){this.stopPropagation=Ve,this.stopImmediatePropagation=Ve,this.preventDefault=Ve,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),ES={mousedown:function(e){e=Kx(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Kx(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=Kx(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Kx(this.dom,e);var t=e.toElement||e.relatedTarget;wS(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){yS=!0,e=Kx(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){yS||(e=Kx(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Kx(this.dom,e),SS(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),ES.mousemove.call(this,e),ES.mousedown.call(this,e)},touchmove:function(e){e=Kx(this.dom,e),SS(e),this.handler.processGesture(e,`change`),ES.mousemove.call(this,e)},touchend:function(e){e=Kx(this.dom,e),SS(e),this.handler.processGesture(e,`end`),ES.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!xc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[XS],e},t.prototype.setTheme=function(e){this._theme=new yp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function lC(e,t){return e.join(`,`)===t.join(`,`)}var uC=R,dC=_e,fC=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function pC(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=fC.length;n0?e[n-1].seriesModel:null)}),IC(e))})}function IC(e){R(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ps(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var LC=function(){function e(){this.group=new Hu,this.uid=mh(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Qe(LC),at(LC);var RC=Ec(),zC={itemStyle:ot(gp,!0),lineStyle:ot(pp,!0)},BC={lineStyle:`stroke`,itemStyle:`fill`};function VC(e,t){return e.visualStyleMapper||zC[t]||(console.warn(`Unknown style type '`+t+`'.`),zC.itemStyle)}function HC(e,t){return e.visualDrawType||BC[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var UC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=VC(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=HC(e,r),c=a[s],l=me(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||me(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||me(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=I({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},WC=new yp,GC={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=VC(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){WC.option=n[r];var o=i(WC);I(e.ensureUniqueItemVisual(t,`style`),o),WC.option.decal&&(e.setItemVisual(t,`decal`,WC.option.decal),WC.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},KC={performRawSeries:!0,overallReset:function(e){var t=Le();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();RC(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=RC(e).scope,a=HC(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},qC=Math.PI;function rne(e,t){t||={},L(t,{text:`loading`,textColor:g_.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:g_.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Hu,r=new Go({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Xo({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Go({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Ed({shape:{startAngle:-qC/2,endAngle:-qC/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.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`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var JC=function(){function e(e,t,n,r){this._stageTaskMap=Le(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Qc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Le();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;R(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Oe(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;R(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Le(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||$g({plan:cne,reset:lne,count:dne}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||$g({reset:ine});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Le(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Oe(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):R(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,$g({reset:ane,onDirty:sne})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return me(e)&&(e={overallReset:e,seriesType:XC(e)}),e.uid=mh(`stageHandler`),t&&(e.visualType=t),e},e}();function ine(e){e.overallReset(e.ecModel,e.api,e.payload)}function ane(e){return e.dirtyOnOverallProgress&&one}function one(){this.agent.dirty(),this.getDownstream().dirty()}function sne(){this.agent&&this.agent.dirty()}function cne(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function lne(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=ac(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?z(t,function(e,t){return YC(t)}):une}var une=YC(0);function YC(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),ow=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],sw=ow.concat([`symbolKeepAspect`]),cw={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&Sw(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function Tw(e,t,n){for(var r=t.type===`radial`?ww(e,t,n):Cw(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:ge(e)?[e]:B(e)?e:null}function Aw(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&kw(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=z(n,function(e){return e/i}),r/=i)}return[n,r]}var jw=new ao(!0);function Mw(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Nw(e){return typeof e==`string`&&e!==`none`}function Pw(e){var t=e.fill;return t!=null&&t!==`none`}function Fw(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Iw(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Lw(e,t,n){var r=mt(t.image,t.__image,n);if(gt(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*He),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Rw(e,t,n,r,i){var a,o=Mw(n),s=Pw(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||jw,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?Tw(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?Tw(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?Lw(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?Lw(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=Aw(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Iw(e,n),s&&Fw(e,n)):(s&&Fw(e,n),o&&Iw(e,n)),T&&e.setLineDash([])}function pne(e,t,n){var r=t.__image=mt(n.image,t.__image,t,t.onload);if(r&>(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function mne(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Aw(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Mw(n)&&e.strokeText(i,n.x,n.y),Pw(n)&&e.fillText(i,n.x,n.y)):(Pw(n)&&e.fillText(i,n.x,n.y),Mw(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var zw=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],Bw=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function Vw(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){Yw(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?ya.opacity:o}(r||t.blend!==n.blend)&&(a||=(Yw(e,i),!0),e.globalCompositeOperation=t.blend||ya.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[kT]){if(this._disposed){this.id;return}var r,i,a;if(_e(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[kT]=!0,aE(this),!this._model||t){var o=new aC(this._api),s=this._theme,c=this._model=new QS;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},pE);var l={seriesTransition:a,optionChanged:!0};if(n)this[jT]={silent:r,updateParams:l},this[kT]=!1,this.getZr().wakeUp();else{try{VT(this),WT.update.call(this,null,l)}catch(e){throw this[jT]=null,this[kT]=!1,e}this._ssr||this._zr.flush(),this[jT]=null,this[kT]=!1,JT.call(this,r),YT.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[kT]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[jT]&&(r??=this[jT].silent,i=this[jT].updateParams,this[jT]=null),this[kT]=!0,aE(this);try{this._updateTheme(e),n.setTheme(this._theme),VT(this),WT.update.call(this,{type:`setTheme`},i)}catch(e){throw this[kT]=!1,e}this[kT]=!1,JT.call(this,r),YT.call(this,r)}}},t.prototype._updateTheme=function(e){V(e)&&(e=hE[e]),e&&(e=P(e),e&&NC(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return R(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;R(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return R(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(vE[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();R(_E,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(P(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=b.createCanvas(),h=zS(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return R(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Go({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),R(u,function(e){var t=new Lo({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return GT(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return GT(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return GT(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return R(Oc(n,e),function(e,n){n.indexOf(`Models`)>=0&&R(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Oc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?dw(i,t):uw(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;R(cE,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&pw(i,function(e){var t=el(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=I({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;R(dE,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),Fte(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Nc(this.getDom(),bE,``);var e=this,t=e._api,n=e._model;R(e._componentsViews,function(e){e.dispose(n,t)}),R(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete _E[e.id]},t.prototype.resize=function(e){if(!this[kT]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[jT]&&(r??=this[jT].silent,n=!0,this[jT]=null),this[kT]=!0,aE(this);try{n&&VT(this),WT.update.call(this,{type:`resize`,animation:I({duration:0},e&&e.animation)})}catch(e){throw this[kT]=!1,e}this[kT]=!1,JT.call(this,r),YT.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(_e(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),gE[e]){var n=gE[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=I({},e);return t.type=uE[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(_e(t)||(t={silent:!!t}),lE[e.type]&&this._model){if(this[kT]){this._pendingActions.push(e);return}var n=t.silent;qT.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&We.browser.weChat&&this._throttledZrFlush(),JT.call(this,n),YT.call(this,n)}},t.prototype.updateLabelLayout=function(){mw.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){VT=function(e){Ob(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),HT(e,!0),HT(e,!1),t.plan()},HT=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cwe(t.get(`hoverLayerThreshold`),WS.hoverLayerThreshold)&&!We.node&&!We.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=zf(e);t.eachRendered(function(e){return Vf(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!qd(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(qd(e))return;if(e instanceof jo&&yu(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}tE=function(e){return new(function(t){p(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Wl(t,n),rE(e)},n.prototype.leaveEmphasis=function(t,n){Gl(t,n),rE(e)},n.prototype.enterBlur=function(t){Kl(t),rE(e)},n.prototype.leaveBlur=function(t){ql(t),rE(e)},n.prototype.enterSelect=function(t){Jl(t),rE(e)},n.prototype.leaveSelect=function(t){Yl(t),rE(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[AT]},n.prototype.usingTHL=function(){return e._usingTHL},n}(dl))(e)},nE=function(e){function t(e,t){for(var n=0;n=0)){NE.push(n);var o=JC.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function FE(e,t){gE[e]=t}function IE(e,t,n){var r=gw(`registerMap`);r&&r(e,t,n)}var LE=l_;ME(bT,UC),ME(CT,GC),ME(CT,KC),ME(bT,cw),ME(CT,lw),ME(DT,lT),wE(NC),TE(pT,PC),FE(`default`,rne),kE({type:yl,event:yl,update:yl},Ve),kE({type:bl,event:bl,update:bl},Ve),kE({type:xl,event:wl,update:xl,action:Ve,refineEvent:RE,publishNonRefinedEvent:!0}),kE({type:Sl,event:wl,update:Sl,action:Ve,refineEvent:RE,publishNonRefinedEvent:!0}),kE({type:Cl,event:wl,update:Cl,action:Ve,refineEvent:RE,publishNonRefinedEvent:!0});function RE(e,t,n,r){return{eventContent:{selected:ou(n),isFromClick:t.isFromClick||!1}}}CE(`default`,{}),CE(`dark`,iw);var zE=[],BE={registerPreprocessor:wE,registerProcessor:TE,registerPostInit:EE,registerPostUpdate:DE,registerUpdateLifecycle:OE,registerAction:kE,registerCoordinateSystem:AE,registerLayout:jE,registerVisual:ME,registerTransform:LE,registerLoading:FE,registerMap:IE,registerImpl:fne,PRIORITY:OT,ComponentModel:Vg,ComponentView:LC,SeriesModel:P_,ChartView:dv,registerComponentModel:function(e){Vg.registerClass(e)},registerComponentView:function(e){LC.registerClass(e)},registerSeriesModel:function(e){P_.registerClass(e)},registerChartView:function(e){dv.registerClass(e)},registerCustomSeries:function(e,t){vw(e,t)},registerSubTypeDefaulter:function(e,t){Vg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){$te(e,t)}};function VE(e){if(B(e)){R(e,function(e){VE(e)});return}re(zE,e)>=0||(zE.push(e),me(e)&&(e={install:e}),e.install(BE))}var HE=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),UE=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Ac).models[0]},t.type=`cartesian2dAxis`,t}(Vg);ae(UE,HE);var WE={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:`auto`,onZeroAxisIndex:null,lineStyle:{color:g_.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},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,color:g_.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:g_.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[g_.color.backgroundTint,g_.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:g_.color.neutral00,borderColor:g_.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},GE=F({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},WE),KE=F({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:g_.color.axisMinorSplitLine,width:1}}},WE),qE={category:GE,value:KE,time:F({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},KE),log:L({logBase:10},KE)};function JE(e,t,n,r){R(vy,function(i,a){var o=F(F({},qE[a],!0),r,!0),s=function(e){p(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Rg(this),r=n?Bg(e):{};F(e,t.getTheme().get(a+`Axis`)),F(e,this.getDefaultOption()),e.type=YE(e),n&&zg(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Cv.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=nx();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,YE)}function YE(e){return e.type||(e.data?`category`:`value`)}var XE=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return z(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ce(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),ZE=[`x`,`y`];function QE(e){return(e.type===`interval`||e.type===`time`)&&!Bh(e)}var $E=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Nx,t.dimensions=ZE,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(QE(e)&&QE(t)){var n=Av(e,null),r=Av(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=wt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new tn(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Rt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Rt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new tn(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(XE);function eD(e,t){var n=e.scale,r=e.model,i=Ax(n,r,r.ecModel,e,null),a=zv(n),o=zv(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=hs(l[0].value-l[1].value),g=hs(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=ks(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=ks(vs(C[0]/E)*E,D),O=ks(_s(C[1]/E)*E,D);var e=gs((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=_s(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}Py(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function tD(e,t){var n=zv(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Gv(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?rD(r,t):nD(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Hv(d)),i[0]||(s[0]=ks(_s(s[0]/u)*u,l)),i[1]||(s[1]=ks(vs(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Py(e,i,o,s,a,c)}function nD(e,t){var n=qv(t.splitNumber,5),r=Mv(e),i=t.minInterval,a=t.maxInterval,o=Hs(r/n,!0);i!=null&&oa&&(o=a);var s=Hv(o),c=e.getExtent(),l=[ks(vs(c[0]/o)*o,s),ks(_s(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function rD(e,t){var n=qv(t.splitNumber,10),r=e.getExtent(),i=Mv(e),a=ms(Bs(i),1);n/i*a<=.5&&(a*=10);var o=Hv(a),s=[ks(vs(r[0]/a)*a,o),ks(_s(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function iD(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;aD(t,n,r,i,null)}function aD(e,t,n,r,i){var a=Ax(e,t,r,n,i),o=Lv(e)||Rv(e);oD(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Nte(n,e,a,r)}function oD(e,t){sD[e.type](e,t)}var sD={interval:tD,log:tD,time:uy,ordinal:Ve},cD=[[3,1],[0,2]],lD=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ZE,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;R(this._axesList,function(e){kte(e,1);var t=e.scale;Bv(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=ue(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):iD(i)}R(n,function(e){mD(e,e.__alignTo)?iD(e):eD(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};R(n.x,function(e){dD(n,`y`,e,i)}),R(n.y,function(e){dD(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Lg(e,t),i=this._rect=Fg(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(gD(a,i),!n){var c=bD(i,o,a,s,t),l=void 0;if(s)vD?(vD(this._axesList,i),gD(a,i)):l=yD(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=SD(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=yD(d,f,p,i,a,c,r))}xD(i,a,sb.determine,null,l,r),R(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}_e(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];Iv(a.scale)&&My(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&R(r,function(e){e.__alignTo=n})}function mD(e,t){return Bh(e.scale)||Bh(t.scale)||t.scale.getTicks().length<2}function hD(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function gD(e,t){R(e.x,function(e){return _D(e,t.x,t.width)}),R(e.y,function(e){return _D(e,t.y,t.height)})}function _D(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),hD(e,t)}var vD;function yD(e,t,n,r,i,a,o){xD(r,i,sb.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=le(s,function(e){return e>0})==null;return kf(r,s,!0,!0,n),gD(i,r),c;function l(e){R(i[ef[e]],function(t){if(jy(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Se(t)&&t>1e-4&&(e/=t),e}}function bD(e,t,n,r,i){var a=new ox(CD);return R(n,function(n){return R(n,function(n){if(jy(n.model)){var o=!r;n.axisBuilder=Cte(e,t,n.model,i,a,o)}})}),a}function xD(e,t,n,r,i,a){var o=n===sb.determine;R(t,function(t){return R(t,function(t){jy(t.model)&&(wte(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[ef[1-t]]=e[tf[t]]<=a.refContainer[tf[t]]*.5?0:1-t==1?2:1}R(t,function(e,t){return R(e,function(e){jy(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function SD(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Fg(e.get(`outerBounds`,!0)||jx,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||re([`all`,`axisLabel`],a)<0?`all`:a,s=[Ds(we(e.get(`outerBoundsClampWidth`,!0),Mx[0]),t.width),Ds(we(e.get(`outerBoundsClampHeight`,!0),Mx[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var CD=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;lx(e,t,n,r,i,a),Ay(e.nameLocation)||R(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&dx(e.labelInfoList,e.dirVec,r,i)})};function wD(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return TD(n,e,t),n.seriesInvolved&&DD(n,e),n}function TD(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];R(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=PD(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(R(n.getAxes(),pe(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&R(f.baseAxes,pe(p,!d||`cross`,u)),d&&R(f.otherAxes,pe(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||ND(d))){s??=d.get(`triggerTooltip`),d=r?ED(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=PD(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:ND(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=OD(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function ED(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};R(s,function(e){c[e]=P(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&L(l,u.textStyle)}return e.model.getModel(`axisPointer`,new yp(c,n,r))}function DD(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&R(e.coordSysAxesInfo[PD(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function OD(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function AD(e){var t=jD(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=ND(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o=0;a--)r[a]??(delete n[t[a]],t.pop())}function eO(e,t){var n=e.visual,r=[];_e(n)?JD(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),cO(e,r)}function tO(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:oO([0,1])}}function nO(e){var t=this.option.visual;return t[Math.round(ws(e,[0,1],[0,t.length-1],!0))]||{}}function rO(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function iO(e){var t=this.option.visual;return t[this.option.loop&&e!==XD?e%t.length:e]}function aO(){return this.option.visual[0]}function oO(e){return{linear:function(t){return ws(t,e,this.option.visual,!0)},category:iO,piecewise:function(t,n){var r=sO.call(this,n);return r??=ws(t,e,this.option.visual,!0),r},fixed:aO}}function sO(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[ZD.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function cO(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=z(t,function(e){return Kr(e)||[0,0,0,1]})),t}var lO={linear:function(e){return ws(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=ZD.findPieceIndex(e,t,!0);if(n!=null)return ws(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??XD},fixed:Ve};function uO(e,t,n){return e?t<=n:ta&&(t[1-r]=Ps(t[r],d.sign*a)),t}function fO(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function pO(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var mO=256,hO=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=b.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=b.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=g_.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function gO(e,t,n){var r=e[1]-e[0];t=z(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var vO=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):bv(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(bv(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Pf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=yv(a,`cartesian2d`),s=yv(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Ub(f).w+.5,l=Ub(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Zf(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var j=a.dataToPoint([k,A]);D=new Go({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Se(ee.x))continue;D=new Go({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var M=a.dataToLayout([h.get(T[0],E)]),ee=M.contentRect||M.rect;if(Se(ee.x)||Se(ee.y))continue;D=new Go({z2:1,shape:ee,style:O})}if(h.hasItemOption){var N=h.getItemModel(E),te=N.getModel(`emphasis`);g=te.getModel(`itemStyle`).getItemStyle(),_=N.getModel([`blur`,`itemStyle`]).getItemStyle(),v=N.getModel([`select`,`itemStyle`]).getItemStyle(),y=N.get([`itemStyle`,`borderRadius`]),S=te.get(`focus`),C=te.get(`blurScope`),w=te.get(`disabled`),b=Zf(N)}D.shape.r=y;var P=e.getRawValue(E),F=`-`;P&&P[2]!=null&&(F=P[2]+``),Xf(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:F}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,lu(D,S,C,w),D.incremental=Zc(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new hO;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?_O(v,n.option.range):gO(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Lo({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(dv),yO=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return uh(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=Jm.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:g_.color.primary}}},t}(P_);function bO(e){e.registerChartView(vO),e.registerSeriesModel(yO)}function xO(e){return Object.keys(e)}function SO(e){return e&&typeof e==`object`&&!Array.isArray(e)}function CO(e,t){let n={...e},r=t;return SO(e)&&SO(t)&&Object.keys(t).forEach(t=>{SO(r[t])&&t in e?n[t]=CO(n[t],r[t]):n[t]=r[t]}),n}function wO(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function TO(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function EO(e){let t=TO(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function DO(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function OO(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?DO(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?DO(n):n}}return r}return n}var U=OO(`rem`,{shouldScale:!0}),kO=OO(`em`);function AO(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function jO(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var MO=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=MO()})),W=u(NO(),1);function PO(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==W.Fragment}function FO(e){let t=(0,W.createContext)(null);return[t,()=>{let n=(0,W.use)(t);if(n===null)throw Error(e);return n}]}function IO(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function LO(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function RO(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function zO(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(LO(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>BO(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=zO(l,c,r),d=RO(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[zO(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[RO(c.length,c,!1)]?.focus()}}}var HO={app:100,modal:200,popover:300,overlay:400,max:9999};function UO(e){return HO[e]}function WO(e,t=`size`,n=!0){if(e!==void 0)return jO(e)?n?U(e):e:`var(--${t}-${e})`}function GO(e){return WO(e,`mantine-spacing`)}function KO(e){return e===void 0?`var(--mantine-radius-default)`:WO(e,`mantine-radius`)}function qO(e){return WO(e,`mantine-font-size`)}function JO(e){return WO(e,`mantine-line-height`,!1)}function YO(e){if(e)return WO(e,`mantine-shadow`,!1)}function XO(e,t){return n=>{e?.(n),t?.(n)}}function ZO(e,t){return e in t?EO(t[e]):EO(e)}function QO(e,t){let n=e.map(e=>({value:e,px:ZO(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function $O(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function ek(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function tk(e){let t=(0,W.useRef)(e);return(0,W.useEffect)(()=>{t.current=e}),(0,W.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function nk(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=tk(e),s=(0,W.useRef)(0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,W.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function rk(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window&&window.matchMedia(e).matches}function ik(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,W.useState)(n?t:rk(e));return(0,W.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var ak=typeof document<`u`?W.useLayoutEffect:W.useEffect;function ok(e,t){let n=(0,W.useRef)(!1);(0,W.useEffect)(()=>()=>{n.current=!1},[]),(0,W.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}var sk=e=>(e+1)%1e6;function ck(){let[,e]=(0,W.useReducer)(sk,0);return e}function lk(e){let[t,n]=(0,W.useState)(`mantine-${(0,W.useId)().replace(/:/g,``)}`),r=(0,W.useRef)(!1);return ak(()=>{r.current||(r.current=!0,n(ek()))},[]),typeof e==`string`?e:t}function uk(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function dk(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=uk(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():uk(e,null)}),t.clear()}}}function fk(...e){return(0,W.useCallback)(dk(...e),e)}function pk({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,W.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function mk(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var hk=`dots`;function gk({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=pk({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,W.useCallback)(e=>{f(ec?c:e)},[s,c,f]),m=(0,W.useCallback)(()=>p(d+1),[d,p]),h=(0,W.useCallback)(()=>p(d-1),[d,p]),g=(0,W.useCallback)(()=>p(s),[p,s]),_=(0,W.useCallback)(()=>p(c),[c,p]);return{range:(0,W.useMemo)(()=>{if(t*2+3+n*2>=l)return mk(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r{var t=NO();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=vk()}));function bk(e){return e?.props?.ref}function xk(e){let t=W.Children.toArray(e);return t.length!==1||!PO(t[0])?null:t[0]}function Sk(e){return e}function Ck(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=wk(t[e],n):t[e]=n})}),t}function Dk({theme:e,classNames:t,props:n,stylesCtx:r}){return Ek((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||Tk))}function Ok({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function kk(e){return e===`auto`||e===`dark`||e===`light`}function Ak({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return kk(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&kk(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function jk(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function Mk(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function Nk(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function Pk(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function Fk(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function Ik(e){return Mk(e)?Nk(e):e.startsWith(`rgb`)?Pk(e):e.startsWith(`hsl`)?Fk(e):{r:0,g:0,b:0,a:1}}function Lk(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Rk(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function zk(e){if(e.startsWith(`oklch(`))return(Rk(e)||0)/100;let{r:t,g:n,b:r}=Ik(e),i=t/255,a=n/255,o=r/255,s=Lk(i),c=Lk(a),l=Lk(o);return .2126*s+.7152*c+.0722*l}function Bk(e,t=.179){return!e.startsWith(`var(`)&&zk(e)>t}function Vk({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Bk(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Bk(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Bk(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][jk(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:Bk(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Bk(e,t.luminanceThreshold),shade:a,variable:void 0}}function Hk(e,t){let n=Vk({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function Uk(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function Wk(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=Ik(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function Gk(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=Hk(n.from,t),i=Hk(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function Kk(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=Ik(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var qk=Kk,Jk=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=Vk({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&Uk(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${U(1)} solid transparent`}:{background:e,hover:Wk(e,.1),color:r,border:`${U(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:Wk(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${U(1)} solid transparent`}}return{background:Kk(e,.1),hover:Kk(e,.12),color:e,border:`${U(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${U(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:Kk(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:Kk(e,.05),color:e,border:`${U(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:Kk(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}}return{background:`transparent`,hover:Kk(e,.12),color:e,border:`${U(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${U(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:Wk(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Wk(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Wk(t.white,.01),color:e,border:`${U(1)} solid transparent`}:n===`gradient`?{background:Gk(r,t),hover:Gk(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${U(1)} solid var(--mantine-color-default-border)`}:{}};function Yk({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&Vk({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Xk(e,t,n){return Yk({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function Zk(e,t){let n=e.colors[e.primaryColor];return Uk(n)?e.autoContrast?Xk(n,e,t):`var(--mantine-color-white)`:Yk({color:n[jk(e,t)],theme:e,autoContrast:null})}function Qk(e,t){return typeof e==`boolean`?e:t.autoContrast}var $k=(0,W.createContext)(null);function eA(){let e=(0,W.use)($k);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function tA(){return eA().cssVariablesResolver}function nA(){return eA().classNamesPrefix}function rA(){return eA().getStyleNonce}function iA(){return eA().withStaticClasses}function aA(){return eA().headless}function oA(){return eA().stylesTransform?.sx}function sA(){return eA().stylesTransform?.styles}function cA(){return eA().env||`default`}function lA(){return eA().deduplicateInlineStyles}function uA(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function dA({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,W.useRef)(null),[a,o]=(0,W.useState)(()=>e.get(t)),s=r||a,c=(0,W.useCallback)(t=>{r||(uA(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,W.useCallback)(()=>{o(t),uA(t,n),e.clear()},[e.clear,t]);return(0,W.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),ak(()=>{uA(e.get(t),n)},[]),(0,W.useEffect)(()=>{if(r)return uA(r,n),()=>{};r===void 0&&uA(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&uA(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var fA=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),pA=s(((e,t)=>{t.exports=fA()})),mA={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},hA=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,gA={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:mA,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:Jk,autoContrast:!1,luminanceThreshold:.3,fontFamily:hA,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:hA,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:U(34),lineHeight:`1.3`},h2:{fontSize:U(26),lineHeight:`1.35`},h3:{fontSize:U(22),lineHeight:`1.4`},h4:{fontSize:U(18),lineHeight:`1.45`},h5:{fontSize:U(16),lineHeight:`1.5`},h6:{fontSize:U(14),lineHeight:`1.5`}}},fontSizes:{xs:U(12),sm:U(14),md:U(16),lg:U(18),xl:U(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:U(2),sm:U(4),md:U(8),lg:U(16),xl:U(32)},spacing:{xs:U(10),sm:U(12),md:U(16),lg:U(20),xl:U(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), 0 ${U(1)} ${U(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(10)} ${U(15)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(7)} ${U(7)} ${U(-5)}`,md:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(20)} ${U(25)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(10)} ${U(10)} ${U(-5)}`,lg:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(28)} ${U(23)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(12)} ${U(12)} ${U(-7)}`,xl:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(36)} ${U(28)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(17)} ${U(17)} ${U(-7)}`},other:{},components:{}},_A=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,vA=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function yA(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function bA(e){if(!(e.primaryColor in e.colors))throw Error(_A);if(typeof e.primaryShade==`object`&&(!yA(e.primaryShade.dark)||!yA(e.primaryShade.light))||typeof e.primaryShade==`number`&&!yA(e.primaryShade))throw Error(vA)}function xA(e,t){if(!t)return bA(e),e;let n=CO(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),bA(n),n}var G=pA(),SA=(0,W.createContext)(null),CA=()=>(0,W.use)(SA)||gA;function wA(){let e=(0,W.use)(SA);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function TA({theme:e,children:t,inherit:n=!0}){let r=CA(),i=(0,W.useMemo)(()=>xA(n?r:gA,e),[e,r,n]);return(0,G.jsx)(SA,{value:i,children:t})}TA.displayName=`@mantine/core/MantineThemeProvider`;function EA(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function DA(e,t){let n=t?[t]:[`:root`,`:host`],r=EA(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=EA(e.dark),o=EA(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function OA({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=jk(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:qk(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=jk(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:Wk(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:Wk(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:qk(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function kA(e,t,n){xO(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var AA=e=>{let t=jk(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:U(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":Zk(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":Zk(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};kA(r.variables,e.breakpoints,`breakpoint`),kA(r.variables,e.spacing,`spacing`),kA(r.variables,e.fontSizes,`font-size`),kA(r.variables,e.lineHeights,`line-height`),kA(r.variables,e.shadows,`shadow`),kA(r.variables,e.radius,`radius`),kA(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),xO(e.colors).forEach(t=>{let n=e.colors[t];if(Uk(n)){Object.assign(r.light,OA({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,OA({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=Xk(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=Xk(n,e,`dark`);return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,OA({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,OA({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return xO(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function jA(){let e=wA(),t=rA(),n=xO(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=EO(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:kO(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:kO(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,G.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function MA({theme:e,generator:t}){let n=AA(e),r=t?.(e);return r?CO(n,r):n}var NA=AA(gA);function PA(e){let t={variables:{},light:{},dark:{}};return xO(e.variables).forEach(n=>{NA.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),xO(e.light).forEach(n=>{NA.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),xO(e.dark).forEach(n=>{NA.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function FA(e){return DA({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function IA({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=wA(),r=rA(),i=MA({theme:n,generator:tA()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=DA(a?PA(i):i,e);return o?(0,G.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:FA(e)}`}}):null}IA.displayName=`@mantine/CssVariables`;function LA({respectReducedMotion:e,getRootElement:t}){ak(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function RA({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=Ak(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=dA({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return LA({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,G.jsx)($k,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,G.jsxs)(TA,{theme:e,children:[o&&(0,G.jsx)(IA,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,G.jsx)(jA,{}),t]})})}RA.displayName=`@mantine/core/MantineProvider`;function zA(e,t,n){let r=wA(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...AO(n)}}function BA(e){return e}var VA={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function HA({theme:e,options:t,unstyled:n}){return wk(t?.focusable&&!n&&(e.focusClassName||VA[e.focusRing]),t?.active&&!n&&e.activeClassName)}function UA({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return Dk({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function WA({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return Dk({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function GA({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function KA({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function qA({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function JA({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function YA({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return wk(HA({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),JA({options:t,classes:s,selector:r,unstyled:c||m}),a[r],WA({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),UA({selector:r,stylesCtx:f,options:t,props:d,theme:e}),GA({rootSelector:u,selector:r,className:l}),KA({selector:r,classes:s,unstyled:c||m}),p&&!m&&qA({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function XA({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...XA({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function ZA({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&Ok({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...XA({style:n?.style,theme:e})}}function QA(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...AO(t[n])}}),e),{})}function $A({props:e,stylesCtx:t,themeName:n,theme:r}){let i=sA()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function ej({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=wA(),m=nA(),h=iA(),g=aA(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=$A({props:n,stylesCtx:r,themeName:_,theme:p}),b=Dk({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>Dk({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:Ok({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=Ok({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=QA([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=XA({style:a,theme:p});return(e,a)=>({...f?.[e],className:YA({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:ZA({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function tj(e){return xO(e).reduce((t,n)=>e[n]===void 0?t:`${t}${wO(n)}:${e[n]};`,``).trim()}function nj({selector:e,styles:t,media:n,container:r}){let i=t?tj(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${tj(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${tj(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function rj(e){let t=5381;for(let n=0;n>>0).toString(36)}function ij({deduplicate:e,...t}){let n=rA(),r=nj(t);return e?(0,G.jsx)(`style`,{href:`mantine-${rj(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function aj(e){let t=5381;for(let n=0;n>>0).toString(36)}function oj(e,t){return`__mdi__-${aj(`${e?tj(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${tj(e.styles)}`).join(`|`):``}`)}`}function sj(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e,...ve}=e;return{styleProps:AO({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,bdrs:w,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e}),rest:ve}}var cj={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function lj(e,t){let n=Vk({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function uj(e,t){let n=Vk({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:lj(e,t)}function dj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${U(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${lj(i.join(` `),t)}`),a.trim()}return e}var fj={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function pj(e){return typeof e==`string`&&e in fj?fj[e]:e}var mj=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function hj(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&mj.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?U(e):e}function gj(e){return e}var _j=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function vj(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&_j.includes(e)?`var(--mantine-${e}-line-height)`:e}function yj(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?U(e):e}function bj(e){return typeof e==`number`?U(e):e}function xj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return U(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var Sj={color:lj,textColor:uj,fontSize:hj,spacing:xj,radius:yj,identity:gj,size:bj,lineHeight:vj,fontFamily:pj,border:dj};function Cj(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function bne({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(Cj(e))-Number(Cj(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function xne(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function Sne(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Cne(e){return typeof e==`object`&&e?xO(e).filter(e=>e!==`base`):[]}function wne(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Tne({styleProps:e,data:t,theme:n}){return bne(xO(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=Sne(e[i]);if(!xne(e[i]))return o.forEach(e=>{r.inlineStyles[e]=Sj[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Cne(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=Sj[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:Sj[a.type](wne(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function wj(){return`__m__-${(0,W.useId)().replace(/[:«»]/g,``)}`}function Tj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Tj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Ene(e){return e}var Ej=Ene;function Dj(e){return e}function Oj(e){let t=e;return t.extend=Dj,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function kj(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Dj,t}function Aj(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function Dne(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Aj(n)]=e[n]),t},{})}function jj(e){return e?typeof e==`string`?{[Aj(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...jj(t)}),{}):Dne(e):null}function Mj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Mj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function One({theme:e,style:t,vars:n,styleProps:r}){let i=Mj(t,e),a=Mj(n,e);return{...i,...a,...r}}function Nj({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=wA(),g=e||`div`,{styleProps:_,rest:v}=sj(m),y=oA()?.()?.(_.sx),b=wj(),x=Tne({styleProps:_,theme:h,data:cj}),S=lA(),C=S&&x.hasResponsiveStyles?oj(x.styles,x.media):b,w={ref:p,style:One({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:wk(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":jO(o)?void 0:o||void 0,size:f,...jj(a),...v};return(0,G.jsxs)(G.Fragment,{children:[x.hasResponsiveStyles&&(0,G.jsx)(ij,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,G.jsx)(g,{...w})]})}Nj.displayName=`@mantine/core/Box`;var Pj=Ej(Nj),kne=(0,W.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function Fj(){return(0,W.use)(kne)}var[Ane,Ij]=FO(`ScrollArea.Root component was not found in tree`);function Lj(e,t){let n=(0,W.useEffectEvent)(t);ak(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function jne(e){let{style:t,...n}=e,r=Ij(),[i,a]=(0,W.useState)(0),[o,s]=(0,W.useState)(0),c=!!(i&&o);return Lj(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),Lj(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function Mne(e){let t=Ij(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(jne,{...e}):null}var Nne={scrollHideDelay:1e3,type:`hover`};function Rj(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=zA(`ScrollAreaRoot`,Nne,e),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(0),[y,b]=(0,W.useState)(0),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(!1),T=fk(a,c);return(0,G.jsx)(Ane,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)(Pj,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}Rj.displayName=`@mantine/core/ScrollAreaRoot`;function zj(e,t){let n=e/t;return Number.isNaN(n)?0:n}function Bj(e){let t=zj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Vj(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Pne(e,[t,n]){return Math.min(n,Math.max(t,e))}function Hj(e,t,n=`ltr`){let r=Bj(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Pne(e,n===`ltr`?[0,o]:[o*-1,0]);return Vj([0,o],[0,s])(c)}function Fne(e,t,n,r=`ltr`){let i=Bj(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return Vj([c,l],d)(e)}function Uj(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[Ine,Kj]=FO(`ScrollAreaScrollbar was not found in tree`);function qj(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=Ij(),[p,m]=(0,W.useState)(null),h=fk(u,m),g=(0,W.useRef)(null),_=(0,W.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,W.useEffectEvent)(c),x=tk(o),S=nk(l,10),C=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,W.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,W.useEffect)(x,[t,x]),Lj(p,S),Lj(f.content,S),(0,G.jsx)(Ine,{value:{scrollbar:p,hasThumb:n,onThumbChange:tk(r),onThumbPointerUp:tk(i),onThumbPositionChange:x,onThumbPointerDown:tk(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:Gj(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:Gj(e.onPointerMove,C),onPointerUp:Gj(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var Jj=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=Ij(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=fk(i,l,o.onScrollbarXChange);return(0,W.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(qj,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${Bj(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Uj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Wj(s.paddingLeft),paddingEnd:Wj(s.paddingRight)}})}})};Jj.displayName=`@mantine/core/ScrollAreaScrollbarX`;function Yj(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=Ij(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=fk(i,l,o.onScrollbarYChange);return(0,W.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(qj,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${Bj(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Uj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Wj(s.paddingTop),paddingEnd:Wj(s.paddingBottom)}})}})}Yj.displayName=`@mantine/core/ScrollAreaScrollbarY`;function Xj(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=Fj(),i=Ij(),a=(0,W.useRef)(null),o=(0,W.useRef)(0),[s,c]=(0,W.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=zj(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>Fne(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(Jj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=Hj(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)(Yj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=Hj(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}Xj.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function Zj(e){let t=Ij(),{forceMount:n,...r}=e,[i,a]=(0,W.useState)(!1),o=e.orientation===`horizontal`,s=nk(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(Zj,{"data-state":i?`visible`:`hidden`,...n}):null}Qj.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function Lne(e){let{forceMount:t,...n}=e,r=Ij(),i=e.orientation===`horizontal`,[a,o]=(0,W.useState)(`hidden`),s=nk(()=>o(`idle`),100);return(0,W.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,W.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(Xj,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:Gj(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:Gj(e.onPointerLeave,()=>o(`idle`))}):null}function $j(e){let{forceMount:t,...n}=e,r=Ij(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,W.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(Qj,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(Lne,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(Zj,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(Xj,{...n}):null}$j.displayName=`@mantine/core/ScrollAreaScrollbar`;function Rne(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function eM(e){let{style:t,ref:n,...r}=e,i=Ij(),a=Kj(),{onThumbPositionChange:o}=a,s=fk(n,a.onThumbChange),c=(0,W.useRef)(void 0),l=nk(()=>{c.current&&=(c.current(),void 0)},100);return(0,W.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=Rne(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:Gj(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:Gj(e.onPointerUp,a.onThumbPointerUp)})}eM.displayName=`@mantine/core/ScrollAreaThumb`;function tM(e){let{forceMount:t,...n}=e,r=Kj();return t||r.hasThumb?(0,G.jsx)(eM,{...n}):null}tM.displayName=`@mantine/core/ScrollAreaThumb`;function nM({children:e,style:t,ref:n,onWheel:r,...i}){let a=Ij(),o=fk(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)(Pj,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}nM.displayName=`@mantine/core/ScrollAreaViewport`;var rM={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function iM(){return typeof window<`u`}function aM(e){return cM(e)?(e.nodeName||``).toLowerCase():`#document`}function oM(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sM(e){return((cM(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function cM(e){return iM()?e instanceof Node||e instanceof oM(e).Node:!1}function lM(e){return iM()?e instanceof Element||e instanceof oM(e).Element:!1}function uM(e){return iM()?e instanceof HTMLElement||e instanceof oM(e).HTMLElement:!1}function dM(e){return!iM()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof oM(e).ShadowRoot}function fM(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=yM(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function zne(e){return/^(table|td|th)$/.test(aM(e))}function pM(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Bne=/transform|translate|scale|rotate|perspective|filter/,Vne=/paint|layout|strict|content/,mM=e=>!!e&&e!==`none`,hM;function gM(e){let t=lM(e)?yM(e):e;return mM(t.transform)||mM(t.translate)||mM(t.scale)||mM(t.rotate)||mM(t.perspective)||!_M()&&(mM(t.backdropFilter)||mM(t.filter))||Bne.test(t.willChange||``)||Vne.test(t.contain||``)}function Hne(e){let t=xM(e);for(;uM(t)&&!vM(t);){if(gM(t))return t;if(pM(t))return null;t=xM(t)}return null}function _M(){return hM??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),hM}function vM(e){return/^(html|body|#document)$/.test(aM(e))}function yM(e){return oM(e).getComputedStyle(e)}function bM(e){return lM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xM(e){if(aM(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||dM(e)&&e.host||sM(e);return dM(t)?t.host:t}function SM(e){let t=xM(e);return vM(t)?(e.ownerDocument||e).body:uM(t)&&fM(t)?t:SM(t)}function CM(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=SM(e),i=r===e.ownerDocument?.body,a=oM(r);if(i){let e=wM(a);return t.concat(a,a.visualViewport||[],fM(r)?r:[],e&&n?CM(e):[])}return t.concat(r,CM(r,[],n))}function wM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var TM=Math.min,EM=Math.max,DM=Math.round,OM=Math.floor,kM=e=>({x:e,y:e}),AM={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function jM(e,t,n){return EM(e,TM(t,n))}function MM(e,t){return typeof e==`function`?e(t):e}function NM(e){return e.split(`-`)[0]}function PM(e){return e.split(`-`)[1]}function FM(e){return e===`x`?`y`:`x`}function IM(e){return e===`y`?`height`:`width`}function LM(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function RM(e){return FM(LM(e))}function zM(e,t,n){n===void 0&&(n=!1);let r=PM(e),i=RM(e),a=IM(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=JM(o)),[o,JM(o)]}function BM(e){let t=JM(e);return[VM(e),t,VM(t)]}function VM(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var HM=[`left`,`right`],UM=[`right`,`left`],WM=[`top`,`bottom`],GM=[`bottom`,`top`];function KM(e,t,n){switch(e){case`top`:case`bottom`:return n?t?UM:HM:t?HM:UM;case`left`:case`right`:return t?WM:GM;default:return[]}}function qM(e,t,n,r){let i=PM(e),a=KM(NM(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(VM)))),a}function JM(e){let t=NM(e);return AM[t]+e.slice(t.length)}function YM(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function XM(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:YM(e)}function ZM(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Une(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Wne(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function Gne(){return/apple/i.test(navigator.vendor)}function Kne(){return Une().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function qne(){return Wne().includes(`jsdom/`)}var QM=`data-floating-ui-focusable`,Jne=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function $M(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function eN(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&dM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function tN(e){return`composedPath`in e?e.composedPath()[0]:e.target}function nN(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function rN(e){return e.matches(`html,body`)}function iN(e){return e?.ownerDocument||document}function aN(e){return uM(e)&&e.matches(Jne)}function oN(e){if(!e||qne())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function sN(e){return e?e.hasAttribute(QM)?e:e.querySelector(`[`+QM+`]`)||e:null}function cN(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...cN(e,t.id,n)])}function lN(e){return`nativeEvent`in e}function uN(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var dN=typeof document<`u`?W.useLayoutEffect:function(){},fN={...W};function pN(e){let t=W.useRef(e);return dN(()=>{t.current=e}),t}var mN=fN.useInsertionEffect||(e=>e());function hN(e){let t=W.useRef(()=>{});return mN(()=>{t.current=e}),W.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function gN(e,t,n){let{reference:r,floating:i}=e,a=LM(t),o=RM(t),s=IM(o),c=NM(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=PM(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function _N(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=MM(t,e),p=XM(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ZM(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ZM(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var vN=50,yN=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:_N},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=gN(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=MM(e,t)||{};if(l==null)return{};let d=XM(u),f={x:n,y:r},p=RM(i),m=IM(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=TM(d[_],T),D=TM(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=jM(E,k,O),j=!c.arrow&&PM(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===LM(t)||T.every(e=>LM(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=LM(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function SN(e){let t=TM(...e.map(e=>e.left)),n=TM(...e.map(e=>e.top)),r=EM(...e.map(e=>e.right)),i=EM(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function CN(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>ZM(SN(e)))}var wN=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=MM(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=CN(u),f=ZM(SN(u)),p=XM(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(LM(n)===`y`){let e=d[0],t=d[d.length-1],r=NM(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return ZM({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=NM(n)===`left`,t=EM(...d.map(e=>e.right)),r=TM(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return ZM({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},TN=new Set([`left`,`top`]);async function EN(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=NM(n),s=PM(n),c=LM(n)===`y`,l=TN.has(o)?-1:1,u=a&&c?-1:1,d=MM(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var DN=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await EN(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ON=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=MM(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=LM(i),p=FM(f),m=u[p],h=u[f],g=(e,t)=>jM(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function kN(e){let t=yM(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=uM(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=DM(n)!==a||DM(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function AN(e){return lM(e)?e:e.contextElement}function jN(e){let t=AN(e);if(!uM(t))return kM(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=kN(t),o=(a?DM(n.width):n.width)/r,s=(a?DM(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var MN=kM(0);function NN(e){let t=oM(e);return!_M()||!t.visualViewport?MN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PN(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===oM(e)}function FN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=AN(e),o=kM(1);t&&(r?lM(r)&&(o=jN(r)):o=jN(e));let s=PN(a,n,r)?NN(a):kM(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=oM(a),t=lM(r)?oM(r):r,n=e,i=wM(n);for(;i&&t!==n;){let e=jN(i),t=i.getBoundingClientRect(),r=yM(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=oM(i),i=wM(n)}}return ZM({width:u,height:d,x:c,y:l})}function IN(e,t){let n=bM(e).scrollLeft;return t?t.left+n:FN(sM(e)).left+n}function LN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-IN(e,n),y:n.top+t.scrollTop}}function RN(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=sM(r),s=t?pM(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=kM(1),u=kM(0),d=uM(r);if((d||!a)&&((aM(r)!==`body`||fM(o))&&(c=bM(r)),d)){let e=FN(r);l=jN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?LN(o,c):kM(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function zN(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function BN(e){let t=bM(e),n=e.ownerDocument.body,r=EM(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=EM(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+IN(e),o=-t.scrollTop;return yM(n).direction===`rtl`&&(a+=EM(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var VN=25;function HN(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=oM(e),a=sM(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!_M()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(IN(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=VN&&(s-=o)}return{width:s,height:c,x:l,y:u}}function UN(e,t){let n=FN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=jN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function WN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=HN(e,n,t);else if(t===`document`)r=BN(sM(e));else if(lM(t))r=UN(t,n);else{let n=NN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ZM(r)}function GN(e,t){let n=t.get(e);if(n)return n;let r=CM(e,[],!1).filter(e=>lM(e)&&aM(e)!==`body`),i=null,a=yM(e).position===`fixed`,o=a?xM(e):e;for(;lM(o)&&!vM(o);){let e=yM(o),t=gM(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=xM(o)}return t.set(e,r),r}function KN(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?pM(t)?[]:GN(t,this._c):[].concat(n),r],o=WN(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=oM(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function nP(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=AN(e),u=i||a?[...l?CM(l):[],...t?CM(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Yne(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?FN(e):null;c&&g();function g(){let t=FN(e);h&&!tP(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var rP=DN,iP=ON,aP=xN,oP=bN,sP=wN,cP=(e,t,n)=>{let r=new Map,i=n??{},a={...eP,...i.platform,_c:r};return yN(e,t,{...i,platform:a})},lP=u(yk(),1),uP=typeof document<`u`?W.useLayoutEffect:function(){};function dP(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!dP(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!dP(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function fP(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pP(e,t){let n=fP(e);return Math.round(t*n)/n}function mP(e){let t=W.useRef(e);return uP(()=>{t.current=e}),t}function Xne(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);dP(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=mP(c),D=mP(i),O=mP(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),cP(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!dP(w.current,t)&&(w.current=t,lP.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);uP(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);uP(()=>(A.current=!0,()=>{A.current=!1}),[]),uP(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ee=W.useMemo(()=>({reference:b,floating:x}),[b,x]),M=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!ee.floating)return e;let t=pP(ee.floating,u.x),r=pP(ee.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...fP(ee.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ee.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:ee,floatingStyles:M}),[u,k,j,ee,M])}var Zne=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:oP({element:r.current,padding:i}).fn(n):r?oP({element:r,padding:i}).fn(n):{}}}},Qne=(e,t)=>{let n=rP(e);return{name:n.name,fn:n.fn,options:[e,t]}},hP=(e,t)=>{let n=iP(e);return{name:n.name,fn:n.fn,options:[e,t]}},gP=(e,t)=>{let n=aP(e);return{name:n.name,fn:n.fn,options:[e,t]}},_P=(e,t)=>{let n=sP(e);return{name:n.name,fn:n.fn,options:[e,t]}},$ne=(e,t)=>{let n=Zne(e);return{name:n.name,fn:n.fn,options:[e,t]}};function vP(e){let t=W.useRef(void 0),n=W.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return W.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var ere=`data-floating-ui-focusable`,yP=`active`,bP=`selected`,tre=`ArrowLeft`,nre=`ArrowRight`,rre=`ArrowUp`,ire=`ArrowDown`,are=[tre,nre],ore=[rre,ire];[...are,...ore];var sre={...W},xP=!1,cre=0,SP=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+cre++;function CP(){let[e,t]=W.useState(()=>xP?SP():void 0);return dN(()=>{e??t(SP())},[]),W.useEffect(()=>{xP=!0},[]),e}var wP=sre.useId||CP;function TP(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var EP=W.createContext(null),DP=W.createContext(null),OP=()=>W.useContext(EP)?.id||null,kP=()=>W.useContext(DP);function AP(e){return`data-floating-ui-`+e}function jP(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var MP=AP(`safe-polygon`);function NP(e,t,n){if(n&&!uN(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function PP(e){return typeof e==`function`?e():e}function FP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=kP(),m=OP(),h=pN(l),g=pN(c),_=pN(n),v=pN(d),y=W.useRef(),b=W.useRef(-1),x=W.useRef(),S=W.useRef(-1),C=W.useRef(!0),w=W.useRef(!1),T=W.useRef(()=>{}),E=W.useRef(!1),D=hN(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});W.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(jP(b),jP(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),W.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=iN(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=W.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=NP(g.current,`close`,y.current);i&&!x.current?(jP(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(jP(b),r(!1,e,n))},[g,r]),k=hN(()=>{T.current(),x.current=void 0}),A=hN(()=>{if(w.current){let e=iN(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(MP),w.current=!1}}),j=hN(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);W.useEffect(()=>{if(!s)return;function e(e){if(jP(b),C.current=!1,u&&!uN(y.current)||PP(v.current)>0&&!NP(g.current,`open`))return;let t=NP(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=iN(o.floating);if(jP(S),E.current=!1,h.current&&i.current.floatingContext){n||jP(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!eN(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){jP(b)}function l(e){j()||O(e,!1)}if(lM(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),dN(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(lM(o.domReference)&&e){var t;let n=iN(o.floating).body;n.setAttribute(MP,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),dN(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),W.useEffect(()=>()=>{k(),jP(b),jP(S),A()},[s,o.domReference,k,A]);let ee=W.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||uN(y.current))&&(n||PP(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(jP(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,PP(v.current)))))}}},[u,r,n,_,v]);return W.useMemo(()=>s?{reference:ee}:{},[s,ee])}var IP=()=>{},LP=W.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:IP,setState:IP,isInstantPhase:!1}),RP=()=>W.useContext(LP);function zP(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=W.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=W.useRef(null),s=W.useCallback(e=>{a({currentId:e})},[]);return dN(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(LP.Provider,{value:W.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function BP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=RP(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return dN(()=>{o&&l&&(f({delay:{open:1,close:NP(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),dN(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),dN(()=>{o&&u!==IP&&n&&u(s)},[o,n,u,s]),c}function VP(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&dM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function HP(e){return`composedPath`in e?e.composedPath()[0]:e.target}var UP={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},WP={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},GP=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function KP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=kP(),g=hN(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=W.useRef(!1),{escapeKey:y,outsidePress:b}=GP(p),{escapeKey:x,outsidePress:S}=GP(m),C=W.useRef(!1),w=hN(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?cN(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,lN(e)?e.nativeEvent:e,`escape-key`)}),T=hN(e=>{var t;let n=()=>{var t;w(e),(t=tN(e))==null||t.removeEventListener(`keydown`,n)};(t=tN(e))==null||t.addEventListener(`keydown`,n)}),E=hN(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=tN(e),s=`[`+AP(`inert`)+`]`,c=iN(i.floating).querySelectorAll(s),u=lM(o)?o:null;for(;u&&!vM(u);){let e=xM(u);if(vM(e)||!lM(e))break;u=e}if(c.length&&lM(o)&&!rN(o)&&!eN(o,i.floating)&&Array.from(c).every(e=>!eN(u,e)))return;if(uM(o)&&k){let t=vM(o),n=yM(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&cN(h.nodesRef.current,d).some(t=>nN(e,t.context?.elements.floating));if(nN(e,i.floating)||nN(e,i.domReference)||f)return;let p=h?cN(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=hN(e=>{var t;let n=()=>{var t;E(e),(t=tN(e))==null||t.removeEventListener(l,n)};(t=tN(e))==null||t.addEventListener(l,n)});W.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},_M()?5:0)}let d=iN(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(lM(i.domReference)&&(p=CM(i.domReference)),lM(i.floating)&&(p=p.concat(CM(i.floating))),!lM(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(CM(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),W.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=W.useMemo(()=>({onKeyDown:w,...u&&{[UP[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=W.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[WP[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return W.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function qP(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=wP(),a=W.useRef({}),[o]=W.useState(()=>TP()),s=OP()!=null,[c,l]=W.useState(r.reference),u=hN((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return W.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function JP(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=qP({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=W.useState(null),[l,u]=W.useState(null),d=o?.domReference||s,f=W.useRef(null),p=kP();dN(()=>{d&&(f.current=d)},[d]);let m=Xne({...n,elements:{...o,...l&&{reference:l}}}),h=W.useCallback(e=>{let t=lM(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=W.useCallback(e=>{(lM(e)||e===null)&&(f.current=e,c(e)),(lM(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!lM(e))&&m.refs.setReference(e)},[m.refs]),_=W.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=W.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=W.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return dN(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),W.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function YP(){return Kne()&&Gne()}function XP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=W.useRef(!1),u=W.useRef(-1),d=W.useRef(!0);W.useEffect(()=>{if(!s)return;let e=oM(o.domReference);function t(){!n&&uM(o.domReference)&&o.domReference===$M(iN(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),YP()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),YP()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),W.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),W.useEffect(()=>()=>{jP(u)},[]);let f=W.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=tN(e.nativeEvent);if(c&&lM(t)){if(YP()&&!e.relatedTarget){if(!d.current&&!aN(t))return}else if(!oN(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=lM(t)&&t.hasAttribute(AP(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=$M(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(eN(a.current.floatingContext?.refs.floating.current,e)||eN(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return W.useMemo(()=>s?{reference:f}:{},[s,f])}function ZP(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[yP]:t,[bP]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[ere]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[yP,bP].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function QP(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=W.useCallback(t=>ZP(t,e,`reference`),t),a=W.useCallback(t=>ZP(t,e,`floating`),n),o=W.useCallback(t=>ZP(t,e,`item`),r);return W.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var $P=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function eF(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=wP(),c=r.domReference?.id||s,l=W.useMemo(()=>sN(r.floating)?.id||i,[r.floating,i]),u=$P.get(o)??o,d=OP()!=null,f=W.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=W.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=W.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return W.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function tF(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...tF(e,t.id,n)])}function nF(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function rF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function iF(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){jP(i),u()}if(jP(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=HP(e),v=e.type===`mouseleave`,y=VP(c.floating,_),b=VP(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=rF(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,ee=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&lM(e.relatedTarget)&&VP(c.floating,e.relatedTarget)||f&&tF(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let M=[];switch(C){case`top`:M=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:M=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:M=[[S.right-1,ee],[S.right-1,j],[x.left+1,j],[x.left+1,ee]];break;case`right`:M=[[x.right-1,ee],[x.right-1,j],[S.left+1,j],[S.left+1,ee]]}function N(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!nF([m,h],M)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}nF([m,h],N([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var aF={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},oF=Sk((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":U(t),"--scrollarea-over-scroll-behavior":i}}}),sF=Oj(e=>{let t=zA(`ScrollArea`,aF,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:C,attributes:w,...T}=t,[E,D]=(0,W.useState)(!1),[O,k]=(0,W.useState)(!1),[A,j]=(0,W.useState)(!1),ee=(0,W.useRef)(!0),M=(0,W.useRef)(!1),N=(0,W.useRef)(!0),te=(0,W.useRef)(!1),P=ej({name:`ScrollArea`,props:t,classes:rM,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:c,varsResolver:oF}),F=(0,W.useRef)(null),[I,ne]=(0,W.useState)(null),L=vP([f,F,(0,W.useCallback)(e=>{ne(t=>t===e?t:e)},[])]);return Lj(h===`present`?I:null,()=>{let e=F.current;e&&(k(e.scrollHeight>e.clientHeight),j(e.scrollWidth>e.clientWidth))}),ak(()=>{S&&F.current&&F.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(Rj,{getStyles:P,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...P(`root`),...T,children:[(0,G.jsx)(nM,{...d,...P(`viewport`,{style:d?.style}),ref:L,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":C||void 0,"data-horizontal-hidden":h===`present`&&!A?`true`:void 0,"data-vertical-hidden":h===`present`&&!O?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!M.current&&_?.(),c&&!ee.current&&v?.(),M.current=s,ee.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!te.current&&b?.(),u&&!N.current&&y?.(),te.current=l,N.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)($j,{...P(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!A||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(tM,{...P(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)($j,{...P(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!O||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(tM,{...P(`thumb`)})}),(0,G.jsx)(Mne,{...P(`corner`),"data-vertical-scrollbar-position":C||void 0,"data-hovered":E||void 0,"data-hidden":l===`never`||void 0})]})});sF.displayName=`@mantine/core/ScrollArea`;var cF=Oj(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...C}=zA(`ScrollAreaAutosize`,aF,e),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(null),D=vP([u,w,(0,W.useCallback)(e=>{E(t=>t===e?t:e)},[])]),O=(0,W.useRef)(!1),k=(0,W.useRef)(!1),A=(0,W.useEffectEvent)(()=>{let e=w.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==O.current&&(k.current?S(t):(k.current=!0,t&&S(!0)),O.current=t)});return Lj(S?T:null,A),(0,G.jsx)(Pj,{...C,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)(Pj,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(sF,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:D,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});sF.classes=rM,sF.varsResolver=oF,cF.displayName=`@mantine/core/ScrollAreaAutosize`,cF.classes=rM,sF.Autosize=cF;var lF={root:`m_87cf2631`},uF={__staticSelector:`UnstyledButton`},dF=kj(e=>{let t=zA(`UnstyledButton`,uF,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,G.jsx)(Pj,{...ej({name:i,props:t,classes:lF,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});dF.classes=lF,dF.displayName=`@mantine/core/UnstyledButton`;var fF={root:`m_1b7284a3`},pF=Sk((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:KO(t),"--paper-shadow":YO(n)}})),mF=kj(e=>{let t=zA(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=ej({name:`Paper`,props:t,classes:fF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:pF});return(0,G.jsx)(Pj,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});mF.classes=fF,mF.varsResolver=pF,mF.displayName=`@mantine/core/Paper`;function hF(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function gF(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var _F={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function vF({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function yF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=vF({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[_F[c]]:r},d=-t/2;return c===`left`?{...u,...hF(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...hF(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...gF(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...gF(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function bF({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function xF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=Fj();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,...yF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}xF.displayName=`@mantine/core/FloatingArrow`;function SF(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function CF(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function wF({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||CF(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=CF(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return CF(n)}var TF={reuseTargetNode:!0},EF=Oj(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=zA(`Portal`,TF,e),[o,s]=(0,W.useState)(!1),c=(0,W.useRef)(null);return ak(()=>(s(!0),c.current=wF({target:n,reuseTargetNode:r,...a}),uk(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,lP.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});EF.displayName=`@mantine/core/Portal`;var DF=Oj(({withinPortal:e=!0,children:t,...n})=>cA()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)(EF,{...n,children:t}));DF.displayName=`@mantine/core/OptionalPortal`;var OF=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),kF={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...OF(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...OF(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...OF(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...OF(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...OF(`top`),common:{transformOrigin:`top right`}}},AF={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function jF({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in kF?{transitionProperty:kF[e].transitionProperty,...i,...kF[e].common,...kF[e][AF[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[AF[t]]}}function MF({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=wA(),d=_k(),f=u.respectReducedMotion?d:!1,[p,m]=(0,W.useState)(f?0:e),[h,g]=(0,W.useState)(r?`entered`:`exited`),_=(0,W.useRef)(-1),v=(0,W.useRef)(-1),y=(0,W.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{lP.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return ok(()=>{S(r)},[r]),(0,W.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function NF({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=cA(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=MF({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(W.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:jF({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(W.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(jF({transition:n,duration:h,state:g,timingFunction:_}))})}NF.displayName=`@mantine/core/Transition`;var PF={duration:100,transition:`fade`};function FF(e,t){return{...PF,...t,...e}}var IF={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},LF=({className:e,...t})=>(0,G.jsxs)(Pj,{component:`span`,className:wk(IF.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:IF.bar}),(0,G.jsx)(`span`,{className:IF.bar}),(0,G.jsx)(`span`,{className:IF.bar})]});LF.displayName=`@mantine/core/Bars`;var RF=({className:e,...t})=>(0,G.jsxs)(Pj,{component:`span`,className:wk(IF.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:IF.dot}),(0,G.jsx)(`span`,{className:IF.dot}),(0,G.jsx)(`span`,{className:IF.dot})]});RF.displayName=`@mantine/core/Dots`;var zF=({className:e,...t})=>(0,G.jsx)(Pj,{component:`span`,className:wk(IF.ovalLoader,e),...t});zF.displayName=`@mantine/core/Oval`;var BF={bars:LF,oval:zF,dots:RF},VF={loaders:BF,type:`oval`},HF=Sk((e,{size:t,color:n})=>({root:{"--loader-size":WO(t,`loader-size`),"--loader-color":n?Hk(n,e):void 0}})),UF=Oj(e=>{let t=zA(`Loader`,VF,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=ej({name:`Loader`,props:t,classes:IF,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:HF});return p?(0,G.jsx)(Pj,{...g(`root`),...h,children:p}):(0,G.jsx)(Pj,{...g(`root`),component:d[i],variant:f,size:n,...h})});UF.defaultLoaders=BF,UF.classes=IF,UF.varsResolver=HF,UF.displayName=`@mantine/core/Loader`;var WF={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},GF={orientation:`horizontal`},KF=Sk((e,{borderWidth:t})=>({group:{"--ai-border-width":U(t)}})),qF=Oj(e=>{let t=zA(`ActionIconGroup`,GF,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t;return(0,G.jsx)(Pj,{...ej({name:`ActionIconGroup`,props:t,classes:WF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:KF,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});qF.classes=WF,qF.varsResolver=KF,qF.displayName=`@mantine/core/ActionIconGroup`;var JF=Sk((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":WO(o,`section-height`),"--section-padding-x":WO(o,`section-padding-x`),"--section-fz":qO(o),"--section-radius":t===void 0?void 0:KO(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),YF=Oj(e=>{let t=zA(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,G.jsx)(Pj,{...ej({name:`ActionIconGroupSection`,props:t,classes:WF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:JF,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});YF.classes=WF,YF.varsResolver=JF,YF.displayName=`@mantine/core/ActionIconGroupSection`;var XF=Sk((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":WO(t,`ai-size`),"--ai-radius":n===void 0?void 0:KO(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),ZF=kj(e=>{let t=zA(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=ej({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:WF,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:XF});return(0,G.jsxs)(dF,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(NF,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)(Pj,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(UF,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)(Pj,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});ZF.classes=WF,ZF.varsResolver=XF,ZF.displayName=`@mantine/core/ActionIcon`,ZF.Group=qF,ZF.GroupSection=YF;function QF({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}QF.displayName=`@mantine/core/CloseIcon`;var $F={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},eI={variant:`subtle`},tI=Sk((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":WO(t,`cb-size`),"--cb-radius":n===void 0?void 0:KO(n),"--cb-icon-size":U(r)}})),nI=kj(e=>{let t=zA(`CloseButton`,eI,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=ej({name:_||`CloseButton`,props:t,className:o,style:c,classes:$F,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:tI});return(0,G.jsxs)(dF,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(QF,{}),r]})});nI.classes=$F,nI.varsResolver=tI,nI.displayName=`@mantine/core/CloseButton`;function rI(e){return W.Children.toArray(e).filter(Boolean)}var iI={root:`m_4081bf90`},aI={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},oI=Sk((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":GO(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),sI=Oj(e=>{let t=zA(`Group`,aI,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=rI(s),x=b.length,S=GO(c??`md`);return(0,G.jsx)(Pj,{...ej({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:iI,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:oI})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});sI.classes=iI,sI.varsResolver=oI,sI.displayName=`@mantine/core/Group`;var cI={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},lI=Sk((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:KO(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),uI=Oj(e=>{let t=zA(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=ej({name:`Alert`,classes:cI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:lI}),C=lk(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(Pj,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(nI,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});uI.classes=cI,uI.varsResolver=lI,uI.displayName=`@mantine/core/Alert`;var dI={root:`m_b6d8b162`};function fI(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var pI={inherit:!1},mI=Sk((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":qO(i),"--text-lh":JO(i),"--text-gradient":t===`gradient`?Gk(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),hI=kj(e=>{let t=zA(`Text`,pI,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)(Pj,{...ej({name:[`Text`,l],props:t,classes:dI,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:mI})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":fI(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});hI.classes=dI,hI.varsResolver=mI,hI.displayName=`@mantine/core/Text`;var gI={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},_I=Sk((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":WO(a,`badge-height`),"--badge-padding-x":WO(a,`badge-padding-x`),"--badge-fz":WO(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:KO(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?Hk(n,e):void 0}}}),vI=kj(e=>{let t=zA(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=ej({name:`Badge`,props:t,classes:gI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:_I});return(0,G.jsxs)(Pj,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});vI.classes=gI,vI.varsResolver=_I,vI.displayName=`@mantine/core/Badge`;var yI={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},bI={orientation:`horizontal`},xI=Sk((e,{borderWidth:t})=>({group:{"--button-border-width":U(t)}})),SI=Oj(e=>{let t=zA(`ButtonGroup`,bI,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=zA(`ButtonGroup`,bI,e);return(0,G.jsx)(Pj,{...ej({name:`ButtonGroup`,props:t,classes:yI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:xI,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});SI.classes=yI,SI.varsResolver=xI,SI.displayName=`@mantine/core/ButtonGroup`;var CI=Sk((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":WO(o,`section-height`),"--section-padding-x":WO(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?qO(o.replace(`compact-`,``)):qO(o),"--section-radius":t===void 0?void 0:KO(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),wI=Oj(e=>{let t=zA(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)(Pj,{...ej({name:`ButtonGroupSection`,props:t,classes:yI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:CI,rootSelector:`groupSection`})(`groupSection`),...f})});wI.classes=yI,wI.varsResolver=CI,wI.displayName=`@mantine/core/ButtonGroupSection`;var TI={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${U(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},EI=Sk((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":WO(a,`button-height`),"--button-padding-x":WO(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?qO(a.replace(`compact-`,``)):qO(a),"--button-radius":t===void 0?void 0:KO(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),DI=kj(e=>{let t=zA(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=ej({name:`Button`,props:t,classes:yI,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:EI}),T=!!c,E=!!l;return(0,G.jsxs)(dF,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(NF,{mounted:p,transition:TI,duration:150,children:e=>(0,G.jsx)(Pj,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(UF,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(Pj,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(Pj,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(Pj,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});DI.classes=yI,DI.varsResolver=EI,DI.displayName=`@mantine/core/Button`,DI.Group=SI,DI.GroupSection=wI;var OI={root:`m_4451eb3a`},kI=kj(e=>{let t=zA(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=ej({name:`Center`,props:t,classes:OI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)(Pj,{mod:[{inline:c},l],...f(`root`),...d})});kI.classes=OI,kI.displayName=`@mantine/core/Center`;var[AI,jI]=FO(`Pagination.Root component was not found in tree`),MI={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},NI={withPadding:!0},PI=Oj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=zA(`PaginationControl`,NI,e),d=jI(),f=s||d.disabled;return(0,G.jsx)(dF,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});PI.classes=MI,PI.displayName=`@mantine/core/PaginationControl`;function FI({style:e,children:t,path:n,...r}){return(0,G.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,G.jsx)(`path`,{d:n,fill:`currentColor`})})}var II=e=>(0,G.jsx)(FI,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),LI=e=>(0,G.jsx)(FI,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),RI=e=>(0,G.jsx)(FI,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),zI=e=>(0,G.jsx)(FI,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),BI={icon:e=>(0,G.jsx)(FI,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},VI=Oj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=zA(`PaginationDots`,BI,e);return(0,G.jsx)(Pj,{...jI().getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,G.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});VI.classes=MI,VI.displayName=`@mantine/core/PaginationDots`;function HI({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=zA(t,i,e),s=jI(),c=r===`next`?s.active===s.total:s.active===1;return(0,G.jsx)(PI,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,G.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,Ej(a)}var UI=HI({icon:II,name:`PaginationNext`,action:`onNext`,type:`next`}),WI=HI({icon:LI,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),GI=HI({icon:RI,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),KI=HI({icon:zI,name:`PaginationLast`,action:`onLast`,type:`next`});function qI({dotsIcon:e}){let t=jI();return(0,G.jsx)(G.Fragment,{children:t.range.map((n,r)=>n===`dots`?(0,G.jsx)(VI,{icon:e},r):(0,G.jsx)(PI,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r))})}qI.displayName=`@mantine/core/PaginationItems`;var lre={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},JI=Oj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=zA(`PaginationLabel`,lre,e),c=jI();return(0,G.jsx)(Pj,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});JI.classes=MI,JI.displayName=`@mantine/core/PaginationLabel`;var ure={siblings:1,boundaries:1},YI=Sk((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:KO(n),"--pagination-control-size":WO(t,`pagination-control-size`),"--pagination-control-fz":qO(t),"--pagination-active-bg":r?Hk(r,e):void 0,"--pagination-active-color":Qk(i,e)?Yk({color:r,theme:e,autoContrast:i}):void 0}})),XI=Oj(e=>{let t=zA(`PaginationRoot`,ure,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=ej({name:`Pagination`,classes:MI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:YI}),{range:k,setPage:A,next:j,previous:ee,active:M,first:N,last:te}=gk({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,G.jsx)(AI,{value:{total:c,range:k,active:M,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:XO(_,j),onPrevious:XO(v,ee),onFirst:XO(y,N),onLast:XO(b,te),getStyles:O},children:(0,G.jsx)(Pj,{...O(`root`),mod:[{layout:w},T],...D})})});XI.classes=MI,XI.varsResolver=YI,XI.displayName=`@mantine/core/PaginationRoot`;var dre={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function fre({children:e}){return(0,G.jsx)(Pj,{...jI().getStyles(`items`),children:e})}var ZI=Oj(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=zA(`Pagination`,dre,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(fre,{children:(0,G.jsx)(qI,{dotsIcon:c})}),(0,G.jsx)(JI,{formatLabel:m})]}):(0,G.jsx)(qI,{dotsIcon:c}):null;return(0,G.jsx)(XI,{total:l,layout:p,...h,children:(0,G.jsxs)(sI,{gap:u,children:[t&&(0,G.jsx)(GI,{icon:s,...r?.(`first`)}),n&&(0,G.jsx)(WI,{icon:a,...r?.(`previous`)}),g,n&&(0,G.jsx)(UI,{icon:i,...r?.(`next`)}),t&&(0,G.jsx)(KI,{icon:o,...r?.(`last`)})]})})});ZI.classes=MI,ZI.displayName=`@mantine/core/Pagination`,ZI.Root=XI,ZI.Control=PI,ZI.Dots=VI,ZI.First=GI,ZI.Last=KI,ZI.Next=UI,ZI.Previous=WI,ZI.Items=qI,ZI.Label=JI;function pre({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,W.useState)(n),a=(0,W.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=JP({placement:t,middleware:[hP({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,W.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,W.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=CM(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var QI={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},mre={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:UO(`popover`)},$I=Sk((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:KO(t),"--tooltip-bg":n?Hk(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),eL=Oj(e=>{let t=zA(`TooltipFloating`,mre,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=wA(),E=ej({name:`TooltipFloating`,props:t,classes:QI,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:$I}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:j,floating:ee,setOpened:M}=pre({offset:p,position:m,defaultOpened:v}),N=xk(n);if(!N)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let te=fk(j,bk(N),C),P=N.props,F=e=>{P.onMouseEnter?.(e),D(e),M(!0)},I=e=>{P.onMouseLeave?.(e),M(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(DF,{...x,withinPortal:i,children:(0,G.jsx)(Pj,{...w,...E(`tooltip`,{style:{...Tj(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:Number.isFinite(k)?Math.round(k):``,left:Number.isFinite(O)?Math.round(O):``}}),variant:y,ref:ee,mod:{multiline:h},children:f})}),(0,W.cloneElement)(N,{...P,[r]:te,onMouseEnter:F,onMouseLeave:I})]})});eL.classes=QI,eL.varsResolver=$I,eL.displayName=`@mantine/core/TooltipFloating`;var tL=(0,W.createContext)({withinGroup:!1}),hre={openDelay:0,closeDelay:0};function nL(e){let{openDelay:t,closeDelay:n,children:r}=zA(`TooltipGroup`,hre,e);return(0,G.jsx)(tL,{value:{withinGroup:!0},children:(0,G.jsx)(zP,{delay:{open:t,close:n},children:r})})}nL.displayName=`@mantine/core/TooltipGroup`,nL.extend=e=>e;function gre(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function _re(e){let t=gre(e.middlewares),n=[Qne(e.offset)];return t.shift&&n.push(hP(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?gP():gP(t.flip)),n.push($ne({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?_P():_P(t.inline)):e.inline&&n.push(_P()),n}function vre(e){let[t,n]=(0,W.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,W.use)(tL).withinGroup,a=lk(),o=(0,W.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=JP({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:_re(e),whileElementsMounted:nP}),{delay:m,currentId:h,setCurrentId:g}=BP(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=QP([FP(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?iF():null}),XP(l,{enabled:e.events?.focus,visibleOnly:!0}),eF(l,{role:`tooltip`}),KP(l,{enabled:e.opened===void 0})]),y=(0,W.useRef)(d);ak(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var yre={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:UO(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},rL=Sk((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:KO(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),iL=Oj(e=>{let t=zA(`Tooltip`,yre,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,interactive:O,zIndex:k,disabled:A,onClick:j,onMouseEnter:ee,onMouseLeave:M,inline:N,variant:te,keepMounted:P,vars:F,portalProps:I,mod:ne,floatingStrategy:L,middlewares:re,autoContrast:ie,attributes:ae,target:oe,ref:R,...z}=t,{dir:se}=Fj(),ce=(0,W.useRef)(null),le=vre({position:SF(se,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,interactive:O,arrowRef:ce,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:N,strategy:L,middlewares:re});(0,W.useEffect)(()=>{let e=oe instanceof HTMLElement?oe:typeof oe==`string`?document.querySelector(oe):oe?.current||null;e&&le.reference(e)},[oe,le]);let ue=ej({name:`Tooltip`,props:t,classes:QI,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ae,rootSelector:`tooltip`,vars:F,varsResolver:rL}),de=xk(n);if(!oe&&!de)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let fe=ue(`tooltip`),pe=O&&!A&&!!le.opened,B=C===`merge`&&y?bF({position:le.placement,dir:se}):void 0;if(oe){let e=FF(T,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(DF,{...I,withinPortal:d,children:(0,G.jsx)(NF,{...e,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(Pj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...fe,...le.getFloatingProps({ref:le.floating,className:fe.className,style:{...fe.style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(xF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})})})}let me=de.props,V=fk(le.reference,bk(de),R),he=FF(T,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(DF,{...I,withinPortal:d,children:(0,G.jsx)(NF,{...he,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:he.duration,children:e=>(0,G.jsxs)(Pj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...le.getFloatingProps({ref:le.floating,className:ue(`tooltip`).className,style:{...ue(`tooltip`).style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(xF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})}),(0,W.cloneElement)(de,le.getReferenceProps({onClick:j,onMouseEnter:ee,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...me,className:wk(v,me.className),[i]:V}))]})});iL.classes=QI,iL.varsResolver=rL,iL.displayName=`@mantine/core/Tooltip`,iL.Floating=eL,iL.Group=nL;function aL(e){if(e!==void 0)return typeof e==`number`?U(e):e}function bre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=wA(),s=t===void 0?e:t,c=r!==void 0,l=AO({"--sg-spacing-x":GO($O(e)),"--sg-spacing-y":GO($O(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":aL(r)}:{"--sg-cols":$O(n)?.toString()}}),u=xO(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=GO(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=GO(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(ij,{styles:l,media:QO(xO(u),o.breakpoints).filter(e=>xO(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function oL(e){return typeof e==`object`&&e?xO(e):[]}function xre(e){return e.sort((e,t)=>EO(e)-EO(t))}function Sre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return xre(Array.from(new Set([...oL(e),...oL(t),...r===void 0?oL(n):[]])))}function Cre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=AO({"--sg-spacing-x":GO($O(e)),"--sg-spacing-y":GO($O(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":aL(r)}:{"--sg-cols":$O(n)?.toString()}}),l=Sre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=GO(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=GO(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(ij,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var sL={container:`m_925c2d2c`,root:`m_2415a157`},wre={cols:1,spacing:`md`,type:`media`},cL=Oj(e=>{let t=zA(`SimpleGrid`,wre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=ej({name:`SimpleGrid`,classes:sL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=wj(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Cre,{...t,selector:`.${v}`}),(0,G.jsx)(`div`,{..._(`container`),children:(0,G.jsx)(Pj,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(bre,{...t,selector:`.${v}`}),(0,G.jsx)(Pj,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});cL.classes=sL,cL.displayName=`@mantine/core/SimpleGrid`;var lL={root:`m_6d731127`},Tre={gap:`md`,align:`stretch`,justify:`flex-start`},uL=Sk((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":GO(t),"--stack-align":n,"--stack-justify":r}})),dL=Oj(e=>{let t=zA(`Stack`,Tre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,G.jsx)(Pj,{...ej({name:`Stack`,props:t,classes:lL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:uL})(`root`),variant:d,...p})});dL.classes=lL,dL.varsResolver=uL,dL.displayName=`@mantine/core/Stack`;var[Ere,Dre]=FO(`Table component was not found in the tree`),fL={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function Ore(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function pL(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=Oj(r=>{let i=zA(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=Dre();return(0,G.jsx)(Pj,{component:e,...Ore(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=fL,r}var mL=pL(`th`,{columnBorder:!0}),hL=pL(`td`,{columnBorder:!0}),gL=pL(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),_L=pL(`thead`,{stickyHeader:!0}),vL=pL(`tbody`),yL=pL(`tfoot`),bL=pL(`caption`,{captionSide:!0}),kre={type:`scrollarea`},xL=Sk((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":U(t),"--table-max-height":U(n),"--table-overflow":r===`native`?`auto`:void 0}})),SL=Oj(e=>{let t=zA(`TableScrollContainer`,kre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=ej({name:`TableScrollContainer`,classes:fL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:xL,rootSelector:`scrollContainer`});return(0,G.jsx)(Pj,{component:d===`scrollarea`?sF:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});SL.classes=fL,SL.varsResolver=xL,SL.displayName=`@mantine/core/TableScrollContainer`;function CL({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)(bL,{children:e.caption}),e.head&&(0,G.jsx)(_L,{children:(0,G.jsx)(gL,{children:e.head.map((e,t)=>(0,G.jsx)(mL,{children:e},t))})}),e.body&&(0,G.jsx)(vL,{children:e.body.map((e,t)=>(0,G.jsx)(gL,{children:e.map((e,t)=>(0,G.jsx)(hL,{children:e},t))},t))}),e.foot&&(0,G.jsx)(yL,{children:(0,G.jsx)(gL,{children:e.foot.map((e,t)=>(0,G.jsx)(mL,{children:e},t))})})]})}CL.displayName=`@mantine/core/TableDataRenderer`;var wL={withRowBorders:!0,verticalSpacing:7},TL=Sk((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":GO(r),"--table-vertical-spacing":GO(i),"--table-border-color":a?Hk(a,e):void 0,"--table-striped-color":c&&o?Hk(o,e):void 0,"--table-highlight-on-hover-color":l&&s?Hk(s,e):void 0,"--table-sticky-header-offset":d?U(u):void 0}})),EL=Oj(e=>{let t=zA(`Table`,wL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:C,mod:w,tabularNums:T,attributes:E,...D}=t,O=ej({name:`Table`,props:t,className:r,style:i,classes:fL,classNames:n,styles:a,unstyled:o,attributes:E,rootSelector:`table`,vars:s,varsResolver:TL});return(0,G.jsx)(Ere,{value:{getStyles:O,stickyHeader:S,striped:p===!0?`odd`:p||void 0,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:u||`bottom`},children:(0,G.jsx)(Pj,{component:`table`,mod:[{"data-with-table-border":_,"data-tabular-nums":T},w],...O(`table`),...D,children:x||!!b&&(0,G.jsx)(CL,{data:b})})})});EL.classes=fL,EL.varsResolver=TL,EL.displayName=`@mantine/core/Table`,EL.Td=hL,EL.Th=mL,EL.Tr=gL,EL.Thead=_L,EL.Tbody=vL,EL.Tfoot=yL,EL.Caption=bL,EL.ScrollContainer=SL,EL.DataRenderer=CL;var[DL,OL]=FO(`Tabs component was not found in the tree`),kL={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},AL=Oj(e=>{let t=zA(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=OL();return(0,G.jsx)(Pj,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});AL.classes=kL,AL.displayName=`@mantine/core/TabsList`;var jL=Oj(e=>{let t=zA(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=cA(),f=OL();(0,W.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,G.jsx)(W.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,G.jsx)(Pj,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});jL.classes=kL,jL.displayName=`@mantine/core/TabsPanel`;var ML=Oj(e=>{let t=zA(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=wA(),{dir:y}=Fj(),b=OL(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,G.jsxs)(dF,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?Hk(u,v):void 0},onKeyDown:VO({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,G.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});ML.classes=kL,ML.displayName=`@mantine/core/TabsTab`;var NL=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,PL={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},FL=Sk((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":KO(t),"--tabs-color":Hk(n,e),"--tabs-text-color":Qk(r,e)?Yk({color:n,theme:e,autoContrast:r}):void 0}})),IL=Oj(e=>{let t=zA(`Tabs`,PL,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:C,autoContrast:w,mod:T,attributes:E,...D}=t,O=lk(c),k=(0,W.useRef)(new Set),A=ck(),j=(0,W.useCallback)((e,t)=>{let n=k.current;t&&!n.has(e)?(n.add(e),A()):!t&&n.has(e)&&(n.delete(e),A())},[]),[ee,M]=pk({value:r,defaultValue:n,finalValue:null,onChange:i}),N=ej({name:`Tabs`,props:t,classes:kL,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:E,vars:C,varsResolver:FL});return(0,G.jsx)(DL,{value:{placement:h,value:ee,orientation:a,id:O,loop:s,activateTabWithKeyboard:l,getTabId:IO(`${O}-tab`,NL),getPanelId:IO(`${O}-panel`,NL),onChange:M,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:N,mountedPanels:k,setMountedPanel:j},children:(0,G.jsx)(Pj,{id:O,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},T],...N(`root`),...D,children:o})})});IL.classes=kL,IL.varsResolver=FL,IL.displayName=`@mantine/core/Tabs`,IL.Tab=ML,IL.Panel=jL,IL.List=AL;var LL={root:`m_7341320d`},RL=Sk((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":WO(t,`ti-size`),"--ti-radius":n===void 0?void 0:KO(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),zL=Oj(e=>{let t=zA(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t;return(0,G.jsx)(Pj,{...ej({name:`ThemeIcon`,classes:LL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:RL})(`root`),...u})});zL.classes=LL,zL.varsResolver=RL,zL.displayName=`@mantine/core/ThemeIcon`;var BL=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],VL=[`xs`,`sm`,`md`,`lg`,`xl`];function HL(e,t){let n=t===void 0?`h${e}`:t;return BL.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:VL.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:U(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var UL={root:`m_8a5d1357`},WL={order:1},GL=Sk((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=HL(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),KL=Oj(e=>{let t=zA(`Title`,WL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=ej({name:`Title`,props:t,classes:UL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:GL});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(Pj,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});KL.classes=UL,KL.varsResolver=GL,KL.displayName=`@mantine/core/Title`;var qL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),JL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),YL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,80v96H48V80Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z`}))]]),XL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z`}))]]),ZL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M96,40l33.52,88H56Zm104,88H129.52L160,208Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z`}))]]),QL=(0,W.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),$L=W.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=W.useContext(QL);return W.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&W.createElement(`title`,null,n),s,c.get(a??f))});$L.displayName=`IconBase`;var eR=W.forwardRef((e,t)=>W.createElement($L,{ref:t,...e,weights:qL}));eR.displayName=`ArrowClockwiseIcon`;var tR=eR,nR=W.forwardRef((e,t)=>W.createElement($L,{ref:t,...e,weights:JL}));nR.displayName=`ArrowUpRightIcon`;var rR=nR,iR=W.forwardRef((e,t)=>W.createElement($L,{ref:t,...e,weights:YL}));iR.displayName=`ArrowsLeftRightIcon`;var aR=iR,oR=W.forwardRef((e,t)=>W.createElement($L,{ref:t,...e,weights:XL}));oR.displayName=`GridFourIcon`;var sR=oR,cR=W.forwardRef((e,t)=>W.createElement($L,{ref:t,...e,weights:ZL}));cR.displayName=`PulseIcon`;var lR=cR,uR=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),dR=s(((e,t)=>{t.exports=uR()})),fR=s((e=>{var t=dR(),n=NO(),r=yk();function i(e){var t=`https://react.dev/errors/`+e;if(1F||(e.current=P[F],P[F]=null,F--)}function L(e,t){F++,P[F]=e.current,e.current=t}var re=I(null),ie=I(null),ae=I(null),oe=I(null);function R(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),L(re,e)}function z(){ne(re),ne(ie),ne(ae)}function se(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=Zd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function ce(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),sp._currentValue=te)}var le,ue;function de(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-11||n>0&&!e.noHeader;return R(e.blocks,function(e){var n=E_(e);n>=t&&(t=n+ +(r&&(!n||w_(e)&&!e.noHeader)))}),t}return 0}function Cee(e,t,n,r){var i=t.noHeader,a=Tee(E_(t)),o=[],s=t.blocks||[];Oe(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Be(l,c)){var u=new nee(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}R(s,function(n,i){var s=t.valueFormatter,c=T_(n)(s?I(I({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):O_(r,o.join(``),i?n:a.html);if(i)return d;var f=wg(t.header,`ordinal`,e.useUTC),p=x_(r,e.renderMode).nameStyle,m=b_(r);return e.renderMode===`richText`?k_(e,f,p)+a.richText+d:O_(r,`
`+Th(f)+`
`+d,n)}function wee(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=B(e)?e:[e],z(e,function(e,t){return wg(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||h_.color.secondary,i),f=a?``:wg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=x_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:k_(e,f,v))+(o?``:Oee(e,m,h,g,y)):O_(r,(s?``:d)+(a?``:Eee(f,!s,v))+(o?``:Dee(m,h,g,y)),n)}}function D_(e,t,n,r,i,a){if(e)return T_(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function Tee(e){return{html:S_[e],richText:See[e]}}function O_(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=b_(e);return`
`+t+r+`
`}function Eee(e,t,n){var r=t?`margin-left:2px`:``;return``+Th(e)+``}function Dee(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=B(e)?e:[e],``+z(e,function(e){return Th(e)}).join(`  `)+``}function k_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Oee(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(` `):t,a)}function kee(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return kg(n)}function A_(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var j_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Ks()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=Og({color:t,type:e,renderMode:n,markerId:r});return V(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};B(t)?R(t,function(e){return I(n,e)}):I(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function Aee(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=B(s),l=kee(t,n),u,d,f,p;if(o>1||c&&!o){var m=jee(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=am(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=bc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return C_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[C_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ke(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function jee(e,t,n,r,i){var a=t.getData(),o=se(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?R(r,function(e){u(am(a,n,e),e)}):R(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(C_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var M_=Ec();function N_(e,t){return e.getName(t)||e.getId(t)}var P_=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Qg({count:Nee,reset:Pee}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(M_(this).sourceManager=new f_(this)).prepareSource();var r=this.getInitialData(e,n);I_(r,this),this.dataTask.context.data=r,M_(this).dataBeforeProcessed=r,F_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Rg(this),r=n?Bg(e):{},i=this.subType;Vg.hasClass(i)&&(i+=`Series`),F(e,t.getTheme().get(this.subType)),F(e,this.getDefaultOption()),oc(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&zg(e,r,n)},t.prototype.mergeOption=function(e,t){e=F(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Rg(this);n&&zg(this.option,e,n);var r=M_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);I_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,M_(this).dataBeforeProcessed=i,F_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ye(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return Aee({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(We.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Wg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[N_(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){_e(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Vg.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Vg);ae(P_,Xg),ae(P_,Wg),et(P_,Vg);function F_(e){var t=e.name;bc(e)||(e.name=Mee(e)||t)}function Mee(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return R(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Nee(e){return e.model.getRawData().count()}function Pee(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Fee}function Fee(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function I_(e,t){R(Re(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,pe(Iee,t))})}function Iee(e,t){var n=L_(e);return n&&n.setOutputEnd((t||this).count()),t}function L_(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Lee=jo.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Ree={line:bd,rect:Go,roundRect:Go,square:Go,circle:Wu,diamond:jo.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:jo.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:jo.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Lee},zee={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},R_={};R(Ree,function(e,t){R_[t]=new e});var Bee=jo.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=wn(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=R_[r];i||=(r=`rect`,R_[r]),zee[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Vee(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||h_.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function z_(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?lf(e.slice(8),new tn(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?cf(e.slice(7),{},new tn(t,n,r,i),o?`center`:`cover`):new Bee({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Vee,a&&c.setColor(a),c}function Hee(e){return B(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function B_(e,t){if(e!=null)return B(e)||(e=[e,e]),[Ts(e[0],t[0])||0,Ts(we(e[1],e[0]),t[1])||0]}var Uee=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return uh(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Hu,n=z_(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=z_(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=h_.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(P_);function V_(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=am(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var H_=function(e){p(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=z_(e,-1,-1,2,2,null,a);o.attr({z2:we(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Gee,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Wl(this.childAt(0))},t.prototype.downplay=function(){Gl(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Gd(f,p,o,n),Zd(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Kd(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Zf(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=B_(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Lo){var S=a.style;a.useStyle(I({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(I({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Xf(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):V_(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),lu(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=el(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Jd(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Jd(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Hee(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Hu);function Gee(e,t){this.parent.drift(e,t)}function U_(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function W_(e){return e!=null&&!_e(e)&&(e={isIgnore:e}),e||{}}function G_(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Zf(t),cursorStyle:t.get(`cursor`)}}function K_(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Kee=function(){function e(e){this.group=new Hu,this._SymbolCtor=e||H_}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=W_(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=G_(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);U_(e,i,r,t)&&K_(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!U_(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Gd(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function J_(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Y_(e,t){return!isFinite(e)||!isFinite(t)}var X_=typeof Float32Array<`u`?Float32Array:void 0;function Z_(e){return Q_({ctor:X_},e).arr}function Q_(e,t){var n=e.arr,r=e.ctor;if(t>Fs&&(t=Fs),!n||e.typed&&n.length=i||h<0)break;if(Y_(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||Y_(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,M=C-v,N=void 0,te=void 0;if(s===`x`){N=Math.abs(A),te=Math.abs(j);var P=E>0?1:-1;p=_-P*N*o,m=v,O=_+P*te*o,k=v}else if(s===`y`){N=Math.abs(ee),te=Math.abs(M);var F=D>0?1:-1;p=_,m=v-F*N*o,O=_,k=v+F*te*o}else N=Math.sqrt(A*A+ee*ee),te=Math.sqrt(j*j+M*M),T=te/(te+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=tv(O,nv(S,_)),k=tv(k,nv(C,v)),O=nv(O,tv(S,_)),k=nv(k,tv(C,v)),E=O-_,D=k-v,p=_-E*N/te,m=v-D*N/te,p=tv(p,nv(l,_)),m=tv(m,nv(u,v)),p=nv(p,tv(l,_)),m=nv(m,tv(u,v)),E=_-p,D=v-m,O=_+E*te/N,k=v+D*te/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var iv=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),av=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:h_.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new iv},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Y_(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?vr(i,u,f,m,e,s):vr(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?gr(a,d,p,h,b):gr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(jo),ov=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(iv),sv=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new ov},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Y_(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Fv(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Fv(r,e,t,n)},freeze:function(){}};function Fv(e,t,n,r){Uc(n,r)&&(e[t][0]=n,e[t][1]=r)}function Iv(e){return Lv(e)||zv(e)}function Lv(e){return e.type===`interval`}function Rv(e){return e.type===`time`}function zv(e){return e.type===`log`}function Bv(e){return e.type===`ordinal`}function Vv(e){var t=Vs(e),n=ys(10,t),r=gs(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,ks(r*n,-t)}function Hv(e){return js(e)+2}function Uv(e,t){return bs(e)/bs(t)}function Wv(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var Yv=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Dv(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Cv({}),B(i)&&(i=new Cv({categories:z(i,function(e){return _e(e)?e.value:e})})),r._ordinalMeta=i;var a=Ev(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Ov(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:V(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=gs(e),e},t.prototype.getTicks=function(){var e=[];return Jv(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=ps(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=ps(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=ks(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=ks(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?ks(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return Xv(this,e,zh(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=js(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),xg(ks(e.value,n,!0))},t.type=`interval`,t}(xv);xv.registerClass(Zv);var Qv=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ry(e){var t=30*Wh;return e/=t,e>6?6:e>3?3:e>2?2:1}function iy(e){return e/=Uh,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function ay(e,t){return e/=t?Hh:Vh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function oy(e){return ms(Hs(e,!0),1)}function sy(e,t,n){var r=Math.max(0,re(Xh,t)-1);return og(new Date(e),Xh[r],n).getTime()}function cy(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function ly(e,t,n,r,i,a){var o=Zh,s=0;function c(e,t,n,i,o,c,l){for(var u=cy(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!ty(tg(e),r[0],r[1],n)){s&&(i=[{value:sy(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=ce(z(u,function(e){return ce(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=ey.length,l=Math.min(Qv(ey,a,0,c),c-1),u=ey[l][1],d=ey[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};xv.registerClass($v);var dy=0,fy=1,py=2,my=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=Zv.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[dy]=i[fy]=a[dy]=a[fy]=NaN,Dv(r,t.mapperMethods);var s=Lh(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},py,l),r.powStub=new Zv({breakParsed:l.original}),r.intervalStub=new Zv({breakParsed:l.transformed}),Ov(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Lh(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return z(i.getTicks(e||{}),function(e){var i=e.value,o=Wv(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,zh(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return Xv(this,e,zh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Uv(e,this.base))},scale:function(e){return Wv(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Uv(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return hy.depth=n,gy.lookup=this._lookup,Wv(n===2?e:this.intervalStub.transformOut(e,hy),this.base,gy)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Uc(t,n)||t<=0||n<=0)){var r=_y,i=_y;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[dy]=t,r[fy]=n);var o=this.base;this.intervalStub.setExtent2(e,i[dy]=Uv(t,o),i[fy]=Uv(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Uc(t[0],t[1])&&Ys(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(xv);xv.registerClass(my);var hy={},gy={},_y=[],vy={value:1,category:1,time:1,log:1},yy=Ec();function by(e){var t=e.get(`type`);return(t==null||!Be(vy,t)&&!xv.getClass(t))&&(t=`value`),t}function xy(e,t,n){var r=Lh(),i;switch(r&&(i=My(e,t,n)),t){case`category`:return new Yv({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Lc()});case`time`:return new $v({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new my({logBase:e.get(`logBase`),breakOption:i});case`value`:return new Zv({breakOption:i});default:return new((xv.getClass(t))||Zv)({})}}function Sy(e,t,n){var r=n?Av(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Uc(i,a)?i===t||a===t?2:it?1:3:3}function Cy(e){yy(e).noOnMyZero=!0}function wy(e){return yy(e).noOnMyZero}function Ty(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Qh(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(V(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(me(t)){if(e.type===`category`)return function(n,r){return t(Ey(e,n),n.value-e.scale.getExtent()[0],null)};var r=Lh();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Ey(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Ey(e,t){var n=e.scale;return Bv(n)?n.getLabel(t):t.value}function Dy(e){return e.get(`interval`)??`auto`}function Oy(e){return e.type===`category`&&Dy(e.getLabelModel())===0}function ky(e,t){var n={};return R(e.mapDimensionsAll(t),function(t){n[sh(e,t)]=!0}),ue(n)}function Ay(e){return e===`middle`||e===`center`}function jy(e){return e.getShallow(`show`)}function My(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Lh()||!n||!Ny(t)?void 0:r}function Ny(e){return e!==`category`}function Py(e,t,n,r,i,a){var o=zv(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=Kv(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Fy(e,t){return Bv(e)?e.getRawOrdinalNumber(t.value):t.value}function Iy(e,t){return Bv(e)&&!!t.get(`boundaryGap`)}function Ly(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Wy(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=z(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=Uy(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;R(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new kd(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function Gy(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&Ky(a,t))){var o=t.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(e){e.tick.offInterval||(s[Fy(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Ky(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function qy(e){for(var t=e.length/2;t>0&&Y_(e[t*2-2],e[t*2-1]);t--);return t-1}function Jy(e,t){return[e[t*2],e[t*2+1]]}function Yy(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function Xy(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<_l.length;t++)if(e.get([_l[t],`endLabel`,`show`]))return!0;return!1}function Zy(e,t,n,r){if(yv(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=Xy(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=_v(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return vv(t,n,r)}function Qy(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var $y=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Hu,t=new Kee;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=fe(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=q_(r,a,_),y=g&&Vy(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Gy(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Wy(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=Hy(y,c,r,w,x),c=Hy(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,kg(E)),m.setClipPath(Zy(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,kg(E));var D=m.getClipPath();D?Kd(D,{shape:Zy(this,r,!1,e).shape},e):m.setClipPath(Zy(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!Ly(this._stackedOnPoints,y)||!Ly(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Hy(y,c,r,w,x),c=Hy(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(L(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),pu(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}el(f).seriesIndex=e.seriesIndex,lu(f,k,A,j);var M=By(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:M,smoothMonotone:N,connectNulls:x}),p){var te=a.getCalculationInfo(`stackedOnSeries`),P=0;p.useStyle(L(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),te&&(P=By(te.get(`smooth`))),p.setShape({smooth:M,stackedOnSmooth:P,smoothMonotone:N,connectNulls:x}),pu(p,e,`areaStyle`),el(p).seriesIndex=e.seriesIndex,lu(p,k,A,j)}var F=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var I=e.get(`triggerEvent`),ne=e.get(`triggerLineEvent`),re=ne===!0||I===!0||I===`line`,ie=ne===!0||I===!0||I===`area`;this.packEventData(e,f,re),p&&this.packEventData(e,p,ie)},t.prototype.packEventData=function(e,t,n){el(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Tc(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Y_(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new H_(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else dv.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Tc(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else dv.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Fl(this._polyline,e),t&&Fl(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new av({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new sv({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);me(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=me(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=me(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(Xy(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Xo({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=qy(o);c>=0&&(Xf(a,Zf(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?V_(i,e):Wee(i,n)},enableTextSetter:!0},Qy(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=Yy(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=Jy(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Ic(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=Jy(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=sp(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=ev(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=Hy(u.stackedOnCurrent,u.current,n,i,o),d=Hy(u.current,null,n,i,o),m=Hy(u.stackedOnNext,u.next,n,i,o),p=Hy(u.next,null,n,i,o)),zy(d,p)>3e3||c&&zy(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Gd(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Gd(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;V(i)?p=tb[i]:me(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,nb))}}}}}function ib(e){e.registerChartView($y),e.registerSeriesModel(Uee),e.registerLayout(eb(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,rb(`line`))}var ab=Ec(),ob=Ec(),sb={estimate:1,determine:2};function cb(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function lb(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:z(db(n,r),function(t,n){return{formattedLabel:Ty(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?fb(e,t):hb(e)}function ub(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:db(i,r)}:e.type===`category`?mb(e,t):{ticks:r.getTicks(n)}}function db(e,t){var n=t.getExtent(),r=[];return R(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Jc(r,Xc,null),As(r),z(r,function(e){return{value:e}})}function fb(e,t){var n=e.getLabelModel(),r=pb(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function pb(e,t,n){var r=_b(e),i=Dy(t),a=n.kind===sb.estimate;if(!a){var o=yb(r,i);if(o)return o}var s,c;me(i)?s=Eb(e,i,!1):(c=i===`auto`?xb(e,n):i,s=Eb(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return bb(r,i,l),!0}):bb(r,i,l),l}function mb(e,t){var n=gb(e),r=Dy(t),i=yb(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),me(r))a=Eb(e,r,!0);else if(r===`auto`){var s=pb(e,e.getLabelModel(),cb(sb.determine));o=s.labelCategoryInterval,a=z(s.labels,function(e){return e.tick})}else o=r,a=Eb(e,o,!0);return bb(n,r,{ticks:a,tickCategoryInterval:o})}function hb(e){var t=e.scale.getTicks(),n=Ty(e);return{labels:z(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var gb=vb(`axisTick`),_b=vb(`axisLabel`);function vb(e){return function(t){return ob(t)[e]||(ob(t)[e]={list:[]})}}function yb(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=yn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===sb.estimate?(t.out.noPxChangeTryDetermine.push(fe(Cb,null,e,S,c)),S):wb(e,S,c)??S}function Cb(e,t,n){return wb(e,t,n)==null}function wb(e,t,n){var r=ab(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function Tb(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Eb(e,t,n){var r=Ty(e),i=e.scale,a=[],o=me(t);return Jv(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Db=Ec();function Ob(e){Db(e).prepare={}}function kb(e){Db(e).fullUpdate={}}function Ab(e){return Db(e).fullUpdate}Kc();var jb=Ec();Ec();function Mb(e,t){var n=e.model,r=jb(Ab(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Nb(e,t){return Ib(Mb(e,t))}function Pb(e,t){var n=[];return Fb(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Ys(n)&&n>0&&Ys(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*Jee,e.w2=e.w*n/r)}var Wb=[0,1],Zee=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),ws(e,Wb,Gb(this),t)},e.prototype.coordToData=function(e,t){var n=ws(e,Gb(this),Wb,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=z(ub(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Fy(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Qee(this,n,r);return z(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Bv(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),z(this.scale.getMinorTicks(e),function(e){return z(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=cb(sb.determine),lb(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Ub(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=cb(sb.determine),Sb(this,e)},e}();function Gb(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Qee(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Ub(e).w;if(!i)return!1;R(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var $ee=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Zee),Kb=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],ete=1,qb=2,Jb=ete|qb;function Yb(e,t,n){n||=Jb,t?e.dirty|=n:e.dirty&=~n}function Xb(e,t){return t||=Jb,e.dirty==null||!!(e.dirty&t)}function Zb(e){if(e)return Xb(e)&&tte(e,e.label,e),e}function tte(e,t,n){var r=t.getComputedTransform();e.transform=Rf(e.transform,r);var i=e.localRect=Lf(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=cp.textMargin);for(var d=0;d<4;d++)Qb[d]=u===cp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===cp.textMargin&&kf(i,Qb,!1,!1);var f=e.rect=Lf(e.rect,i);return r&&f.applyTransform(r),u===cp.minMargin&&kf(f,Qb,!1,!1),e.axisAligned=Ff(r),(e.label=e.label||{}).ignore=t.ignore,Yb(e,!1),Yb(e,!0,qb),e}var Qb=[0,0,0,0];function nte(e,t,n){return e.transform=Rf(e.transform,n),e.localRect=Lf(e.localRect,t),e.rect=Lf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Ff(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function rte(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function $b(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new tn(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var sx=_t(),cx=new tn(0,0,0,0),lx=function(e,t,n,r,i,a){if(Ay(e.nameLocation)){var o=a.stOccupiedRect;o&&ux(nte({},o,a.transGroup.transform),r,i)}else dx(a.labelInfoList,a.dirVec,r,i)};function ux(e,t,n){var r=new Vt;tx(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&rte(t,r)}function dx(e,t,n,r){for(var i=Vt.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Ls(r-rx)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),ute=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],dte={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Rt(u,u,l),Rt(d,d,l));var p=I({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Bh(r.axis.scale))nx().buildAxisBreakLine(r,i,a,m);else{var h=new bd(I({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));pf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);V(g)&&(g=[g,g]),(V(_)||ge(_))&&(_=[_,_]);var v=B_(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];R([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=z_(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){gx(t,i,s)&&px(e,t,n,r,i,a,o,sb.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){gx(t,i,s)&&px(e,t,n,r,i,a,o,sb.determine);var c=hte(e,i,a,r);mte(e,t.labelLayoutList,c),gte(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(bx(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Vt(0,0),_=new Vt(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=_t();_.transform(St(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*rx/180);var b,x;Ay(u)?b=fx.innerTextLayout(e.rotation,y??e.rotation,d):(b=fte(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Ce(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Xo({x:g.x,y:g.y,rotation:b.rotation,silent:fx.isLabelSilent(r),style:Qf(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Mf({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=fx.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,el(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=Zb({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Ay(u)?ste[E]:cte[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function px(e,t,n,r,i,a,o,s){_x(t)||_te(e,t,i,s,r,o);var c=t.labelLayoutList;vte(e,r,c,a),xte(r,e.rotation,c);var l=e.optionHideOverlap;pte(r,c,l),l&&ite(ce(c,function(e){return e&&!e.label.ignore})),lte(e,n,r,c)}function fte(e,t,n,r){var i=Is(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ls(i-rx/2)?(o=c?`bottom`:`top`,a=`center`):Ls(i-rx*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=irx/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function pte(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Oy(r))return;function a(e,a,o){var s=Zb(t[a]),c=Zb(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=ix(s.label).labelInfo.tick;if(Rv(l)&&u.notNice||Bv(l)&&u.offInterval){mx(s.label);return}}if(e===!1||s.suggestIgnore){mx(s.label);return}if(c.suggestIgnore){mx(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=$b({marginForce:f},s),c=$b({marginForce:f},c)}tx(s,c,null,{touchThreshold:d})&&mx(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function mte(e,t,n){e.showMinorTicks||R(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=Tx(e,t.get(`startValue`,!0)),x=b!=null;!Ys(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Ys(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),Cx(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),Cx(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function Cx(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Gc(t))}function Tx(e,t){return t==null?null:Se(t)?NaN:e.parse(t)}function Dte(e,t){var n;if(Bv(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[Ex(n[0]),Ex(n[1])]}function Ex(e){return Cn(typeof e==`boolean`?0:e,1)||0}function Dx(e){var t=Tte(e.scale);return t.extent||=Lc(),t}function Ote(e,t){Dx(e).dimIdxInCoord=t.get(e.dim)}function kte(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Ate(n,e,i,r,t)}function Ate(e,t,n,r,i){var a=Dx(t),o=a.extent,s=!1;Lb(t,function(r){if(r.boxCoordinateSystem){var i=Zm(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&Rc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;R(ky(u,n),function(e){Vc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Mte(e,t,r);Ox(e,new Sx(e,r,o,s,c),i),a.extent=null}function jte(e,t){var n=e.scale;Ox(n,new Sx(n,e.model,t,!1,!1),Ete)}function Ox(e,t,n){e.rawExtentInfo=t,t.from=n}var kx=Le();function Ax(e,t,n,r,i){e.rawExtentInfo||jte({scale:e,model:t},i||Lc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Mte(e,t,n){var r=Iy(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return zb(t,function(e){a=!!kx.get(e)||a}),a}function Nte(e,t,n,r){if(n.ctnShp){var i;if(zb(e,function(t){var n=kx.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],zc(i,a[0]),Bc(i,a[1]),Cy(e))}}),i){var a=t.getExtent();if(Bv(t))e.onBand||t.setExtent2(1,ps(a[0],a[0]+i[0]),ms(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=ps(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ms(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}var jx={left:0,right:0,top:0,bottom:0},Mx=[`25%`,`25%`],Nx=`cartesian2d`,Pte=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Bg(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&zg(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&zg(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:jx,outerBoundsContain:`all`,outerBoundsClampWidth:Mx[0],outerBoundsClampHeight:Mx[1],backgroundColor:h_.color.transparent,borderWidth:1,borderColor:h_.color.neutral30},t}(Vg),Px=`\0__throttleOriginMethod`,Fx=`\0__throttleRate`,Ix=`\0__throttleType`;function Lx(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Rx(e,t,n,r){var i=e[t];if(i){var a=i[Px]||i,o=i[Ix];if(i[Fx]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Lx(a,n,r===`debounce`),i[Px]=a,i[Ix]=r,i[Fx]=n}return i}}function zx(e,t){var n=e[t];n&&n[Px]&&(n.clear&&n.clear(),e[t]=n[Px])}function Bx(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Ux(e,i,t,n)}else{Ux(e,t,t,n);var a=zte(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Lte.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function zte(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Bte(e,t,n,r){e.addEventListener(t,n,r)}function Vte(e,t,n,r){e.removeEventListener(t,n,r)}var qx=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},Hte=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=Jx(r)/Jx(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Ute(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},Xx=`silent`;function Wte(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Gte}}function Gte(){qx(this.event)}var Kte=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ji),Zx=function(){function e(e,t){this.x=e,this.y=t}return e}(),qte=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Qx=new tn(0,0,0,0),$x=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new Zx(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new Kte,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Ite(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(qte,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=tS(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new Zx(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new Zx(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=Wte(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Zx(e,t);if(eS(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new tn(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(Qx.copy(u.getBoundingRect()),u.transform&&Qx.applyTransform(u.transform),Qx.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Jte(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||Xx}return!1}function eS(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Jte(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Xx)){t.target=o;break}}}function tS(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var nS=32,rS=7;function Yte(e){for(var t=0;e>=nS;)t|=e&1,e>>=1;return e+t}function iS(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function Xte(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function oS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function sS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Zte(e,t){var n=rS,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=rS||m>=rS);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-oS(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=rS||g>=rS);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),aS(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var lS=!1;function uS(){lS||(lS=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function dS(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var fS=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=dS}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),pS=We.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function mS(){return new Date().getTime()}var Qte=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=mS()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(pS(t),!e._paused&&e.update())}pS(t)},t.prototype.start=function(){this._running||(this._time=mS(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=mS(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=mS()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new qi(e,t.loop);return this.addAnimator(n),n},t}(Ji),hS=300,gS=We.domSupported,_S=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),vS={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},yS=!1;function bS(e){var t=e.pointerType;return t===`pen`||t===`touch`}function xS(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function SS(e){e&&(e.zrByTouch=!0)}function CS(e,t){return Kx(e.dom,new TS(e,t),!0)}function wS(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var TS=function(){function e(e,t){this.stopPropagation=Ve,this.stopImmediatePropagation=Ve,this.preventDefault=Ve,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),ES={mousedown:function(e){e=Kx(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Kx(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=Kx(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Kx(this.dom,e);var t=e.toElement||e.relatedTarget;wS(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){yS=!0,e=Kx(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){yS||(e=Kx(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Kx(this.dom,e),SS(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),ES.mousemove.call(this,e),ES.mousedown.call(this,e)},touchmove:function(e){e=Kx(this.dom,e),SS(e),this.handler.processGesture(e,`change`),ES.mousemove.call(this,e)},touchend:function(e){e=Kx(this.dom,e),SS(e),this.handler.processGesture(e,`end`),ES.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!xc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[XS],e},t.prototype.setTheme=function(e){this._theme=new yp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function lC(e,t){return e.join(`,`)===t.join(`,`)}var uC=R,dC=_e,fC=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function pC(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=fC.length;n0?e[n-1].seriesModel:null)}),IC(e))})}function IC(e){R(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ps(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var LC=function(){function e(){this.group=new Hu,this.uid=mh(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Qe(LC),at(LC);var RC=Ec(),zC={itemStyle:ot(gp,!0),lineStyle:ot(pp,!0)},BC={lineStyle:`stroke`,itemStyle:`fill`};function VC(e,t){return e.visualStyleMapper||zC[t]||(console.warn(`Unknown style type '`+t+`'.`),zC.itemStyle)}function HC(e,t){return e.visualDrawType||BC[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var UC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=VC(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=HC(e,r),c=a[s],l=me(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||me(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||me(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=I({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},WC=new yp,GC={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=VC(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){WC.option=n[r];var o=i(WC);I(e.ensureUniqueItemVisual(t,`style`),o),WC.option.decal&&(e.setItemVisual(t,`decal`,WC.option.decal),WC.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},KC={performRawSeries:!0,overallReset:function(e){var t=Le();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();RC(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=RC(e).scope,a=HC(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},qC=Math.PI;function rne(e,t){t||={},L(t,{text:`loading`,textColor:h_.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:h_.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Hu,r=new Go({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Xo({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Go({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Ed({shape:{startAngle:-qC/2,endAngle:-qC/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.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`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var JC=function(){function e(e,t,n,r){this._stageTaskMap=Le(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Qc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Le();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;R(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Oe(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;R(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Le(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||Qg({plan:cne,reset:lne,count:dne}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||Qg({reset:ine});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Le(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Oe(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):R(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,Qg({reset:ane,onDirty:sne})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return me(e)&&(e={overallReset:e,seriesType:XC(e)}),e.uid=mh(`stageHandler`),t&&(e.visualType=t),e},e}();function ine(e){e.overallReset(e.ecModel,e.api,e.payload)}function ane(e){return e.dirtyOnOverallProgress&&one}function one(){this.agent.dirty(),this.getDownstream().dirty()}function sne(){this.agent&&this.agent.dirty()}function cne(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function lne(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=ac(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?z(t,function(e,t){return YC(t)}):une}var une=YC(0);function YC(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),ow=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],sw=ow.concat([`symbolKeepAspect`]),cw={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&Sw(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function Tw(e,t,n){for(var r=t.type===`radial`?ww(e,t,n):Cw(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:ge(e)?[e]:B(e)?e:null}function Aw(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&kw(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=z(n,function(e){return e/i}),r/=i)}return[n,r]}var jw=new ao(!0);function Mw(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Nw(e){return typeof e==`string`&&e!==`none`}function Pw(e){var t=e.fill;return t!=null&&t!==`none`}function Fw(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Iw(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Lw(e,t,n){var r=mt(t.image,t.__image,n);if(gt(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*He),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Rw(e,t,n,r,i){var a,o=Mw(n),s=Pw(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||jw,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?Tw(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?Tw(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?Lw(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?Lw(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=Aw(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Iw(e,n),s&&Fw(e,n)):(s&&Fw(e,n),o&&Iw(e,n)),T&&e.setLineDash([])}function pne(e,t,n){var r=t.__image=mt(n.image,t.__image,t,t.onload);if(r&>(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function mne(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Aw(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Mw(n)&&e.strokeText(i,n.x,n.y),Pw(n)&&e.fillText(i,n.x,n.y)):(Pw(n)&&e.fillText(i,n.x,n.y),Mw(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var zw=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],Bw=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function Vw(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){Yw(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?ya.opacity:o}(r||t.blend!==n.blend)&&(a||=(Yw(e,i),!0),e.globalCompositeOperation=t.blend||ya.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[kT]){if(this._disposed){this.id;return}var r,i,a;if(_e(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[kT]=!0,aE(this),!this._model||t){var o=new aC(this._api),s=this._theme,c=this._model=new QS;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},pE);var l={seriesTransition:a,optionChanged:!0};if(n)this[jT]={silent:r,updateParams:l},this[kT]=!1,this.getZr().wakeUp();else{try{VT(this),WT.update.call(this,null,l)}catch(e){throw this[jT]=null,this[kT]=!1,e}this._ssr||this._zr.flush(),this[jT]=null,this[kT]=!1,JT.call(this,r),YT.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[kT]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[jT]&&(r??=this[jT].silent,i=this[jT].updateParams,this[jT]=null),this[kT]=!0,aE(this);try{this._updateTheme(e),n.setTheme(this._theme),VT(this),WT.update.call(this,{type:`setTheme`},i)}catch(e){throw this[kT]=!1,e}this[kT]=!1,JT.call(this,r),YT.call(this,r)}}},t.prototype._updateTheme=function(e){V(e)&&(e=hE[e]),e&&(e=P(e),e&&NC(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return R(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;R(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return R(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(vE[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();R(_E,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(P(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=b.createCanvas(),h=zS(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return R(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Go({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),R(u,function(e){var t=new Lo({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return GT(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return GT(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return GT(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return R(Oc(n,e),function(e,n){n.indexOf(`Models`)>=0&&R(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Oc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?dw(i,t):uw(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;R(cE,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&pw(i,function(e){var t=el(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=I({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;R(dE,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),Fte(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Nc(this.getDom(),bE,``);var e=this,t=e._api,n=e._model;R(e._componentsViews,function(e){e.dispose(n,t)}),R(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete _E[e.id]},t.prototype.resize=function(e){if(!this[kT]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[jT]&&(r??=this[jT].silent,n=!0,this[jT]=null),this[kT]=!0,aE(this);try{n&&VT(this),WT.update.call(this,{type:`resize`,animation:I({duration:0},e&&e.animation)})}catch(e){throw this[kT]=!1,e}this[kT]=!1,JT.call(this,r),YT.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(_e(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),gE[e]){var n=gE[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=I({},e);return t.type=uE[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(_e(t)||(t={silent:!!t}),lE[e.type]&&this._model){if(this[kT]){this._pendingActions.push(e);return}var n=t.silent;qT.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&We.browser.weChat&&this._throttledZrFlush(),JT.call(this,n),YT.call(this,n)}},t.prototype.updateLabelLayout=function(){mw.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){VT=function(e){Ob(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),HT(e,!0),HT(e,!1),t.plan()},HT=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cwe(t.get(`hoverLayerThreshold`),WS.hoverLayerThreshold)&&!We.node&&!We.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=zf(e);t.eachRendered(function(e){return Vf(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!qd(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(qd(e))return;if(e instanceof jo&&yu(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}tE=function(e){return new(function(t){p(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Wl(t,n),rE(e)},n.prototype.leaveEmphasis=function(t,n){Gl(t,n),rE(e)},n.prototype.enterBlur=function(t){Kl(t),rE(e)},n.prototype.leaveBlur=function(t){ql(t),rE(e)},n.prototype.enterSelect=function(t){Jl(t),rE(e)},n.prototype.leaveSelect=function(t){Yl(t),rE(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[AT]},n.prototype.usingTHL=function(){return e._usingTHL},n}(dl))(e)},nE=function(e){function t(e,t){for(var n=0;n=0)){NE.push(n);var o=JC.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function FE(e,t){gE[e]=t}function IE(e,t,n){var r=gw(`registerMap`);r&&r(e,t,n)}var LE=c_;ME(bT,UC),ME(CT,GC),ME(CT,KC),ME(bT,cw),ME(CT,lw),ME(DT,lT),wE(NC),TE(pT,PC),FE(`default`,rne),kE({type:yl,event:yl,update:yl},Ve),kE({type:bl,event:bl,update:bl},Ve),kE({type:xl,event:wl,update:xl,action:Ve,refineEvent:RE,publishNonRefinedEvent:!0}),kE({type:Sl,event:wl,update:Sl,action:Ve,refineEvent:RE,publishNonRefinedEvent:!0}),kE({type:Cl,event:wl,update:Cl,action:Ve,refineEvent:RE,publishNonRefinedEvent:!0});function RE(e,t,n,r){return{eventContent:{selected:ou(n),isFromClick:t.isFromClick||!1}}}CE(`default`,{}),CE(`dark`,iw);var zE=[],BE={registerPreprocessor:wE,registerProcessor:TE,registerPostInit:EE,registerPostUpdate:DE,registerUpdateLifecycle:OE,registerAction:kE,registerCoordinateSystem:AE,registerLayout:jE,registerVisual:ME,registerTransform:LE,registerLoading:FE,registerMap:IE,registerImpl:fne,PRIORITY:OT,ComponentModel:Vg,ComponentView:LC,SeriesModel:P_,ChartView:dv,registerComponentModel:function(e){Vg.registerClass(e)},registerComponentView:function(e){LC.registerClass(e)},registerSeriesModel:function(e){P_.registerClass(e)},registerChartView:function(e){dv.registerClass(e)},registerCustomSeries:function(e,t){vw(e,t)},registerSubTypeDefaulter:function(e,t){Vg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){$te(e,t)}};function VE(e){if(B(e)){R(e,function(e){VE(e)});return}re(zE,e)>=0||(zE.push(e),me(e)&&(e={install:e}),e.install(BE))}var HE=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),UE=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Ac).models[0]},t.type=`cartesian2dAxis`,t}(Vg);ae(UE,HE);var WE={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:`auto`,onZeroAxisIndex:null,lineStyle:{color:h_.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},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,color:h_.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:h_.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[h_.color.backgroundTint,h_.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:h_.color.neutral00,borderColor:h_.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},GE=F({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},WE),KE=F({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:h_.color.axisMinorSplitLine,width:1}}},WE),qE={category:GE,value:KE,time:F({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},KE),log:L({logBase:10},KE)};function JE(e,t,n,r){R(vy,function(i,a){var o=F(F({},qE[a],!0),r,!0),s=function(e){p(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Rg(this),r=n?Bg(e):{};F(e,t.getTheme().get(a+`Axis`)),F(e,this.getDefaultOption()),e.type=YE(e),n&&zg(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Cv.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=nx();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,YE)}function YE(e){return e.type||(e.data?`category`:`value`)}var XE=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return z(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ce(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),ZE=[`x`,`y`];function QE(e){return(e.type===`interval`||e.type===`time`)&&!Bh(e)}var $E=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Nx,t.dimensions=ZE,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(QE(e)&&QE(t)){var n=Av(e,null),r=Av(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=wt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new tn(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Rt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Rt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new tn(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(XE);function eD(e,t){var n=e.scale,r=e.model,i=Ax(n,r,r.ecModel,e,null),a=zv(n),o=zv(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=hs(l[0].value-l[1].value),g=hs(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=ks(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=ks(vs(C[0]/E)*E,D),O=ks(_s(C[1]/E)*E,D);var e=gs((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=_s(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}Py(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function tD(e,t){var n=zv(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Gv(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?rD(r,t):nD(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Hv(d)),i[0]||(s[0]=ks(_s(s[0]/u)*u,l)),i[1]||(s[1]=ks(vs(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Py(e,i,o,s,a,c)}function nD(e,t){var n=qv(t.splitNumber,5),r=Mv(e),i=t.minInterval,a=t.maxInterval,o=Hs(r/n,!0);i!=null&&oa&&(o=a);var s=Hv(o),c=e.getExtent(),l=[ks(vs(c[0]/o)*o,s),ks(_s(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function rD(e,t){var n=qv(t.splitNumber,10),r=e.getExtent(),i=Mv(e),a=ms(Bs(i),1);n/i*a<=.5&&(a*=10);var o=Hv(a),s=[ks(vs(r[0]/a)*a,o),ks(_s(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function iD(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;aD(t,n,r,i,null)}function aD(e,t,n,r,i){var a=Ax(e,t,r,n,i),o=Lv(e)||Rv(e);oD(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Nte(n,e,a,r)}function oD(e,t){sD[e.type](e,t)}var sD={interval:tD,log:tD,time:uy,ordinal:Ve},cD=[[3,1],[0,2]],lD=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ZE,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;R(this._axesList,function(e){kte(e,1);var t=e.scale;Bv(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=ue(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):iD(i)}R(n,function(e){mD(e,e.__alignTo)?iD(e):eD(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};R(n.x,function(e){dD(n,`y`,e,i)}),R(n.y,function(e){dD(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Lg(e,t),i=this._rect=Fg(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(gD(a,i),!n){var c=bD(i,o,a,s,t),l=void 0;if(s)vD?(vD(this._axesList,i),gD(a,i)):l=yD(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=SD(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=yD(d,f,p,i,a,c,r))}xD(i,a,sb.determine,null,l,r),R(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}_e(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];Iv(a.scale)&&My(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&R(r,function(e){e.__alignTo=n})}function mD(e,t){return Bh(e.scale)||Bh(t.scale)||t.scale.getTicks().length<2}function hD(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function gD(e,t){R(e.x,function(e){return _D(e,t.x,t.width)}),R(e.y,function(e){return _D(e,t.y,t.height)})}function _D(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),hD(e,t)}var vD;function yD(e,t,n,r,i,a,o){xD(r,i,sb.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=le(s,function(e){return e>0})==null;return kf(r,s,!0,!0,n),gD(i,r),c;function l(e){R(i[ef[e]],function(t){if(jy(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Se(t)&&t>1e-4&&(e/=t),e}}function bD(e,t,n,r,i){var a=new ox(CD);return R(n,function(n){return R(n,function(n){if(jy(n.model)){var o=!r;n.axisBuilder=Cte(e,t,n.model,i,a,o)}})}),a}function xD(e,t,n,r,i,a){var o=n===sb.determine;R(t,function(t){return R(t,function(t){jy(t.model)&&(wte(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[ef[1-t]]=e[tf[t]]<=a.refContainer[tf[t]]*.5?0:1-t==1?2:1}R(t,function(e,t){return R(e,function(e){jy(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function SD(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Fg(e.get(`outerBounds`,!0)||jx,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||re([`all`,`axisLabel`],a)<0?`all`:a,s=[Ds(we(e.get(`outerBoundsClampWidth`,!0),Mx[0]),t.width),Ds(we(e.get(`outerBoundsClampHeight`,!0),Mx[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var CD=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;lx(e,t,n,r,i,a),Ay(e.nameLocation)||R(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&dx(e.labelInfoList,e.dirVec,r,i)})};function wD(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return TD(n,e,t),n.seriesInvolved&&DD(n,e),n}function TD(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];R(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=PD(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(R(n.getAxes(),pe(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&R(f.baseAxes,pe(p,!d||`cross`,u)),d&&R(f.otherAxes,pe(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||ND(d))){s??=d.get(`triggerTooltip`),d=r?ED(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=PD(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:ND(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=OD(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function ED(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};R(s,function(e){c[e]=P(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&L(l,u.textStyle)}return e.model.getModel(`axisPointer`,new yp(c,n,r))}function DD(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&R(e.coordSysAxesInfo[PD(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function OD(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function AD(e){var t=jD(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=ND(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o=0;a--)r[a]??(delete n[t[a]],t.pop())}function eO(e,t){var n=e.visual,r=[];_e(n)?JD(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),cO(e,r)}function tO(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:oO([0,1])}}function nO(e){var t=this.option.visual;return t[Math.round(ws(e,[0,1],[0,t.length-1],!0))]||{}}function rO(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function iO(e){var t=this.option.visual;return t[this.option.loop&&e!==XD?e%t.length:e]}function aO(){return this.option.visual[0]}function oO(e){return{linear:function(t){return ws(t,e,this.option.visual,!0)},category:iO,piecewise:function(t,n){var r=sO.call(this,n);return r??=ws(t,e,this.option.visual,!0),r},fixed:aO}}function sO(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[ZD.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function cO(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=z(t,function(e){return Kr(e)||[0,0,0,1]})),t}var lO={linear:function(e){return ws(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=ZD.findPieceIndex(e,t,!0);if(n!=null)return ws(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??XD},fixed:Ve};function uO(e,t,n){return e?t<=n:ta&&(t[1-r]=Ps(t[r],d.sign*a)),t}function fO(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function pO(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var mO=256,hO=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=b.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=b.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=h_.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function gO(e,t,n){var r=e[1]-e[0];t=z(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var vO=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):bv(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(bv(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Pf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=yv(a,`cartesian2d`),s=yv(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Ub(f).w+.5,l=Ub(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Zf(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var j=a.dataToPoint([k,A]);D=new Go({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Se(ee.x))continue;D=new Go({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var M=a.dataToLayout([h.get(T[0],E)]),ee=M.contentRect||M.rect;if(Se(ee.x)||Se(ee.y))continue;D=new Go({z2:1,shape:ee,style:O})}if(h.hasItemOption){var N=h.getItemModel(E),te=N.getModel(`emphasis`);g=te.getModel(`itemStyle`).getItemStyle(),_=N.getModel([`blur`,`itemStyle`]).getItemStyle(),v=N.getModel([`select`,`itemStyle`]).getItemStyle(),y=N.get([`itemStyle`,`borderRadius`]),S=te.get(`focus`),C=te.get(`blurScope`),w=te.get(`disabled`),b=Zf(N)}D.shape.r=y;var P=e.getRawValue(E),F=`-`;P&&P[2]!=null&&(F=P[2]+``),Xf(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:F}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,lu(D,S,C,w),D.incremental=Zc(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new hO;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?_O(v,n.option.range):gO(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Lo({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(dv),yO=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return uh(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=Jm.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:h_.color.primary}}},t}(P_);function bO(e){e.registerChartView(vO),e.registerSeriesModel(yO)}function xO(e){return Object.keys(e)}function SO(e){return e&&typeof e==`object`&&!Array.isArray(e)}function CO(e,t){let n={...e},r=t;return SO(e)&&SO(t)&&Object.keys(t).forEach(t=>{SO(r[t])&&t in e?n[t]=CO(n[t],r[t]):n[t]=r[t]}),n}function wO(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function TO(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function EO(e){let t=TO(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function DO(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function OO(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?DO(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?DO(n):n}}return r}return n}var U=OO(`rem`,{shouldScale:!0}),kO=OO(`em`);function AO(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function jO(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var MO=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=MO()})),W=u(NO(),1);function PO(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==W.Fragment}function FO(e){let t=(0,W.createContext)(null);return[t,()=>{let n=(0,W.use)(t);if(n===null)throw Error(e);return n}]}function IO(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function LO(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function RO(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function zO(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(LO(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>BO(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=zO(l,c,r),d=RO(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[zO(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[RO(c.length,c,!1)]?.focus()}}}var HO={app:100,modal:200,popover:300,overlay:400,max:9999};function UO(e){return HO[e]}function WO(e,t=`size`,n=!0){if(e!==void 0)return jO(e)?n?U(e):e:`var(--${t}-${e})`}function GO(e){return WO(e,`mantine-spacing`)}function KO(e){return e===void 0?`var(--mantine-radius-default)`:WO(e,`mantine-radius`)}function qO(e){return WO(e,`mantine-font-size`)}function JO(e){return WO(e,`mantine-line-height`,!1)}function YO(e){if(e)return WO(e,`mantine-shadow`,!1)}function XO(e,t){return n=>{e?.(n),t?.(n)}}function ZO(e,t){return e in t?EO(t[e]):EO(e)}function QO(e,t){let n=e.map(e=>({value:e,px:ZO(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function $O(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function ek(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function tk(e){let t=(0,W.useRef)(e);return(0,W.useEffect)(()=>{t.current=e}),(0,W.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function nk(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=tk(e),s=(0,W.useRef)(0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,W.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function rk(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window&&window.matchMedia(e).matches}function ik(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,W.useState)(n?t:rk(e));return(0,W.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var ak=typeof document<`u`?W.useLayoutEffect:W.useEffect;function ok(e,t){let n=(0,W.useRef)(!1);(0,W.useEffect)(()=>()=>{n.current=!1},[]),(0,W.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}var sk=e=>(e+1)%1e6;function ck(){let[,e]=(0,W.useReducer)(sk,0);return e}function lk(e){let[t,n]=(0,W.useState)(`mantine-${(0,W.useId)().replace(/:/g,``)}`),r=(0,W.useRef)(!1);return ak(()=>{r.current||(r.current=!0,n(ek()))},[]),typeof e==`string`?e:t}function uk(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function dk(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=uk(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():uk(e,null)}),t.clear()}}}function fk(...e){return(0,W.useCallback)(dk(...e),e)}function pk({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,W.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function mk(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var hk=`dots`;function gk({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=pk({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,W.useCallback)(e=>{f(ec?c:e)},[s,c,f]),m=(0,W.useCallback)(()=>p(d+1),[d,p]),h=(0,W.useCallback)(()=>p(d-1),[d,p]),g=(0,W.useCallback)(()=>p(s),[p,s]),_=(0,W.useCallback)(()=>p(c),[c,p]);return{range:(0,W.useMemo)(()=>{if(t*2+3+n*2>=l)return mk(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r{var t=NO();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=vk()}));function bk(e){return e?.props?.ref}function xk(e){let t=W.Children.toArray(e);return t.length!==1||!PO(t[0])?null:t[0]}function Sk(e){return e}function Ck(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=wk(t[e],n):t[e]=n})}),t}function Dk({theme:e,classNames:t,props:n,stylesCtx:r}){return Ek((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||Tk))}function Ok({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function kk(e){return e===`auto`||e===`dark`||e===`light`}function Ak({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return kk(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&kk(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function jk(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function Mk(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function Nk(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function Pk(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function Fk(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function Ik(e){return Mk(e)?Nk(e):e.startsWith(`rgb`)?Pk(e):e.startsWith(`hsl`)?Fk(e):{r:0,g:0,b:0,a:1}}function Lk(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Rk(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function zk(e){if(e.startsWith(`oklch(`))return(Rk(e)||0)/100;let{r:t,g:n,b:r}=Ik(e),i=t/255,a=n/255,o=r/255,s=Lk(i),c=Lk(a),l=Lk(o);return .2126*s+.7152*c+.0722*l}function Bk(e,t=.179){return!e.startsWith(`var(`)&&zk(e)>t}function Vk({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Bk(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Bk(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Bk(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][jk(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:Bk(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Bk(e,t.luminanceThreshold),shade:a,variable:void 0}}function Hk(e,t){let n=Vk({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function Uk(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function Wk(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=Ik(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function Gk(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=Hk(n.from,t),i=Hk(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function Kk(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=Ik(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var qk=Kk,Jk=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=Vk({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&Uk(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${U(1)} solid transparent`}:{background:e,hover:Wk(e,.1),color:r,border:`${U(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:Wk(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${U(1)} solid transparent`}}return{background:Kk(e,.1),hover:Kk(e,.12),color:e,border:`${U(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${U(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:Kk(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:Kk(e,.05),color:e,border:`${U(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:Kk(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}}return{background:`transparent`,hover:Kk(e,.12),color:e,border:`${U(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${U(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:Wk(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Wk(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Wk(t.white,.01),color:e,border:`${U(1)} solid transparent`}:n===`gradient`?{background:Gk(r,t),hover:Gk(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${U(1)} solid var(--mantine-color-default-border)`}:{}};function Yk({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&Vk({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Xk(e,t,n){return Yk({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function Zk(e,t){let n=e.colors[e.primaryColor];return Uk(n)?e.autoContrast?Xk(n,e,t):`var(--mantine-color-white)`:Yk({color:n[jk(e,t)],theme:e,autoContrast:null})}function Qk(e,t){return typeof e==`boolean`?e:t.autoContrast}var $k=(0,W.createContext)(null);function eA(){let e=(0,W.use)($k);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function tA(){return eA().cssVariablesResolver}function nA(){return eA().classNamesPrefix}function rA(){return eA().getStyleNonce}function iA(){return eA().withStaticClasses}function aA(){return eA().headless}function oA(){return eA().stylesTransform?.sx}function sA(){return eA().stylesTransform?.styles}function cA(){return eA().env||`default`}function lA(){return eA().deduplicateInlineStyles}function uA(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function dA({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,W.useRef)(null),[a,o]=(0,W.useState)(()=>e.get(t)),s=r||a,c=(0,W.useCallback)(t=>{r||(uA(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,W.useCallback)(()=>{o(t),uA(t,n),e.clear()},[e.clear,t]);return(0,W.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),ak(()=>{uA(e.get(t),n)},[]),(0,W.useEffect)(()=>{if(r)return uA(r,n),()=>{};r===void 0&&uA(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&uA(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var fA=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),pA=s(((e,t)=>{t.exports=fA()})),mA={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},hA=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,gA={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:mA,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:Jk,autoContrast:!1,luminanceThreshold:.3,fontFamily:hA,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:hA,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:U(34),lineHeight:`1.3`},h2:{fontSize:U(26),lineHeight:`1.35`},h3:{fontSize:U(22),lineHeight:`1.4`},h4:{fontSize:U(18),lineHeight:`1.45`},h5:{fontSize:U(16),lineHeight:`1.5`},h6:{fontSize:U(14),lineHeight:`1.5`}}},fontSizes:{xs:U(12),sm:U(14),md:U(16),lg:U(18),xl:U(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:U(2),sm:U(4),md:U(8),lg:U(16),xl:U(32)},spacing:{xs:U(10),sm:U(12),md:U(16),lg:U(20),xl:U(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), 0 ${U(1)} ${U(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(10)} ${U(15)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(7)} ${U(7)} ${U(-5)}`,md:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(20)} ${U(25)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(10)} ${U(10)} ${U(-5)}`,lg:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(28)} ${U(23)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(12)} ${U(12)} ${U(-7)}`,xl:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(36)} ${U(28)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(17)} ${U(17)} ${U(-7)}`},other:{},components:{}},_A=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,vA=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function yA(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function bA(e){if(!(e.primaryColor in e.colors))throw Error(_A);if(typeof e.primaryShade==`object`&&(!yA(e.primaryShade.dark)||!yA(e.primaryShade.light))||typeof e.primaryShade==`number`&&!yA(e.primaryShade))throw Error(vA)}function xA(e,t){if(!t)return bA(e),e;let n=CO(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),bA(n),n}var G=pA(),SA=(0,W.createContext)(null),CA=()=>(0,W.use)(SA)||gA;function wA(){let e=(0,W.use)(SA);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function TA({theme:e,children:t,inherit:n=!0}){let r=CA(),i=(0,W.useMemo)(()=>xA(n?r:gA,e),[e,r,n]);return(0,G.jsx)(SA,{value:i,children:t})}TA.displayName=`@mantine/core/MantineThemeProvider`;function EA(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function DA(e,t){let n=t?[t]:[`:root`,`:host`],r=EA(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=EA(e.dark),o=EA(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function OA({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=jk(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:qk(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=jk(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:Wk(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:Wk(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:qk(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function kA(e,t,n){xO(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var AA=e=>{let t=jk(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:U(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":Zk(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":Zk(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};kA(r.variables,e.breakpoints,`breakpoint`),kA(r.variables,e.spacing,`spacing`),kA(r.variables,e.fontSizes,`font-size`),kA(r.variables,e.lineHeights,`line-height`),kA(r.variables,e.shadows,`shadow`),kA(r.variables,e.radius,`radius`),kA(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),xO(e.colors).forEach(t=>{let n=e.colors[t];if(Uk(n)){Object.assign(r.light,OA({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,OA({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=Xk(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=Xk(n,e,`dark`);return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,OA({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,OA({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return xO(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function jA(){let e=wA(),t=rA(),n=xO(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=EO(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:kO(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:kO(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,G.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function MA({theme:e,generator:t}){let n=AA(e),r=t?.(e);return r?CO(n,r):n}var NA=AA(gA);function PA(e){let t={variables:{},light:{},dark:{}};return xO(e.variables).forEach(n=>{NA.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),xO(e.light).forEach(n=>{NA.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),xO(e.dark).forEach(n=>{NA.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function FA(e){return DA({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function IA({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=wA(),r=rA(),i=MA({theme:n,generator:tA()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=DA(a?PA(i):i,e);return o?(0,G.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:FA(e)}`}}):null}IA.displayName=`@mantine/CssVariables`;function LA({respectReducedMotion:e,getRootElement:t}){ak(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function RA({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=Ak(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=dA({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return LA({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,G.jsx)($k,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,G.jsxs)(TA,{theme:e,children:[o&&(0,G.jsx)(IA,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,G.jsx)(jA,{}),t]})})}RA.displayName=`@mantine/core/MantineProvider`;function zA(e,t,n){let r=wA(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...AO(n)}}function BA(e){return e}var VA={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function HA({theme:e,options:t,unstyled:n}){return wk(t?.focusable&&!n&&(e.focusClassName||VA[e.focusRing]),t?.active&&!n&&e.activeClassName)}function UA({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return Dk({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function WA({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return Dk({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function GA({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function KA({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function qA({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function JA({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function YA({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return wk(HA({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),JA({options:t,classes:s,selector:r,unstyled:c||m}),a[r],WA({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),UA({selector:r,stylesCtx:f,options:t,props:d,theme:e}),GA({rootSelector:u,selector:r,className:l}),KA({selector:r,classes:s,unstyled:c||m}),p&&!m&&qA({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function XA({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...XA({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function ZA({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&Ok({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...XA({style:n?.style,theme:e})}}function QA(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...AO(t[n])}}),e),{})}function $A({props:e,stylesCtx:t,themeName:n,theme:r}){let i=sA()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function ej({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=wA(),m=nA(),h=iA(),g=aA(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=$A({props:n,stylesCtx:r,themeName:_,theme:p}),b=Dk({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>Dk({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:Ok({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=Ok({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=QA([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=XA({style:a,theme:p});return(e,a)=>({...f?.[e],className:YA({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:ZA({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function tj(e){return xO(e).reduce((t,n)=>e[n]===void 0?t:`${t}${wO(n)}:${e[n]};`,``).trim()}function nj({selector:e,styles:t,media:n,container:r}){let i=t?tj(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${tj(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${tj(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function rj(e){let t=5381;for(let n=0;n>>0).toString(36)}function ij({deduplicate:e,...t}){let n=rA(),r=nj(t);return e?(0,G.jsx)(`style`,{href:`mantine-${rj(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function aj(e){let t=5381;for(let n=0;n>>0).toString(36)}function oj(e,t){return`__mdi__-${aj(`${e?tj(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${tj(e.styles)}`).join(`|`):``}`)}`}function sj(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e,...ve}=e;return{styleProps:AO({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,bdrs:w,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e}),rest:ve}}var cj={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function lj(e,t){let n=Vk({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function uj(e,t){let n=Vk({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:lj(e,t)}function dj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${U(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${lj(i.join(` `),t)}`),a.trim()}return e}var fj={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function pj(e){return typeof e==`string`&&e in fj?fj[e]:e}var mj=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function hj(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&mj.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?U(e):e}function gj(e){return e}var _j=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function vj(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&_j.includes(e)?`var(--mantine-${e}-line-height)`:e}function yj(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?U(e):e}function bj(e){return typeof e==`number`?U(e):e}function xj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return U(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var Sj={color:lj,textColor:uj,fontSize:hj,spacing:xj,radius:yj,identity:gj,size:bj,lineHeight:vj,fontFamily:pj,border:dj};function Cj(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function bne({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(Cj(e))-Number(Cj(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function xne(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function Sne(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Cne(e){return typeof e==`object`&&e?xO(e).filter(e=>e!==`base`):[]}function wne(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Tne({styleProps:e,data:t,theme:n}){return bne(xO(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=Sne(e[i]);if(!xne(e[i]))return o.forEach(e=>{r.inlineStyles[e]=Sj[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Cne(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=Sj[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:Sj[a.type](wne(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function wj(){return`__m__-${(0,W.useId)().replace(/[:«»]/g,``)}`}function Tj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Tj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Ene(e){return e}var Ej=Ene;function Dj(e){return e}function Oj(e){let t=e;return t.extend=Dj,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function kj(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Dj,t}function Aj(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function Dne(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Aj(n)]=e[n]),t},{})}function jj(e){return e?typeof e==`string`?{[Aj(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...jj(t)}),{}):Dne(e):null}function Mj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Mj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function One({theme:e,style:t,vars:n,styleProps:r}){let i=Mj(t,e),a=Mj(n,e);return{...i,...a,...r}}function Nj({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=wA(),g=e||`div`,{styleProps:_,rest:v}=sj(m),y=oA()?.()?.(_.sx),b=wj(),x=Tne({styleProps:_,theme:h,data:cj}),S=lA(),C=S&&x.hasResponsiveStyles?oj(x.styles,x.media):b,w={ref:p,style:One({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:wk(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":jO(o)?void 0:o||void 0,size:f,...jj(a),...v};return(0,G.jsxs)(G.Fragment,{children:[x.hasResponsiveStyles&&(0,G.jsx)(ij,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,G.jsx)(g,{...w})]})}Nj.displayName=`@mantine/core/Box`;var Pj=Ej(Nj),kne=(0,W.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function Fj(){return(0,W.use)(kne)}var[Ane,Ij]=FO(`ScrollArea.Root component was not found in tree`);function Lj(e,t){let n=(0,W.useEffectEvent)(t);ak(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function jne(e){let{style:t,...n}=e,r=Ij(),[i,a]=(0,W.useState)(0),[o,s]=(0,W.useState)(0),c=!!(i&&o);return Lj(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),Lj(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function Mne(e){let t=Ij(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(jne,{...e}):null}var Nne={scrollHideDelay:1e3,type:`hover`};function Rj(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=zA(`ScrollAreaRoot`,Nne,e),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(0),[y,b]=(0,W.useState)(0),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(!1),T=fk(a,c);return(0,G.jsx)(Ane,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)(Pj,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}Rj.displayName=`@mantine/core/ScrollAreaRoot`;function zj(e,t){let n=e/t;return Number.isNaN(n)?0:n}function Bj(e){let t=zj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Vj(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Pne(e,[t,n]){return Math.min(n,Math.max(t,e))}function Hj(e,t,n=`ltr`){let r=Bj(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Pne(e,n===`ltr`?[0,o]:[o*-1,0]);return Vj([0,o],[0,s])(c)}function Fne(e,t,n,r=`ltr`){let i=Bj(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return Vj([c,l],d)(e)}function Uj(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[Ine,Kj]=FO(`ScrollAreaScrollbar was not found in tree`);function qj(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=Ij(),[p,m]=(0,W.useState)(null),h=fk(u,m),g=(0,W.useRef)(null),_=(0,W.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,W.useEffectEvent)(c),x=tk(o),S=nk(l,10),C=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,W.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,W.useEffect)(x,[t,x]),Lj(p,S),Lj(f.content,S),(0,G.jsx)(Ine,{value:{scrollbar:p,hasThumb:n,onThumbChange:tk(r),onThumbPointerUp:tk(i),onThumbPositionChange:x,onThumbPointerDown:tk(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:Gj(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:Gj(e.onPointerMove,C),onPointerUp:Gj(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var Jj=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=Ij(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=fk(i,l,o.onScrollbarXChange);return(0,W.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(qj,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${Bj(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Uj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Wj(s.paddingLeft),paddingEnd:Wj(s.paddingRight)}})}})};Jj.displayName=`@mantine/core/ScrollAreaScrollbarX`;function Yj(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=Ij(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=fk(i,l,o.onScrollbarYChange);return(0,W.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(qj,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${Bj(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Uj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Wj(s.paddingTop),paddingEnd:Wj(s.paddingBottom)}})}})}Yj.displayName=`@mantine/core/ScrollAreaScrollbarY`;function Xj(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=Fj(),i=Ij(),a=(0,W.useRef)(null),o=(0,W.useRef)(0),[s,c]=(0,W.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=zj(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>Fne(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(Jj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=Hj(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)(Yj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=Hj(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}Xj.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function Zj(e){let t=Ij(),{forceMount:n,...r}=e,[i,a]=(0,W.useState)(!1),o=e.orientation===`horizontal`,s=nk(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(Zj,{"data-state":i?`visible`:`hidden`,...n}):null}Qj.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function Lne(e){let{forceMount:t,...n}=e,r=Ij(),i=e.orientation===`horizontal`,[a,o]=(0,W.useState)(`hidden`),s=nk(()=>o(`idle`),100);return(0,W.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,W.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(Xj,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:Gj(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:Gj(e.onPointerLeave,()=>o(`idle`))}):null}function $j(e){let{forceMount:t,...n}=e,r=Ij(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,W.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(Qj,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(Lne,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(Zj,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(Xj,{...n}):null}$j.displayName=`@mantine/core/ScrollAreaScrollbar`;function Rne(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function eM(e){let{style:t,ref:n,...r}=e,i=Ij(),a=Kj(),{onThumbPositionChange:o}=a,s=fk(n,a.onThumbChange),c=(0,W.useRef)(void 0),l=nk(()=>{c.current&&=(c.current(),void 0)},100);return(0,W.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=Rne(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:Gj(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:Gj(e.onPointerUp,a.onThumbPointerUp)})}eM.displayName=`@mantine/core/ScrollAreaThumb`;function tM(e){let{forceMount:t,...n}=e,r=Kj();return t||r.hasThumb?(0,G.jsx)(eM,{...n}):null}tM.displayName=`@mantine/core/ScrollAreaThumb`;function nM({children:e,style:t,ref:n,onWheel:r,...i}){let a=Ij(),o=fk(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)(Pj,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}nM.displayName=`@mantine/core/ScrollAreaViewport`;var rM={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function iM(){return typeof window<`u`}function aM(e){return cM(e)?(e.nodeName||``).toLowerCase():`#document`}function oM(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sM(e){return((cM(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function cM(e){return iM()?e instanceof Node||e instanceof oM(e).Node:!1}function lM(e){return iM()?e instanceof Element||e instanceof oM(e).Element:!1}function uM(e){return iM()?e instanceof HTMLElement||e instanceof oM(e).HTMLElement:!1}function dM(e){return!iM()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof oM(e).ShadowRoot}function fM(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=yM(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function zne(e){return/^(table|td|th)$/.test(aM(e))}function pM(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Bne=/transform|translate|scale|rotate|perspective|filter/,Vne=/paint|layout|strict|content/,mM=e=>!!e&&e!==`none`,hM;function gM(e){let t=lM(e)?yM(e):e;return mM(t.transform)||mM(t.translate)||mM(t.scale)||mM(t.rotate)||mM(t.perspective)||!_M()&&(mM(t.backdropFilter)||mM(t.filter))||Bne.test(t.willChange||``)||Vne.test(t.contain||``)}function Hne(e){let t=xM(e);for(;uM(t)&&!vM(t);){if(gM(t))return t;if(pM(t))return null;t=xM(t)}return null}function _M(){return hM??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),hM}function vM(e){return/^(html|body|#document)$/.test(aM(e))}function yM(e){return oM(e).getComputedStyle(e)}function bM(e){return lM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xM(e){if(aM(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||dM(e)&&e.host||sM(e);return dM(t)?t.host:t}function SM(e){let t=xM(e);return vM(t)?(e.ownerDocument||e).body:uM(t)&&fM(t)?t:SM(t)}function CM(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=SM(e),i=r===e.ownerDocument?.body,a=oM(r);if(i){let e=wM(a);return t.concat(a,a.visualViewport||[],fM(r)?r:[],e&&n?CM(e):[])}return t.concat(r,CM(r,[],n))}function wM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var TM=Math.min,EM=Math.max,DM=Math.round,OM=Math.floor,kM=e=>({x:e,y:e}),AM={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function jM(e,t,n){return EM(e,TM(t,n))}function MM(e,t){return typeof e==`function`?e(t):e}function NM(e){return e.split(`-`)[0]}function PM(e){return e.split(`-`)[1]}function FM(e){return e===`x`?`y`:`x`}function IM(e){return e===`y`?`height`:`width`}function LM(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function RM(e){return FM(LM(e))}function zM(e,t,n){n===void 0&&(n=!1);let r=PM(e),i=RM(e),a=IM(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=JM(o)),[o,JM(o)]}function BM(e){let t=JM(e);return[VM(e),t,VM(t)]}function VM(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var HM=[`left`,`right`],UM=[`right`,`left`],WM=[`top`,`bottom`],GM=[`bottom`,`top`];function KM(e,t,n){switch(e){case`top`:case`bottom`:return n?t?UM:HM:t?HM:UM;case`left`:case`right`:return t?WM:GM;default:return[]}}function qM(e,t,n,r){let i=PM(e),a=KM(NM(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(VM)))),a}function JM(e){let t=NM(e);return AM[t]+e.slice(t.length)}function YM(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function XM(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:YM(e)}function ZM(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Une(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Wne(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function Gne(){return/apple/i.test(navigator.vendor)}function Kne(){return Une().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function qne(){return Wne().includes(`jsdom/`)}var QM=`data-floating-ui-focusable`,Jne=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function $M(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function eN(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&dM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function tN(e){return`composedPath`in e?e.composedPath()[0]:e.target}function nN(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function rN(e){return e.matches(`html,body`)}function iN(e){return e?.ownerDocument||document}function aN(e){return uM(e)&&e.matches(Jne)}function oN(e){if(!e||qne())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function sN(e){return e?e.hasAttribute(QM)?e:e.querySelector(`[`+QM+`]`)||e:null}function cN(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...cN(e,t.id,n)])}function lN(e){return`nativeEvent`in e}function uN(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var dN=typeof document<`u`?W.useLayoutEffect:function(){},fN={...W};function pN(e){let t=W.useRef(e);return dN(()=>{t.current=e}),t}var mN=fN.useInsertionEffect||(e=>e());function hN(e){let t=W.useRef(()=>{});return mN(()=>{t.current=e}),W.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function gN(e,t,n){let{reference:r,floating:i}=e,a=LM(t),o=RM(t),s=IM(o),c=NM(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=PM(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function _N(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=MM(t,e),p=XM(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ZM(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ZM(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var vN=50,yN=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:_N},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=gN(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=MM(e,t)||{};if(l==null)return{};let d=XM(u),f={x:n,y:r},p=RM(i),m=IM(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=TM(d[_],T),D=TM(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=jM(E,k,O),j=!c.arrow&&PM(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===LM(t)||T.every(e=>LM(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=LM(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function SN(e){let t=TM(...e.map(e=>e.left)),n=TM(...e.map(e=>e.top)),r=EM(...e.map(e=>e.right)),i=EM(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function CN(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>ZM(SN(e)))}var wN=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=MM(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=CN(u),f=ZM(SN(u)),p=XM(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(LM(n)===`y`){let e=d[0],t=d[d.length-1],r=NM(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return ZM({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=NM(n)===`left`,t=EM(...d.map(e=>e.right)),r=TM(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return ZM({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},TN=new Set([`left`,`top`]);async function EN(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=NM(n),s=PM(n),c=LM(n)===`y`,l=TN.has(o)?-1:1,u=a&&c?-1:1,d=MM(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var DN=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await EN(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ON=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=MM(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=LM(i),p=FM(f),m=u[p],h=u[f],g=(e,t)=>jM(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function kN(e){let t=yM(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=uM(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=DM(n)!==a||DM(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function AN(e){return lM(e)?e:e.contextElement}function jN(e){let t=AN(e);if(!uM(t))return kM(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=kN(t),o=(a?DM(n.width):n.width)/r,s=(a?DM(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var MN=kM(0);function NN(e){let t=oM(e);return!_M()||!t.visualViewport?MN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PN(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===oM(e)}function FN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=AN(e),o=kM(1);t&&(r?lM(r)&&(o=jN(r)):o=jN(e));let s=PN(a,n,r)?NN(a):kM(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=oM(a),t=lM(r)?oM(r):r,n=e,i=wM(n);for(;i&&t!==n;){let e=jN(i),t=i.getBoundingClientRect(),r=yM(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=oM(i),i=wM(n)}}return ZM({width:u,height:d,x:c,y:l})}function IN(e,t){let n=bM(e).scrollLeft;return t?t.left+n:FN(sM(e)).left+n}function LN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-IN(e,n),y:n.top+t.scrollTop}}function RN(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=sM(r),s=t?pM(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=kM(1),u=kM(0),d=uM(r);if((d||!a)&&((aM(r)!==`body`||fM(o))&&(c=bM(r)),d)){let e=FN(r);l=jN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?LN(o,c):kM(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function zN(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function BN(e){let t=bM(e),n=e.ownerDocument.body,r=EM(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=EM(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+IN(e),o=-t.scrollTop;return yM(n).direction===`rtl`&&(a+=EM(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var VN=25;function HN(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=oM(e),a=sM(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!_M()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(IN(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=VN&&(s-=o)}return{width:s,height:c,x:l,y:u}}function UN(e,t){let n=FN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=jN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function WN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=HN(e,n,t);else if(t===`document`)r=BN(sM(e));else if(lM(t))r=UN(t,n);else{let n=NN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ZM(r)}function GN(e,t){let n=t.get(e);if(n)return n;let r=CM(e,[],!1).filter(e=>lM(e)&&aM(e)!==`body`),i=null,a=yM(e).position===`fixed`,o=a?xM(e):e;for(;lM(o)&&!vM(o);){let e=yM(o),t=gM(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=xM(o)}return t.set(e,r),r}function KN(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?pM(t)?[]:GN(t,this._c):[].concat(n),r],o=WN(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=oM(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function nP(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=AN(e),u=i||a?[...l?CM(l):[],...t?CM(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Yne(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?FN(e):null;c&&g();function g(){let t=FN(e);h&&!tP(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var rP=DN,iP=ON,aP=xN,oP=bN,sP=wN,cP=(e,t,n)=>{let r=new Map,i=n??{},a={...eP,...i.platform,_c:r};return yN(e,t,{...i,platform:a})},lP=u(yk(),1),uP=typeof document<`u`?W.useLayoutEffect:function(){};function dP(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!dP(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!dP(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function fP(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pP(e,t){let n=fP(e);return Math.round(t*n)/n}function mP(e){let t=W.useRef(e);return uP(()=>{t.current=e}),t}function Xne(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);dP(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=mP(c),D=mP(i),O=mP(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),cP(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!dP(w.current,t)&&(w.current=t,lP.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);uP(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);uP(()=>(A.current=!0,()=>{A.current=!1}),[]),uP(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ee=W.useMemo(()=>({reference:b,floating:x}),[b,x]),M=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!ee.floating)return e;let t=pP(ee.floating,u.x),r=pP(ee.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...fP(ee.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ee.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:ee,floatingStyles:M}),[u,k,j,ee,M])}var Zne=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:oP({element:r.current,padding:i}).fn(n):r?oP({element:r,padding:i}).fn(n):{}}}},Qne=(e,t)=>{let n=rP(e);return{name:n.name,fn:n.fn,options:[e,t]}},hP=(e,t)=>{let n=iP(e);return{name:n.name,fn:n.fn,options:[e,t]}},gP=(e,t)=>{let n=aP(e);return{name:n.name,fn:n.fn,options:[e,t]}},_P=(e,t)=>{let n=sP(e);return{name:n.name,fn:n.fn,options:[e,t]}},$ne=(e,t)=>{let n=Zne(e);return{name:n.name,fn:n.fn,options:[e,t]}};function vP(e){let t=W.useRef(void 0),n=W.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return W.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var ere=`data-floating-ui-focusable`,yP=`active`,bP=`selected`,tre=`ArrowLeft`,nre=`ArrowRight`,rre=`ArrowUp`,ire=`ArrowDown`,are=[tre,nre],ore=[rre,ire];[...are,...ore];var sre={...W},xP=!1,cre=0,SP=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+cre++;function CP(){let[e,t]=W.useState(()=>xP?SP():void 0);return dN(()=>{e??t(SP())},[]),W.useEffect(()=>{xP=!0},[]),e}var wP=sre.useId||CP;function TP(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var EP=W.createContext(null),DP=W.createContext(null),OP=()=>W.useContext(EP)?.id||null,kP=()=>W.useContext(DP);function AP(e){return`data-floating-ui-`+e}function jP(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var MP=AP(`safe-polygon`);function NP(e,t,n){if(n&&!uN(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function PP(e){return typeof e==`function`?e():e}function FP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=kP(),m=OP(),h=pN(l),g=pN(c),_=pN(n),v=pN(d),y=W.useRef(),b=W.useRef(-1),x=W.useRef(),S=W.useRef(-1),C=W.useRef(!0),w=W.useRef(!1),T=W.useRef(()=>{}),E=W.useRef(!1),D=hN(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});W.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(jP(b),jP(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),W.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=iN(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=W.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=NP(g.current,`close`,y.current);i&&!x.current?(jP(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(jP(b),r(!1,e,n))},[g,r]),k=hN(()=>{T.current(),x.current=void 0}),A=hN(()=>{if(w.current){let e=iN(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(MP),w.current=!1}}),j=hN(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);W.useEffect(()=>{if(!s)return;function e(e){if(jP(b),C.current=!1,u&&!uN(y.current)||PP(v.current)>0&&!NP(g.current,`open`))return;let t=NP(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=iN(o.floating);if(jP(S),E.current=!1,h.current&&i.current.floatingContext){n||jP(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!eN(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){jP(b)}function l(e){j()||O(e,!1)}if(lM(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),dN(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(lM(o.domReference)&&e){var t;let n=iN(o.floating).body;n.setAttribute(MP,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),dN(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),W.useEffect(()=>()=>{k(),jP(b),jP(S),A()},[s,o.domReference,k,A]);let ee=W.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||uN(y.current))&&(n||PP(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(jP(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,PP(v.current)))))}}},[u,r,n,_,v]);return W.useMemo(()=>s?{reference:ee}:{},[s,ee])}var IP=()=>{},LP=W.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:IP,setState:IP,isInstantPhase:!1}),RP=()=>W.useContext(LP);function zP(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=W.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=W.useRef(null),s=W.useCallback(e=>{a({currentId:e})},[]);return dN(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(LP.Provider,{value:W.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function BP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=RP(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return dN(()=>{o&&l&&(f({delay:{open:1,close:NP(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),dN(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),dN(()=>{o&&u!==IP&&n&&u(s)},[o,n,u,s]),c}function VP(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&dM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function HP(e){return`composedPath`in e?e.composedPath()[0]:e.target}var UP={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},WP={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},GP=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function KP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=kP(),g=hN(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=W.useRef(!1),{escapeKey:y,outsidePress:b}=GP(p),{escapeKey:x,outsidePress:S}=GP(m),C=W.useRef(!1),w=hN(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?cN(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,lN(e)?e.nativeEvent:e,`escape-key`)}),T=hN(e=>{var t;let n=()=>{var t;w(e),(t=tN(e))==null||t.removeEventListener(`keydown`,n)};(t=tN(e))==null||t.addEventListener(`keydown`,n)}),E=hN(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=tN(e),s=`[`+AP(`inert`)+`]`,c=iN(i.floating).querySelectorAll(s),u=lM(o)?o:null;for(;u&&!vM(u);){let e=xM(u);if(vM(e)||!lM(e))break;u=e}if(c.length&&lM(o)&&!rN(o)&&!eN(o,i.floating)&&Array.from(c).every(e=>!eN(u,e)))return;if(uM(o)&&k){let t=vM(o),n=yM(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&cN(h.nodesRef.current,d).some(t=>nN(e,t.context?.elements.floating));if(nN(e,i.floating)||nN(e,i.domReference)||f)return;let p=h?cN(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=hN(e=>{var t;let n=()=>{var t;E(e),(t=tN(e))==null||t.removeEventListener(l,n)};(t=tN(e))==null||t.addEventListener(l,n)});W.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},_M()?5:0)}let d=iN(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(lM(i.domReference)&&(p=CM(i.domReference)),lM(i.floating)&&(p=p.concat(CM(i.floating))),!lM(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(CM(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),W.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=W.useMemo(()=>({onKeyDown:w,...u&&{[UP[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=W.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[WP[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return W.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function qP(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=wP(),a=W.useRef({}),[o]=W.useState(()=>TP()),s=OP()!=null,[c,l]=W.useState(r.reference),u=hN((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return W.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function JP(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=qP({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=W.useState(null),[l,u]=W.useState(null),d=o?.domReference||s,f=W.useRef(null),p=kP();dN(()=>{d&&(f.current=d)},[d]);let m=Xne({...n,elements:{...o,...l&&{reference:l}}}),h=W.useCallback(e=>{let t=lM(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=W.useCallback(e=>{(lM(e)||e===null)&&(f.current=e,c(e)),(lM(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!lM(e))&&m.refs.setReference(e)},[m.refs]),_=W.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=W.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=W.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return dN(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),W.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function YP(){return Kne()&&Gne()}function XP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=W.useRef(!1),u=W.useRef(-1),d=W.useRef(!0);W.useEffect(()=>{if(!s)return;let e=oM(o.domReference);function t(){!n&&uM(o.domReference)&&o.domReference===$M(iN(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),YP()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),YP()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),W.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),W.useEffect(()=>()=>{jP(u)},[]);let f=W.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=tN(e.nativeEvent);if(c&&lM(t)){if(YP()&&!e.relatedTarget){if(!d.current&&!aN(t))return}else if(!oN(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=lM(t)&&t.hasAttribute(AP(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=$M(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(eN(a.current.floatingContext?.refs.floating.current,e)||eN(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return W.useMemo(()=>s?{reference:f}:{},[s,f])}function ZP(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[yP]:t,[bP]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[ere]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[yP,bP].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function QP(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=W.useCallback(t=>ZP(t,e,`reference`),t),a=W.useCallback(t=>ZP(t,e,`floating`),n),o=W.useCallback(t=>ZP(t,e,`item`),r);return W.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var $P=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function eF(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=wP(),c=r.domReference?.id||s,l=W.useMemo(()=>sN(r.floating)?.id||i,[r.floating,i]),u=$P.get(o)??o,d=OP()!=null,f=W.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=W.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=W.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return W.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function tF(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...tF(e,t.id,n)])}function nF(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function rF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function iF(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){jP(i),u()}if(jP(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=HP(e),v=e.type===`mouseleave`,y=VP(c.floating,_),b=VP(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=rF(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,ee=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&lM(e.relatedTarget)&&VP(c.floating,e.relatedTarget)||f&&tF(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let M=[];switch(C){case`top`:M=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:M=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:M=[[S.right-1,ee],[S.right-1,j],[x.left+1,j],[x.left+1,ee]];break;case`right`:M=[[x.right-1,ee],[x.right-1,j],[S.left+1,j],[S.left+1,ee]]}function N(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!nF([m,h],M)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}nF([m,h],N([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var aF={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},oF=Sk((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":U(t),"--scrollarea-over-scroll-behavior":i}}}),sF=Oj(e=>{let t=zA(`ScrollArea`,aF,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:C,attributes:w,...T}=t,[E,D]=(0,W.useState)(!1),[O,k]=(0,W.useState)(!1),[A,j]=(0,W.useState)(!1),ee=(0,W.useRef)(!0),M=(0,W.useRef)(!1),N=(0,W.useRef)(!0),te=(0,W.useRef)(!1),P=ej({name:`ScrollArea`,props:t,classes:rM,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:c,varsResolver:oF}),F=(0,W.useRef)(null),[I,ne]=(0,W.useState)(null),L=vP([f,F,(0,W.useCallback)(e=>{ne(t=>t===e?t:e)},[])]);return Lj(h===`present`?I:null,()=>{let e=F.current;e&&(k(e.scrollHeight>e.clientHeight),j(e.scrollWidth>e.clientWidth))}),ak(()=>{S&&F.current&&F.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(Rj,{getStyles:P,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...P(`root`),...T,children:[(0,G.jsx)(nM,{...d,...P(`viewport`,{style:d?.style}),ref:L,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":C||void 0,"data-horizontal-hidden":h===`present`&&!A?`true`:void 0,"data-vertical-hidden":h===`present`&&!O?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!M.current&&_?.(),c&&!ee.current&&v?.(),M.current=s,ee.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!te.current&&b?.(),u&&!N.current&&y?.(),te.current=l,N.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)($j,{...P(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!A||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(tM,{...P(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)($j,{...P(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!O||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(tM,{...P(`thumb`)})}),(0,G.jsx)(Mne,{...P(`corner`),"data-vertical-scrollbar-position":C||void 0,"data-hovered":E||void 0,"data-hidden":l===`never`||void 0})]})});sF.displayName=`@mantine/core/ScrollArea`;var cF=Oj(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...C}=zA(`ScrollAreaAutosize`,aF,e),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(null),D=vP([u,w,(0,W.useCallback)(e=>{E(t=>t===e?t:e)},[])]),O=(0,W.useRef)(!1),k=(0,W.useRef)(!1),A=(0,W.useEffectEvent)(()=>{let e=w.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==O.current&&(k.current?S(t):(k.current=!0,t&&S(!0)),O.current=t)});return Lj(S?T:null,A),(0,G.jsx)(Pj,{...C,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)(Pj,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(sF,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:D,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});sF.classes=rM,sF.varsResolver=oF,cF.displayName=`@mantine/core/ScrollAreaAutosize`,cF.classes=rM,sF.Autosize=cF;var lF={root:`m_87cf2631`},uF={__staticSelector:`UnstyledButton`},dF=kj(e=>{let t=zA(`UnstyledButton`,uF,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,G.jsx)(Pj,{...ej({name:i,props:t,classes:lF,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});dF.classes=lF,dF.displayName=`@mantine/core/UnstyledButton`;var fF={root:`m_1b7284a3`},pF=Sk((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:KO(t),"--paper-shadow":YO(n)}})),mF=kj(e=>{let t=zA(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=ej({name:`Paper`,props:t,classes:fF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:pF});return(0,G.jsx)(Pj,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});mF.classes=fF,mF.varsResolver=pF,mF.displayName=`@mantine/core/Paper`;function hF(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function gF(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var _F={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function vF({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function yF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=vF({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[_F[c]]:r},d=-t/2;return c===`left`?{...u,...hF(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...hF(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...gF(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...gF(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function bF({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function xF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=Fj();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,...yF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}xF.displayName=`@mantine/core/FloatingArrow`;function SF(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function CF(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function wF({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||CF(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=CF(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return CF(n)}var TF={reuseTargetNode:!0},EF=Oj(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=zA(`Portal`,TF,e),[o,s]=(0,W.useState)(!1),c=(0,W.useRef)(null);return ak(()=>(s(!0),c.current=wF({target:n,reuseTargetNode:r,...a}),uk(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,lP.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});EF.displayName=`@mantine/core/Portal`;var DF=Oj(({withinPortal:e=!0,children:t,...n})=>cA()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)(EF,{...n,children:t}));DF.displayName=`@mantine/core/OptionalPortal`;var OF=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),kF={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...OF(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...OF(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...OF(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...OF(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...OF(`top`),common:{transformOrigin:`top right`}}},AF={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function jF({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in kF?{transitionProperty:kF[e].transitionProperty,...i,...kF[e].common,...kF[e][AF[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[AF[t]]}}function MF({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=wA(),d=_k(),f=u.respectReducedMotion?d:!1,[p,m]=(0,W.useState)(f?0:e),[h,g]=(0,W.useState)(r?`entered`:`exited`),_=(0,W.useRef)(-1),v=(0,W.useRef)(-1),y=(0,W.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{lP.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return ok(()=>{S(r)},[r]),(0,W.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function NF({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=cA(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=MF({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(W.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:jF({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(W.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(jF({transition:n,duration:h,state:g,timingFunction:_}))})}NF.displayName=`@mantine/core/Transition`;var PF={duration:100,transition:`fade`};function FF(e,t){return{...PF,...t,...e}}var IF={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},LF=({className:e,...t})=>(0,G.jsxs)(Pj,{component:`span`,className:wk(IF.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:IF.bar}),(0,G.jsx)(`span`,{className:IF.bar}),(0,G.jsx)(`span`,{className:IF.bar})]});LF.displayName=`@mantine/core/Bars`;var RF=({className:e,...t})=>(0,G.jsxs)(Pj,{component:`span`,className:wk(IF.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:IF.dot}),(0,G.jsx)(`span`,{className:IF.dot}),(0,G.jsx)(`span`,{className:IF.dot})]});RF.displayName=`@mantine/core/Dots`;var zF=({className:e,...t})=>(0,G.jsx)(Pj,{component:`span`,className:wk(IF.ovalLoader,e),...t});zF.displayName=`@mantine/core/Oval`;var BF={bars:LF,oval:zF,dots:RF},VF={loaders:BF,type:`oval`},HF=Sk((e,{size:t,color:n})=>({root:{"--loader-size":WO(t,`loader-size`),"--loader-color":n?Hk(n,e):void 0}})),UF=Oj(e=>{let t=zA(`Loader`,VF,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=ej({name:`Loader`,props:t,classes:IF,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:HF});return p?(0,G.jsx)(Pj,{...g(`root`),...h,children:p}):(0,G.jsx)(Pj,{...g(`root`),component:d[i],variant:f,size:n,...h})});UF.defaultLoaders=BF,UF.classes=IF,UF.varsResolver=HF,UF.displayName=`@mantine/core/Loader`;var WF={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},GF={orientation:`horizontal`},KF=Sk((e,{borderWidth:t})=>({group:{"--ai-border-width":U(t)}})),qF=Oj(e=>{let t=zA(`ActionIconGroup`,GF,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t;return(0,G.jsx)(Pj,{...ej({name:`ActionIconGroup`,props:t,classes:WF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:KF,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});qF.classes=WF,qF.varsResolver=KF,qF.displayName=`@mantine/core/ActionIconGroup`;var JF=Sk((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":WO(o,`section-height`),"--section-padding-x":WO(o,`section-padding-x`),"--section-fz":qO(o),"--section-radius":t===void 0?void 0:KO(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),YF=Oj(e=>{let t=zA(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,G.jsx)(Pj,{...ej({name:`ActionIconGroupSection`,props:t,classes:WF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:JF,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});YF.classes=WF,YF.varsResolver=JF,YF.displayName=`@mantine/core/ActionIconGroupSection`;var XF=Sk((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":WO(t,`ai-size`),"--ai-radius":n===void 0?void 0:KO(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),ZF=kj(e=>{let t=zA(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=ej({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:WF,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:XF});return(0,G.jsxs)(dF,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(NF,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)(Pj,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(UF,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)(Pj,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});ZF.classes=WF,ZF.varsResolver=XF,ZF.displayName=`@mantine/core/ActionIcon`,ZF.Group=qF,ZF.GroupSection=YF;function QF({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}QF.displayName=`@mantine/core/CloseIcon`;var $F={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},eI={variant:`subtle`},tI=Sk((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":WO(t,`cb-size`),"--cb-radius":n===void 0?void 0:KO(n),"--cb-icon-size":U(r)}})),nI=kj(e=>{let t=zA(`CloseButton`,eI,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=ej({name:_||`CloseButton`,props:t,className:o,style:c,classes:$F,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:tI});return(0,G.jsxs)(dF,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(QF,{}),r]})});nI.classes=$F,nI.varsResolver=tI,nI.displayName=`@mantine/core/CloseButton`;function rI(e){return W.Children.toArray(e).filter(Boolean)}var iI={root:`m_4081bf90`},aI={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},oI=Sk((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":GO(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),sI=Oj(e=>{let t=zA(`Group`,aI,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=rI(s),x=b.length,S=GO(c??`md`);return(0,G.jsx)(Pj,{...ej({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:iI,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:oI})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});sI.classes=iI,sI.varsResolver=oI,sI.displayName=`@mantine/core/Group`;var cI={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},lI=Sk((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:KO(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),uI=Oj(e=>{let t=zA(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=ej({name:`Alert`,classes:cI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:lI}),C=lk(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(Pj,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(nI,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});uI.classes=cI,uI.varsResolver=lI,uI.displayName=`@mantine/core/Alert`;var dI={root:`m_b6d8b162`};function fI(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var pI={inherit:!1},mI=Sk((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":qO(i),"--text-lh":JO(i),"--text-gradient":t===`gradient`?Gk(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),hI=kj(e=>{let t=zA(`Text`,pI,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)(Pj,{...ej({name:[`Text`,l],props:t,classes:dI,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:mI})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":fI(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});hI.classes=dI,hI.varsResolver=mI,hI.displayName=`@mantine/core/Text`;var gI={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},_I=Sk((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":WO(a,`badge-height`),"--badge-padding-x":WO(a,`badge-padding-x`),"--badge-fz":WO(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:KO(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?Hk(n,e):void 0}}}),vI=kj(e=>{let t=zA(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=ej({name:`Badge`,props:t,classes:gI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:_I});return(0,G.jsxs)(Pj,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});vI.classes=gI,vI.varsResolver=_I,vI.displayName=`@mantine/core/Badge`;var yI={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},bI={orientation:`horizontal`},xI=Sk((e,{borderWidth:t})=>({group:{"--button-border-width":U(t)}})),SI=Oj(e=>{let t=zA(`ButtonGroup`,bI,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=zA(`ButtonGroup`,bI,e);return(0,G.jsx)(Pj,{...ej({name:`ButtonGroup`,props:t,classes:yI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:xI,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});SI.classes=yI,SI.varsResolver=xI,SI.displayName=`@mantine/core/ButtonGroup`;var CI=Sk((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":WO(o,`section-height`),"--section-padding-x":WO(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?qO(o.replace(`compact-`,``)):qO(o),"--section-radius":t===void 0?void 0:KO(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),wI=Oj(e=>{let t=zA(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)(Pj,{...ej({name:`ButtonGroupSection`,props:t,classes:yI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:CI,rootSelector:`groupSection`})(`groupSection`),...f})});wI.classes=yI,wI.varsResolver=CI,wI.displayName=`@mantine/core/ButtonGroupSection`;var TI={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${U(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},EI=Sk((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":WO(a,`button-height`),"--button-padding-x":WO(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?qO(a.replace(`compact-`,``)):qO(a),"--button-radius":t===void 0?void 0:KO(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),DI=kj(e=>{let t=zA(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=ej({name:`Button`,props:t,classes:yI,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:EI}),T=!!c,E=!!l;return(0,G.jsxs)(dF,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(NF,{mounted:p,transition:TI,duration:150,children:e=>(0,G.jsx)(Pj,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(UF,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(Pj,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(Pj,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(Pj,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});DI.classes=yI,DI.varsResolver=EI,DI.displayName=`@mantine/core/Button`,DI.Group=SI,DI.GroupSection=wI;var OI={root:`m_4451eb3a`},kI=kj(e=>{let t=zA(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=ej({name:`Center`,props:t,classes:OI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)(Pj,{mod:[{inline:c},l],...f(`root`),...d})});kI.classes=OI,kI.displayName=`@mantine/core/Center`;var[AI,jI]=FO(`Pagination.Root component was not found in tree`),MI={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},NI={withPadding:!0},PI=Oj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=zA(`PaginationControl`,NI,e),d=jI(),f=s||d.disabled;return(0,G.jsx)(dF,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});PI.classes=MI,PI.displayName=`@mantine/core/PaginationControl`;function FI({style:e,children:t,path:n,...r}){return(0,G.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,G.jsx)(`path`,{d:n,fill:`currentColor`})})}var II=e=>(0,G.jsx)(FI,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),LI=e=>(0,G.jsx)(FI,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),RI=e=>(0,G.jsx)(FI,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),zI=e=>(0,G.jsx)(FI,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),lre={icon:e=>(0,G.jsx)(FI,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},BI=Oj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=zA(`PaginationDots`,lre,e);return(0,G.jsx)(Pj,{...jI().getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,G.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});BI.classes=MI,BI.displayName=`@mantine/core/PaginationDots`;function VI({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=zA(t,i,e),s=jI(),c=r===`next`?s.active===s.total:s.active===1;return(0,G.jsx)(PI,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,G.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,Ej(a)}var HI=VI({icon:II,name:`PaginationNext`,action:`onNext`,type:`next`}),UI=VI({icon:LI,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),WI=VI({icon:RI,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),GI=VI({icon:zI,name:`PaginationLast`,action:`onLast`,type:`next`});function KI({dotsIcon:e}){let t=jI();return(0,G.jsx)(G.Fragment,{children:t.range.map((n,r)=>n===`dots`?(0,G.jsx)(BI,{icon:e},r):(0,G.jsx)(PI,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r))})}KI.displayName=`@mantine/core/PaginationItems`;var ure={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},qI=Oj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=zA(`PaginationLabel`,ure,e),c=jI();return(0,G.jsx)(Pj,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});qI.classes=MI,qI.displayName=`@mantine/core/PaginationLabel`;var dre={siblings:1,boundaries:1},JI=Sk((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:KO(n),"--pagination-control-size":WO(t,`pagination-control-size`),"--pagination-control-fz":qO(t),"--pagination-active-bg":r?Hk(r,e):void 0,"--pagination-active-color":Qk(i,e)?Yk({color:r,theme:e,autoContrast:i}):void 0}})),YI=Oj(e=>{let t=zA(`PaginationRoot`,dre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=ej({name:`Pagination`,classes:MI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:JI}),{range:k,setPage:A,next:j,previous:ee,active:M,first:N,last:te}=gk({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,G.jsx)(AI,{value:{total:c,range:k,active:M,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:XO(_,j),onPrevious:XO(v,ee),onFirst:XO(y,N),onLast:XO(b,te),getStyles:O},children:(0,G.jsx)(Pj,{...O(`root`),mod:[{layout:w},T],...D})})});YI.classes=MI,YI.varsResolver=JI,YI.displayName=`@mantine/core/PaginationRoot`;var fre={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function pre({children:e}){return(0,G.jsx)(Pj,{...jI().getStyles(`items`),children:e})}var XI=Oj(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=zA(`Pagination`,fre,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(pre,{children:(0,G.jsx)(KI,{dotsIcon:c})}),(0,G.jsx)(qI,{formatLabel:m})]}):(0,G.jsx)(KI,{dotsIcon:c}):null;return(0,G.jsx)(YI,{total:l,layout:p,...h,children:(0,G.jsxs)(sI,{gap:u,children:[t&&(0,G.jsx)(WI,{icon:s,...r?.(`first`)}),n&&(0,G.jsx)(UI,{icon:a,...r?.(`previous`)}),g,n&&(0,G.jsx)(HI,{icon:i,...r?.(`next`)}),t&&(0,G.jsx)(GI,{icon:o,...r?.(`last`)})]})})});XI.classes=MI,XI.displayName=`@mantine/core/Pagination`,XI.Root=YI,XI.Control=PI,XI.Dots=BI,XI.First=WI,XI.Last=GI,XI.Next=HI,XI.Previous=UI,XI.Items=KI,XI.Label=qI;function mre({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,W.useState)(n),a=(0,W.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=JP({placement:t,middleware:[hP({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,W.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,W.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=CM(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var ZI={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},hre={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:UO(`popover`)},QI=Sk((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:KO(t),"--tooltip-bg":n?Hk(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),$I=Oj(e=>{let t=zA(`TooltipFloating`,hre,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=wA(),E=ej({name:`TooltipFloating`,props:t,classes:ZI,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:QI}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:j,floating:ee,setOpened:M}=mre({offset:p,position:m,defaultOpened:v}),N=xk(n);if(!N)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let te=fk(j,bk(N),C),P=N.props,F=e=>{P.onMouseEnter?.(e),D(e),M(!0)},I=e=>{P.onMouseLeave?.(e),M(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(DF,{...x,withinPortal:i,children:(0,G.jsx)(Pj,{...w,...E(`tooltip`,{style:{...Tj(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:Number.isFinite(k)?Math.round(k):``,left:Number.isFinite(O)?Math.round(O):``}}),variant:y,ref:ee,mod:{multiline:h},children:f})}),(0,W.cloneElement)(N,{...P,[r]:te,onMouseEnter:F,onMouseLeave:I})]})});$I.classes=ZI,$I.varsResolver=QI,$I.displayName=`@mantine/core/TooltipFloating`;var eL=(0,W.createContext)({withinGroup:!1}),gre={openDelay:0,closeDelay:0};function tL(e){let{openDelay:t,closeDelay:n,children:r}=zA(`TooltipGroup`,gre,e);return(0,G.jsx)(eL,{value:{withinGroup:!0},children:(0,G.jsx)(zP,{delay:{open:t,close:n},children:r})})}tL.displayName=`@mantine/core/TooltipGroup`,tL.extend=e=>e;function _re(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function vre(e){let t=_re(e.middlewares),n=[Qne(e.offset)];return t.shift&&n.push(hP(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?gP():gP(t.flip)),n.push($ne({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?_P():_P(t.inline)):e.inline&&n.push(_P()),n}function yre(e){let[t,n]=(0,W.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,W.use)(eL).withinGroup,a=lk(),o=(0,W.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=JP({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:vre(e),whileElementsMounted:nP}),{delay:m,currentId:h,setCurrentId:g}=BP(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=QP([FP(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?iF():null}),XP(l,{enabled:e.events?.focus,visibleOnly:!0}),eF(l,{role:`tooltip`}),KP(l,{enabled:e.opened===void 0})]),y=(0,W.useRef)(d);ak(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var bre={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:UO(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},nL=Sk((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:KO(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),rL=Oj(e=>{let t=zA(`Tooltip`,bre,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,interactive:O,zIndex:k,disabled:A,onClick:j,onMouseEnter:ee,onMouseLeave:M,inline:N,variant:te,keepMounted:P,vars:F,portalProps:I,mod:ne,floatingStrategy:L,middlewares:re,autoContrast:ie,attributes:ae,target:oe,ref:R,...z}=t,{dir:se}=Fj(),ce=(0,W.useRef)(null),le=yre({position:SF(se,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,interactive:O,arrowRef:ce,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:N,strategy:L,middlewares:re});(0,W.useEffect)(()=>{let e=oe instanceof HTMLElement?oe:typeof oe==`string`?document.querySelector(oe):oe?.current||null;e&&le.reference(e)},[oe,le]);let ue=ej({name:`Tooltip`,props:t,classes:ZI,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ae,rootSelector:`tooltip`,vars:F,varsResolver:nL}),de=xk(n);if(!oe&&!de)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let fe=ue(`tooltip`),pe=O&&!A&&!!le.opened,B=C===`merge`&&y?bF({position:le.placement,dir:se}):void 0;if(oe){let e=FF(T,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(DF,{...I,withinPortal:d,children:(0,G.jsx)(NF,{...e,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(Pj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...fe,...le.getFloatingProps({ref:le.floating,className:fe.className,style:{...fe.style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(xF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})})})}let me=de.props,V=fk(le.reference,bk(de),R),he=FF(T,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(DF,{...I,withinPortal:d,children:(0,G.jsx)(NF,{...he,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:he.duration,children:e=>(0,G.jsxs)(Pj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...le.getFloatingProps({ref:le.floating,className:ue(`tooltip`).className,style:{...ue(`tooltip`).style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(xF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})}),(0,W.cloneElement)(de,le.getReferenceProps({onClick:j,onMouseEnter:ee,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...me,className:wk(v,me.className),[i]:V}))]})});rL.classes=ZI,rL.varsResolver=nL,rL.displayName=`@mantine/core/Tooltip`,rL.Floating=$I,rL.Group=tL;function iL(e){if(e!==void 0)return typeof e==`number`?U(e):e}function xre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=wA(),s=t===void 0?e:t,c=r!==void 0,l=AO({"--sg-spacing-x":GO($O(e)),"--sg-spacing-y":GO($O(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":iL(r)}:{"--sg-cols":$O(n)?.toString()}}),u=xO(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=GO(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=GO(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(ij,{styles:l,media:QO(xO(u),o.breakpoints).filter(e=>xO(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function aL(e){return typeof e==`object`&&e?xO(e):[]}function Sre(e){return e.sort((e,t)=>EO(e)-EO(t))}function Cre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return Sre(Array.from(new Set([...aL(e),...aL(t),...r===void 0?aL(n):[]])))}function wre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=AO({"--sg-spacing-x":GO($O(e)),"--sg-spacing-y":GO($O(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":iL(r)}:{"--sg-cols":$O(n)?.toString()}}),l=Cre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=GO(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=GO(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(ij,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var oL={container:`m_925c2d2c`,root:`m_2415a157`},Tre={cols:1,spacing:`md`,type:`media`},sL=Oj(e=>{let t=zA(`SimpleGrid`,Tre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=ej({name:`SimpleGrid`,classes:oL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=wj(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(wre,{...t,selector:`.${v}`}),(0,G.jsx)(`div`,{..._(`container`),children:(0,G.jsx)(Pj,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(xre,{...t,selector:`.${v}`}),(0,G.jsx)(Pj,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});sL.classes=oL,sL.displayName=`@mantine/core/SimpleGrid`;var cL={root:`m_6d731127`},Ere={gap:`md`,align:`stretch`,justify:`flex-start`},lL=Sk((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":GO(t),"--stack-align":n,"--stack-justify":r}})),uL=Oj(e=>{let t=zA(`Stack`,Ere,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,G.jsx)(Pj,{...ej({name:`Stack`,props:t,classes:cL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:lL})(`root`),variant:d,...p})});uL.classes=cL,uL.varsResolver=lL,uL.displayName=`@mantine/core/Stack`;var[Dre,Ore]=FO(`Table component was not found in the tree`),dL={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function kre(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function fL(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=Oj(r=>{let i=zA(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=Ore();return(0,G.jsx)(Pj,{component:e,...kre(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=dL,r}var pL=fL(`th`,{columnBorder:!0}),mL=fL(`td`,{columnBorder:!0}),hL=fL(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),gL=fL(`thead`,{stickyHeader:!0}),_L=fL(`tbody`),vL=fL(`tfoot`),yL=fL(`caption`,{captionSide:!0}),Are={type:`scrollarea`},bL=Sk((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":U(t),"--table-max-height":U(n),"--table-overflow":r===`native`?`auto`:void 0}})),xL=Oj(e=>{let t=zA(`TableScrollContainer`,Are,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=ej({name:`TableScrollContainer`,classes:dL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:bL,rootSelector:`scrollContainer`});return(0,G.jsx)(Pj,{component:d===`scrollarea`?sF:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});xL.classes=dL,xL.varsResolver=bL,xL.displayName=`@mantine/core/TableScrollContainer`;function SL({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)(yL,{children:e.caption}),e.head&&(0,G.jsx)(gL,{children:(0,G.jsx)(hL,{children:e.head.map((e,t)=>(0,G.jsx)(pL,{children:e},t))})}),e.body&&(0,G.jsx)(_L,{children:e.body.map((e,t)=>(0,G.jsx)(hL,{children:e.map((e,t)=>(0,G.jsx)(mL,{children:e},t))},t))}),e.foot&&(0,G.jsx)(vL,{children:(0,G.jsx)(hL,{children:e.foot.map((e,t)=>(0,G.jsx)(pL,{children:e},t))})})]})}SL.displayName=`@mantine/core/TableDataRenderer`;var CL={withRowBorders:!0,verticalSpacing:7},wL=Sk((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":GO(r),"--table-vertical-spacing":GO(i),"--table-border-color":a?Hk(a,e):void 0,"--table-striped-color":c&&o?Hk(o,e):void 0,"--table-highlight-on-hover-color":l&&s?Hk(s,e):void 0,"--table-sticky-header-offset":d?U(u):void 0}})),TL=Oj(e=>{let t=zA(`Table`,CL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:C,mod:w,tabularNums:T,attributes:E,...D}=t,O=ej({name:`Table`,props:t,className:r,style:i,classes:dL,classNames:n,styles:a,unstyled:o,attributes:E,rootSelector:`table`,vars:s,varsResolver:wL});return(0,G.jsx)(Dre,{value:{getStyles:O,stickyHeader:S,striped:p===!0?`odd`:p||void 0,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:u||`bottom`},children:(0,G.jsx)(Pj,{component:`table`,mod:[{"data-with-table-border":_,"data-tabular-nums":T},w],...O(`table`),...D,children:x||!!b&&(0,G.jsx)(SL,{data:b})})})});TL.classes=dL,TL.varsResolver=wL,TL.displayName=`@mantine/core/Table`,TL.Td=mL,TL.Th=pL,TL.Tr=hL,TL.Thead=gL,TL.Tbody=_L,TL.Tfoot=vL,TL.Caption=yL,TL.ScrollContainer=xL,TL.DataRenderer=SL;var[EL,DL]=FO(`Tabs component was not found in the tree`),OL={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},kL=Oj(e=>{let t=zA(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=DL();return(0,G.jsx)(Pj,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});kL.classes=OL,kL.displayName=`@mantine/core/TabsList`;var AL=Oj(e=>{let t=zA(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=cA(),f=DL();(0,W.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,G.jsx)(W.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,G.jsx)(Pj,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});AL.classes=OL,AL.displayName=`@mantine/core/TabsPanel`;var jL=Oj(e=>{let t=zA(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=wA(),{dir:y}=Fj(),b=DL(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,G.jsxs)(dF,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?Hk(u,v):void 0},onKeyDown:VO({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,G.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});jL.classes=OL,jL.displayName=`@mantine/core/TabsTab`;var ML=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,NL={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},PL=Sk((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":KO(t),"--tabs-color":Hk(n,e),"--tabs-text-color":Qk(r,e)?Yk({color:n,theme:e,autoContrast:r}):void 0}})),FL=Oj(e=>{let t=zA(`Tabs`,NL,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:C,autoContrast:w,mod:T,attributes:E,...D}=t,O=lk(c),k=(0,W.useRef)(new Set),A=ck(),j=(0,W.useCallback)((e,t)=>{let n=k.current;t&&!n.has(e)?(n.add(e),A()):!t&&n.has(e)&&(n.delete(e),A())},[]),[ee,M]=pk({value:r,defaultValue:n,finalValue:null,onChange:i}),N=ej({name:`Tabs`,props:t,classes:OL,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:E,vars:C,varsResolver:PL});return(0,G.jsx)(EL,{value:{placement:h,value:ee,orientation:a,id:O,loop:s,activateTabWithKeyboard:l,getTabId:IO(`${O}-tab`,ML),getPanelId:IO(`${O}-panel`,ML),onChange:M,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:N,mountedPanels:k,setMountedPanel:j},children:(0,G.jsx)(Pj,{id:O,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},T],...N(`root`),...D,children:o})})});FL.classes=OL,FL.varsResolver=PL,FL.displayName=`@mantine/core/Tabs`,FL.Tab=jL,FL.Panel=AL,FL.List=kL;var IL={root:`m_7341320d`},LL=Sk((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":WO(t,`ti-size`),"--ti-radius":n===void 0?void 0:KO(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),RL=Oj(e=>{let t=zA(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t;return(0,G.jsx)(Pj,{...ej({name:`ThemeIcon`,classes:IL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:LL})(`root`),...u})});RL.classes=IL,RL.varsResolver=LL,RL.displayName=`@mantine/core/ThemeIcon`;var zL=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],BL=[`xs`,`sm`,`md`,`lg`,`xl`];function VL(e,t){let n=t===void 0?`h${e}`:t;return zL.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:BL.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:U(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var HL={root:`m_8a5d1357`},UL={order:1},WL=Sk((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=VL(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),GL=Oj(e=>{let t=zA(`Title`,UL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=ej({name:`Title`,props:t,classes:HL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:WL});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(Pj,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});GL.classes=HL,GL.varsResolver=WL,GL.displayName=`@mantine/core/Title`;var KL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),qL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),JL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,80v96H48V80Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z`}))]]),YL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z`}))]]),XL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M96,40l33.52,88H56Zm104,88H129.52L160,208Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z`}))]]),ZL=(0,W.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),QL=W.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=W.useContext(ZL);return W.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&W.createElement(`title`,null,n),s,c.get(a??f))});QL.displayName=`IconBase`;var $L=W.forwardRef((e,t)=>W.createElement(QL,{ref:t,...e,weights:KL}));$L.displayName=`ArrowClockwiseIcon`;var eR=$L,tR=W.forwardRef((e,t)=>W.createElement(QL,{ref:t,...e,weights:qL}));tR.displayName=`ArrowUpRightIcon`;var nR=tR,rR=W.forwardRef((e,t)=>W.createElement(QL,{ref:t,...e,weights:JL}));rR.displayName=`ArrowsLeftRightIcon`;var iR=rR,aR=W.forwardRef((e,t)=>W.createElement(QL,{ref:t,...e,weights:YL}));aR.displayName=`GridFourIcon`;var oR=aR,sR=W.forwardRef((e,t)=>W.createElement(QL,{ref:t,...e,weights:XL}));sR.displayName=`PulseIcon`;var cR=sR,lR=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),uR=s(((e,t)=>{t.exports=lR()})),dR=s((e=>{var t=uR(),n=NO(),r=yk();function i(e){var t=`https://react.dev/errors/`+e;if(1F||(e.current=P[F],P[F]=null,F--)}function L(e,t){F++,P[F]=e.current,e.current=t}var re=I(null),ie=I(null),ae=I(null),oe=I(null);function R(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),L(re,e)}function z(){ne(re),ne(ie),ne(ae)}function se(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=Zd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function ce(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),sp._currentValue=te)}var le,ue;function de(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-1)`:-1`)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?de(n):``}function B(e,t){switch(e.tag){case 26:case 27:case 5:return de(e.type);case 16:return de(`Lazy`);case 13:return e.child!==t&&t!==null?de(`Suspense Fallback`):de(`Suspense`);case 19:return de(`SuspenseList`);case 0:case 15:return pe(e.type,!1);case 11:return pe(e.type.render,!1);case 1:return pe(e.type,!0);case 31:return de(`Activity`);default:return``}}function me(e){try{var t=``,n=null;do t+=B(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var V=Object.prototype.hasOwnProperty,he=t.unstable_scheduleCallback,ge=t.unstable_cancelCallback,_e=t.unstable_shouldYield,ve=t.unstable_requestPaint,ye=t.unstable_now,be=t.unstable_getCurrentPriorityLevel,xe=t.unstable_ImmediatePriority,Se=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,we=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Ee=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function Ae(e){if(typeof Ee==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var je=Math.clz32?Math.clz32:Pe,Me=Math.log,Ne=Math.LN2;function Pe(e){return e>>>=0,e===0?32:31-(Me(e)/Ne|0)|0}var Fe=256,Ie=262144,Le=4194304;function Re(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Re(n))):i=Re(o):i=Re(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Re(n))):i=Re(o)):i=Re(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Be(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ve(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function He(){var e=Le;return Le<<=1,!(Le&62914560)&&(Le=4194304),e}function Ue(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),rn=!1;if(nn)try{var an={};Object.defineProperty(an,"passive",{get:function(){rn=!0}}),window.addEventListener(`test`,an,an),window.removeEventListener(`test`,an,an)}catch{rn=!1}var on=null,sn=null,cn=null;function ln(){if(cn)return cn;var e,t=sn,n=t.length,r,i=`value`in on?on.value:on.textContent,a=i.length;for(e=0;e=Vn),Wn=` `,Gn=!1;function Kn(e,t){switch(e){case`keyup`:return zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Jn=!1;function Yn(e,t){switch(e){case`compositionend`:return qn(t);case`keypress`:return t.which===32?(Gn=!0,Wn):null;case`textInput`:return e=t.data,e===Wn&&Gn?null:e;default:return null}}function Xn(e,t){if(Jn)return e===`compositionend`||!Bn&&Kn(e,t)?(e=ln(),cn=sn=on=null,Jn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=vr(n)}}function br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=At(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=At(e.document)}return t}function Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Cr=nn&&`documentMode`in document&&11>=document.documentMode,wr=null,Tr=null,Er=null,Dr=!1;function Or(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dr||wr==null||wr!==At(r)||(r=wr,`selectionStart`in r&&Sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Er&&_r(Er,r)||(Er=r,r=Pd(Tr,`onSelect`),0>=o,i-=o,bi=1<<32-je(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),ki&&Si(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),ki&&Si(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return ki&&Si(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),ki&&Si(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ca(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=oi(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ui(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ca(o),x(e,r,o,c)}if(ee(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ka(o),c);if(o.$$typeof===b)return x(e,r,Zi(e,o),c);ja(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=x(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=$r(e),Qr(e,null,n),t}return Yr(e,r,t,n),$r(e)}function Ba(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Ul&p)===p:(r&p)===p){p!==0&&p===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Fa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=M.T,s={};M.T=s,Ns(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,da(c,r),yu(e)):Ms(e,t,r,yu(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},yu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function Ss(){}function Cs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ws(e).queue;xs(e,a,t,te,n===null?Ss:function(){return Ts(e),n(r)})}function ws(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=ws(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},yu())}function Es(){return Xi(sp)}function Ds(){return ko().memoizedState}function Os(){return ko().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yu();e=Ra(n);var r=za(t,e,n);r!==null&&(xu(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=yu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=Xr(e,t,n,r),n!==null&&(xu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,yu())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,gr(s,o))return Yr(e,t,i,0),Vl===null&&Jr(),!1}catch{}if(n=Xr(e,t,i,r),n!==null)return xu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=Xr(e,n,r,2),t!==null&&xu(t,e,2)}function Ps(e){var t=e.alternate;return e===co||t!==null&&t===co}function Fs(e,t){po=fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}var Ls={readContext:Xi,use:Mo,useCallback:yo,useContext:yo,useEffect:yo,useImperativeHandle:yo,useLayoutEffect:yo,useInsertionEffect:yo,useMemo:yo,useReducer:yo,useRef:yo,useState:yo,useDebugValue:yo,useDeferredValue:yo,useTransition:yo,useSyncExternalStore:yo,useId:yo,useHostTransitionStatus:yo,useFormState:yo,useActionState:yo,useOptimistic:yo,useMemoCache:yo,useCacheRefresh:yo};Ls.useEffectEvent=yo;var Rs={readContext:Xi,use:Mo,useCallback:function(e,t){return Oo().memoizedState=[e,t===void 0?null:t],e},useContext:Xi,useEffect:cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),os(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=Oo();t=t===void 0?null:t;var r=e();if(mo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Oo();if(n!==void 0){var i=n(t);if(mo){Ae(!0);try{n(t)}finally{Ae(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=As.bind(null,co,e),[r.memoizedState,e]},useRef:function(e){var t=Oo();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,n=js.bind(null,co,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gs,useDeferredValue:function(e,t){return ys(Oo(),e,t)},useTransition:function(){var e=Wo(!1);return e=xs.bind(null,co,e.queue,!0,!1),Oo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=co,a=Oo();if(ki){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Vl===null)throw Error(i(349));Ul&127||zo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs(Vo.bind(null,r,o,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,o,n,t),null),n},useId:function(){var e=Oo(),t=Vl.identifierPrefix;if(ki){var n=xi,r=bi;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ho++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[et]=t,o[tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ud(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Mc(t)}}return Lc(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Di,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Bd(e.nodeValue,n)),e||Ni(t,!0)}else e=Yd(e).createTextNode(r),e[et]=t,t.stateNode=e}return Lc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[et]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(t),null);if(t.flags&128)throw Error(i(558))}return Lc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ii(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[et]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),a=!1}else a=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(io(t),t):(io(t),null)}return io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fc(t,t.updateQueue),Lc(t),null);case 4:return z(),e===null&&Ad(t.stateNode.containerInfo),Lc(t),null;case 10:return Wi(t.type),Lc(t),null;case 19:if(ne(ao),r=t.memoizedState,r===null)return Lc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Ic(r,!1);else{if(Xl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=oo(e),o!==null){for(t.flags|=128,Ic(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ai(n,e),n=n.sibling;return L(ao,ao.current&1|2),ki&&Si(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>su&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}}else{if(!a){if(e=oo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),Ic(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ki)return Lc(t),null}else 2*ye()-r.renderingStartTime>su&&n!==536870912&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Lc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=ao.current,L(ao,a?n&1|2:n&1),ki&&Si(t,r.treeForkCount),e);case 22:case 23:return io(t),Za(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Lc(t),t.subtreeFlags&6&&(t.flags|=8192)):Lc(t),n=t.updateQueue,n!==null&&Fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ne(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wi(na),Lc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(na),z(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ce(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ao),null;case 4:return z(),null;case 10:return Wi(t.type),null;case 22:case 23:return io(t),Za(),e!==null&&ne(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wi(na),null;case 25:return null;default:return null}}function Bc(e,t){switch(Ti(t),t.tag){case 3:Wi(na),z();break;case 26:case 27:case 5:ce(t);break;case 4:z();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:ne(ao);break;case 10:Wi(t.type);break;case 22:case 23:io(t),Za(),e!==null&&ne(pa);break;case 24:Wi(na)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Zu(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Zu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Zu(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){Zu(e,e.return,t)}}}function Wc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Zu(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Zu(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Zu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Zu(e,t,n)}else n.current=null}}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Zu(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Wd(r,e.type,n,t),r[tt]=t}catch(t){Zu(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qt));else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ud(t,r,n),t[et]=e,t[tt]=n}catch(t){Zu(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,qd=gp,e=xr(e),Sr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Jd={focusedElem:e,selectionRange:n},gp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Ud(o,r,n),o[et]=e,pt(o),r=o;break a;case`link`:var s=Xf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=yr(s,h),v=yr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,M.T=null,n=hu,hu=null;var o=du,s=pu;if(uu=0,fu=du=null,pu=0,Bl&6)throw Error(i(331));var c=Bl;if(Bl|=4,Fl(o.current),Dl(o,o.current,s,n),Bl=c,dd(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{N.p=a,M.T=r,qu(e,t)}}function Xu(e,t,n){t=fi(n,t),t=Zs(e.stateNode,t,2),e=za(e,t,2),e!==null&&(We(e,2),ud(e))}function Zu(e,t,n){if(e.tag===3)Xu(e,e,n);else for(;t!==null;){if(t.tag===3){Xu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(lu===null||!lu.has(r))){e=fi(n,e),n=Qs(2),r=za(t,n,2),r!==null&&($s(n,r,t,e),We(r,2),ud(r));break}}t=t.return}}function Qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Jl=!0,i.add(n),e=$u.bind(null,e,t,n),t.then(e,e))}function $u(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Vl===e&&(Ul&n)===n&&(Xl===4||Xl===3&&(Ul&62914560)===Ul&&300>ye()-au?!(Bl&2)&&Ou(e,0):$l|=n,tu===Ul&&(tu=0)),ud(e)}function ed(e,t){t===0&&(t=He()),e=Zr(e,t),e!==null&&(We(e,t),ud(e))}function td(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ed(e,n)}function nd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ed(e,n)}function rd(e,t){return he(e,t)}var id=null,ad=null,od=!1,sd=!1,cd=!1,ld=0;function ud(e){e!==ad&&e.next===null&&(ad===null?id=ad=e:ad=ad.next=e),sd=!0,od||(od=!0,_d())}function dd(e,t){if(!cd&&sd){cd=!0;do for(var n=!1,r=id;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,gd(r,a))}else a=Ul,a=ze(r,r===Vl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Be(r,a)||(n=!0,gd(r,a))}r=r.next}while(n);cd=!1}}function fd(){pd()}function pd(){sd=od=!1;var e=0;ld!==0&&ef()&&(e=ld);for(var t=ye(),n=null,r=id;r!==null;){var i=r.next,a=md(r,t);a===0?(r.next=null,n===null?id=i:n.next=i,i===null&&(ad=n)):(n=r,(e!==0||a&3)&&(sd=!0)),r=i}uu!==0&&uu!==5||dd(e,!1),ld!==0&&(ld=0)}function md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=ft(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);pt(c),Ud(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=ae.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+Mt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),pt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Mt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,pt(a),a):(r=n,(a=Cf.get(o))&&(r=f({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Ud(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fR()}))(),mR=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],hR=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],gR=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],_R=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],vR=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],yR=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],bR={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},xR={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},SR={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},CR={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:mR,brand:hR,ok:gR,warn:_R,bad:vR,info:yR},defaultRadius:`md`,fontFamily:SR.body,fontFamilyMonospace:SR.display,headings:{fontFamily:SR.body,fontWeight:`600`},cursorType:`pointer`},wR=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":bR.light.muted},dark:{}}),TR=BA(CR);function ER({dark:e,children:t}){return(0,G.jsx)(RA,{theme:TR,cssVariablesResolver:wR,forceColorScheme:e?`dark`:`light`,children:(0,G.jsx)(mF,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function DR({title:e,summary:t,onRefresh:n,disabled:r}){return(0,G.jsxs)(sI,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,G.jsxs)(Pj,{miw:0,children:[(0,G.jsx)(KL,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,G.jsx)(hI,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,G.jsx)(iL,{label:`Refresh this view`,children:(0,G.jsx)(ZF,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,G.jsx)(tR,{size:15,weight:`bold`})})})]})}function OR({error:e,loading:t,retry:n}){return e?(0,G.jsx)(uI,{color:`bad`,m:`md`,radius:`md`,children:(0,G.jsxs)(sI,{justify:`space-between`,children:[(0,G.jsx)(hI,{size:`sm`,children:e}),n&&(0,G.jsx)(DI,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,G.jsxs)(kI,{mih:160,p:`xl`,children:[(0,G.jsx)(UF,{size:`sm`}),(0,G.jsx)(hI,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function kR({active:e,items:t,onChange:n}){return(0,G.jsx)(sF,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,G.jsx)(IL,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,G.jsx)(IL.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,G.jsx)(IL.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,G.jsx)(vI,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function AR({icon:e,title:t,children:n,tall:r=!1}){return(0,G.jsx)(kI,{mih:r?220:130,p:`xl`,children:(0,G.jsxs)(sI,{wrap:`nowrap`,children:[(0,G.jsx)(zL,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,G.jsxs)(Pj,{children:[(0,G.jsx)(hI,{fw:700,size:`sm`,children:t}),(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function jR({left:e,right:t}){return(0,G.jsxs)(sI,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function MR({label:e,value:t,color:n}){return(0,G.jsxs)(mF,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(hI,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function NR(e,t=8){let[n,r]=(0,W.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,W.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function PR({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,G.jsxs)(sI,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsxs)(hI,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,G.jsx)(ZI,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function FR(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function IR(e){return bR[e?`dark`:`light`]}function LR(e){let t=e?5:7;return{ok:gR[t],warn:_R[t],bad:vR[t],info:yR[t]}}function RR(e,t){let n=xR[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}var zR=Ec(),BR=P,VR=fe,HR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Hu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=pe(UR,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}qR(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Ub(r).w>o)return!0;if(a){var s=jD(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=zR(e).pointerEl=new Qd[i.type](BR(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=zR(e).labelEl=new Xo(BR(t.label));e.add(i),GR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=zR(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=zR(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),GR(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=wf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){qx(e.event)},onmousedown:VR(this._onHandleDragMove,this,0,0),drift:VR(this._onHandleDragMove,this),ondragend:VR(this._onHandleDragEnd,this)}),n.add(r)),qR(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Rx(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){UR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,KR(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(KR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(KR(r)),zR(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),zx(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function UR(e,t,n,r){WR(zR(n).lastProp,r)||(zR(n).lastProp=r,t?Gd(n,r,e):(n.stopAnimation(),n.attr(r)))}function WR(e,t){if(_e(e)&&_e(t)){var n=!0;return R(t,function(t,r){n&&=WR(e[r],t)}),!!n}return e===t}function GR(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function KR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function qR(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function JR(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function YR(e,t,n,r,i){var a=ZR(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=Cg(o.get(`padding`)||0),c=o.getFont(),l=yn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),XR(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Qf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function XR(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function ZR(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Ey(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),V(o)?a=o.replace(`{value}`,a):me(o)&&(a=o(s))}return a}function QR(e,t,n){var r=_t();return St(r,r,n.rotation),xt(r,r,n.position),_f([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function $R(e,t,n,r,i,a){var o=fx.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),YR(t,r,i,a,{position:QR(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function ez(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function tz(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function nz(e,t,n){return Ub(e,{fromStat:{sers:z(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function rz(e,t,n){return[ms(ps(t[0],t[1]),e-n/2),ps(e+n/2,ms(t[0],t[1]))]}var iz=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=az(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=JR(r),f=oz[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}$R(t,e,xx(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=xx(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=QR(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=az(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=ps(o[1],l[c]),l[c]=ms(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(HR);function az(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var oz={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:ez([t,r[0]],[t,r[1]],sz(e))}},shadow:function(e,t,n,r,i,a){var o=nz(e,i,a),s=r[1]-r[0],c=rz(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:tz([l,r[0]],[u-l,s],sz(e))}}};function sz(e){return e.dim===`x`?0:1}var cz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:g_.color.border,width:1,type:`dashed`},shadowStyle:{color:g_.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:g_.color.neutral00,padding:[5,7,5,7],backgroundColor:g_.color.accent60,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:g_.color.accent40,throttle:40}},t}(Vg),lz=Ec(),uz=R;function dz(e,t,n){if(!We.node){var r=t.getZr();lz(r).records||(lz(r).records={}),fz(r,t);var i=lz(r).records[e]||(lz(r).records[e]={});i.handler=n}}function fz(e,t){if(lz(e).initialized)return;lz(e).initialized=!0,n(`click`,pe(hz,`click`)),n(`mousemove`,pe(hz,`mousemove`)),n(`mousewheel`,pe(hz,`mousewheel`)),n(`globalout`,mz);function n(n,r){e.on(n,function(n){var i=gz(t);uz(lz(e).records,function(e){e&&r(e,n,i.dispatchAction)}),pz(i.pendings,t)})}}function pz(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function mz(e,t,n){e.handler(`leave`,null,n)}function hz(e,t,n,r){t.handler(e,n,r)}function gz(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function _z(e,t){if(!We.node){var n=t.getZr();(lz(n).records||{})[e]&&(lz(n).records[e]=null)}}var vz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;dz(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){_z(`axisPointer`,t)},t.prototype.dispose=function(e,t){_z(`axisPointer`,t)},t.type=`axisPointer`,t}(LC);function yz(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Tc(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(z(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var bz=Ec();function xz(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||fe(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){jz(i)&&(i=yz({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=jz(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||jz(i),f={},p={},m={list:[],map:{}},h={showPointer:pe(wz,p),showTooltip:pe(Tz,m)};R(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);R(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=kz(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&Sz(e,o,h,!1,f)}})});var g={};return R(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&R(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,Az(t),Az(e)))),g[e.key]=a}})}),R(g,function(e,t){Sz(u[t],e,h,!0,f)}),Ez(p,u,f),Dz(m,i,e,o),Oz(u,o,n),f}}function Sz(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=Cz(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&I(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function Cz(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Ys(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),R(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function wz(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function Tz(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=PD(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function Ez(e,t,n){var r=n.axesInfo=[];R(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function Dz(e,t,n,r){if(jz(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function Oz(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=bz(r)[i]||{},o=bz(r)[i]={};R(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&R(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}R(a,function(e,t){!o[t]&&c.push(l(e))}),R(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function kz(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function Az(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function jz(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function Mz(e){ID.registerAxisPointerClass(`CartesianAxisPointer`,iz),e.registerComponentModel(cz),e.registerComponentView(vz),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=wD(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},xz)}function Nz(e){VE(qD),VE(Mz)}function Pz(e,t){var n=Cg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Go({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var Fz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:g_.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:g_.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:g_.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:g_.color.tertiary,fontSize:14}},t}(Vg);function Iz(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Lz(e){if(We.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function qz(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(We.transformSupported?``+Uz+i:`,left`+i+`,top`+i)),Hz+`:`+a}function Jz(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!We.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=We.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Uz+`:`+o+`;`:[[`top`,0],[`left`,0],[Rz,o]]}function Yz(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=we(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),R([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function Xz(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=A_(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(qz(a,n,r)),o&&i.push(`background-color:`+o),R([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Sg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(Yz(d)),f!=null&&i.push(`padding:`+Cg(f).join(`px `)+`px`),i.join(`;`)+`;`}function Zz(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&see(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var Qz=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(V(i)?document.querySelector(i):be(i)?i:me(i)&&i(e.getDom()));Zz(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;Kx(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Vz(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Wz+Xz(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+Jz(i[0],i[1],!0)+(`border-color:`+kg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(V(i)&&n.get(`trigger`)===`item`&&!Iz(n)&&(o=Kz(n,r,i)),V(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!We.node&&n.getDom()){var i=oB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=dB(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=rB;c.x=r.x,c.y=r.y,c.update(),el(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=yz(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(oB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&aB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(el(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;pw(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(el(e).dataIndex==null?el(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=fe(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=aB([t.tooltipOption],r),o=this._renderMode,s=[],c=C_(`section`,{blocks:[],noHeader:!0}),l=[],u=new j_;R(e,function(e){R(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=ZR(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=C_(`section`,{header:f,noHeader:!ke(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),R(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Ey(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,kg(m.color),o);var h=Qg(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=aB([a],r).get(`valueFormatter`);p.blocks.push(_?I({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=D_(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` +`).replace(Rd,``)}function Bd(e,t){return t=zd(t),zd(e)===t}function Vd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&zt(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:Ht(e,r,o);break;case`data`:if(t!==`object`){Ct(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Vd(e,t,`name`,a.name,a,null),Vd(e,t,`formEncType`,a.formEncType,a,null),Vd(e,t,`formMethod`,a.formMethod,a,null),Vd(e,t,`formTarget`,a.formTarget,a,null)):(Vd(e,t,`encType`,a.encType,a,null),Vd(e,t,`method`,a.method,a,null),Vd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Kt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Dd(`beforetoggle`,e),Dd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=ft(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);pt(c),Ud(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=ae.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+Mt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),pt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Mt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,pt(a),a):(r=n,(a=Cf.get(o))&&(r=f({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Ud(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=dR()}))(),pR=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],mR=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],hR=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],gR=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],_R=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],vR=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],yR={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},bR={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},xR={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},SR={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:pR,brand:mR,ok:hR,warn:gR,bad:_R,info:vR},defaultRadius:`md`,fontFamily:xR.body,fontFamilyMonospace:xR.display,headings:{fontFamily:xR.body,fontWeight:`600`},cursorType:`pointer`},CR=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":yR.light.muted},dark:{}}),wR=BA(SR);function TR({dark:e,children:t}){return(0,G.jsx)(RA,{theme:wR,cssVariablesResolver:CR,forceColorScheme:e?`dark`:`light`,children:(0,G.jsx)(mF,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function ER({title:e,summary:t,onRefresh:n,disabled:r}){return(0,G.jsxs)(sI,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,G.jsxs)(Pj,{miw:0,children:[(0,G.jsx)(GL,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,G.jsx)(hI,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,G.jsx)(rL,{label:`Refresh this view`,children:(0,G.jsx)(ZF,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,G.jsx)(eR,{size:15,weight:`bold`})})})]})}function DR({error:e,loading:t,retry:n}){return e?(0,G.jsx)(uI,{color:`bad`,m:`md`,radius:`md`,children:(0,G.jsxs)(sI,{justify:`space-between`,children:[(0,G.jsx)(hI,{size:`sm`,children:e}),n&&(0,G.jsx)(DI,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,G.jsxs)(kI,{mih:160,p:`xl`,children:[(0,G.jsx)(UF,{size:`sm`}),(0,G.jsx)(hI,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function OR({active:e,items:t,onChange:n}){return(0,G.jsx)(sF,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,G.jsx)(FL,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,G.jsx)(FL.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,G.jsx)(FL.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,G.jsx)(vI,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function kR({icon:e,title:t,children:n,tall:r=!1}){return(0,G.jsx)(kI,{mih:r?220:130,p:`xl`,children:(0,G.jsxs)(sI,{wrap:`nowrap`,children:[(0,G.jsx)(RL,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,G.jsxs)(Pj,{children:[(0,G.jsx)(hI,{fw:700,size:`sm`,children:t}),(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function AR({left:e,right:t}){return(0,G.jsxs)(sI,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function jR({label:e,value:t,color:n}){return(0,G.jsxs)(mF,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(hI,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function MR(e,t=8){let[n,r]=(0,W.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,W.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function NR({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,G.jsxs)(sI,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsxs)(hI,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,G.jsx)(XI,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function PR(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function FR(e){return yR[e?`dark`:`light`]}function IR(e){let t=e?5:7;return{ok:hR[t],warn:gR[t],bad:_R[t],info:vR[t]}}function LR(e,t){let n=bR[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}var RR=Ec(),zR=P,BR=fe,VR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Hu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=pe(HR,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}KR(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Ub(r).w>o)return!0;if(a){var s=jD(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=RR(e).pointerEl=new Qd[i.type](zR(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=RR(e).labelEl=new Xo(zR(t.label));e.add(i),WR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=RR(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=RR(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),WR(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=wf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){qx(e.event)},onmousedown:BR(this._onHandleDragMove,this,0,0),drift:BR(this._onHandleDragMove,this),ondragend:BR(this._onHandleDragEnd,this)}),n.add(r)),KR(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Rx(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){HR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,GR(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(GR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(GR(r)),RR(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),zx(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function HR(e,t,n,r){UR(RR(n).lastProp,r)||(RR(n).lastProp=r,t?Gd(n,r,e):(n.stopAnimation(),n.attr(r)))}function UR(e,t){if(_e(e)&&_e(t)){var n=!0;return R(t,function(t,r){n&&=UR(e[r],t)}),!!n}return e===t}function WR(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function GR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function KR(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function qR(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function JR(e,t,n,r,i){var a=XR(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=Cg(o.get(`padding`)||0),c=o.getFont(),l=yn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),YR(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Qf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function YR(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function XR(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Ey(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),V(o)?a=o.replace(`{value}`,a):me(o)&&(a=o(s))}return a}function ZR(e,t,n){var r=_t();return St(r,r,n.rotation),xt(r,r,n.position),_f([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function QR(e,t,n,r,i,a){var o=fx.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),JR(t,r,i,a,{position:ZR(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function $R(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function ez(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function tz(e,t,n){return Ub(e,{fromStat:{sers:z(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function nz(e,t,n){return[ms(ps(t[0],t[1]),e-n/2),ps(e+n/2,ms(t[0],t[1]))]}var rz=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=iz(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=qR(r),f=az[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}QR(t,e,xx(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=xx(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=ZR(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=iz(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=ps(o[1],l[c]),l[c]=ms(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(VR);function iz(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var az={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:$R([t,r[0]],[t,r[1]],oz(e))}},shadow:function(e,t,n,r,i,a){var o=tz(e,i,a),s=r[1]-r[0],c=nz(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ez([l,r[0]],[u-l,s],oz(e))}}};function oz(e){return e.dim===`x`?0:1}var sz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:h_.color.border,width:1,type:`dashed`},shadowStyle:{color:h_.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:h_.color.neutral00,padding:[5,7,5,7],backgroundColor:h_.color.accent60,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:h_.color.accent40,throttle:40}},t}(Vg),cz=Ec(),lz=R;function uz(e,t,n){if(!We.node){var r=t.getZr();cz(r).records||(cz(r).records={}),dz(r,t);var i=cz(r).records[e]||(cz(r).records[e]={});i.handler=n}}function dz(e,t){if(cz(e).initialized)return;cz(e).initialized=!0,n(`click`,pe(mz,`click`)),n(`mousemove`,pe(mz,`mousemove`)),n(`mousewheel`,pe(mz,`mousewheel`)),n(`globalout`,pz);function n(n,r){e.on(n,function(n){var i=hz(t);lz(cz(e).records,function(e){e&&r(e,n,i.dispatchAction)}),fz(i.pendings,t)})}}function fz(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function pz(e,t,n){e.handler(`leave`,null,n)}function mz(e,t,n,r){t.handler(e,n,r)}function hz(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function gz(e,t){if(!We.node){var n=t.getZr();(cz(n).records||{})[e]&&(cz(n).records[e]=null)}}var _z=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;uz(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){gz(`axisPointer`,t)},t.prototype.dispose=function(e,t){gz(`axisPointer`,t)},t.type=`axisPointer`,t}(LC);function vz(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Tc(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(z(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var yz=Ec();function bz(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||fe(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){Az(i)&&(i=vz({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=Az(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||Az(i),f={},p={},m={list:[],map:{}},h={showPointer:pe(Cz,p),showTooltip:pe(wz,m)};R(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);R(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=Oz(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&xz(e,o,h,!1,f)}})});var g={};return R(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&R(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,kz(t),kz(e)))),g[e.key]=a}})}),R(g,function(e,t){xz(u[t],e,h,!0,f)}),Tz(p,u,f),Ez(m,i,e,o),Dz(u,o,n),f}}function xz(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=Sz(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&I(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function Sz(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Ys(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),R(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function Cz(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function wz(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=PD(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function Tz(e,t,n){var r=n.axesInfo=[];R(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function Ez(e,t,n,r){if(Az(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function Dz(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=yz(r)[i]||{},o=yz(r)[i]={};R(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&R(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}R(a,function(e,t){!o[t]&&c.push(l(e))}),R(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function Oz(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function kz(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function Az(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function jz(e){ID.registerAxisPointerClass(`CartesianAxisPointer`,rz),e.registerComponentModel(sz),e.registerComponentView(_z),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=wD(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},bz)}function Mz(e){VE(qD),VE(jz)}function Nz(e,t){var n=Cg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Go({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var Pz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:h_.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:h_.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:h_.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:h_.color.tertiary,fontSize:14}},t}(Vg);function Fz(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Iz(e){if(We.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function Kz(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(We.transformSupported?``+Hz+i:`,left`+i+`,top`+i)),Vz+`:`+a}function qz(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!We.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=We.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Hz+`:`+o+`;`:[[`top`,0],[`left`,0],[Lz,o]]}function Jz(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=we(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),R([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function Yz(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=A_(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(Kz(a,n,r)),o&&i.push(`background-color:`+o),R([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Sg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(Jz(d)),f!=null&&i.push(`padding:`+Cg(f).join(`px `)+`px`),i.join(`;`)+`;`}function Xz(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&see(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var Zz=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(V(i)?document.querySelector(i):be(i)?i:me(i)&&i(e.getDom()));Xz(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;Kx(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Bz(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Uz+Yz(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+qz(i[0],i[1],!0)+(`border-color:`+kg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(V(i)&&n.get(`trigger`)===`item`&&!Fz(n)&&(o=Gz(n,r,i)),V(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!We.node&&n.getDom()){var i=aB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=uB(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=nB;c.x=r.x,c.y=r.y,c.update(),el(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=vz(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(aB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&iB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(el(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;pw(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(el(e).dataIndex==null?el(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=fe(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=iB([t.tooltipOption],r),o=this._renderMode,s=[],c=C_(`section`,{blocks:[],noHeader:!0}),l=[],u=new j_;R(e,function(e){R(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=XR(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=C_(`section`,{header:f,noHeader:!ke(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),R(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Ey(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,kg(m.color),o);var h=Zg(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=iB([a],r).get(`valueFormatter`);p.blocks.push(_?I({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=D_(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` -`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=el(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=aB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new j_;h.marker=g.makeTooltipMarker(`item`,kg(h.color),d);var _=Qg(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?D_(y?I({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=el(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(V(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=Th(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=aB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new j_;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(V(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=rg(m.axisValue,d,p)),d=Dg(d,n,!0)}else if(me(u)){var g=fe(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),me(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=Ts(t[0],s),r=Ts(t[1],c);else if(_e(t)){var p=t;p.width=l[0],p.height=l[1];var m=Fg(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(V(t)&&o){var h=lB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=sB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=uB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=uB(d)?l[1]/2:d===`bottom`?l[1]:0),Iz(e)){var h=cB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&R(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&R(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&R(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&R(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!We.node&&t.getDom()&&(zx(this,`_updatePosition`),this._tooltipContent.dispose(),_z(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(LC);function aB(e,t,n){var r=t.ecModel,i;n?(i=new yp(n,r,r),i=new yp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof yp&&(o=o.get(`tooltip`,!0)),V(o)&&(o={formatter:o}),o&&(i=new yp(o,i,r)))}return i}function oB(e,t){return e.dispatchAction||fe(t.dispatchAction,t)}function sB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function cB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function lB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function uB(e){return e===`center`||e===`middle`}function dB(e,t,n){var r=kc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=jc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=el(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function fB(e){VE(Mz),e.registerComponentModel(Fz),e.registerComponentView(iB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ve),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ve)}var pB=R;function mB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function hB(e,t,n){var r={};return pB(t,function(t){var a=r[t]=i();pB(e[t],function(e,r){if(ZD.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new ZD(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new ZD(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function gB(e,t,n){var r;R(n,function(e){t.hasOwnProperty(e)&&mB(t[e])&&(r=!0)}),r&&R(n,function(n){t.hasOwnProperty(n)&&mB(t[n])?e[n]=P(t[n]):delete e[n]})}function _B(e,t,n,r){var i={};return R(e,function(e){i[e]=ZD.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return uw(a,l,e)}function c(e,t){fw(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var vB=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},yB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&R(t,function(e,r){V(e)&&(e={type:e}),t[r]=F(e,vB(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:g_.size.m,align:`auto`,backgroundColor:g_.color.transparent,borderColor:g_.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:g_.color.disabled,inactiveBorderColor:g_.color.disabled,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:g_.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:g_.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:g_.color.tertiary,borderWidth:1,borderColor:g_.color.border},emphasis:{selectorLabel:{show:!0,color:g_.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Vg),bB=pe,xB=R,SB=Hu,CB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new SB),this.group.add(this._selectorGroup=new SB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=Lg(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Fg(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Fg(L({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Pz(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Le(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),xB(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` -`)){var p=new SB;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,bB(EB,f,null,r,d)).on(`mouseover`,bB(DB,m.name,null,r,d)).on(`mouseout`,bB(OB,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=el(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Kr(h.fill);_&&_[3]===0&&(_[3]=.2,h=I(I({},h),{fill:ei(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,bB(EB,null,f,r,d)).on(`mouseover`,bB(DB,null,f,r,d)).on(`mouseout`,bB(OB,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=el(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};el(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();xB(e,function(e){var r=e.type,i=new Xo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Xf(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),su(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=wB(c,r,o,s,d,m,u),y=new SB,b=r.getModel(`textStyle`);if(me(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(TB({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;V(w)&&w?T=w.replace(`{name}`,t??``):me(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Xo({style:Qf(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Go({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Mf({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),su(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Pg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Pg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(LC);function wB(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),xB(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:rT(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function TB(e){var t=e.icon||`roundRect`,n=z_(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=g_.color.neutral00,n.style.lineWidth=2),n}function EB(e,t,n,r){OB(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),DB(e,t,n,r)}function DB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function OB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function kB(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),AB(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){R(i,function(t,n){e[t?`select`:`unSelect`](n)}),AB(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function AB(e,t){var n=t||{};return R(e.getData(),function(t){var r=t.get(`name`);if(r!==` -`&&r!==``){var i=e.isSelected(r);n[r]=Be(n,r)?n[r]&&i:i}}),n}function jB(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,pe(kB,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,pe(kB,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,pe(kB,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,pe(kB,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,pe(kB,`unSelect`))}var MB=$c(NB);function NB(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=we(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Go({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Gd(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,V(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=RB[i],o=zB[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(CB);function VB(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function HB(e){VE(PB),e.registerComponentModel(FB),e.registerComponentView(BB),VB(e)}function UB(e){VE(PB),VE(HB)}var WB={get:function(e,t,n){var r=P((GB[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},GB={color:{active:[`#006edd`,`#e0ffff`],inactive:[g_.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},KB=ZD.mapVisual,qB=ZD.eachVisual,JB=B,YB=R,XB=As,ZB=ws,QB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&gB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=fe(e,this),this.controllerVisuals=hB(this.option.controller,t,e),this.targetVisuals=hB(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return YB(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=jc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return z(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){R(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(V(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(me(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=XB([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=le(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};F(r,n),F(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){JB(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},YB(r,function(e,t){if(ZD.isValidType(t)){var n=WB.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;YB(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&P(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&P(n)||(a?s[0]:[s[0],s[0]])),c.symbol=KB(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;qB(l,function(e){e>u&&(u=e)}),c.symbolSize=KB(l,function(e){return ZB(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:g_.color.transparent,borderColor:g_.color.borderTint,contentColor:g_.color.theme[0],inactiveColor:g_.color.disabled,borderWidth:0,padding:g_.size.m,textGap:10,precision:0,textStyle:{color:g_.color.secondary}},t}(Vg),$B=[20,140],eV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=$B[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=$B[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=As((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=tV(this,`outOfRange`,this.getExtent()),n=tV(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Hu(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);sV([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=oV(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=_f(n.handleLabelPoints[l],gf(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=oV(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=_f(c.indicatorLabelPoint,gf(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||hV(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=wc(u,d);this._dispatchHighDown(`downplay`,aV(f[0],n)),this._dispatchHighDown(`highlight`,aV(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(pw(e.target,function(e){var n=el(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function bV(e,t,n,r){for(var i=t.targetVisuals[r],a=ZD.prepareVisualTypes(i),o={color:dw(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(_V,vV),R(yV,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(SV))}function EV(e){e.registerComponentModel(eV),e.registerComponentView(fV),TV(e)}var DV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],OV[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=z(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=ZD.listVisualTypes(),i=this.isCategory();R(t.pieces,function(e){R(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),R(n,function(e,n){var r=!1;R(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&R(this.stateList,function(e){(t[e]||(t[e]={}))[n]=WB.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,R(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;R(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=ZD.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){ZD.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return R(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=_h(QB.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(QB),OV={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function kV(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var AV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ce(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),R(o.viewPieceList,function(o){var s=o.piece,u=new Hu;u.onclick=fe(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Xo({style:Qf(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:we(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),Pg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:aV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return iV(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Hu,o=this.visualMapModel.textStyleModel;a.add(new Xo({style:Qf(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=z(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=z_(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,R(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(nV);function jV(e){e.registerComponentModel(DV),e.registerComponentView(AV),TV(e)}function MV(e){VE(EV),VE(jV)}var NV={label:{enabled:!0},decal:{show:!1}},PV=Ec(),FV=Ec(),IV=$c(LV);function LV(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=FV(e).scope||(FV(e).scope={}),i=P(NV);F(i.label,e.getLocaleModel().get(`aria`),!1),F(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Le();e.eachSeries(function(e){e.isColorBySeries()||(PV(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(me(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Kg(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=PV(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Kg(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?I(I({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=L(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=UV:-c>=UV),f=c>0?c%UV:c%UV+UV,p=!1;p=d?!0:!si(u)&&f>=HV==!!l;var m=e+n*VV(a),h=t+r*BV(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*WV);if(d){var _=1/this._p,v=(l?1:-1)*(UV-_);this._add(`A`,n,r,g,1,+l,e+n*VV(a+v),t+r*BV(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*VV(o),b=t+r*BV(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function sH(e){return``}function cH(e,t){t||={};var n=t.newline?` -`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return oH(i,a)+(i===`style`?o||``:Th(o))+(t?``+n+z(t,function(e){return r(e)}).join(n)+n:``)+sH(i)}return r(e)}function lH(e,t,n){n||={};var r=n.newline?` -`:``,i=` {`+r,a=r+`}`,o=z(ue(e),function(t){return t+i+z(ue(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=z(ue(t),function(e){return`@keyframes `+e+i+z(ue(t[e]),function(n){return n+i+z(ue(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function uH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function dH(e,t,n,r){return aH(`svg`,`root`,{width:e,height:t,xmlns:$V,"xmlns:xlink":eH,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var fH=0;function pH(){return fH++}var mH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},hH=`transform-origin`;function gH(e,t,n){var r=I({},e.shape);I(r,t),e.buildPath(n,r);var i=new GV;return i.reset(Si(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function _H(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[hH]=n+`px `+r+`px`)}var vH={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function yH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function bH(e,t,n){var r=e.shape.paths,i={},a,o;if(R(r,function(e){var t=uH(n.zrId);t.animation=!0,SH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=ue(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=yH(i,n);return a.replace(o,s)}}function xH(e){return V(e)?mH[e]?`cubic-bezier(`+mH[e]+`)`:jr(e)?e:``:``}function SH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Dd){var s=bH(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return yH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+pH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function CH(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};wH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=ri(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),wH(r,t,n,!0)}}}function wH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+pH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var TH=Math.round;function EH(e){return e&&V(e.src)}function DH(e){return e&&me(e.toDataURL)}function OH(e,t,n,r){QV(function(i,a){var o=i===`fill`||i===`stroke`;o&&bi(a)?UH(t,e,i,r):o&&_i(a)?WH(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),HH(n,e,r)}function kH(e,t){var n=ene(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[rH+`silent`]=`true`))}function AH(e){return si(e[0]-1)&&si(e[1])&&si(e[2])&&si(e[3]-1)}function jH(e){return si(e[4])&&si(e[5])}function MH(e,t,n){if(t&&!(jH(t)&&AH(t))){var r=n?10:1e4;e.transform=AH(t)?`translate(`+TH(t[4]*r)/r+` `+TH(t[5]*r)/r+`)`:ui(t)}}function NH(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Oe(f,g),Oe(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=mt(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=aH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=P(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Ci(i);x&&(o.patternTransform=x);var S=aH(`pattern`,``,o,[d]),C=cH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=aH(`pattern`,T,o,[d])),t[n]=xi(T)}}function GH(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=aH(`clipPath`,a,o,[RH(e,n)])}t[`clip-path`]=xi(a)}function KH(e){return document.createTextNode(e)}function qH(e,t,n){e.insertBefore(t,n)}function JH(e,t){e.removeChild(t)}function YH(e,t){e.appendChild(t)}function XH(e){return e.parentNode}function ZH(e){return e.nextSibling}function QH(e,t){e.textContent=t}var $H=58,eU=120,tU=aH(``,``);function nU(e){return e===void 0}function rU(e){return e!==void 0}function iU(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function aU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function oU(e){var t,n=e.children,r=e.tag;if(rU(r)){var i=e.elm=iH(r);if(lU(tU,e),B(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,sU(e,m,n,i,c)):cU(e,t,r,a))}function dU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(lU(e,t),nU(t.text)?rU(r)&&rU(i)?r!==i&&uU(n,r,i):rU(i)?(rU(e.text)&&QH(n,``),sU(n,null,i,0,i.length-1)):rU(r)?cU(n,r,0,r.length-1):rU(e.text)&&QH(n,``):e.text!==t.text&&(rU(r)&&cU(n,r,0,r.length-1),QH(n,t.text)))}function fU(e,t){if(aU(e,t))dU(e,t);else{var n=e.elm,r=XH(n);oU(t),r!==null&&(qH(r,t.elm,ZH(n)),cU(r,[e],0,0))}return t}var pU=0,mU=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=hU(`configLayer`),this.storage=t,this._opts=n=I({},n),this.root=e,this._id=`zr`+pU++,this._oldVNode=dH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=iH(`svg`);lU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,fU(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return VH(e,uH(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=uH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=gU(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=aH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=z(ue(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(aH(`defs`,`defs`,{},c)),e.animation){var l=lH(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=aH(`style`,`stl`,{},[],l);a.push(u)}}return dH(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},cH(this.renderToVNode({animation:we(e.cssAnimation,!0),emphasis:we(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:we(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=xE(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}var yU=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function bU(e){return`${(e*100).toFixed(e>=.1?1:2)}%`}function xU(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(e>=100?0:1)}ms`}function SU(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}function CU(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}var wU=c({BIGINT_FORMAT_RANGES:()=>TW,CONSTANT_CATCH:()=>jW,Class:()=>DW,NUMBER_FORMAT_RANGES:()=>wW,aborted:()=>$U,allowsEval:()=>bW,assert:()=>Mre,assertEqual:()=>TU,assertIs:()=>Are,assertNever:()=>jre,assertNotEqual:()=>EU,assignProp:()=>FU,attachSchema:()=>rW,base64ToUint8Array:()=>uW,base64urlToUint8Array:()=>Vre,cached:()=>AU,captureStackTrace:()=>yW,cleanEnum:()=>Bre,cleanRegex:()=>MU,clone:()=>UU,cloneDef:()=>Pre,codePointLength:()=>oW,constantCatch:()=>_W,createTransparentProxy:()=>zre,defineLazy:()=>PU,defineLazyInternal:()=>hW,esc:()=>LU,escapeRegex:()=>HU,explicitlyAborted:()=>eW,extend:()=>JU,finalizeIssue:()=>iW,floatSafeRemainder:()=>NU,getElementAtPath:()=>Fre,getEnumValues:()=>OU,getLengthableOrigin:()=>sW,getParsedType:()=>xW,getSizableOrigin:()=>aW,hexToUint8Array:()=>Ure,hide:()=>mW,installLazyProp:()=>gW,isObject:()=>zU,isPlainObject:()=>BU,issue:()=>lW,joinValues:()=>K,jsonStringifyReplacer:()=>kU,members:()=>fW,merge:()=>XU,mergeDefs:()=>IU,normalizeParams:()=>q,nullish:()=>jU,numKeys:()=>Rre,objectClone:()=>Nre,omit:()=>qU,optionalKeys:()=>GU,own:()=>pW,parsedType:()=>cW,partial:()=>ZU,pick:()=>KU,prefixIssues:()=>tW,primitiveTypes:()=>CW,promiseAllObject:()=>Ire,propertyKeyTypes:()=>SW,randomString:()=>Lre,required:()=>QU,safeExtend:()=>YU,shallowClone:()=>VU,slugify:()=>RU,stringifyPrimitive:()=>WU,toZod:()=>DU,uint8ArrayToBase64:()=>dW,uint8ArrayToBase64url:()=>Hre,uint8ArrayToHex:()=>Wre,unwrapMessage:()=>nW});function TU(e){return e}function EU(e){return e}function DU(){return e=>e}function Are(e){}function jre(e){throw Error(`Unexpected value in exhaustive check`)}function Mre(e){}function OU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>WU(e)).join(t)}function kU(e,t){return typeof t==`bigint`?t.toString():t}function AU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function jU(e){return e==null}function MU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function NU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function Ire(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function zre(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function WU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function GU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function KU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return UU(e,IU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&FU(e,r,n.shape[r])}return FU(this,`shape`,e),e},checks:[]}))}function qU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return UU(e,IU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return FU(this,`shape`,r),r},checks:[]}))}function JU(e,t){if(!BU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return FU(this,`shape`,n),n}}))}function YU(e,t){if(!BU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return FU(this,`shape`,n),n}}))}function XU(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return FU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ZU(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return UU(t,IU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return FU(this,`shape`,i),i},checks:[]}))}function QU(e,t,n){return UU(t,IU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return FU(this,`shape`,i),i}}))}function $U(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function nW(e){return typeof e==`string`?e:e?.message}function rW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function uW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function fW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Gre(e,n,r.value)}}function pW(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function mW(e,t,n){return pW(e,t,n,!1)}function Gre(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:pW(this,t,n.bind(this))},set(e){pW(this,t,e)}})}function Kre(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function hW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&OW!==e._zod){OW=void 0;return}OW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,AW);let e=kW;kW=!1;try{let r=n(this);return kW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),kW||=e,r}catch(n){throw delete this[t],kW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function gW(e,t,n,r){let i=Kre(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function _W(e){let t=()=>e;return t[jW]=!0,t}var vW,yW,bW,xW,SW,CW,wW,TW,EW,DW,OW,kW,AW,jW,J=o((()=>{VW(),vW=Symbol(`evaluating`),yW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},bW=AU(()=>{if(BW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),xW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},SW=new Set([`string`,`number`,`symbol`]),CW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),wW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},TW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},EW=/[\uD800-\uDBFF]/,DW=class{constructor(...e){}},kW=!1,AW={configurable:!0,get(){kW=!0}},jW=`~constantCatch`}));function qre(e){let t=IW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return IW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){FW.value=new a(r);try{Object.defineProperty(n,"_zod",FW)}finally{FW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),fW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?qre(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function MW(e){return e&&Object.assign(BW,e),BW}var NW,PW,FW,IW,LW,RW,zW,BW,VW=o((()=>{J(),PW=Object.freeze({status:`aborted`}),FW={value:void 0,enumerable:!1},IW=`captureStackTrace`in Error?Error:null,LW=Symbol(`zod_brand`),RW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},zW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(NW=globalThis).__zod_globalConfig??(NW.__zod_globalConfig={}),BW=globalThis.__zod_globalConfig}));function Jre(){let e=this._zod;return e.message??=JSON.stringify(e.def,kU,2),e.message}function Yre(e){this._zod.message=e}function Xre(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function HW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xre(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function UW(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function KW(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${GW(e.path)}`);return t.join(` +`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=el(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=iB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new j_;h.marker=g.makeTooltipMarker(`item`,kg(h.color),d);var _=Zg(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?D_(y?I({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=el(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(V(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=Th(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=iB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new j_;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(V(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=rg(m.axisValue,d,p)),d=Dg(d,n,!0)}else if(me(u)){var g=fe(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),me(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=Ts(t[0],s),r=Ts(t[1],c);else if(_e(t)){var p=t;p.width=l[0],p.height=l[1];var m=Fg(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(V(t)&&o){var h=cB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=oB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=lB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=lB(d)?l[1]/2:d===`bottom`?l[1]:0),Fz(e)){var h=sB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&R(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&R(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&R(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&R(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!We.node&&t.getDom()&&(zx(this,`_updatePosition`),this._tooltipContent.dispose(),gz(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(LC);function iB(e,t,n){var r=t.ecModel,i;n?(i=new yp(n,r,r),i=new yp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof yp&&(o=o.get(`tooltip`,!0)),V(o)&&(o={formatter:o}),o&&(i=new yp(o,i,r)))}return i}function aB(e,t){return e.dispatchAction||fe(t.dispatchAction,t)}function oB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function sB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function cB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function lB(e){return e===`center`||e===`middle`}function uB(e,t,n){var r=kc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=jc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=el(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function dB(e){VE(jz),e.registerComponentModel(Pz),e.registerComponentView(rB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ve),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ve)}var fB=R;function pB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function mB(e,t,n){var r={};return fB(t,function(t){var a=r[t]=i();fB(e[t],function(e,r){if(ZD.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new ZD(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new ZD(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function hB(e,t,n){var r;R(n,function(e){t.hasOwnProperty(e)&&pB(t[e])&&(r=!0)}),r&&R(n,function(n){t.hasOwnProperty(n)&&pB(t[n])?e[n]=P(t[n]):delete e[n]})}function gB(e,t,n,r){var i={};return R(e,function(e){i[e]=ZD.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return uw(a,l,e)}function c(e,t){fw(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var _B=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},vB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&R(t,function(e,r){V(e)&&(e={type:e}),t[r]=F(e,_B(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:h_.size.m,align:`auto`,backgroundColor:h_.color.transparent,borderColor:h_.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:h_.color.disabled,inactiveBorderColor:h_.color.disabled,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:h_.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:h_.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:h_.color.tertiary,borderWidth:1,borderColor:h_.color.border},emphasis:{selectorLabel:{show:!0,color:h_.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Vg),yB=pe,bB=R,xB=Hu,SB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new xB),this.group.add(this._selectorGroup=new xB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=Lg(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Fg(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Fg(L({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Nz(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Le(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),bB(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` +`)){var p=new xB;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,yB(TB,f,null,r,d)).on(`mouseover`,yB(EB,m.name,null,r,d)).on(`mouseout`,yB(DB,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=el(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Kr(h.fill);_&&_[3]===0&&(_[3]=.2,h=I(I({},h),{fill:ei(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,yB(TB,null,f,r,d)).on(`mouseover`,yB(EB,null,f,r,d)).on(`mouseout`,yB(DB,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=el(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};el(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();bB(e,function(e){var r=e.type,i=new Xo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Xf(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),su(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=CB(c,r,o,s,d,m,u),y=new xB,b=r.getModel(`textStyle`);if(me(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(wB({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;V(w)&&w?T=w.replace(`{name}`,t??``):me(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Xo({style:Qf(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Go({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Mf({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),su(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Pg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Pg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(LC);function CB(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),bB(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:rT(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function wB(e){var t=e.icon||`roundRect`,n=z_(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=h_.color.neutral00,n.style.lineWidth=2),n}function TB(e,t,n,r){DB(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),EB(e,t,n,r)}function EB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function DB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function OB(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),kB(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){R(i,function(t,n){e[t?`select`:`unSelect`](n)}),kB(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function kB(e,t){var n=t||{};return R(e.getData(),function(t){var r=t.get(`name`);if(r!==` +`&&r!==``){var i=e.isSelected(r);n[r]=Be(n,r)?n[r]&&i:i}}),n}function AB(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,pe(OB,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,pe(OB,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,pe(OB,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,pe(OB,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,pe(OB,`unSelect`))}var jB=$c(MB);function MB(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=we(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Go({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Gd(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,V(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=LB[i],o=RB[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(SB);function BB(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function VB(e){VE(NB),e.registerComponentModel(PB),e.registerComponentView(zB),BB(e)}function HB(e){VE(NB),VE(VB)}var UB={get:function(e,t,n){var r=P((WB[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},WB={color:{active:[`#006edd`,`#e0ffff`],inactive:[h_.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},GB=ZD.mapVisual,KB=ZD.eachVisual,qB=B,JB=R,YB=As,XB=ws,ZB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&hB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=fe(e,this),this.controllerVisuals=mB(this.option.controller,t,e),this.targetVisuals=mB(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return JB(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=jc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return z(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){R(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(V(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(me(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=YB([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=le(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};F(r,n),F(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){qB(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},JB(r,function(e,t){if(ZD.isValidType(t)){var n=UB.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;JB(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&P(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&P(n)||(a?s[0]:[s[0],s[0]])),c.symbol=GB(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;KB(l,function(e){e>u&&(u=e)}),c.symbolSize=GB(l,function(e){return XB(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:h_.color.transparent,borderColor:h_.color.borderTint,contentColor:h_.color.theme[0],inactiveColor:h_.color.disabled,borderWidth:0,padding:h_.size.m,textGap:10,precision:0,textStyle:{color:h_.color.secondary}},t}(Vg),QB=[20,140],$B=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=QB[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=QB[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=As((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=eV(this,`outOfRange`,this.getExtent()),n=eV(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Hu(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);oV([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=aV(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=_f(n.handleLabelPoints[l],gf(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=aV(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=_f(c.indicatorLabelPoint,gf(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||mV(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=wc(u,d);this._dispatchHighDown(`downplay`,iV(f[0],n)),this._dispatchHighDown(`highlight`,iV(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(pw(e.target,function(e){var n=el(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function yV(e,t,n,r){for(var i=t.targetVisuals[r],a=ZD.prepareVisualTypes(i),o={color:dw(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(gV,_V),R(vV,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(xV))}function TV(e){e.registerComponentModel($B),e.registerComponentView(dV),wV(e)}var EV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],DV[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=z(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=ZD.listVisualTypes(),i=this.isCategory();R(t.pieces,function(e){R(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),R(n,function(e,n){var r=!1;R(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&R(this.stateList,function(e){(t[e]||(t[e]={}))[n]=UB.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,R(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;R(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=ZD.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){ZD.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return R(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=_h(ZB.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(ZB),DV={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function OV(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var kV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ce(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),R(o.viewPieceList,function(o){var s=o.piece,u=new Hu;u.onclick=fe(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Xo({style:Qf(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:we(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),Pg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:iV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return rV(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Hu,o=this.visualMapModel.textStyleModel;a.add(new Xo({style:Qf(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=z(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=z_(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,R(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(tV);function AV(e){e.registerComponentModel(EV),e.registerComponentView(kV),wV(e)}function jV(e){VE(TV),VE(AV)}var MV={label:{enabled:!0},decal:{show:!1}},NV=Ec(),PV=Ec(),FV=$c(IV);function IV(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=PV(e).scope||(PV(e).scope={}),i=P(MV);F(i.label,e.getLocaleModel().get(`aria`),!1),F(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Le();e.eachSeries(function(e){e.isColorBySeries()||(NV(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(me(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Gg(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=NV(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Gg(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?I(I({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=L(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=HV:-c>=HV),f=c>0?c%HV:c%HV+HV,p=!1;p=d?!0:!si(u)&&f>=VV==!!l;var m=e+n*BV(a),h=t+r*zV(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*UV);if(d){var _=1/this._p,v=(l?1:-1)*(HV-_);this._add(`A`,n,r,g,1,+l,e+n*BV(a+v),t+r*zV(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*BV(o),b=t+r*zV(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function oH(e){return``}function sH(e,t){t||={};var n=t.newline?` +`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return aH(i,a)+(i===`style`?o||``:Th(o))+(t?``+n+z(t,function(e){return r(e)}).join(n)+n:``)+oH(i)}return r(e)}function cH(e,t,n){n||={};var r=n.newline?` +`:``,i=` {`+r,a=r+`}`,o=z(ue(e),function(t){return t+i+z(ue(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=z(ue(t),function(e){return`@keyframes `+e+i+z(ue(t[e]),function(n){return n+i+z(ue(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function lH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function uH(e,t,n,r){return iH(`svg`,`root`,{width:e,height:t,xmlns:QV,"xmlns:xlink":$V,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var dH=0;function fH(){return dH++}var pH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},mH=`transform-origin`;function hH(e,t,n){var r=I({},e.shape);I(r,t),e.buildPath(n,r);var i=new WV;return i.reset(Si(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function gH(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[mH]=n+`px `+r+`px`)}var _H={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function vH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function yH(e,t,n){var r=e.shape.paths,i={},a,o;if(R(r,function(e){var t=lH(n.zrId);t.animation=!0,xH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=ue(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=vH(i,n);return a.replace(o,s)}}function bH(e){return V(e)?pH[e]?`cubic-bezier(`+pH[e]+`)`:jr(e)?e:``:``}function xH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Dd){var s=yH(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return vH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+fH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function SH(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};CH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=ri(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),CH(r,t,n,!0)}}}function CH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+fH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var wH=Math.round;function TH(e){return e&&V(e.src)}function EH(e){return e&&me(e.toDataURL)}function DH(e,t,n,r){ZV(function(i,a){var o=i===`fill`||i===`stroke`;o&&bi(a)?HH(t,e,i,r):o&&_i(a)?UH(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),VH(n,e,r)}function OH(e,t){var n=ene(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[nH+`silent`]=`true`))}function kH(e){return si(e[0]-1)&&si(e[1])&&si(e[2])&&si(e[3]-1)}function AH(e){return si(e[4])&&si(e[5])}function jH(e,t,n){if(t&&!(AH(t)&&kH(t))){var r=n?10:1e4;e.transform=kH(t)?`translate(`+wH(t[4]*r)/r+` `+wH(t[5]*r)/r+`)`:ui(t)}}function MH(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Oe(f,g),Oe(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=mt(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=iH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=P(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Ci(i);x&&(o.patternTransform=x);var S=iH(`pattern`,``,o,[d]),C=sH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=iH(`pattern`,T,o,[d])),t[n]=xi(T)}}function WH(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=iH(`clipPath`,a,o,[LH(e,n)])}t[`clip-path`]=xi(a)}function GH(e){return document.createTextNode(e)}function KH(e,t,n){e.insertBefore(t,n)}function qH(e,t){e.removeChild(t)}function JH(e,t){e.appendChild(t)}function YH(e){return e.parentNode}function XH(e){return e.nextSibling}function ZH(e,t){e.textContent=t}var QH=58,$H=120,eU=iH(``,``);function tU(e){return e===void 0}function nU(e){return e!==void 0}function rU(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function iU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function aU(e){var t,n=e.children,r=e.tag;if(nU(r)){var i=e.elm=rH(r);if(cU(eU,e),B(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,oU(e,m,n,i,c)):sU(e,t,r,a))}function uU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(cU(e,t),tU(t.text)?nU(r)&&nU(i)?r!==i&&lU(n,r,i):nU(i)?(nU(e.text)&&ZH(n,``),oU(n,null,i,0,i.length-1)):nU(r)?sU(n,r,0,r.length-1):nU(e.text)&&ZH(n,``):e.text!==t.text&&(nU(r)&&sU(n,r,0,r.length-1),ZH(n,t.text)))}function dU(e,t){if(iU(e,t))uU(e,t);else{var n=e.elm,r=YH(n);aU(t),r!==null&&(KH(r,t.elm,XH(n)),sU(r,[e],0,0))}return t}var fU=0,pU=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=mU(`configLayer`),this.storage=t,this._opts=n=I({},n),this.root=e,this._id=`zr`+fU++,this._oldVNode=uH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=rH(`svg`);cU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,dU(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return BH(e,lH(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=lH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=hU(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=iH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=z(ue(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(iH(`defs`,`defs`,{},c)),e.animation){var l=cH(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=iH(`style`,`stl`,{},[],l);a.push(u)}}return uH(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},sH(this.renderToVNode({animation:we(e.cssAnimation,!0),emphasis:we(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:we(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=xE(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}var vU=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function yU(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function bU(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${bU(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function xU(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}function SU(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}var CU=c({BIGINT_FORMAT_RANGES:()=>TW,CONSTANT_CATCH:()=>jW,Class:()=>DW,NUMBER_FORMAT_RANGES:()=>wW,aborted:()=>$U,allowsEval:()=>bW,assert:()=>Mre,assertEqual:()=>wU,assertIs:()=>DU,assertNever:()=>jre,assertNotEqual:()=>TU,assignProp:()=>FU,attachSchema:()=>rW,base64ToUint8Array:()=>uW,base64urlToUint8Array:()=>Vre,cached:()=>AU,captureStackTrace:()=>yW,cleanEnum:()=>Bre,cleanRegex:()=>MU,clone:()=>UU,cloneDef:()=>Pre,codePointLength:()=>oW,constantCatch:()=>_W,createTransparentProxy:()=>zre,defineLazy:()=>PU,defineLazyInternal:()=>hW,esc:()=>LU,escapeRegex:()=>HU,explicitlyAborted:()=>eW,extend:()=>JU,finalizeIssue:()=>iW,floatSafeRemainder:()=>NU,getElementAtPath:()=>Fre,getEnumValues:()=>OU,getLengthableOrigin:()=>sW,getParsedType:()=>xW,getSizableOrigin:()=>aW,hexToUint8Array:()=>Ure,hide:()=>mW,installLazyProp:()=>gW,isObject:()=>zU,isPlainObject:()=>BU,issue:()=>lW,joinValues:()=>K,jsonStringifyReplacer:()=>kU,members:()=>fW,merge:()=>XU,mergeDefs:()=>IU,normalizeParams:()=>q,nullish:()=>jU,numKeys:()=>Rre,objectClone:()=>Nre,omit:()=>qU,optionalKeys:()=>GU,own:()=>pW,parsedType:()=>cW,partial:()=>ZU,pick:()=>KU,prefixIssues:()=>tW,primitiveTypes:()=>CW,promiseAllObject:()=>Ire,propertyKeyTypes:()=>SW,randomString:()=>Lre,required:()=>QU,safeExtend:()=>YU,shallowClone:()=>VU,slugify:()=>RU,stringifyPrimitive:()=>WU,toZod:()=>EU,uint8ArrayToBase64:()=>dW,uint8ArrayToBase64url:()=>Hre,uint8ArrayToHex:()=>Wre,unwrapMessage:()=>nW});function wU(e){return e}function TU(e){return e}function EU(){return e=>e}function DU(e){}function jre(e){throw Error(`Unexpected value in exhaustive check`)}function Mre(e){}function OU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>WU(e)).join(t)}function kU(e,t){return typeof t==`bigint`?t.toString():t}function AU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function jU(e){return e==null}function MU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function NU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function Ire(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function zre(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function WU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function GU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function KU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return UU(e,IU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&FU(e,r,n.shape[r])}return FU(this,`shape`,e),e},checks:[]}))}function qU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return UU(e,IU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return FU(this,`shape`,r),r},checks:[]}))}function JU(e,t){if(!BU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return FU(this,`shape`,n),n}}))}function YU(e,t){if(!BU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return FU(this,`shape`,n),n}}))}function XU(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return FU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ZU(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return UU(t,IU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return FU(this,`shape`,i),i},checks:[]}))}function QU(e,t,n){return UU(t,IU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return FU(this,`shape`,i),i}}))}function $U(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function nW(e){return typeof e==`string`?e:e?.message}function rW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function uW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function fW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Gre(e,n,r.value)}}function pW(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function mW(e,t,n){return pW(e,t,n,!1)}function Gre(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:pW(this,t,n.bind(this))},set(e){pW(this,t,e)}})}function Kre(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function hW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&OW!==e._zod){OW=void 0;return}OW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,AW);let e=kW;kW=!1;try{let r=n(this);return kW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),kW||=e,r}catch(n){throw delete this[t],kW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function gW(e,t,n,r){let i=Kre(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function _W(e){let t=()=>e;return t[jW]=!0,t}var vW,yW,bW,xW,SW,CW,wW,TW,EW,DW,OW,kW,AW,jW,J=o((()=>{VW(),vW=Symbol(`evaluating`),yW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},bW=AU(()=>{if(BW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),xW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},SW=new Set([`string`,`number`,`symbol`]),CW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),wW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},TW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},EW=/[\uD800-\uDBFF]/,DW=class{constructor(...e){}},kW=!1,AW={configurable:!0,get(){kW=!0}},jW=`~constantCatch`}));function qre(e){let t=IW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return IW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){FW.value=new a(r);try{Object.defineProperty(n,"_zod",FW)}finally{FW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),fW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?qre(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function MW(e){return e&&Object.assign(BW,e),BW}var NW,PW,FW,IW,LW,RW,zW,BW,VW=o((()=>{J(),PW=Object.freeze({status:`aborted`}),FW={value:void 0,enumerable:!1},IW=`captureStackTrace`in Error?Error:null,LW=Symbol(`zod_brand`),RW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},zW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(NW=globalThis).__zod_globalConfig??(NW.__zod_globalConfig={}),BW=globalThis.__zod_globalConfig}));function Jre(){let e=this._zod;return e.message??=JSON.stringify(e.def,kU,2),e.message}function Yre(e){this._zod.message=e}function Xre(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function HW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xre(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function UW(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function KW(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${GW(e.path)}`);return t.join(` `)}var qW,JW,YW,XW,ZW,QW,$W,eG=o((()=>{VW(),J(),qW={get:Jre,set:Yre,enumerable:!0,configurable:!0},JW={value:void 0,enumerable:!1},YW={value:void 0,enumerable:!1},XW=new WeakSet([Object.prototype,Error.prototype]),ZW=(e,t)=>{e.name=`$ZodError`,JW.value=e._zod,Object.defineProperty(e,"_zod",JW),YW.value=t,Object.defineProperty(e,"issues",YW),JW.value=void 0,YW.value=void 0,Object.defineProperty(e,"message",qW);let n=Object.getPrototypeOf(e);XW.has(n)||(XW.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},QW=Y(`$ZodError`,ZW),$W=Y(`$ZodError`,ZW,void 0,{Parent:Error})}));function tG(e,t){return{callee:t?.callee??e,Err:t?.Err}}function Zre(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[dG]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new RW;return a.issues.length===0}var nG,rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG=o((()=>{VW(),eG(),J(),nG=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new RW;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>iW(e,o,MW())));throw yW(n,a?.callee??t),n}return s.value};return t},rG=nG($W),iG=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>iW(e,o,MW())));throw yW(n,a?.callee??t),n}return s.value};return t},aG=iG($W),oG=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new RW;return a.issues.length?{success:!1,error:new(e??QW)(a.issues.map(e=>iW(e,i,MW())))}:{success:!0,data:a.value}},sG=oG($W),cG=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>iW(e,i,MW())))}:{success:!0,data:a.value}},lG=cG($W),uG=Symbol.for(`zod.compile.invalid`),dG=Symbol.for(`zod.compile.fallback`),fG=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==uG||Zre(e,t,n)}),pG=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},mG=e=>{let t=nG(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,tG(n,a))};return n},hG=mG($W),gG=e=>{let t=nG(e),n=(e,r,i,a)=>t(e,r,i,tG(n,a));return n},_G=gG($W),vG=e=>{let t=iG(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,tG(n,a))};return n},yG=vG($W),bG=e=>{let t=iG(e),n=async(e,r,i,a)=>await t(e,r,i,tG(n,a));return n},xG=bG($W),SG=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return oG(e)(t,n,i)},CG=SG($W),wG=e=>(t,n,r)=>oG(e)(t,n,r),TG=wG($W),EG=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return cG(e)(t,n,i)},DG=EG($W),OG=e=>async(t,n,r)=>cG(e)(t,n,r),kG=OG($W)})),jG=c({base64:()=>dK,base64url:()=>fK,bigint:()=>xK,boolean:()=>wK,browserEmail:()=>iK,cidrv4:()=>lK,cidrv6:()=>uK,creditCard:()=>_K,cuid:()=>BG,cuid2:()=>VG,date:()=>yK,datetime:()=>LG,domain:()=>mK,duration:()=>KG,e164:()=>gK,email:()=>$G,emoji:()=>NG,extendedDuration:()=>qG,guid:()=>JG,hex:()=>kK,hostname:()=>pK,html5Email:()=>eK,httpProtocol:()=>hK,idnEmail:()=>rK,integer:()=>SK,ipv4:()=>oK,ipv6:()=>sK,ksuid:()=>WG,lowercase:()=>DK,mac:()=>cK,md5_base64:()=>jK,md5_base64url:()=>MK,md5_hex:()=>AK,nanoid:()=>GG,nanoidOfLength:()=>MG,null:()=>TK,number:()=>CK,rfc5322Email:()=>tK,sha1_base64:()=>PK,sha1_base64url:()=>FK,sha1_hex:()=>NK,sha256_base64:()=>LK,sha256_base64url:()=>RK,sha256_hex:()=>IK,sha384_base64:()=>BK,sha384_base64url:()=>VK,sha384_hex:()=>zK,sha512_base64:()=>UK,sha512_base64url:()=>WK,sha512_hex:()=>HK,string:()=>bK,time:()=>IG,ulid:()=>HG,undefined:()=>EK,unicodeEmail:()=>nK,uppercase:()=>OK,uuid:()=>YG,uuid4:()=>XG,uuid6:()=>ZG,uuid7:()=>QG,xid:()=>UG});function MG(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function NG(){return new RegExp(aK,`u`)}function PG(e){return RegExp(`^${e}$`)}function FG(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function IG(e){return RegExp(`^${FG(e)}$`)}function LG(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${FG({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${FG({precision:e.precision})}`:n;return RegExp(`^${vK}T(?:${r})$`)}function RG(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function zG(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var BG,VG,HG,UG,WG,GG,KG,qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK=o((()=>{J(),BG=/^[cC][0-9a-z]{6,}$/,VG=/^[0-9a-z]+$/,HG=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,UG=/^[0-9a-vA-V]{20}$/,WG=/^[A-Za-z0-9]{27}$/,GG=/^[a-zA-Z0-9_-]{21}$/,KG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qG=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,JG=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,YG=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,XG=YG(4),ZG=YG(6),QG=YG(7),$G=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,tK=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,nK=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,rK=nK,iK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,aK=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,oK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,sK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,cK=e=>{let t=HU(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},lK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,uK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fK=/^[A-Za-z0-9_-]*$/,pK=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,mK=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,hK=/^https?$/,gK=/^\+[1-9]\d{6,14}$/,_K=/^\d(?:[ -]?\d){11,18}$/,vK=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,yK=PG(vK),bK=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},xK=/^-?\d+n?$/,SK=/^-?\d+$/,CK=/^-?\d+(?:\.\d+)?$/,wK=/^(?:true|false)$/i,TK=/^null$/i,EK=/^undefined$/i,DK=/^[^A-Z]*$/,OK=/^[^a-z]*$/,kK=/^[0-9a-fA-F]*$/,AK=/^[0-9a-fA-F]{32}$/,jK=RG(22,`==`),MK=zG(22),NK=/^[0-9a-fA-F]{40}$/,PK=RG(27,`=`),FK=zG(27),IK=/^[0-9a-fA-F]{64}$/,LK=RG(43,`=`),RK=zG(43),zK=/^[0-9a-fA-F]{96}$/,BK=RG(64,``),VK=zG(64),HK=/^[0-9a-fA-F]{128}$/,UK=RG(86,`==`),WK=zG(86)}));function KK(e,t,n){e.issues.length&&t.issues.push(...tW(n,e.issues))}var qK,JK,YK,XK,ZK,QK,$K,eq,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq=o((()=>{VW(),GK(),J(),qK=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),JK=e=>{let t=e.value;return!jU(t)&&t.size!==void 0},YK=e=>{let t=e.value;return!jU(t)&&t.length!==void 0},XK={number:`number`,bigint:`bigint`,object:`date`},ZK=Y(`$ZodCheckLessThan`,(e,t)=>{qK.init(e,t);let n=XK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{qK.init(e,t);let n=XK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:XK[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$K=Y(`$ZodCheckMultipleOf`,(e,t)=>{qK.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):NU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),eq=Y(`$ZodCheckNumberFormat`,(e,t)=>{qK.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=wW[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=SK)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),tq=Y(`$ZodCheckBigIntFormat`,(e,t)=>{qK.init(e,t);let[n,r]=TW[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),nq=Y(`$ZodCheckMaxSize`,(e,t)=>{var n;qK.init(e,t),(n=e._zod.def).when??(n.when=JK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:aW(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rq=Y(`$ZodCheckMinSize`,(e,t)=>{var n;qK.init(e,t),(n=e._zod.def).when??(n.when=JK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:aW(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),iq=Y(`$ZodCheckSizeEquals`,(e,t)=>{var n;qK.init(e,t),(n=e._zod.def).when??(n.when=JK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:aW(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),aq=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;qK.init(e,t),(n=e._zod.def).when??(n.when=YK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?oW(r):i)<=t.maximum)return;let a=sW(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),oq=Y(`$ZodCheckMinLength`,(e,t)=>{var n;qK.init(e,t),(n=e._zod.def).when??(n.when=YK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=sW(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sq=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;qK.init(e,t),(n=e._zod.def).when??(n.when=YK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?oW(r):i;if(a===t.length)return;let o=sW(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),cq=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;qK.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),lq=Y(`$ZodCheckRegex`,(e,t)=>{cq.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),uq=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=DK,cq.init(e,t)}),dq=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=OK,cq.init(e,t)}),fq=Y(`$ZodCheckIncludes`,(e,t)=>{qK.init(e,t);let n=HU(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),pq=Y(`$ZodCheckStartsWith`,(e,t)=>{qK.init(e,t);let n=RegExp(`^${HU(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),mq=Y(`$ZodCheckEndsWith`,(e,t)=>{qK.init(e,t);let n=RegExp(`.*${HU(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),hq=Y(`$ZodCheckProperty`,(e,t)=>{qK.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>KK(n,e,t.property));KK(n,e,t.property)}}),gq=Y(`$ZodCheckMimeType`,(e,t)=>{qK.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),_q=Y(`$ZodCheckOverwrite`,(e,t)=>{qK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),yq,bq=o((()=>{yq=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` `)}\n};`)(...Object.values(this.closed))}}})),xq,Sq=o((()=>{xq={major:4,minor:5,patch:4}}));function Cq(e){return{validate:t=>{try{return aJ(sG(e,t))}catch{return lG(e,t).then(aJ)}},vendor:`zod`,version:1}}function wq(e,t){if(!t.normalize&&t.protocol?.source===hK.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function Tq(e){return e.replace(dJ,``)}function Eq(e,t){return t.lastIndex=0,t.test(e.hostname)}function Dq(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function Oq(e){if(!TJ.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function kq(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Oq(n)}function Aq(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function jq(e){if(!fK.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Aq(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Mq(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Nq(e){return _K.test(e)?Mq(e.replace(NJ,``)):!1}function Pq(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Fq(e,t,n){e.issues.length&&t.issues.push(...tW(n,e.issues)),t.value[n]=e.value}function Iq(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...tW(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function Lq(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ZJ,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=GU(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Rq(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Iq(e,n,i,t,u,d))):Iq(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function zq(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!$U(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>iW(e,r,MW())))}),t)}function Bq(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>iW(e,r,MW())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Vq(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function Hq(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(BU(e)&&BU(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Hq(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Hq(t.value,n.value);if(!c.valid){if($U(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function Wq(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Gq(e,t,n){e.issues.length&&t.issues.push(...tW(n,e.issues)),t.value[n]=e.value}function Kq(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...tW(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function qq(e,t,n,r,i,a,o){e.issues.length&&(SW.has(typeof r)?n.issues.push(...tW(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>iW(e,o,MW()))})),t.issues.length&&(SW.has(typeof r)?n.issues.push(...tW(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>iW(e,o,MW()))})),n.value.set(e.value,t.value)}function Jq(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function Yq(e,t){return e.value=t.issues.length?void 0:t.value,e}function Xq(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Zq(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Qq(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>iW(e,r,MW()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function $q(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function eJ(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>tJ(e,r,t.out,n)):tJ(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>tJ(e,r,t.in,n)):tJ(e,r,t.in,n)}}function tJ(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function nJ(e){return e.memo||(e.value=Object.freeze(e.value)),e}function rJ(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(lW(e))}}var iJ,aJ,oJ,sJ,cJ,lJ,uJ,dJ,fJ,pJ,mJ,hJ,gJ,_J,vJ,yJ,bJ,xJ,SJ,CJ,wJ,TJ,EJ,DJ,OJ,kJ,AJ,jJ,MJ,NJ,PJ,FJ,IJ,LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,rY,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,kY,AY,jY=o((()=>{vq(),VW(),bq(),AG(),GK(),J(),Sq(),iJ=Y(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xq;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=$U(t),a;for(let o of n){if(o._zod.def.when){if(eW(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new RW;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(rW(t.issues,n,e),i||=$U(t,n))});else{if(t.issues.length===n)continue;rW(t.issues,n,e),i||=$U(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if($U(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new RW;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new RW;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return mW(this,`~standard`,Cq(this))},set"~standard"(e){pW(this,`~standard`,e)}}),aJ=e=>e.success?{value:e.data}:{issues:e.error?.issues},oJ=Y(`$ZodString`,(e,t)=>{iJ.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bK(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),sJ=Y(`$ZodStringFormat`,(e,t)=>{cq.init(e,t),oJ.init(e,t)}),cJ=Y(`$ZodGUID`,(e,t)=>{t.pattern??=JG,sJ.init(e,t)}),lJ=Y(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=YG(e)}else t.pattern??=YG();sJ.init(e,t)}),uJ=Y(`$ZodEmail`,(e,t)=>{t.pattern??=$G,sJ.init(e,t)}),dJ=/[\t\n\r]/g,fJ=Y(`$ZodURL`,(e,t)=>{sJ.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=wq(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Eq(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Dq(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Tq(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),pJ=Y(`$ZodEmoji`,(e,t)=>{t.pattern??=NG(),sJ.init(e,t)}),mJ=Y(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?GG:MG(t.length),sJ.init(e,t)}),hJ=Y(`$ZodCUID`,(e,t)=>{t.pattern??=BG,sJ.init(e,t)}),gJ=Y(`$ZodCUID2`,(e,t)=>{t.pattern??=VG,sJ.init(e,t)}),_J=Y(`$ZodULID`,(e,t)=>{t.pattern??=HG,sJ.init(e,t)}),vJ=Y(`$ZodXID`,(e,t)=>{t.pattern??=UG,sJ.init(e,t)}),yJ=Y(`$ZodKSUID`,(e,t)=>{t.pattern??=WG,sJ.init(e,t)}),bJ=Y(`$ZodISODateTime`,(e,t)=>{t.pattern??=LG(t),sJ.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),xJ=Y(`$ZodISODate`,(e,t)=>{t.pattern??=yK,sJ.init(e,t)}),SJ=Y(`$ZodISOTime`,(e,t)=>{t.pattern??=IG(t),sJ.init(e,t)}),CJ=Y(`$ZodISODuration`,(e,t)=>{t.pattern??=KG,sJ.init(e,t)}),wJ=Y(`$ZodIPv4`,(e,t)=>{t.pattern??=oK,sJ.init(e,t),e._zod.bag.format=`ipv4`}),TJ=/^[0-9a-fA-F:.]+$/,EJ=Y(`$ZodIPv6`,(e,t)=>{t.pattern??=sK,sJ.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Oq(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),DJ=Y(`$ZodMAC`,(e,t)=>{t.pattern??=cK(t.delimiter),sJ.init(e,t),e._zod.bag.format=`mac`}),OJ=Y(`$ZodCIDRv4`,(e,t)=>{t.pattern??=lK,sJ.init(e,t)}),kJ=Y(`$ZodCIDRv6`,(e,t)=>{t.pattern??=uK,sJ.init(e,t),e._zod.check=n=>{kq(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),AJ=Y(`$ZodBase64`,(e,t)=>{t.pattern??=dK,sJ.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Aq(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),jJ=Y(`$ZodBase64URL`,(e,t)=>{t.pattern??=fK,sJ.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{jq(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),MJ=Y(`$ZodE164`,(e,t)=>{t.pattern??=gK,sJ.init(e,t)}),NJ=/[- ]/g,PJ=Y(`$ZodCreditCard`,(e,t)=>{t.pattern??=_K,sJ.init(e,t),e._zod.check=n=>{Nq(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),FJ=Y(`$ZodJWT`,(e,t)=>{sJ.init(e,t),e._zod.check=n=>{Pq(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),IJ=Y(`$ZodCustomStringFormat`,(e,t)=>{sJ.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),LJ=Y(`$ZodNumber`,(e,t)=>{iJ.init(e,t),e._zod.pattern=e._zod.bag.pattern??CK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),RJ=Y(`$ZodNumberFormat`,(e,t)=>{eq.init(e,t),LJ.init(e,t)}),zJ=Y(`$ZodBoolean`,(e,t)=>{iJ.init(e,t),e._zod.pattern=wK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),BJ=Y(`$ZodBigInt`,(e,t)=>{iJ.init(e,t),e._zod.pattern=xK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),VJ=Y(`$ZodBigIntFormat`,(e,t)=>{tq.init(e,t),BJ.init(e,t)}),HJ=Y(`$ZodSymbol`,(e,t)=>{iJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),UJ=Y(`$ZodUndefined`,(e,t)=>{iJ.init(e,t),e._zod.pattern=EK,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),WJ=Y(`$ZodNull`,(e,t)=>{iJ.init(e,t),e._zod.pattern=TK,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),GJ=Y(`$ZodAny`,(e,t)=>{iJ.init(e,t),e._zod.parse=e=>e}),KJ=Y(`$ZodUnknown`,(e,t)=>{iJ.init(e,t),e._zod.parse=e=>e}),qJ=Y(`$ZodNever`,(e,t)=>{iJ.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),JJ=Y(`$ZodVoid`,(e,t)=>{iJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),YJ=Y(`$ZodDate`,(e,t)=>{iJ.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),XJ=Y(`$ZodArray`,(e,t)=>{iJ.init(e,t);let n=BW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;eFq(t,r,e))):Fq(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),ZJ=[],QJ=new WeakMap,$J=Y(`$ZodObject`,(e,t)=>{if(iJ.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;QJ.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),QJ.set(t,n),n}})}let n=AU(()=>Lq(t));hW(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||FU(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=zU,i=t.catchall,a,o=BW.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>Iq(n,t,e,c,r,i))):Iq(a,t,e,c,r,i)}return i?Rq(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),eY=Y(`$ZodObjectJIT`,(e,t)=>{$J.init(e,t);let n=e._zod.parse,r=AU(()=>Lq(t)),i=BW.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new yq([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` @@ -76,7 +76,7 @@ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=zU,c=!BW.jitless,l=c&&bW.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Rq([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}}),tY=Y(`$ZodUnion`,(e,t)=>{iJ.init(e,t),hW(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),hW(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),hW(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),hW(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>MU(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>zq(t,r,e,i)):zq(o,r,e,i)}}),nY=Y(`$ZodXor`,(e,t)=>{tY.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Bq(t,r,e,i)):Bq(o,r,e,i)}}),rY=Y(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,tY.init(e,t);let n=e._zod.parse;hW(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||FU(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=QJ.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=AU(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!zU(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),iY=Y(`$ZodIntersection`,(e,t)=>{iJ.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Uq(e,t,n)):Uq(e,i,a)}}),aY=Y(`$ZodTuple`,(e,t)=>{iJ.init(e,t);let n=t.items,r=BW.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=Wq(n,`optin`),l=Wq(n,`optout`);if(!t.rest){if(o.lengthn.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>Gq(t,i,e))):Gq(r,i,e)}}return s.length?Promise.all(s).then(()=>Kq(u,i,n,o,l)):Kq(u,i,n,o,l)}}),oY=Y(`$ZodRecord`,(e,t)=>{iJ.init(e,t);let n=BW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!BU(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>iW(e,i,MW())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...tW(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...tW(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&CK.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>iW(e,i,MW())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...tW(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...tW(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),sY=Y(`$ZodMap`,(e,t)=>{iJ.init(e,t);let n=BW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{qq(t,o,r,n,a,e,i)})):qq(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}}),cY=Y(`$ZodSet`,(e,t)=>{iJ.init(e,t);let n=BW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>Jq(e,r))):Jq(n,r)}return o.length?Promise.all(o).then(()=>r):r}}),lY=Y(`$ZodEnum`,(e,t)=>{iJ.init(e,t);let n=OU(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>SW.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>HU(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),uY=Y(`$ZodLiteral`,(e,t)=>{iJ.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?HU(e):e?HU(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),dY=Y(`$ZodFile`,(e,t)=>{iJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),fY=Y(`$ZodTransform`,(e,t)=>{iJ.init(e,t),e._zod.optin=`optional`,BW.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zW(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new RW;return n.value=i,n}}),pY=Y(`$ZodOptional`,(e,t)=>{iJ.init(e,t),hW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,hW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),hW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${MU(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Yq(e,t)):Yq(e,r)}return t.innerType._zod.run(e,n)}}),mY=Y(`$ZodExactOptional`,(e,t)=>{pY.init(e,t),hW(e,`values`,e=>e.def.innerType._zod.values),hW(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),hY=Y(`$ZodNullable`,(e,t)=>{iJ.init(e,t),hW(e,`optin`,e=>e.def.innerType._zod.optin),hW(e,`optout`,e=>e.def.innerType._zod.optout),hW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${MU(t.source)}|null)$`):void 0}),hW(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),gY=Y(`$ZodDefault`,(e,t)=>{iJ.init(e,t),e._zod.optin=`defaulted`,hW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Xq(e,t)):Xq(r,t)}}),_Y=Y(`$ZodPrefault`,(e,t)=>{iJ.init(e,t),e._zod.optin=`defaulted`,hW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),vY=Y(`$ZodNonOptional`,(e,t)=>{iJ.init(e,t),hW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Zq(t,e)):Zq(i,e)}}),yY=Y(`$ZodSuccess`,(e,t)=>{iJ.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new zW(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),bY=Y(`$ZodCatch`,(e,t)=>{iJ.init(e,t),hW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),hW(e,`optout`,e=>e.def.innerType._zod.optout),hW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Qq(e,r,t,n)):Qq(e,r,t,n)}}),xY=Y(`$ZodNaN`,(e,t)=>{iJ.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),SY=Y(`$ZodPipe`,(e,t)=>{iJ.init(e,t),hW(e,`values`,e=>e.def.in._zod.values),hW(e,`optin`,e=>e.def.in._zod.optin),hW(e,`optout`,e=>e.def.out._zod.optout),hW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>$q(e,t.in,n)):$q(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>$q(e,t.out,n)):$q(r,t.out,n)}}),CY=Y(`$ZodCodec`,(e,t)=>{iJ.init(e,t),hW(e,`values`,e=>e.def.in._zod.values),hW(e,`optin`,e=>e.def.in._zod.optin),hW(e,`optout`,e=>e.def.out._zod.optout),hW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>eJ(e,t,n)):eJ(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>eJ(e,t,n)):eJ(r,t,n)}}}),wY=Y(`$ZodPreprocess`,(e,t)=>{SY.init(e,t)}),TY=Y(`$ZodReadonly`,(e,t)=>{iJ.init(e,t),hW(e,`propValues`,e=>e.def.innerType._zod.propValues),hW(e,`values`,e=>e.def.innerType._zod.values),hW(e,`optin`,e=>e.def.innerType?._zod?.optin),hW(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(nJ):nJ(r)}}),EY=Y(`$ZodTemplateLiteral`,(e,t)=>{iJ.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||CW.has(typeof e))n.push(HU(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),DY=Y(`$ZodFunction`,(e,t)=>(iJ.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?rG(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?rG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await aG(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await aG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new aY({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),OY=Y(`$ZodPromise`,(e,t)=>{iJ.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),kY=Y(`$ZodLazy`,(e,t)=>{iJ.init(e,t),PU(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),hW(e,`pattern`,e=>e.innerType?._zod?.pattern),hW(e,`propValues`,e=>e.innerType?._zod?.propValues),hW(e,`optin`,e=>e.innerType?._zod?.optin??void 0),hW(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),AY=Y(`$ZodCustom`,(e,t)=>{qK.init(e,t),iJ.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>rJ(t,n,r,e));rJ(i,n,r,e)}})}));function MY(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function NY(e,t){let n=VY.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&NY(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),VY.set(e,r),r}function PY(e){return NY(e,new Set)}function FY(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}function IY(){return WY}function LY(e,t){let n=e[zY]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var RY,zY,BY,VY,HY,UY,WY,GY=o((()=>{RY=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},zY=`~memo`,BY=[],VY=new WeakMap,UY=[],WY={alloc(e,t,n){let r=HY;if(!r)return n;HY=void 0;let i={value:n,issues:null};return r.set(t.value,i),UY.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&LY(n,e.value))throw new RY;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=NY(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[zY];l||(l={buckets:new Map,backEdges:void 0},s[zY]=l);let u;r===s?u=i:(u=FY(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...MY(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;HY=u;let f=UY.length,p=t(o,s);HY=void 0;let m=UY.length>f?UY.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?MY(e.issues):BY),e)):(m&&(m.issues=p.issues.length?MY(p.issues):BY),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}}}));function KY(){return{localeError:qY()}}var qY,JY=o((()=>{J(),qY=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`},map:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,mac:`عنوان MAC`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,credit_card:`رقم بطاقة الائتمان`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${WU(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function YY(){return{localeError:XY()}}var XY,ZY=o((()=>{J(),XY=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`},map:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`kredit kartı nömrəsi`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${WU(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function QY(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function $Y(){return{localeError:eX()}}var eX,tX=o((()=>{J(),eX=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},map:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,mac:`MAC адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,credit_card:`нумар крэдытнай карты`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${WU(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=QY(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=QY(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function nX(){return{localeError:rX()}}var rX,iX=o((()=>{J(),rX=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`},map:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,credit_card:`номер на кредитна карта`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${WU(e.values[0])}`:`Невалидна опция: очаквано едно от ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function aX(){return{localeError:oX()}}var oX,sX=o((()=>{J(),oX=()=>{let e={string:{unit:`অক্ষর`,verb:`থাকতে হবে`},file:{unit:`বাইট`,verb:`থাকতে হবে`},array:{unit:`আইটেম`,verb:`থাকতে হবে`},set:{unit:`আইটেম`,verb:`থাকতে হবে`},map:{unit:`এন্ট্রি`,verb:`থাকতে হবে`}};function t(t){return e[t]??null}let n={regex:`ইনপুট`,email:`ইমেইল ঠিকানা`,url:`URL`,emoji:`ইমোজি`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO তারিখ ও সময়`,date:`ISO তারিখ`,time:`ISO সময়`,duration:`ISO সময়কাল`,ipv4:`IPv4 ঠিকানা`,ipv6:`IPv6 ঠিকানা`,mac:`MAC ঠিকানা`,cidrv4:`IPv4 রেঞ্জ`,cidrv6:`IPv6 রেঞ্জ`,base64:`base64-এনকোডেড স্ট্রিং`,base64url:`base64url-এনকোডেড স্ট্রিং`,json_string:`JSON স্ট্রিং`,e164:`E.164 নম্বর`,credit_card:`ক্রেডিট কার্ড নম্বর`,jwt:`JWT`,template_literal:`ইনপুট`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${t}, প্রাপ্ত ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`অবৈধ ইনপুট: প্রত্যাশিত ${WU(e.values[0])}`:`অবৈধ অপশন: ${K(e.values,` | `)} এর মধ্যে একটি প্রত্যাশিত`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} ${r.unit??`এলিমেন্ট`} হতে হবে`:`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} হতে হবে`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} হতে হবে`:`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} হতে হবে`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`অবৈধ স্ট্রিং: "${t.prefix}" দিয়ে শুরু হতে হবে`:t.format===`ends_with`?`অবৈধ স্ট্রিং: "${t.suffix}" দিয়ে শেষ হতে হবে`:t.format===`includes`?`অবৈধ স্ট্রিং: "${t.includes}" অন্তর্ভুক্ত থাকতে হবে`:t.format===`regex`?`অবৈধ স্ট্রিং: ${t.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${n[t.format]??e.format}`}case`not_multiple_of`:return`অবৈধ নম্বর: ${e.divisor} এর গুণিতক হতে হবে`;case`unrecognized_keys`:return`অচেনা কী${e.keys.length>1?`গুলো`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} এ অবৈধ কী`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${e.options.map(e=>`'${e}'`).join(` | `)}`:`অবৈধ ইনপুট`;case`invalid_element`:return`${e.origin} এ অবৈধ মান`;default:return`অবৈধ ইনপুট`}}}}));function cX(){return{localeError:lX()}}var lX,uX=o((()=>{J(),lX=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`},map:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,mac:`adreça MAC`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de targeta de crèdit`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${WU(e.values[0])}`:`Opció invàlida: s'esperava una de ${K(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function dX(){return{localeError:fX()}}var fX,pX=o((()=>{J(),fX=()=>{let e={string:{unit:`پیت`,verb:`بێت`},file:{unit:`بایت`,verb:`بێت`},array:{unit:`دانە`,verb:`بێت`},set:{unit:`دانە`,verb:`بێت`},map:{unit:`دانە`,verb:`بێت`}};function t(t){return e[t]??null}let n={regex:`regex`,email:`ئیمەیڵ`,url:`بەستەر (URL)`,emoji:`ئیمۆجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ڕێکەوت و کات`,date:`ڕێکەوت`,time:`کات`,duration:`ماوە`,ipv4:`ناونیشانی IPv4`,ipv6:`ناونیشانی IPv6`,mac:`ناونیشانی MAC`,cidrv4:`مەودای IPv4`,cidrv6:`مەودای IPv6`,base64:`دەقی base64`,base64url:`دەقی base64url`,json_string:`دەقی JSON`,e164:`ژمارەی E.164`,credit_card:`ژمارەی کارتی کرێدیت`,jwt:`JWT`,template_literal:`تێکردە`},r={nan:`NaN`,string:`نووسین`,number:`ژمارە`,boolean:`boolean`,array:`array`,object:`object`,date:`ڕێکەوت`,integer:`ژمارە`,float:`ژمارە`,null:`null`,undefined:`undefined`,function:`function`,symbol:`symbol`,unknown:`unknown`,promise:`promise`,void:`void`,never:`never`,map:`map`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n,a=[`ا`,`و`,`ۆ`,`وو`,`ە`,`ی`,`ێ`].some(e=>i.endsWith(e))?`یە`:`ە`,o=/^[a-zA-Z]+$/.test(i);return n===`null`||n===`undefined`?`داواکراوە`:`چاوەڕوانکراوە ${t} بێت، بەڵام ${i}${o?``:a}`}case`invalid_value`:return e.values.length===1?`بەهاکە نادرووستە: چاوەڕوانکراوە ${WU(e.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${K(e.values,`|`)}`;case`too_big`:{let n=t(e.origin);return n?`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} بێت`}case`too_small`:{let n=t(e.origin);return n?`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} بێت`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`دەقی نادروست: پێویستە دەستپێبکات بە "${t.prefix}"`:t.format===`ends_with`?`دەقی نادروست: پێویستە کۆتاییبێت بە "${t.suffix}"`:t.format===`includes`?`دەقی نادروست: پێویستە "${t.includes}" لەخۆبگرێت`:t.format===`regex`?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${t.pattern} بگونجێت`:`بەهای ${n[t.format]??e.format} نادروستە`}case`not_multiple_of`:return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${e.divisor}`;case`unrecognized_keys`:return`کلیلی نەناسراو: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلیلی نادروست لە ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${e.options.map(e=>`'${e}'`).join(` | `)}`:`یەکگرتنی نادروست`;case`invalid_element`:return`${e.origin} بەهاکە نادروستە`;default:return`تێکردەی نادروست`}}}}));function mX(){return{localeError:hX()}}var hX,gX=o((()=>{J(),hX=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`},map:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,credit_card:`číslo kreditní karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${WU(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function _X(){return{localeError:vX()}}var vX,yX=o((()=>{J(),vX=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`},map:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kreditkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${WU(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function bX(){return{localeError:xX()}}var xX,SX=o((()=>{J(),xX=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`},map:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,mac:`MAC-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,credit_card:`Kreditkartennummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${WU(e.values[0])}`:`Ungültige Option: erwartet eine von ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function CX(){return{localeError:wX()}}var wX,TX=o((()=>{J(),wX=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,credit_card:`αριθμός πιστωτικής κάρτας`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${WU(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function EX(){return{localeError:DX()}}var DX,OX=o((()=>{J(),DX=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(cW(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${WU(e.values[0])}`:`Invalid option: expected one of ${K(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function kX(){return{localeError:AX()}}var AX,jX=o((()=>{J(),AX=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`},map:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,mac:`MAC-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,credit_card:`kreditkarta numero`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${WU(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function MX(){return{localeError:NX()}}var NX,PX=o((()=>{J(),NX=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,mac:`dirección MAC`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de tarjeta de crédito`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${WU(e.values[0])}`:`Opción inválida: se esperaba una de ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function FX(){return{localeError:IX()}}var IX,LX=o((()=>{J(),IX=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`},map:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,mac:`MAC آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,credit_card:`شماره کارت اعتباری`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: می‌بایست ${WU(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${K(e.values,`|`)} می‌بود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function RX(){return{localeError:zX()}}var zX,BX=o((()=>{J(),zX=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},map:{unit:`alkiota`,subject:`kuvauksen`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,mac:`MAC-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,credit_card:`luottokortin numero`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${WU(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function VX(){return{localeError:HX()}}var HX,UX=o((()=>{J(),HX=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`expression régulière`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne de caractères encodée en base64`,base64url:`chaîne de caractères encodée en base64url`,json_string:`chaîne de caractères JSON`,e164:`numéro au format E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne de caractères`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`record`,map:`map`,set:`ensemble`,file:`fichier`,nonoptional:`non optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instance de ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${WU(e.values[0])} attendu`:`Option invalide : une valeur parmi ${K(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne de caractères invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne de caractères invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne de caractères invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne de caractères invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function WX(){return{localeError:GX()}}var GX,KX=o((()=>{J(),GX=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`},map:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${WU(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function qX(){return{localeError:JX()}}var JX,YX=o((()=>{J(),JX=()=>{let e={string:{unit:`અક્ષર`,verb:`હોવા જોઈએ`},file:{unit:`બાયટ`,verb:`હોવા જોઈએ`},array:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},set:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},map:{unit:`એન્ટ્રી`,verb:`હોવા જોઈએ`}};function t(t){return e[t]??null}let n={regex:`ઇનપુટ`,email:`ઈમેઇલ એડ્રેસ`,url:`URL`,emoji:`ઇમોજી`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO તારીખ અને સમય`,date:`ISO તારીખ`,time:`ISO સમય`,duration:`ISO અવધિ`,ipv4:`IPv4 એડ્રેસ`,ipv6:`IPv6 એડ્રેસ`,mac:`MAC એડ્રેસ`,cidrv4:`IPv4 શ્રેણી`,cidrv6:`IPv6 શ્રેણી`,base64:`base64-એન્કોડેડ સ્ટ્રિંગ`,base64url:`base64url-એન્કોડેડ સ્ટ્રિંગ`,json_string:`JSON સ્ટ્રિંગ`,e164:`E.164 નંબર`,credit_card:`ક્રેડિટ કાર્ડ નંબર`,jwt:`JWT`,template_literal:`ઇનપુટ`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${t}, પ્રાપ્ત ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`અમાન્ય ઇનપુટ: અપેક્ષિત ${WU(e.values[0])}`:`અમાન્ય વિકલ્પ: ${K(e.values,` | `)} માધ્યમથી એક અપેક્ષિત`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} ${r.unit??`એલિમેન્ટ`} હોવા જોઈએ`:`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} હોવું જોઈએ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} હોવું જોઈએ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`અમાન્ય સ્ટ્રિંગ: "${t.prefix}" થી શરૂ થવું જોઈએ`:t.format===`ends_with`?`અમાન્ય સ્ટ્રિંગ: "${t.suffix}" પર સમાપ્ત થવું જોઈએ`:t.format===`includes`?`અમાન્ય સ્ટ્રિંગ: "${t.includes}" શામેલ હોવું જોઈએ`:t.format===`regex`?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${t.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${n[t.format]??e.format}`}case`not_multiple_of`:return`અમાન્ય નંબર: ${e.divisor} નો ગુણાંક હોવો જોઈએ`;case`unrecognized_keys`:return`ઓળખી શકાતા નહીં તે કી${e.keys.length>1?`ઓ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} માં અમાન્ય કી`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${e.options.map(e=>`'${e}'`).join(` | `)}`:`અમાન્ય ઇનપુટ`;case`invalid_element`:return`${e.origin} માં અમાન્ય મૂલ્ય`;default:return`અમાન્ય ઇનપુટ`}}}}));function XX(){return{localeError:ZX()}}var ZX,QX=o((()=>{J(),ZX=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},uuidv4:{label:`UUIDv4`,gender:`m`},uuidv6:{label:`UUIDv6`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},mac:{label:`כתובת MAC`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},credit_card:{label:`מספר כרטיס אשראי`,gender:`m`},jwt:{label:`JWT`,gender:`m`},template_literal:{label:`קלט`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=cW(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${WU(t.values[0])}`;let e=t.values.map(e=>WU(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${K(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function $X(){return{localeError:eZ()}}var eZ,tZ=o((()=>{J(),eZ=()=>{let e={string:{unit:`अक्षर`,verb:`रखने के लिए`},file:{unit:`बाइट्स`,verb:`रखने के लिए`},array:{unit:`तत्व`,verb:`रखने के लिए`},set:{unit:`तत्व`,verb:`रखने के लिए`},map:{unit:`प्रविष्टियाँ`,verb:`रखने के लिए`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`ईमेल पता`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO तिथि और समय`,date:`ISO तिथि`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 पता`,ipv6:`IPv6 पता`,mac:`MAC पता`,cidrv4:`IPv4 श्रेणी`,cidrv6:`IPv6 श्रेणी`,base64:`Base64-एन्कोडेड स्ट्रिंग`,base64url:`Base64URL-एन्कोडेड स्ट्रिंग`,json_string:`JSON स्ट्रिंग`,e164:`E.164 संख्या`,credit_card:`क्रेडिट कार्ड संख्या`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${WU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} में ${n}${e.maximum} ${r.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} ${n}${e.maximum} हो`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`बहुत छोटा: अपेक्षित था कि ${e.origin} में ${n}${e.minimum} ${r.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${e.origin} ${n}${e.minimum} हो`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिंग: "${t.prefix}" से शुरू होना चाहिए`:t.format===`ends_with`?`अमान्य स्ट्रिंग: "${t.suffix}" पर समाप्त होना चाहिए`:t.format===`includes`?`अमान्य स्ट्रिंग: इसमें "${t.includes}" शामिल होना चाहिए`:t.format===`regex`?`अमान्य स्ट्रिंग: पैटर्न ${t.pattern} से मेल खाना चाहिए`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: यह ${e.divisor} का गुणज होना चाहिए`;case`unrecognized_keys`:return`अपरिचित कुंजी${e.keys.length>1?`याँ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुंजी: ${e.origin} में`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} में`;default:return`अमान्य इनपुट`}}}}));function nZ(){return{localeError:rZ()}}var rZ,iZ=o((()=>{J(),rZ=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,credit_card:`broj kreditne kartice`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${WU(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function aZ(){return{localeError:oZ()}}var oZ,sZ=o((()=>{J(),oZ=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`},map:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,mac:`MAC cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,credit_card:`hitelkártyaszám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${WU(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function cZ(e,t,n){return Math.abs(e)===1?t:n}function lZ(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function uZ(){return{localeError:dZ()}}var dZ,fZ=o((()=>{J(),dZ=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},map:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,mac:`MAC հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,credit_card:`կրեդիտ քարտի համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${WU(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=cZ(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${lZ(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${lZ(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=cZ(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${lZ(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${lZ(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${K(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${lZ(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${lZ(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function pZ(){return{localeError:mZ()}}var mZ,hZ=o((()=>{J(),mZ=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`},map:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,credit_card:`nomor kartu kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${WU(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function gZ(){return{localeError:_Z()}}var _Z,vZ=o((()=>{J(),_Z=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`},map:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,credit_card:`kreditkortanúmer`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${WU(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function yZ(){return{localeError:bZ()}}var bZ,xZ=o((()=>{J(),bZ=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`},map:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,mac:`indirizzo MAC`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,credit_card:`numero di carta di credito`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${WU(e.values[0])}`:`Opzione non valida: atteso uno tra ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function SZ(){return{localeError:CZ()}}var CZ,wZ=o((()=>{J(),CZ=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`},map:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,mac:`MACアドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,credit_card:`クレジットカード番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${WU(e.values[0])}が期待されました`:`無効な選択: ${K(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function TZ(){return{localeError:EZ()}}var EZ,DZ=o((()=>{J(),EZ=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},map:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,mac:`MAC მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,credit_card:`საკრედიტო ბარათის ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${WU(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${K(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function OZ(){return{localeError:kZ()}}var kZ,AZ=o((()=>{J(),kZ=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`},map:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,mac:`អាសយដ្ឋាន MAC`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,credit_card:`លេខប័ណ្ណឥណទាន`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${WU(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${K(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function jZ(){return OZ()}var MZ=o((()=>{AZ()}));function NZ(){return{localeError:PZ()}}var PZ,FZ=o((()=>{J(),PZ=()=>{let e={string:{unit:`ಅಕ್ಷರಗಳು`,verb:`ಹೊಂದಲು`},file:{unit:`ಬೈಟ್‌ಗಳು`,verb:`ಹೊಂದಲು`},array:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},set:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},map:{unit:`entries`,verb:`ಹೊಂದಲು`}};function t(t){return e[t]??null}let n={regex:`ಇನ್ಪುಟ್`,email:`email ವಿಳಾಸ`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ದಿನಾಂಕದ ಸಮಯ`,date:`ISO ದಿನಾಂಕ`,time:`ISO ಸಮಯ`,duration:`ISO ಅವಧಿ`,ipv4:`IPv4 ವಿಳಾಸ`,ipv6:`IPv6 ವಿಳಾಸ`,mac:`MAC ವಿಳಾಸ`,cidrv4:`IPv4 ವ್ಯಾಪ್ತಿಯ`,cidrv6:`IPv6 ವ್ಯಾಪ್ತಿಯ`,base64:`base64-encodedಸ್ಟ್ರಿಂಗ್`,base64url:`base64url-encodedಸ್ಟ್ರಿಂಗ್`,json_string:`JSONಸ್ಟ್ರಿಂಗ್`,e164:`E.164 ಸಂಖ್ಯೆ`,credit_card:`ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ`,jwt:`JWT`,template_literal:`ಇನ್ಪುಟ್`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${t}, ಸ್ವೀಕರಿಸಿದನು ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${WU(e.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಹೊಂದಲು ${n}${e.maximum.toString()} ${r.unit??`ಅಂಶಗಳು`}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಎಂದು ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಹೊಂದಲು ${n}${e.minimum.toString()} ${r.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಎಂದು ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${t.prefix}"`:t.format===`ends_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${t.suffix}"`:t.format===`includes`?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${t.includes}"`:t.format===`regex`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${t.pattern}`:`ಅಮಾನ್ಯ ${n[t.format]??e.format}`}case`not_multiple_of`:return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${e.divisor}`;case`unrecognized_keys`:return`ಗುರುತಿಸಲಾಗದ ಕೀ ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.options.map(e=>`'${e}'`).join(` | `)}`:`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`;case`invalid_element`:return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${e.origin}`;default:return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`}}}}));function IZ(){return{localeError:LZ()}}var LZ,RZ=o((()=>{J(),LZ=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`},map:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,mac:`MAC 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,credit_card:`신용카드 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${WU(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${K(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${K(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function zZ(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function BZ(){return{localeError:HZ()}}var VZ,HZ,UZ=o((()=>{J(),VZ=e=>e.charAt(0).toUpperCase()+e.slice(1),HZ=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,mac:`MAC adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,credit_card:`kredito kortelės numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${WU(e.values[0])}`:`Privalo būti vienas iš ${K(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,zZ(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${VZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${VZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,zZ(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${VZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${VZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:{let t=r[e.origin]??e.origin;return`${VZ(t??e.origin??`reikšmė`)} turi klaidingą įvestį`}default:return`Klaidinga įvestis`}}}}));function WZ(){return{localeError:GZ()}}var GZ,KZ=o((()=>{J(),GZ=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`},map:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,mac:`MAC адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,credit_card:`број на кредитна картичка`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${WU(e.values[0])}`:`Грешана опција: се очекува една ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function qZ(){return{localeError:JZ()}}var JZ,YZ=o((()=>{J(),JZ=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`},map:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,credit_card:`nombor kad kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${WU(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function XZ(){return{localeError:ZZ()}}var ZZ,QZ=o((()=>{J(),ZZ=()=>{let e={string:{unit:`अक्षर`,verb:`हुनुपर्छ`},file:{unit:`बाइट`,verb:`हुनुपर्छ`},array:{unit:`तत्व`,verb:`हुनुपर्छ`},set:{unit:`तत्व`,verb:`हुनुपर्छ`},map:{unit:`प्रविष्टि`,verb:`हुनुपर्छ`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`इमेल ठेगाना`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO मिति र समय`,date:`ISO मिति`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 ठेगाना`,ipv6:`IPv6 ठेगाना`,mac:`MAC ठेगाना`,cidrv4:`IPv4 दायरा`,cidrv6:`IPv6 दायरा`,base64:`base64-इन्कोड गरिएको स्ट्रिङ`,base64url:`base64url-इन्कोड गरिएको स्ट्रिङ`,json_string:`JSON स्ट्रिङ`,e164:`E.164 नम्बर`,credit_card:`क्रेडिट कार्ड नम्बर`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${WU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`धेरै ठूलो: ${e.origin??`मान`} मा ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`धेरै ठूलो: ${e.origin??`मान`} ${n}${e.maximum.toString()} हुनुपर्छ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`धेरै सानो: ${e.origin} मा ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`धेरै सानो: ${e.origin} ${n}${e.minimum.toString()} हुनुपर्छ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिङ: "${t.prefix}" बाट सुरु हुनुपर्छ`:t.format===`ends_with`?`अमान्य स्ट्रिङ: "${t.suffix}" मा समाप्त हुनुपर्छ`:t.format===`includes`?`अमान्य स्ट्रिङ: "${t.includes}" समावेश हुनुपर्छ`:t.format===`regex`?`अमान्य स्ट्रिङ: ढाँचा ${t.pattern} सँग मेल खानुपर्छ`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: ${e.divisor} को गुणज हुनुपर्छ`;case`unrecognized_keys`:return`अपरिचित कुञ्जी${e.keys.length>1?`हरू`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुञ्जी: ${e.origin} मा`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} मा`;default:return`अमान्य इनपुट`}}}}));function $Z(){return{localeError:eQ()}}var eQ,tQ=o((()=>{J(),eQ=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`},map:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,mac:`MAC-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,credit_card:`creditcardnummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${WU(e.values[0])}`:`Ongeldige optie: verwacht één van ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function nQ(){return{localeError:rQ()}}var rQ,iQ=o((()=>{J(),rQ=()=>{let e={string:{unit:`teikn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`element`,verb:`å innehalde`},set:{unit:`element`,verb:`å innehalde`},map:{unit:`element`,verb:`å innehalde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varigheit`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkoda streng`,base64url:`base64url-enkoda streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tal`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventa instanceof ${e.expected}, fekk ${i}`:`Ugyldig input: forventa ${t}, fekk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventa ${WU(e.values[0])}`:`Ugyldig val: forventa eitt av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må slutte med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må innehalde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tal: må vere eit multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjende nøklar`:`Ukjend nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function aQ(){return{localeError:oQ()}}var oQ,sQ=o((()=>{J(),oQ=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`},map:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${WU(e.values[0])}`:`Ugyldig valg: forventet en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function cQ(){return{localeError:lQ()}}var lQ,uQ=o((()=>{J(),lQ=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`},map:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,mac:`MAC nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,credit_card:`i'tibâr kartı numarası`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${WU(e.values[0])}`:`Fâsit tercih: mûteberler ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function dQ(){return{localeError:fQ()}}var fQ,pQ=o((()=>{J(),fQ=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`},map:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,mac:`د MAC پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,credit_card:`د کریډیټ کارت شمیره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${WU(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${K(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function mQ(){return{localeError:hQ()}}var hQ,gQ=o((()=>{J(),hQ=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`},map:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,mac:`adres MAC`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,credit_card:`numer karty kredytowej`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${WU(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function _Q(){return{localeError:vQ()}}var vQ,yQ=o((()=>{J(),vQ=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`o intervalo de endereços IPv4`,cidrv6:`o intervalo de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tuplo`,articles:r.masculine},record:{name:`registo`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`ficheiro`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(cW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${WU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar por "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar em "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function bQ(){return{localeError:xQ()}}var xQ,SQ=o((()=>{J(),xQ=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`a faixa de endereços IPv4`,cidrv6:`a faixa de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tupla`,articles:r.feminine},record:{name:`registro`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`arquivo`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(cW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${WU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Grande demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Grande demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Pequeno demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Pequeno demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function CQ(){return{localeError:wQ()}}var wQ,TQ=o((()=>{J(),wQ=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,credit_card:`număr de card de credit`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${WU(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${K(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function EQ(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function DQ(){return{localeError:OQ()}}var OQ,kQ=o((()=>{J(),OQ=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},map:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,credit_card:`номер кредитной карты`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${WU(e.values[0])}`:`Неверный вариант: ожидалось одно из ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=EQ(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=EQ(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function AQ(){return{localeError:jQ()}}var jQ,MQ=o((()=>{J(),jQ=()=>{let e={string:{unit:`znakov`,verb:`mať`},file:{unit:`bajtov`,verb:`mať`},array:{unit:`prvkov`,verb:`mať`},set:{unit:`prvkov`,verb:`mať`},map:{unit:`položiek`,verb:`mať`}};function t(t){return e[t]??null}let n={regex:`regulárny výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dátum a čas vo formáte ISO`,date:`dátum vo formáte ISO`,time:`čas vo formáte ISO`,duration:`doba trvania ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`reťazec zakódovaný vo formáte base64`,base64url:`reťazec zakódovaný vo formáte base64url`,json_string:`reťazec vo formáte JSON`,e164:`číslo E.164`,credit_card:`číslo kreditnej karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`reťazec`,function:`funkcia`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očakávané instanceof ${e.expected}, obdržané ${i}`:`Neplatný vstup: očakávané ${t}, obdržané ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očakávané ${WU(e.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí mať ${n}${e.maximum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí byť ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je príliš malá: ${e.origin??`hodnota`} musí mať ${n}${e.minimum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš malá: ${e.origin??`hodnota`} musí byť ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný reťazec: musí začínať na "${t.prefix}"`:t.format===`ends_with`?`Neplatný reťazec: musí končiť na "${t.suffix}"`:t.format===`includes`?`Neplatný reťazec: musí obsahovať "${t.includes}"`:t.format===`regex`?`Neplatný reťazec: musí zodpovedať vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí byť násobkom ${e.divisor}`;case`unrecognized_keys`:return`Neznáme klúče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klúč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function NQ(){return{localeError:PQ()}}var PQ,FQ=o((()=>{J(),PQ=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`},map:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,mac:`MAC naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,credit_card:`številka kreditne kartice`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${WU(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function IQ(){return{localeError:LQ()}}var LQ,RQ=o((()=>{J(),LQ=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`},map:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-adress`,ipv6:`IPv6-adress`,mac:`MAC-adress`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,credit_card:`kreditkortsnummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${WU(e.values[0])}`:`Ogiltigt val: förväntade en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function zQ(){return{localeError:BQ()}}var BQ,VQ=o((()=>{J(),BQ=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},map:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,mac:`MAC முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,credit_card:`கடன் அட்டை எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${WU(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${K(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function HQ(){return{localeError:UQ()}}var UQ,WQ=o((()=>{J(),UQ=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`},map:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,mac:`ที่อยู่ MAC`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,credit_card:`หมายเลขบัตรเครดิต`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${WU(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${K(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function GQ(){return{localeError:KQ()}}var KQ,qQ=o((()=>{J(),KQ=()=>{let e={string:{unit:`simwol`,verb:`bolmaly`},file:{unit:`baýt`,verb:`bolmaly`},array:{unit:`elementler`,verb:`bolmaly`},set:{unit:`elementler`,verb:`bolmaly`},map:{unit:`elementler`,verb:`bolmaly`}};function t(t){return e[t]??null}let n={regex:`giriş`,email:`e-poçta salgysy`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sene we wagt`,date:`ISO sene`,time:`ISO wagt`,duration:`ISO wagt aralygy`,ipv4:`IPv4 salgysy`,ipv6:`IPv6 salgysy`,mac:`MAC salgysy`,cidrv4:`IPv4 aralygy`,cidrv6:`IPv6 aralygy`,base64:`base64 bilen şifrlenen setir`,base64url:`base64url bilen şifrlenen setir`,json_string:`JSON setiri`,e164:`E.164 nomeri`,credit_card:`kredit kartynyň nomeri`,jwt:`JWT`,template_literal:`şablon`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`Nädogry baha: garaşylan ${t} ýerine ${r[n]??n} alyndy`}case`invalid_value`:return e.values.length===1?`Nädogry baha: ${WU(e.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()} ${r.unit??`element`}`:`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nädogry setir: "${t.prefix}" bilen başlamaly`:t.format===`ends_with`?`Nädogry setir: "${t.suffix}" bilen gutarmaly`:t.format===`includes`?`Nädogry setir: "${t.includes}" saklamaly`:t.format===`regex`?`Nädogry setir: ${t.pattern} nusga laýyk bolmaly`:`Nädogry ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nädogry san: ${e.divisor} bilen galyndysyz bölünmeli`;case`unrecognized_keys`:return`Tanalmaýan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde nädogry açar`;case`invalid_union`:return`Nädogry baha`;case`invalid_element`:return`${e.origin} içinde nädogry baha`;default:return`Nädogry baha`}}}}));function JQ(){return{localeError:YQ()}}var YQ,XQ=o((()=>{J(),YQ=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`},map:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,mac:`MAC adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,credit_card:`kredi kartı numarası`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${WU(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function ZQ(){return{localeError:QQ()}}var QQ,$Q=o((()=>{J(),QQ=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`},map:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,mac:`адреса MAC`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,credit_card:`номер кредитної картки`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${WU(e.values[0])}`:`Неправильна опція: очікується одне з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function e$(){return ZQ()}var t$=o((()=>{$Q()}));function n$(){return{localeError:r$()}}var r$,i$=o((()=>{J(),r$=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`},map:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,mac:`ایم اے سی ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,credit_card:`کریڈٹ کارڈ نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${WU(e.values[0])} متوقع تھا`:`غلط آپشن: ${K(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function a$(){return{localeError:o$()}}var o$,s$=o((()=>{J(),o$=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,credit_card:`kredit karta raqami`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${WU(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function c$(){return{localeError:l$()}}var l$,u$=o((()=>{J(),l$=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`},map:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,mac:`địa chỉ MAC`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,credit_card:`số thẻ tín dụng`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${WU(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${K(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function d$(){return{localeError:f$()}}var f$,p$=o((()=>{J(),f$=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`},map:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,mac:`MAC地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,credit_card:`信用卡号`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${WU(e.values[0])}`:`无效选项:期望以下之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function m$(){return{localeError:h$()}}var h$,g$=o((()=>{J(),h$=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`},map:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,mac:`MAC 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,credit_card:`信用卡號`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${WU(e.values[0])}`:`無效的選項:預期為以下其中之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function _$(){return{localeError:v$()}}var v$,y$=o((()=>{J(),v$=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`},map:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,mac:`àdírẹ́sì MAC`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,credit_card:`nọmba kaadi gbese`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${WU(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${K(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),b$=c({ar:()=>KY,az:()=>YY,be:()=>$Y,bg:()=>nX,bn:()=>aX,ca:()=>cX,ckb:()=>dX,cs:()=>mX,da:()=>_X,de:()=>bX,el:()=>CX,en:()=>EX,eo:()=>kX,es:()=>MX,fa:()=>FX,fi:()=>RX,fr:()=>VX,frCA:()=>WX,gu:()=>qX,he:()=>XX,hi:()=>$X,hr:()=>nZ,hu:()=>aZ,hy:()=>uZ,id:()=>pZ,is:()=>gZ,it:()=>yZ,ja:()=>SZ,ka:()=>TZ,kh:()=>jZ,km:()=>OZ,kn:()=>NZ,ko:()=>IZ,lt:()=>BZ,mk:()=>WZ,ms:()=>qZ,ne:()=>XZ,nl:()=>$Z,nn:()=>nQ,no:()=>aQ,ota:()=>cQ,pl:()=>mQ,ps:()=>dQ,pt:()=>_Q,ptBR:()=>bQ,ro:()=>CQ,ru:()=>DQ,sk:()=>AQ,sl:()=>NQ,sv:()=>IQ,ta:()=>zQ,th:()=>HQ,tk:()=>GQ,tr:()=>JQ,ua:()=>e$,uk:()=>ZQ,ur:()=>n$,uz:()=>a$,vi:()=>c$,yo:()=>_$,zhCN:()=>d$,zhTW:()=>m$}),x$=o((()=>{JY(),ZY(),tX(),iX(),sX(),uX(),pX(),gX(),yX(),SX(),TX(),OX(),jX(),PX(),LX(),BX(),UX(),KX(),YX(),QX(),tZ(),iZ(),sZ(),fZ(),hZ(),vZ(),xZ(),wZ(),DZ(),MZ(),AZ(),FZ(),RZ(),UZ(),KZ(),YZ(),QZ(),tQ(),iQ(),sQ(),uQ(),pQ(),gQ(),yQ(),SQ(),TQ(),kQ(),MQ(),FQ(),RQ(),VQ(),WQ(),qQ(),XQ(),t$(),$Q(),i$(),s$(),u$(),p$(),g$(),y$()}));function S$(){return new E$}var C$,w$,T$,E$,D$,O$=o((()=>{w$=Symbol(`ZodOutput`),T$=Symbol(`ZodInput`),E$=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(C$=globalThis).__zod_globalRegistry??(C$.__zod_globalRegistry=S$()),D$=globalThis.__zod_globalRegistry}));function k$(e,t){try{return M$(e,{assertOnly:!0})}catch{return t}}function A$(e,t){try{let t=M$(e),n=UU(e),r=e._zod.run,i=r.__originalRun??r,a=(e,n)=>{if(n?.async||n?.direction===`backward`||n?.skipChecks||n?.[G1]||n&&LY(n,e.value))return i(e,n);let r=t(e.value);return r===W1?(n&&(n[G1]=!0),i(e,n)):(e.value=r,e)};return a.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=k$(e,t),n._zod.run=a,r.__originalRun||j$(n,e,t),n}catch(n){if(t?.strict)throw n;return e}}function j$(e,t,n){let r=e,i=t;if(typeof i.safeParse==`function`){let e=i.safeParse;r.safeParse=(t,r)=>{let i=n(t);return i===W1?e(t,r):{success:!0,data:i}}}if(typeof i.parse==`function`){let e=i.parse;r.parse=(t,r)=>{let i=n(t);return i===W1?e(t,r):i}}}function M$(e,t){let n=!0;try{n=PY(e)}catch{}if(n)throw new q1(`a schema whose subtree contains a reference cycle`);let r={constants:new Map,constantCounter:0,varCounter:0},i=new yq([`input`]),a=e1(i,r,e,`input`,!t?.assertOnly);i.write(a===null?`return true;`:`return ${a};`);let o=[`INVALID`,...r.constants.keys()],s=[W1,...r.constants.values()],c=i.content.join(` `),l=t?.debug?o.length>0?`// Constants: ${o.join(`, `)}\n${c}`:c:``,u=Function,d=`return (input) => {\n${c}\n}`,f;try{f=new u(...o,d)(...s)}catch(e){throw new q1(`this schema (generated code failed to evaluate: ${e.message})`)}return t?.debug&&(f.code=l),f}function N$(e,t){for(let[n,r]of e.constants)if(r===t)return n;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function P$(e){return`v${e.varCounter++}`}function F$(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then==`function`)return W1;let r=n;return r.issues.length===0?r.value:W1}function I$(e,t,n,r,i=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return e1(e,t,n,r,i)}catch(i){if(!(i instanceof q1)||!i.islandable)throw i;if(e.content.length=a,t.constants.size>o){let e=Array.from(t.constants.keys()).slice(o);for(let n of e)t.constants.delete(n)}return t.constantCounter=s,t.varCounter=c,L$(e,t,n,r)}}function L$(e,t,n,r){let i=N$(t,n),a=N$(t,F$),o=P$(t);return e.write(`const ${o} = ${a}(${i}, ${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}function R$(e,t,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let a=r;for(let n of i){let r=n._zod.def;if(r.when&&!J1.has(r.check))throw new q1(`check with a custom "when" condition`);switch(r.check){case`greater_than`:H$(e,t,r,a);break;case`less_than`:U$(e,t,r,a);break;case`multiple_of`:W$(e,t,r,a);break;case`number_format`:G$(e,r,a);break;case`min_length`:{let n=B$(r.minimum,`min_length`),i=z$(e,t,a,`${a}.length >= ${n} && ${a}.length < ${r.minimum*2}`);e.write(`if (${i} < ${n}) return INVALID;`);break}case`max_length`:{let n=B$(r.maximum,`max_length`),i=z$(e,t,a,`${a}.length > ${n}`);e.write(`if (${i} > ${n}) return INVALID;`);break}case`length_equals`:{let n=B$(r.length,`length_equals`),i=z$(e,t,a,`${a}.length >= ${n} && ${a}.length <= ${r.length*2}`);e.write(`if (${i} !== ${n}) return INVALID;`);break}case`min_size`:e.write(`if (${a}.size < ${B$(r.minimum,`min_size`)}) return INVALID;`);break;case`max_size`:e.write(`if (${a}.size > ${B$(r.maximum,`max_size`)}) return INVALID;`);break;case`size_equals`:e.write(`if (${a}.size !== ${B$(r.size,`size_equals`)}) return INVALID;`);break;case`string_format`:a=$$(e,t,r,a);break;case`custom`:a=Q$(e,t,n,a);break;case`bigint_format`:K$(e,r,a);break;case`mime_type`:q$(e,t,r,a);break;case`property`:J$(e,t,r,a);break;case`overwrite`:{let r=P$(t);Y$(e,t,n,a,r),a=r;break}default:throw new q1(`check type ${r.check}`)}}return a}function z$(e,t,n,r){let i=N$(t,oW),a=P$(t);return e.write(`const ${a} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),a}function B$(e,t){if(typeof e!=`number`||!Number.isFinite(e))throw new q1(`${t} bound of type ${typeof e}`);return`${e}`}function V$(e,t){if(typeof t==`bigint`)return`${t}n`;if(typeof t==`number`){if(Number.isNaN(t))throw new q1(`comparison check with NaN bound`);return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new q1(`comparison check with Invalid Date bound`);return N$(e,t)}throw new q1(`comparison check bound of type ${typeof t}`)}function H$(e,t,n,r){let i=n.inclusive?`<`:`<=`;e.write(`if (${r} ${i} ${V$(t,n.value)}) return INVALID;`)}function U$(e,t,n,r){let i=n.inclusive?`>`:`>=`;e.write(`if (${r} ${i} ${V$(t,n.value)}) return INVALID;`)}function W$(e,t,n,r){if(typeof n.value==`bigint`){if(n.value===BigInt(0))throw new q1(`multiple_of check with a zero divisor`);e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=N$(t,NU);e.write(`if (${i}(${r}, ${B$(n.value,`multiple_of`)}) !== 0) return INVALID;`)}}function G$(e,t,n){let r=t.format;switch(r){case`safeint`:e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case`int32`:e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case`uint32`:e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case`float32`:e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case`float64`:e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new q1(`number format ${r}`)}}function K$(e,t,n){let r=t.format;if(r)switch(r){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new q1(`bigint format ${r}`)}}function q$(e,t,n,r){let i=n.mime;if(i&&i.length>0){let n=N$(t,new Set(i));e.write(`if (!${n}.has(${r}.type)) return INVALID;`)}}function J$(e,t,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;e1(e,t,n.schema,i)}function Y$(e,t,n,r,i){let a=n._zod.def.tx;if(!a)throw new q1(`overwrite check without a transform function`);if(z1(a))throw new K1(`z.compile: async overwrite transforms are not supported`);let o=N$(t,a);e.write(`const ${i} = ${o}(${r});`)}function X$(){throw new RW}function Z$(e){this.issues.push(e)}function Q$(e,t,n,r){let i=n._zod.def;if(i.fn){if(z1(i.fn))throw new K1(`z.compile: async .refine() predicates are not supported`);let n=N$(t,i.fn),a=N$(t,X$),o=P$(t);return e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`),r}if(n._zod.check){if(z1(n._zod.check))throw new K1(`z.compile: async .superRefine() / check functions are not supported`);let i=n._zod.check,a=N$(t,e=>{let t={value:e,issues:[],addIssue:Z$};return i(t)instanceof Promise&&X$(),t.issues.length===0?t.value:W1}),o=P$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}throw new q1(`custom check without a predicate or check function`)}function $$(e,t,n,r){let i=n.format;if(i===`base64`){let n=N$(t,Aq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`base64url`){let n=N$(t,jq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`jwt`){let i=N$(t,Pq),a=N$(t,n.alg??null);return e.write(`if (!${i}(${r}, ${a})) return INVALID;`),r}if(i===`ipv6`){let n=N$(t,Oq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`cidrv6`){let n=N$(t,kq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`credit_card`){let n=N$(t,Nq);return e.write(`if (!${n}(${r})) return INVALID;`),r}let a=n;if(i===`url`||i===`httpurl`||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let i=N$(t,wq),o=N$(t,n),s=P$(t),c=P$(t);if(e.write(`const ${s} = ${r}.trim();`),e.write(`const ${c} = ${i}(${s}, ${o});`),e.write(`if (typeof ${c} === "number") return INVALID;`),a.hostname!==void 0){let n=N$(t,Eq);e.write(`if (!${n}(${c}, ${o}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let n=N$(t,Dq);e.write(`if (!${n}(${c}, ${o}.protocol)) return INVALID;`)}let l=P$(t),u=a.normalize?`${c}.href`:`${N$(t,Tq)}(${s})`;return e.write(`const ${l} = ${u};`),l}let o=n.fn;if(o){if(z1(o))throw new q1(`async string format ${i}`);let n=N$(t,o);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(Y1.has(i)&&n.pattern){let i=N$(t,n.pattern);return e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${r})) return INVALID;`),r}let s=n.format;switch(s){case`regex`:throw new q1(`regex format without a pattern`);case`lowercase`:e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case`uppercase`:e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case`includes`:e.write(`if (!${r}.includes(${LU(n.includes)})) return INVALID;`);break;case`starts_with`:{let t=n.prefix;e.write(`if (${r}.slice(0, ${t.length}) !== ${LU(t)}) return INVALID;`);break}case`ends_with`:{let t=n.suffix;e.write(`if (${r}.slice(-${t.length}) !== ${LU(t)}) return INVALID;`);break}default:throw new q1(`string format ${s}`)}return r}function e1(e,t,n,r,i=!0){let a=n._zod.def,o=a.type;if(a.coerce)throw new q1(`coercion (z.coerce.${o}())`);let s=i||!!a.checks?.length,c;switch(o){case`string`:c=t1(e,t,n,r);break;case`number`:c=n1(e,n,r);break;case`boolean`:c=r1(e,r);break;case`bigint`:c=i1(e,n,r);break;case`symbol`:c=a1(e,r);break;case`undefined`:c=o1(e,r);break;case`null`:c=s1(e,r);break;case`any`:case`unknown`:c=r;break;case`never`:e.write(`return INVALID;`),c=r;break;case`void`:c=c1(e,r);break;case`nan`:c=l1(e,r);break;case`date`:c=u1(e,r);break;case`object`:c=d1(e,t,n,r,s);break;case`optional`:c=f1(e,t,n,r,s);break;case`nullable`:c=v1(e,t,n,r,s);break;case`array`:c=y1(e,t,n,r,s);break;case`literal`:c=b1(e,t,n,r);break;case`enum`:c=x1(e,t,n,r);break;case`readonly`:{let i=S1(e,t,n,r),a=P$(t);e.write(`const ${a} = Object.freeze(${i});`),c=a;break}case`success`:S1(e,t,n,r),c=`true`;break;case`default`:case`prefault`:c=C1(e,t,n,r);break;case`nonoptional`:c=w1(e,t,n,r);break;case`tuple`:c=T1(e,t,n,r);break;case`union`:c=D1(e,t,n,r);break;case`intersection`:c=A1(e,t,n,r);break;case`record`:c=j1(e,t,n,r);break;case`map`:c=N1(e,t,n,r);break;case`set`:c=P1(e,t,n,r);break;case`file`:c=F1(e,r);break;case`template_literal`:c=I1(e,t,n,r);break;case`lazy`:c=L1(e,t,n,r);break;case`pipe`:c=R1(e,t,n,r);break;case`custom`:c=B1(e,t,n,r);break;case`transform`:c=U1(e,t,n,r);break;case`catch`:c=H1(e,t,n,r);break;default:throw new q1(`schema type ${o}`)}return c===null?null:R$(e,t,n,c)}function t1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.def;return i.format===void 0?r:$$(e,t,i,r)}function n1(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check===`number_format`&&r.format&&G$(e,{format:r.format},n),n}function r1(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function i1(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`)}return n}function a1(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function o1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function s1(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function c1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function l1(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function u1(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function d1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=e=>typeof e==`symbol`?N$(t,e):LU(e),d=e=>typeof e==`symbol`?`[${u(e)}]`:LU(e),f=o;if(s.includes(`__proto__`))throw new q1(`object shape key "__proto__"`);let p=new Map;for(let n of l){let a=f[n],o=u(n),s=P$(t);if(e.write(`const ${s} = ${r}[${o}];`),a._zod.optin!==void 0){let i=P$(t);e.write(`let ${i} = (() => {`),e.indented(e=>{let n=I$(e,t,a,s);e.write(`return ${n};`)}),e.write(`})();`),a._zod.optout===`optional`?(e.write(`if (${i} === INVALID) {`),e.indented(e=>{e.write(`if (${o} in ${r}) return INVALID;`),e.write(`${i} = undefined;`)}),e.write(`}`)):e.write(`if (${i} === INVALID) return INVALID;`),p.set(n,i)}else{m1(a)&&e.write(`if (!(${o} in ${r})) return INVALID;`);let c=I$(e,t,a,s,i);c!==null&&p.set(n,c)}}let m=a.catchall,h=`none`;if(m){let t=m._zod.def.type;if(t===`never`){let t=s.map(e=>`k !== ${LU(e)}`).join(` && `)||`true`;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (${t}) return INVALID;`)}),e.write(`}`)}else h=(t===`unknown`||t===`any`)&&!m._zod.def.checks?.length?`passthrough`:`schema`}let g=P$(t),_=l.some(e=>_1(f[e])||g1(f[e]));if(!i){if(h===`schema`){let n=s.length>0?N$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`);let i=P$(t);e.write(`const ${i} = ${r}[k];`),I$(e,t,m,i,!1)}),e.write(`}`)}return null}if(_){e.write(`const ${g} = {};`);for(let t of l){let n=u(t),i=p.get(t);g1(f[t])?e.write(`if (${n} in ${r}) ${g}[${n}] = ${i};`):_1(f[t])?e.write(`if (${i} !== undefined || ${n} in ${r}) ${g}[${n}] = ${i};`):e.write(`${g}[${n}] = ${i};`)}}else{let t=l.map(e=>`${d(e)}: ${p.get(e)}`).join(`, `);e.write(`const ${g} = { ${t} };`)}if(h!==`none`){let n=s.length>0?N$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{if(e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`),h===`passthrough`)e.write(`${g}[k] = ${r}[k];`);else{let n=P$(t);e.write(`const ${n} = ${r}[k];`);let i=I$(e,t,m,n);e.write(`${g}[k] = ${i};`)}}),e.write(`}`)}return g}function f1(e,t,n,r,i=!0){let a=n._zod.def;if(p1(n))return e1(e,t,a.innerType,r,i);if(a.innerType._zod.optin===`defaulted`){let n=P$(t),i=P$(t);return e.write(`let ${n};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`const ${i} = (() => {`),e.indented(e=>{let n=e1(e,t,a.innerType,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${i} !== INVALID) ${n} = ${i};`)}),e.write(`} else {`),e.indented(e=>{let i=e1(e,t,a.innerType,r);e.write(`${n} = ${i};`)}),e.write(`}`),n}let o=i?P$(t):null;return o&&e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=e1(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function p1(e){return e._zod.traits?.has(`$ZodExactOptional`)===!0}function m1(e){return e._zod.optin===void 0&&h1(e)}function h1(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case`any`:case`unknown`:case`undefined`:case`void`:case`default`:case`prefault`:case`transform`:case`custom`:case`lazy`:return!0;case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`never`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:return!1;case`nonoptional`:return t.innerType?h1(t.innerType):!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:case`nullable`:case`readonly`:case`success`:return!t.innerType||h1(t.innerType);case`catch`:return!0;case`union`:return!t.options||t.options.some(h1);case`intersection`:return!t.left||!t.right||h1(t.left)&&h1(t.right);case`pipe`:return!t.in||h1(t.in);default:return!0}}function g1(e){return e._zod.optin===`optional`&&e._zod.optout===`optional`}function _1(e){let t=e._zod.def;switch(t.type){case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:case`never`:case`success`:return!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:return!0;case`nullable`:case`readonly`:case`nonoptional`:return!t.innerType||_1(t.innerType);case`union`:return!t.options||t.options.some(_1);case`intersection`:return!t.left||!t.right||_1(t.left)||_1(t.right);case`pipe`:return!t.out||_1(t.out);default:return!0}}function v1(e,t,n,r,i=!0){let a=n._zod.def,o=i?P$(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${r} !== null) {`),e.indented(e=>{let n=e1(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function y1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let o=i?P$(t):null,s=P$(t),c=P$(t);return o&&e.write(`const ${o} = new Array(${r}.length);`),e.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),e.indented(e=>{e.write(`const ${c} = ${r}[${s}];`);let n=I$(e,t,a.element,c,i);o&&n!==null&&e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function b1(e,t,n,r){let i=n._zod.def.values;if(i.length!==1){let n=N$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let a=i[0];if(typeof a==`number`&&Number.isNaN(a)){let n=N$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}if(typeof a==`string`)e.write(`if (${r} !== ${LU(a)}) return INVALID;`);else if(typeof a==`number`||typeof a==`boolean`)e.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a==`bigint`)e.write(`if (${r} !== ${a}n) return INVALID;`);else throw new q1(`literal type ${typeof a}`);return r}function x1(e,t,n,r){let i=n._zod.values;if(!i)throw new q1(`enum schema without enumerated values`);let a=N$(t,i);return e.write(`if (!${a}.has(${r})) return INVALID;`),r}function S1(e,t,n,r){let i=n._zod.def;return e1(e,t,i.innerType,r)}function C1(e,t,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,`defaultValue`)?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type===`prefault`){if(!a)return e1(e,t,i.innerType,r);let n=N$(t,a),o=P$(t);return e.write(`let ${o} = ${r};`),e.write(`if (${r} === undefined) ${o} = ${n}();`),e1(e,t,i.innerType,o)}let o=P$(t);if(a){let n=N$(t,a),s=N$(t,VU);e.write(`let ${o};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`${o} = ${s}(${n}());`)}),e.write(`} else {`),e.indented(e=>{let a=e1(e,t,i.innerType,r);e.write(`${o} = ${a} === undefined ? ${s}(${n}()) : ${a};`)}),e.write(`}`)}else e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=e1(e,t,i.innerType,r);e.write(`${o} = ${n};`)}),e.write(`}`);return o}function w1(e,t,n,r){let i=n._zod.def,a=e1(e,t,i.innerType,r),o=P$(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function T1(e,t,n,r){let i=n._zod.def,a=i.items,o=i.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let s=E1(a,`optin`),c=E1(a,`optout`);o?e.write(`if (${r}.length < ${s}) return INVALID;`):e.write(`if (${r}.length < ${s} || ${r}.length > ${a.length}) return INVALID;`);let l=P$(t);e.write(`const ${l} = [];`);for(let n=0;n=c)e.write(`if (${l}.length === ${n}) {`),e.indented(e=>{e.write(`if (${n} < ${r}.length) {`),e.indented(e=>{let a=P$(t);e.write(`const ${a} = ${r}[${n}];`);let o=I$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}),e.write(`} else {`),e.indented(e=>{if(g1(i)){e.write(`${l}.length = ${n};`);return}let r=P$(t),a=P$(t);e.write(`const ${r} = undefined;`),e.write(`const ${a} = (() => {`),e.indented(e=>{let n=I$(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${a} === INVALID || ${a} === undefined) ${l}.length = ${n};`),e.write(`else ${l}[${n}] = ${a};`)}),e.write(`}`)}),e.write(`}`);else{let a=P$(t);e.write(`const ${a} = ${r}[${n}];`);let o=I$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}}if(o){let n=P$(t),i=P$(t);e.write(`for (let ${n} = ${a.length}; ${n} < ${r}.length; ${n}++) {`),e.indented(e=>{e.write(`const ${i} = ${r}[${n}];`);let a=I$(e,t,o,i);e.write(`${l}[${n}] = ${a};`)}),e.write(`}`)}return l}function E1(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function D1(e,t,n,r){let i=n._zod.def,a=i.options;if(i.discriminator)return O1(e,t,i,r);if(i.inclusive===!1)throw new q1(`exclusive unions (z.xor)`);if(a.length===0)return e.write(`return INVALID;`),r;if(a.length===1)return e1(e,t,a[0],r);if(a.every(e=>e._zod.def.type===`literal`&&!e._zod.def.checks?.length)){let n=N$(t,new Set(a.flatMap(e=>e._zod.def.values)));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let o=P$(t);e.write(`let ${o};`);for(let n=0;n {`):e.write(`if (${o} === INVALID) ${o} = (() => {`),e.indented(e=>{let n=e1(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`)}return e.write(`if (${o} === INVALID) return INVALID;`),o}function O1(e,t,n,r){if(n.unionFallback)throw new q1(`discriminated union with unionFallback`);if(n.options.length===0)return e.write(`return INVALID;`),r;let i=P$(t),a=P$(t);e.write(`const ${i} = ${r}?.[${LU(n.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of n.options){let l=c._zod.propValues?.[n.discriminator];if(!l||l.size===0)throw new q1(`discriminated union option without static discriminator values`);for(let e of l){if(s.has(e))throw new q1(`duplicate discriminator value ${String(e)}`);s.add(e)}let u=Array.from(l,e=>k1(t,i,e)),d=o?`if`:`else if`;e.write(`${d} (${u.join(` || `)}) {`),e.indented(e=>{let n=e1(e,t,c,r);e.write(`${a} = ${n};`)}),e.write(`}`),o=!1}return e.write(`else { return INVALID; }`),a}function k1(e,t,n){if(typeof n==`string`)return`${t} === ${LU(n)}`;if(typeof n==`number`)return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n==`boolean`)return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n==`bigint`)return`${t} === ${n}n`;if(typeof n==`symbol`)return`${t} === ${N$(e,n)}`;throw new q1(`literal discriminator value ${String(n)}`)}function A1(e,t,n,r){let i=n._zod.def,a=I$(e,t,i.left,r),o=I$(e,t,i.right,r),s=N$(t,Hq),c=P$(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function j1(e,t,n,r){let i=n._zod.def,a=N$(t,BU);e.write(`if (!${a}(${r})) return INVALID;`);let o=P$(t),s=P$(t),c=P$(t);e.write(`const ${o} = {};`);let l=i,u=l.partial?void 0:i.keyType._zod.values;if(u){let n=[];for(let a of u){if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)throw new q1(`record key value ${String(a)}`);let s=typeof a==`number`?a.toString():a;if(s===`__proto__`)throw new q1(`record key "__proto__"`);n.push(s);let c=N$(t,a),l=e1(e,t,i.keyType,c),u=P$(t);e.write(`const ${u} = ${r}[${M1(t,s)}];`);let d=I$(e,t,i.valueType,u);e.write(`${o}[${l}] = ${d};`)}let a=N$(t,new Set(n));return e.write(`for (const ${s} in ${r}) {`),e.indented(e=>{e.write(`if (${a}.has(${s})) continue;`),l.mode===`loose`?e.write(`if (${s} !== "__proto__") ${o}[${s}] = ${r}[${s}];`):e.write(`return INVALID;`)}),e.write(`}`),o}let d=i.keyType._zod.def;if(d.type!==`string`||d.format!==void 0||d.coerce||(d.checks?.length??0)!==0){let n=i.mode===`loose`,a=N$(t,M$(i.keyType)),c=N$(t,CK),l=N$(t,Object.prototype.propertyIsEnumerable),u=P$(t);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${l}.call(${r}, ${s})) continue;`),e.write(`let ${u} = ${a}(${s});`),e.write(`if (${u} === INVALID && typeof ${s} === "string" && ${c}.test(${s})) ${u} = ${a}(Number(${s}));`),n?e.write(`if (${u} === INVALID) { ${o}[${s}] = ${r}[${s}]; continue; }`):e.write(`if (${u} === INVALID) return INVALID;`),e.write(`if (${u} === "__proto__") continue;`);let d=P$(t);e.write(`const ${d} = ${r}[${s}];`);let f=I$(e,t,i.valueType,d);e.write(`${o}[${u}] = ${f};`)}),e.write(`}`),o}let f=N$(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${f}.call(${r}, ${s})) continue;`),e.write(`if (typeof ${s} !== "string") return INVALID;`),e.write(`const ${c} = ${r}[${s}];`);let n=I$(e,t,i.valueType,c);e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function M1(e,t){return typeof t==`string`?LU(t):N$(e,t)}function N1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let a=P$(t),o=P$(t),s=P$(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${r}) {`),e.indented(e=>{let n=e1(e,t,i.keyType,o),r=e1(e,t,i.valueType,s);e.write(`${a}.set(${n}, ${r});`)}),e.write(`}`),a}function P1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let a=P$(t),o=P$(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${r}) {`),e.indented(e=>{let n=e1(e,t,i.valueType,o);e.write(`${a}.add(${n});`)}),e.write(`}`),a}function F1(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function I1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let n=N$(t,i);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${r})) return INVALID;`)}return r}function L1(e,t,n,r){let i=n._zod.def,a=N$(t,i.getter),o=N$(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(e=>{e.write(`const inner = ${a}();`),e.write(`${o}.parser = function(input) {`),e.indented(e=>{e.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`),e.write(`return result.issues.length === 0 ? result.value : INVALID;`)}),e.write(`};`)}),e.write(`}`);let s=P$(t);return e.write(`const ${s} = ${o}.parser(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function R1(e,t,n,r){let i=n._zod.def,a=e1(e,t,i.in,r);if(i.transform){if(z1(i.transform))throw new K1(`z.compile: async transforms in pipes are not supported`);let n=i.transform,r=N$(t,e=>{let t={value:e,issues:[],addIssue:Z$},r=n(e,t);return r instanceof Promise?W1:t.issues.length===0?r:W1}),o=P$(t);return e.write(`const ${o} = ${r}(${a});`),e.write(`if (${o} === INVALID) return INVALID;`),e1(e,t,i.out,o)}return e1(e,t,i.out,a)}function z1(e){return typeof e==`function`&&(e.constructor.name===`AsyncFunction`||e[Symbol.toStringTag]===`AsyncFunction`)}function B1(e,t,n,r){let i=n._zod.def;if(i.fn){if(z1(i.fn))throw new K1(`z.compile: async custom predicates are not supported`);let n=N$(t,i.fn),a=N$(t,X$),o=P$(t);e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`)}else throw new q1(`custom schema without a predicate function`);return r}function V1(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then==`function`)return W1;let i=r;return i.issues.length===0?i.value:t()}function H1(e,t,n,r){let i=n._zod.def;if(!i.catchValue[`~constantCatch`])throw new q1(`catch with a callback (only a constant catch value compiles)`,!1);let a=P$(t);e.write(`let ${a} = (() => {`),e.indented(e=>{let n=I$(e,t,i.innerType,r);e.write(`return ${n};`)}),e.write(`})();`);let o=N$(t,i.innerType),s=N$(t,i.catchValue),c=N$(t,V1);return e.write(`if (${a} === INVALID) {`),e.indented(e=>{e.write(`${a} = ${c}(${o}, ${s}, ${r});`),e.write(`if (${a} === INVALID) return INVALID;`)}),e.write(`}`),a}function U1(e,t,n,r){let i=n._zod.def;if(i.transform){if(z1(i.transform))throw new K1(`z.compile: async transforms are not supported`);let n=i.transform,a=N$(t,e=>{let t={value:e,issues:[],addIssue:Z$},r=n(e,t);return r instanceof Promise?W1:t.issues.length===0?r:W1}),o=P$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}return r}var W1,G1,K1,q1,J1,Y1,X1=o((()=>{VW(),bq(),GY(),GK(),jY(),J(),W1=Symbol.for(`zod.compile.invalid`),G1=Symbol.for(`zod.compile.fallback`),K1=class extends Error{constructor(e=`z.compile does not support async refinements, transforms, or checks`){super(e),this.name=`ZodCompileAsyncError`}},q1=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name=`ZodCompileUnsupportedError`,this.islandable=t}},J1=new Set([`max_size`,`min_size`,`size_equals`,`max_length`,`min_length`,`length_equals`]),Y1=new Set([`cidrv4`,`cuid`,`cuid2`,`date`,`datetime`,`duration`,`e164`,`email`,`emoji`,`ends_with`,`guid`,`includes`,`ipv4`,`ksuid`,`lowercase`,`mac`,`nanoid`,`regex`,`starts_with`,`time`,`ulid`,`uppercase`,`uuid`,`xid`])}));function Z1(e,t){return new e({type:`string`,...q(t)})}function Q1(e,t){return new e({type:`string`,coerce:!0,...q(t)})}function $1(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function e0(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function t0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function n0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function r0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function i0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function a0(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function o0(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function s0(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function c0(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function l0(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function u0(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function d0(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function f0(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function p0(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function m0(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function h0(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...q(t)})}function g0(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function _0(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function v0(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function y0(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function b0(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function x0(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...q(t)})}function S0(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function C0(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function w0(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function T0(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function E0(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function D0(e,t){return new e({type:`number`,checks:[],...q(t)})}function O0(e,t){return new e({type:`number`,coerce:!0,checks:[],...q(t)})}function k0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function A0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...q(t)})}function j0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...q(t)})}function M0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...q(t)})}function N0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...q(t)})}function P0(e,t){return new e({type:`boolean`,...q(t)})}function F0(e,t){return new e({type:`boolean`,coerce:!0,...q(t)})}function I0(e,t){return new e({type:`bigint`,...q(t)})}function L0(e,t){return new e({type:`bigint`,coerce:!0,...q(t)})}function R0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...q(t)})}function z0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...q(t)})}function B0(e,t){return new e({type:`symbol`,...q(t)})}function V0(e,t){return new e({type:`undefined`,...q(t)})}function H0(e,t){return new e({type:`null`,...q(t)})}function U0(e){return new e({type:`any`})}function W0(e){return new e({type:`unknown`})}function G0(e,t){return new e({type:`never`,...q(t)})}function K0(e,t){return new e({type:`void`,...q(t)})}function q0(e,t){return new e({type:`date`,...q(t)})}function J0(e,t){return new e({type:`date`,coerce:!0,...q(t)})}function Y0(e,t){return new e({type:`nan`,...q(t)})}function X0(e,t){return new ZK({check:`less_than`,...q(t),value:e,inclusive:!1})}function Z0(e,t){return new ZK({check:`less_than`,...q(t),value:e,inclusive:!0})}function Q0(e,t){return new QK({check:`greater_than`,...q(t),value:e,inclusive:!1})}function $0(e,t){return new QK({check:`greater_than`,...q(t),value:e,inclusive:!0})}function e2(e){return Q0(0,e)}function t2(e){return X0(0,e)}function n2(e){return Z0(0,e)}function r2(e){return $0(0,e)}function i2(e,t){return new $K({check:`multiple_of`,...q(t),value:e})}function a2(e,t){return new nq({check:`max_size`,...q(t),maximum:e})}function o2(e,t){return new rq({check:`min_size`,...q(t),minimum:e})}function s2(e,t){return new iq({check:`size_equals`,...q(t),size:e})}function c2(e,t){return new aq({check:`max_length`,...q(t),maximum:e})}function l2(e,t){return new oq({check:`min_length`,...q(t),minimum:e})}function u2(e,t){return new sq({check:`length_equals`,...q(t),length:e})}function d2(e,t){return new lq({check:`string_format`,format:`regex`,...q(t),pattern:e})}function f2(e){return new uq({check:`string_format`,format:`lowercase`,...q(e)})}function p2(e){return new dq({check:`string_format`,format:`uppercase`,...q(e)})}function m2(e,t){return new fq({check:`string_format`,format:`includes`,...q(t),includes:e})}function h2(e,t){return new pq({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function g2(e,t){return new mq({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function _2(e,t,n){return new hq({check:`property`,property:e,schema:t,...q(n)})}function v2(e){return Object.entries(e).map(([e,t])=>new hq({check:`property`,property:e,schema:t}))}function y2(e,t){return new gq({check:`mime_type`,mime:e,...q(t)})}function b2(e){return new _q({check:`overwrite`,tx:e})}function x2(e){return b2(t=>t.normalize(e))}function S2(){return b2(e=>e.trim())}function C2(){return b2(e=>e.toLowerCase())}function w2(){return b2(e=>e.toUpperCase())}function T2(){return b2(e=>RU(e))}function E2(e,t,n){return new e({type:`array`,element:t,...q(n)})}function D2(e,t,n){return new e({type:`union`,options:t,...q(n)})}function O2(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...q(n)})}function k2(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...q(r)})}function A2(e,t,n){return new e({type:`intersection`,left:t,right:n})}function j2(e,t,n,r){let i=n instanceof iJ;return new e({type:`tuple`,items:t,rest:i?n:null,...q(i?r:n)})}function M2(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...q(r)})}function N2(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...q(r)})}function P2(e,t,n){return new e({type:`set`,valueType:t,...q(n)})}function F2(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...q(n)})}function I2(e,t,n){return new e({type:`enum`,entries:t,...q(n)})}function L2(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...q(n)})}function R2(e,t){return new e({type:`file`,...q(t)})}function z2(e,t){return new e({type:`transform`,transform:t})}function B2(e,t){return new e({type:`optional`,innerType:t})}function V2(e,t){return new e({type:`nullable`,innerType:t})}function H2(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():VU(n)}})}function U2(e,t,n){return new e({type:`nonoptional`,innerType:t,...q(n)})}function W2(e,t){return new e({type:`success`,innerType:t})}function G2(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:_W(n)})}function K2(e,t,n){return new e({type:`pipe`,in:t,out:n})}function q2(e,t){return new e({type:`readonly`,innerType:t})}function J2(e,t,n){return new e({type:`template_literal`,parts:t,...q(n)})}function Y2(e,t){return new e({type:`lazy`,getter:t})}function X2(e,t){return new e({type:`promise`,innerType:t})}function Z2(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Q2(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function $2(e,t){let n=e4(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(lW(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(lW(r))}},e(t.value,t)),t);return n}function e4(e,t){let n=new qK({check:`custom`,...q(t)});return n._zod.check=e,n}function t4(e){let t=new qK({check:`describe`});return t._zod.onattach=[t=>{let n=D$.get(t)??{};D$.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function n4(e){let t=new qK({check:`meta`});return t._zod.onattach=[t=>{let n=D$.get(t)??{};D$.add(t,{...n,...e})}],t._zod.check=()=>{},t}function r4(e,t){let n=q(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??CY,c=e.Boolean??zJ,l=new s({type:`pipe`,in:new(e.String??oJ)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function i4(e,t,n,r={}){let i=q(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var a4,o4=o((()=>{vq(),O$(),jY(),J(),a4={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function s4(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&FU(e,t,n[t]);return e}function c4(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??D$,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function l4(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function u4(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,u4(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&s4(o.schema,c),t.io===`input`&&v4(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function d4(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function f4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${d4(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+d4(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function p4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;p4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function m4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function h4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!y4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??m4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}FU(n,r,e.length===1?e[0]:h4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=m4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function g4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of y4)if(t in e)return;let n=t.filter(e=>b4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=h4(t);else{let e=n[0],i=b4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>h4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,s4(e,r))}function _4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):s4(i,s),s4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())p4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])g4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}s4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,FU(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:S4(t,`input`,e.processors),output:S4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function v4(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return v4(r.element,n);if(r.type===`set`)return v4(r.valueType,n);if(r.type===`lazy`)return v4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return v4(r.innerType,n);if(r.type===`intersection`)return v4(r.left,n)||v4(r.right,n);if(r.type===`record`||r.type===`map`)return v4(r.keyType,n)||v4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:v4(r.in,n)||v4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(v4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(v4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(v4(e,n))return!0;return!!(r.rest&&v4(r.rest,n))}return!1}var y4,b4,x4,S4,C4=o((()=>{O$(),J(),y4=new Set([`type`,`properties`,`required`,`additionalProperties`]),b4=[`oneOf`,`anyOf`],x4=(e,t={})=>n=>{let r=c4({...n,processors:t});return u4(e,r),f4(r,e),_4(r,e)},S4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=c4({...i??{},target:a,io:t,processors:n});return u4(e,o),f4(o,e),_4(o,e)}}));function w4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?w4(t.out):t.type===`catch`?w4(t.innerType):e._zod.optin}function T4(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=T4(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>T4(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?CK:SK).source),p):p}function E4(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of i3.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=T4(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function D4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(l4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),c3):JSON.parse(o)}function O4(e,t){if(`_idmap`in e){let n=e,r=c4({...t,processors:_3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;u4(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;f4(r,n),FU(a,t,_4(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=c4({...t,processors:_3});return u4(e,n),f4(n,e),_4(n,e)}var k4,A4,j4,M4,N4,P4,F4,I4,L4,R4,z4,B4,V4,H4,U4,W4,G4,K4,q4,J4,Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3,a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,h3,g3,_3,v3=o((()=>{GK(),C4(),J(),k4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},A4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=k4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},j4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):l4(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},M4=(e,t,n,r)=>{n.type=`boolean`},N4=(e,t,n,r)=>{l4(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},P4=(e,t,n,r)=>{l4(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},F4=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},I4=(e,t,n,r)=>{l4(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},L4=(e,t,n,r)=>{l4(e,t,n,r,`Void cannot be represented in JSON Schema`)},R4=(e,t,n,r)=>{n.not={}},z4=(e,t,n,r)=>{},B4=(e,t,n,r)=>{},V4=(e,t,n,r)=>{l4(e,t,n,r,`Date cannot be represented in JSON Schema`)},H4=(e,t,n,r)=>{let i=e._zod.def,a=OU(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},U4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(l4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(l4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},W4=(e,t,n,r)=>{l4(e,t,n,r,`NaN cannot be represented in JSON Schema`)},G4=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},K4=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},q4=(e,t,n,r)=>{n.type=`boolean`},J4=(e,t,n,r)=>{l4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Y4=(e,t,n,r)=>{l4(e,t,n,r,`Function types cannot be represented in JSON Schema`)},X4=(e,t,n,r)=>{l4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Z4=(e,t,n,r)=>{l4(e,t,n,r,`Map cannot be represented in JSON Schema`)},Q4=(e,t,n,r)=>{l4(e,t,n,r,`Set cannot be represented in JSON Schema`)},$4=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=u4(a.element,t,{...r,path:[...r.path,`items`]})},e3=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&l4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)FU(i.properties,e,u4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?w4(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=u4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},t3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>u4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},n3=(e,t,n,r)=>{let i=e._zod.def,a=u4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=u4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},r3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>u4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?u4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?w4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},i3=new WeakMap,a3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=u4(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)FU(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=u4(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=i3.get(t);n||(n=[],i3.set(t,n),t.deferred.push(()=>E4(t))),n.push(e)}i.additionalProperties=u4(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&w4(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},o3=(e,t,n,r)=>{let i=e._zod.def,a=u4(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},s3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},c3=Symbol(),l3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=D4(i.defaultValue,e,t,n,r);o!==c3&&(n.default=o)},u3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=D4(i.defaultValue,e,t,n,r);o!==c3&&(n._prefault=o)},d3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{l4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},f3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;u4(o,t,r);let s=t.seen.get(e);s.ref=o},p3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},m3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},h3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},g3=(e,t,n,r)=>{let i=e._zod.innerType;u4(i,t,r);let a=t.seen.get(e);a.ref=i},_3={string:A4,number:j4,boolean:M4,bigint:N4,symbol:P4,null:F4,undefined:I4,void:L4,never:R4,any:z4,unknown:B4,date:V4,enum:H4,literal:U4,nan:W4,template_literal:G4,file:K4,success:q4,custom:J4,function:Y4,transform:X4,map:Z4,set:Q4,array:$4,object:e3,union:t3,intersection:n3,tuple:r3,record:a3,nullable:o3,nonoptional:s3,default:l3,prefault:u3,catch:d3,pipe:f3,readonly:p3,promise:m3,optional:h3,lazy:g3}})),y3,b3=o((()=>{v3(),C4(),y3=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=c4({processors:_3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return u4(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,f4(this.ctx,e);let{"~standard":n,...r}=_4(this.ctx,e);return r}}})),x3=c({}),S3=o((()=>{})),C3=c({$ZodAny:()=>GJ,$ZodArray:()=>XJ,$ZodAsyncError:()=>RW,$ZodBase64:()=>AJ,$ZodBase64URL:()=>jJ,$ZodBigInt:()=>BJ,$ZodBigIntFormat:()=>VJ,$ZodBoolean:()=>zJ,$ZodCIDRv4:()=>OJ,$ZodCIDRv6:()=>kJ,$ZodCUID:()=>hJ,$ZodCUID2:()=>gJ,$ZodCatch:()=>bY,$ZodCheck:()=>qK,$ZodCheckBigIntFormat:()=>tq,$ZodCheckEndsWith:()=>mq,$ZodCheckGreaterThan:()=>QK,$ZodCheckIncludes:()=>fq,$ZodCheckLengthEquals:()=>sq,$ZodCheckLessThan:()=>ZK,$ZodCheckLowerCase:()=>uq,$ZodCheckMaxLength:()=>aq,$ZodCheckMaxSize:()=>nq,$ZodCheckMimeType:()=>gq,$ZodCheckMinLength:()=>oq,$ZodCheckMinSize:()=>rq,$ZodCheckMultipleOf:()=>$K,$ZodCheckNumberFormat:()=>eq,$ZodCheckOverwrite:()=>_q,$ZodCheckProperty:()=>hq,$ZodCheckRegex:()=>lq,$ZodCheckSizeEquals:()=>iq,$ZodCheckStartsWith:()=>pq,$ZodCheckStringFormat:()=>cq,$ZodCheckUpperCase:()=>dq,$ZodCodec:()=>CY,$ZodCreditCard:()=>PJ,$ZodCustom:()=>AY,$ZodCustomStringFormat:()=>IJ,$ZodCyclicError:()=>RY,$ZodDate:()=>YJ,$ZodDefault:()=>gY,$ZodDiscriminatedUnion:()=>rY,$ZodE164:()=>MJ,$ZodEmail:()=>uJ,$ZodEmoji:()=>pJ,$ZodEncodeError:()=>zW,$ZodEnum:()=>lY,$ZodError:()=>QW,$ZodExactOptional:()=>mY,$ZodFile:()=>dY,$ZodFunction:()=>DY,$ZodGUID:()=>cJ,$ZodIPv4:()=>wJ,$ZodIPv6:()=>EJ,$ZodISODate:()=>xJ,$ZodISODateTime:()=>bJ,$ZodISODuration:()=>CJ,$ZodISOTime:()=>SJ,$ZodIntersection:()=>iY,$ZodJWT:()=>FJ,$ZodKSUID:()=>yJ,$ZodLazy:()=>kY,$ZodLiteral:()=>uY,$ZodMAC:()=>DJ,$ZodMap:()=>sY,$ZodNaN:()=>xY,$ZodNanoID:()=>mJ,$ZodNever:()=>qJ,$ZodNonOptional:()=>vY,$ZodNull:()=>WJ,$ZodNullable:()=>hY,$ZodNumber:()=>LJ,$ZodNumberFormat:()=>RJ,$ZodObject:()=>$J,$ZodObjectJIT:()=>eY,$ZodOptional:()=>pY,$ZodPipe:()=>SY,$ZodPrefault:()=>_Y,$ZodPreprocess:()=>wY,$ZodPromise:()=>OY,$ZodReadonly:()=>TY,$ZodRealError:()=>$W,$ZodRecord:()=>oY,$ZodRegistry:()=>E$,$ZodSet:()=>cY,$ZodString:()=>oJ,$ZodStringFormat:()=>sJ,$ZodSuccess:()=>yY,$ZodSymbol:()=>HJ,$ZodTemplateLiteral:()=>EY,$ZodTransform:()=>fY,$ZodTuple:()=>aY,$ZodType:()=>iJ,$ZodULID:()=>_J,$ZodURL:()=>fJ,$ZodUUID:()=>lJ,$ZodUndefined:()=>UJ,$ZodUnion:()=>tY,$ZodUnknown:()=>KJ,$ZodVoid:()=>JJ,$ZodXID:()=>vJ,$ZodXor:()=>nY,$brand:()=>LW,$constructor:()=>Y,$input:()=>T$,$output:()=>w$,Doc:()=>yq,INVALID:()=>W1,JSONSchema:()=>x3,JSONSchemaGenerator:()=>y3,NEVER:()=>PW,TimePrecision:()=>a4,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>K1,ZodCompileUnsupportedError:()=>q1,_any:()=>U0,_array:()=>E2,_base64:()=>v0,_base64url:()=>y0,_bigint:()=>I0,_boolean:()=>P0,_catch:()=>G2,_check:()=>e4,_cidrv4:()=>g0,_cidrv6:()=>_0,_coercedBigint:()=>L0,_coercedBoolean:()=>F0,_coercedDate:()=>J0,_coercedNumber:()=>O0,_coercedString:()=>Q1,_creditCard:()=>x0,_cuid:()=>c0,_cuid2:()=>l0,_custom:()=>Z2,_date:()=>q0,_decode:()=>gG,_decodeAsync:()=>bG,_default:()=>H2,_discriminatedUnion:()=>k2,_e164:()=>b0,_email:()=>$1,_emoji:()=>o0,_encode:()=>mG,_encodeAsync:()=>vG,_endsWith:()=>g2,_enum:()=>F2,_file:()=>R2,_float32:()=>A0,_float64:()=>j0,_gt:()=>Q0,_gte:()=>$0,_guid:()=>e0,_includes:()=>m2,_int:()=>k0,_int32:()=>M0,_int64:()=>R0,_intersection:()=>A2,_ipv4:()=>p0,_ipv6:()=>m0,_isoDate:()=>w0,_isoDateTime:()=>C0,_isoDuration:()=>E0,_isoTime:()=>T0,_jwt:()=>S0,_ksuid:()=>f0,_lazy:()=>Y2,_length:()=>u2,_literal:()=>L2,_lowercase:()=>f2,_lt:()=>X0,_lte:()=>Z0,_mac:()=>h0,_map:()=>N2,_max:()=>Z0,_maxLength:()=>c2,_maxSize:()=>a2,_mime:()=>y2,_min:()=>$0,_minLength:()=>l2,_minSize:()=>o2,_multipleOf:()=>i2,_nan:()=>Y0,_nanoid:()=>s0,_nativeEnum:()=>I2,_negative:()=>t2,_never:()=>G0,_nonnegative:()=>r2,_nonoptional:()=>U2,_nonpositive:()=>n2,_normalize:()=>x2,_null:()=>H0,_nullable:()=>V2,_number:()=>D0,_optional:()=>B2,_overwrite:()=>b2,_parse:()=>nG,_parseAsync:()=>iG,_pipe:()=>K2,_positive:()=>e2,_promise:()=>X2,_properties:()=>v2,_property:()=>_2,_readonly:()=>q2,_record:()=>M2,_refine:()=>Q2,_regex:()=>d2,_safeDecode:()=>wG,_safeDecodeAsync:()=>OG,_safeEncode:()=>SG,_safeEncodeAsync:()=>EG,_safeParse:()=>oG,_safeParseAsync:()=>cG,_set:()=>P2,_size:()=>s2,_slugify:()=>T2,_startsWith:()=>h2,_string:()=>Z1,_stringFormat:()=>i4,_stringbool:()=>r4,_success:()=>W2,_superRefine:()=>$2,_symbol:()=>B0,_templateLiteral:()=>J2,_toLowerCase:()=>C2,_toUpperCase:()=>w2,_transform:()=>z2,_trim:()=>S2,_tuple:()=>j2,_uint32:()=>N0,_uint64:()=>z0,_ulid:()=>u0,_undefined:()=>V0,_union:()=>D2,_unknown:()=>W0,_uppercase:()=>p2,_url:()=>a0,_uuid:()=>t0,_uuidv4:()=>n0,_uuidv6:()=>r0,_uuidv7:()=>i0,_void:()=>K0,_xid:()=>d0,_xor:()=>O2,clone:()=>UU,compile:()=>A$,compileFn:()=>M$,config:()=>MW,createStandardJSONSchemaMethod:()=>S4,createToJSONSchemaMethod:()=>x4,decode:()=>_G,decodeAsync:()=>xG,describe:()=>t4,encode:()=>hG,encodeAsync:()=>yG,extractDefs:()=>f4,finalize:()=>_4,flattenError:()=>HW,formatError:()=>UW,getDiscriminatedOption:()=>Vq,globalConfig:()=>BW,globalRegistry:()=>D$,handleUnrepresentable:()=>l4,initializeContext:()=>c4,isBackEdge:()=>LY,isRecursiveSchema:()=>PY,isValidBase64:()=>Aq,isValidBase64URL:()=>jq,isValidCIDRv6:()=>kq,isValidCreditCard:()=>Nq,isValidIPv6:()=>Oq,isValidJWT:()=>Pq,locales:()=>b$,memoizer:()=>IY,mergeValues:()=>Hq,meta:()=>n4,parse:()=>rG,parseAsync:()=>aG,parseURLObject:()=>wq,prettifyError:()=>KW,process:()=>u4,regexes:()=>jG,registry:()=>S$,safeDecode:()=>TG,safeDecodeAsync:()=>kG,safeEncode:()=>CG,safeEncodeAsync:()=>DG,safeParse:()=>sG,safeParseAsync:()=>lG,standardProps:()=>Cq,stripTabAndNewline:()=>Tq,toDotPath:()=>GW,toJSONSchema:()=>O4,toZod:()=>DU,treeifyError:()=>WW,urlHostnameOk:()=>Eq,urlProtocolOk:()=>Dq,util:()=>wU,validate:()=>fG,validateAsync:()=>pG,version:()=>xq}),w3=o((()=>{VW(),AG(),eG(),jY(),GY(),vq(),Sq(),J(),GK(),x$(),O$(),bq(),X1(),o4(),C4(),v3(),b3(),S3()}));function T3(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===E3)return new kY({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,E3);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?UU(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:UU(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?UU(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:UU(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:UU(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?UU(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:UU(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:UU(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:UU(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:UU(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return UU(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var E3,D3=o((()=>{jY(),J(),E3=Symbol(`z.visit/resolving`)}));AG();function O3(e){return!!e._zod}function k3(e,t){return O3(e)?sG(e,t):e.safeParse(t)}function A3(e){if(!e)return;let t;if(t=O3(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function j3(e){if(O3(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var M3=c({endsWith:()=>g2,gt:()=>Q0,gte:()=>$0,includes:()=>m2,length:()=>u2,lowercase:()=>f2,lt:()=>X0,lte:()=>Z0,maxLength:()=>c2,maxSize:()=>a2,mime:()=>y2,minLength:()=>l2,minSize:()=>o2,multipleOf:()=>i2,negative:()=>t2,nonnegative:()=>r2,nonpositive:()=>n2,normalize:()=>x2,overwrite:()=>b2,positive:()=>e2,properties:()=>v2,property:()=>_2,regex:()=>d2,size:()=>s2,slugify:()=>T2,startsWith:()=>h2,toLowerCase:()=>C2,toUpperCase:()=>w2,trim:()=>S2,uppercase:()=>p2}),N3=o((()=>{w3()}));function P3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var F3,I3,L3,R3,z3=o((()=>{w3(),J(),F3=new WeakSet([Object.prototype,Error.prototype]),I3=(e,t)=>{QW.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);F3.has(n)||(F3.add(n),P3(n,`format`,e=>t=>UW(e,t)),P3(n,`flatten`,e=>t=>HW(e,t)),P3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,kU,2)}),P3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,kU,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},L3=Y(`ZodError`,I3),R3=Y(`ZodError`,I3,void 0,{Parent:Error})})),B3,V3,H3,U3,W3,G3,K3,q3,J3,Y3,X3,Z3,Q3=o((()=>{w3(),z3(),B3=nG(R3),V3=iG(R3),H3=oG(R3),U3=cG(R3),W3=mG(R3),G3=gG(R3),K3=vG(R3),q3=bG(R3),J3=SG(R3),Y3=wG(R3),X3=EG(R3),Z3=OG(R3)})),$3=c({ZodAny:()=>S5,ZodArray:()=>D5,ZodBase64:()=>c5,ZodBase64URL:()=>l5,ZodBigInt:()=>_5,ZodBigIntFormat:()=>v5,ZodBoolean:()=>g5,ZodCIDRv4:()=>o5,ZodCIDRv6:()=>s5,ZodCUID:()=>Q8,ZodCUID2:()=>$8,ZodCatch:()=>J5,ZodCodec:()=>Z5,ZodCreditCard:()=>d5,ZodCustom:()=>i7,ZodCustomStringFormat:()=>p5,ZodDate:()=>E5,ZodDefault:()=>W5,ZodDiscriminatedUnion:()=>j5,ZodE164:()=>u5,ZodEmail:()=>K8,ZodEmoji:()=>X8,ZodEnum:()=>L5,ZodExactOptional:()=>H5,ZodFile:()=>z5,ZodFunction:()=>r7,ZodGUID:()=>q8,ZodIPv4:()=>r5,ZodIPv6:()=>a5,ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,ZodIntersection:()=>M5,ZodJWT:()=>f5,ZodKSUID:()=>n5,ZodLazy:()=>t7,ZodLiteral:()=>R5,ZodMAC:()=>i5,ZodMap:()=>F5,ZodNaN:()=>Y5,ZodNanoID:()=>Z8,ZodNever:()=>w5,ZodNonOptional:()=>K5,ZodNull:()=>x5,ZodNullable:()=>U5,ZodNumber:()=>m5,ZodNumberFormat:()=>h5,ZodObject:()=>O5,ZodOptional:()=>V5,ZodPipe:()=>X5,ZodPrefault:()=>G5,ZodPreprocess:()=>Q5,ZodPromise:()=>n7,ZodReadonly:()=>$5,ZodRecord:()=>P5,ZodSet:()=>I5,ZodString:()=>B8,ZodStringFormat:()=>V8,ZodSuccess:()=>q5,ZodSymbol:()=>y5,ZodTemplateLiteral:()=>e7,ZodTransform:()=>B5,ZodTuple:()=>N5,ZodType:()=>R8,ZodULID:()=>e5,ZodURL:()=>Y8,ZodUUID:()=>J8,ZodUndefined:()=>b5,ZodUnion:()=>k5,ZodUnknown:()=>C5,ZodVoid:()=>T5,ZodXID:()=>t5,ZodXor:()=>A5,_ZodString:()=>z8,_default:()=>_8,_function:()=>A8,any:()=>W6,array:()=>Y6,base64:()=>S6,base64url:()=>C6,bigint:()=>R6,boolean:()=>L6,catch:()=>x8,check:()=>j8,cidrv4:()=>b6,cidrv6:()=>x6,codec:()=>w8,creditCard:()=>T6,cuid:()=>f6,cuid2:()=>p6,custom:()=>M8,date:()=>J6,describe:()=>a7,discriminatedUnion:()=>t8,e164:()=>w6,email:()=>n6,emoji:()=>u6,enum:()=>l8,exactOptional:()=>m8,file:()=>d8,float32:()=>N6,float64:()=>P6,function:()=>A8,guid:()=>r6,hash:()=>A6,hex:()=>k6,hostname:()=>O6,httpUrl:()=>l6,instanceof:()=>F8,int:()=>M6,int32:()=>F6,int64:()=>z6,intersection:()=>n8,invertCodec:()=>T8,ipv4:()=>_6,ipv6:()=>y6,json:()=>I8,jwt:()=>E6,keyof:()=>X6,ksuid:()=>g6,lazy:()=>O8,literal:()=>Q,looseObject:()=>Q6,looseRecord:()=>o8,mac:()=>v6,map:()=>s8,meta:()=>o7,nan:()=>S8,nanoid:()=>d6,nativeEnum:()=>u8,never:()=>K6,nonoptional:()=>y8,null:()=>U6,nullable:()=>h8,nullish:()=>g8,number:()=>j6,object:()=>Z,optional:()=>p8,partialRecord:()=>a8,pipe:()=>C8,prefault:()=>v8,preprocess:()=>L8,promise:()=>k8,readonly:()=>E8,record:()=>i8,refine:()=>N8,set:()=>c8,strictObject:()=>Z6,string:()=>X,stringFormat:()=>D6,stringbool:()=>s7,success:()=>b8,superRefine:()=>P8,symbol:()=>V6,templateLiteral:()=>D8,transform:()=>f8,tuple:()=>r8,uint32:()=>I6,uint64:()=>B6,ulid:()=>m6,undefined:()=>H6,union:()=>$6,unknown:()=>G6,url:()=>c6,uuid:()=>i6,uuidv4:()=>a6,uuidv6:()=>o6,uuidv7:()=>s6,void:()=>q6,xid:()=>h6,xor:()=>e8});function e6(){BW.localeError||MW(EX())}function t6(){BW.memoizer||MW({memoizer:IY()})}function X(e){return Z1(B8,e)}function n6(e){return $1(K8,e)}function r6(e){return e0(q8,e)}function i6(e){return t0(J8,e)}function a6(e){return n0(J8,e)}function o6(e){return r0(J8,e)}function s6(e){return i0(J8,e)}function c6(e){return a0(Y8,e)}function l6(e){return a0(Y8,{protocol:hK,hostname:mK,...q(e)})}function u6(e){return o0(X8,e)}function d6(e){return s0(Z8,e)}function f6(e){return c0(Q8,e)}function p6(e){return l0($8,e)}function m6(e){return u0(e5,e)}function h6(e){return d0(t5,e)}function g6(e){return f0(n5,e)}function _6(e){return p0(r5,e)}function v6(e){return h0(i5,e)}function y6(e){return m0(a5,e)}function b6(e){return g0(o5,e)}function x6(e){return _0(s5,e)}function S6(e){return v0(c5,e)}function C6(e){return y0(l5,e)}function w6(e){return b0(u5,e)}function T6(e){return x0(d5,e)}function E6(e){return S0(f5,e)}function D6(e,t,n={}){return i4(p5,e,t,n)}function O6(e){return i4(p5,`hostname`,pK,e)}function k6(e){return i4(p5,`hex`,kK,e)}function A6(e,t){let n=`${e}_${t?.enc??`hex`}`,r=jG[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return i4(p5,n,r,t)}function j6(e){return D0(m5,e)}function M6(e){return k0(h5,e)}function N6(e){return A0(h5,e)}function P6(e){return j0(h5,e)}function F6(e){return M0(h5,e)}function I6(e){return N0(h5,e)}function L6(e){return P0(g5,e)}function R6(e){return I0(_5,e)}function z6(e){return R0(v5,e)}function B6(e){return z0(v5,e)}function V6(e){return B0(y5,e)}function H6(e){return V0(b5,e)}function U6(e){return H0(x5,e)}function W6(){return U0(S5)}function G6(){return W0(C5)}function K6(e){return G0(w5,e)}function q6(e){return K0(T5,e)}function J6(e){return q0(E5,e)}function Y6(e,t){return E2(D5,e,t)}function X6(e){let t=e._zod.def.shape;return l8(Object.keys(t))}function Z(e,t){let n={type:`object`,shape:e??{},...q(t)};return new O5(n)}function Z6(e,t){return new O5({type:`object`,shape:e,catchall:K6(),...q(t)})}function Q6(e,t){return new O5({type:`object`,shape:e,catchall:G6(),...q(t)})}function $6(e,t){return new k5({type:`union`,options:e,...q(t)})}function e8(e,t){return new A5({type:`union`,options:e,inclusive:!1,...q(t)})}function t8(e,t,n){return new j5({type:`union`,options:t,discriminator:e,...q(n)})}function n8(e,t){return new M5({type:`intersection`,left:e,right:t})}function r8(e,t,n){let r=t instanceof iJ;return new N5({type:`tuple`,items:e,rest:r?t:null,...q(r?n:t)})}function i8(e,t,n){return!t||!t._zod?new P5({type:`record`,keyType:X(),valueType:e,...q(t)}):new P5({type:`record`,keyType:e,valueType:t,...q(n)})}function a8(e,t,n){return new P5({type:`record`,keyType:e,valueType:t,...q(n),partial:!0})}function o8(e,t,n){return new P5({type:`record`,keyType:e,valueType:t,mode:`loose`,...q(n)})}function s8(e,t,n){return new F5({type:`map`,keyType:e,valueType:t,...q(n)})}function c8(e,t){return new I5({type:`set`,valueType:e,...q(t)})}function l8(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new L5({type:`enum`,entries:n,...q(t)})}function u8(e,t){return new L5({type:`enum`,entries:e,...q(t)})}function Q(e,t){return new R5({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function d8(e){return R2(z5,e)}function f8(e){return new B5({type:`transform`,transform:e})}function p8(e){return new V5({type:`optional`,innerType:e})}function m8(e){return new H5({type:`optional`,innerType:e})}function h8(e){return new U5({type:`nullable`,innerType:e})}function g8(e){return p8(h8(e))}function _8(e,t){return new W5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}function v8(e,t){return new G5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}function y8(e,t){return new K5({type:`nonoptional`,innerType:e,...q(t)})}function b8(e){return new q5({type:`success`,innerType:e})}function x8(e,t){return new J5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:_W(t)})}function S8(e){return Y0(Y5,e)}function C8(e,t){return new X5({type:`pipe`,in:e,out:t})}function w8(e,t,n){return new Z5({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function T8(e){let t=e._zod.def;return new Z5({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function E8(e){return new $5({type:`readonly`,innerType:e})}function D8(e,t){return new e7({type:`template_literal`,parts:e,...q(t)})}function O8(e){return new t7({type:`lazy`,getter:e})}function k8(e){return new n7({type:`promise`,innerType:e})}function A8(e){return new r7({type:`function`,input:Array.isArray(e?.input)?r8(e?.input):e?.input??Y6(G6()),output:e?.output??G6()})}function j8(e){let t=new qK({check:`custom`});return t._zod.check=e,t}function M8(e,t){return Z2(i7,e??(()=>!0),t)}function N8(e,t={}){return Q2(i7,e,t)}function P8(e,t){return $2(e,t)}function F8(e,t={}){let n=new i7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...q(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function I8(e){let t=O8(()=>$6([X(e),j6(),L6(),U6(),Y6(t),i8(X(),t)]));return t}function L8(e,t){return new Q5({type:`pipe`,in:f8(e),out:t})}var R8,z8,B8,V8,H8,U8,W8,G8,K8,q8,J8,Y8,X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5,F5,I5,L5,R5,z5,B5,V5,H5,U5,W5,G5,K5,q5,J5,Y5,X5,Z5,Q5,$5,e7,t7,n7,r7,i7,a7,o7,s7,c7=o((()=>{w3(),v3(),C4(),OX(),N3(),Q3(),R8=Y(`ZodType`,(e,t)=>(e6(),iJ.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(IU(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return UU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(N8(e,t))},superRefine(e,t){return this.check(P8(e,t))},overwrite(e){return this.check(b2(e))},optional(){return p8(this)},exactOptional(){return m8(this)},nullable(){return h8(this)},nullish(){return p8(h8(this))},nonoptional(e){return y8(this,e)},array(){return Y6(this)},or(e){return $6([this,e])},and(e){return n8(this,e)},transform(e){return C8(this,f8(e))},default(e){return _8(this,e)},prefault(e){return v8(this,e)},catch(e){return x8(this,e)},pipe(e){return C8(this,e)},readonly(){return E8(this)},describe(e){let t=this.clone();return D$.add(t,{description:e}),t},meta(...e){if(e.length===0)return D$.get(this);let t=this.clone();return D$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return mW(this,`~standard`,{...Cq(this),jsonSchema:{input:S4(this,`input`),output:S4(this,`output`)}})},set"~standard"(e){pW(this,`~standard`,e)},parse:function e(t,n){return B3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await V3(this,t,n,{callee:e})},safeParse(e,t){return H3(this,e,t)},async safeParseAsync(e,t){return U3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){pW(this,`spa`,e)},encode:function e(t,n){return W3(this,t,n,{callee:e})},decode:function e(t,n){return G3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await K3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await q3(this,t,n,{callee:e})},safeEncode(e,t){return J3(this,e,t)},safeDecode(e,t){return Y3(this,e,t)},async safeEncodeAsync(e,t){return X3(this,e,t)},async safeDecodeAsync(e,t){return Z3(this,e,t)},toJSONSchema(e){return x4(this,{})(e)},get description(){return D$.get(this)?.description},get _def(){return this._zod.def}}),z8=Y(`_ZodString`,(e,t)=>{oJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A4(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(d2(...e))},includes(...e){return this.check(m2(...e))},startsWith(...e){return this.check(h2(...e))},endsWith(...e){return this.check(g2(...e))},min(...e){return this.check(l2(...e))},max(...e){return this.check(c2(...e))},length(...e){return this.check(u2(...e))},nonempty(...e){return this.check(l2(1,...e))},lowercase(e){return this.check(f2(e))},uppercase(e){return this.check(p2(e))},trim(){return this.check(S2())},normalize(...e){return this.check(x2(...e))},toLowerCase(){return this.check(C2())},toUpperCase(){return this.check(w2())},slugify(){return this.check(T2())}}),B8=Y(`ZodString`,(e,t)=>{oJ.init(e,t),z8.init(e,t)},{email(e){return this.check($1(K8,e))},url(e){return this.check(a0(Y8,e))},jwt(e){return this.check(S0(f5,e))},emoji(e){return this.check(o0(X8,e))},guid(e){return this.check(e0(q8,e))},uuid(e){return this.check(t0(J8,e))},uuidv4(e){return this.check(n0(J8,e))},uuidv6(e){return this.check(r0(J8,e))},uuidv7(e){return this.check(i0(J8,e))},nanoid(e){return this.check(s0(Z8,e))},cuid(e){return this.check(c0(Q8,e))},cuid2(e){return this.check(l0($8,e))},ulid(e){return this.check(u0(e5,e))},base64(e){return this.check(v0(c5,e))},base64url(e){return this.check(y0(l5,e))},xid(e){return this.check(d0(t5,e))},ksuid(e){return this.check(f0(n5,e))},ipv4(e){return this.check(p0(r5,e))},ipv6(e){return this.check(m0(a5,e))},cidrv4(e){return this.check(g0(o5,e))},cidrv6(e){return this.check(_0(s5,e))},e164(e){return this.check(b0(u5,e))},datetime(e){return this.check(C0(H8,e))},date(e){return this.check(w0(U8,e))},time(e){return this.check(T0(W8,e))},duration(e){return this.check(E0(G8,e))}}),V8=Y(`ZodStringFormat`,(e,t)=>{sJ.init(e,t),z8.init(e,t)}),H8=Y(`ZodISODateTime`,(e,t)=>{bJ.init(e,t),V8.init(e,t)}),U8=Y(`ZodISODate`,(e,t)=>{xJ.init(e,t),V8.init(e,t)}),W8=Y(`ZodISOTime`,(e,t)=>{SJ.init(e,t),V8.init(e,t)}),G8=Y(`ZodISODuration`,(e,t)=>{CJ.init(e,t),V8.init(e,t)}),K8=Y(`ZodEmail`,(e,t)=>{uJ.init(e,t),V8.init(e,t)}),q8=Y(`ZodGUID`,(e,t)=>{cJ.init(e,t),V8.init(e,t)}),J8=Y(`ZodUUID`,(e,t)=>{lJ.init(e,t),V8.init(e,t)}),Y8=Y(`ZodURL`,(e,t)=>{fJ.init(e,t),V8.init(e,t)}),X8=Y(`ZodEmoji`,(e,t)=>{pJ.init(e,t),V8.init(e,t)}),Z8=Y(`ZodNanoID`,(e,t)=>{mJ.init(e,t),V8.init(e,t)}),Q8=Y(`ZodCUID`,(e,t)=>{hJ.init(e,t),V8.init(e,t)}),$8=Y(`ZodCUID2`,(e,t)=>{gJ.init(e,t),V8.init(e,t)}),e5=Y(`ZodULID`,(e,t)=>{_J.init(e,t),V8.init(e,t)}),t5=Y(`ZodXID`,(e,t)=>{vJ.init(e,t),V8.init(e,t)}),n5=Y(`ZodKSUID`,(e,t)=>{yJ.init(e,t),V8.init(e,t)}),r5=Y(`ZodIPv4`,(e,t)=>{wJ.init(e,t),V8.init(e,t)}),i5=Y(`ZodMAC`,(e,t)=>{DJ.init(e,t),V8.init(e,t)}),a5=Y(`ZodIPv6`,(e,t)=>{EJ.init(e,t),V8.init(e,t)}),o5=Y(`ZodCIDRv4`,(e,t)=>{OJ.init(e,t),V8.init(e,t)}),s5=Y(`ZodCIDRv6`,(e,t)=>{kJ.init(e,t),V8.init(e,t)}),c5=Y(`ZodBase64`,(e,t)=>{AJ.init(e,t),V8.init(e,t)}),l5=Y(`ZodBase64URL`,(e,t)=>{jJ.init(e,t),V8.init(e,t)}),u5=Y(`ZodE164`,(e,t)=>{MJ.init(e,t),V8.init(e,t)}),d5=Y(`ZodCreditCard`,(e,t)=>{PJ.init(e,t),V8.init(e,t)}),f5=Y(`ZodJWT`,(e,t)=>{FJ.init(e,t),V8.init(e,t)}),p5=Y(`ZodCustomStringFormat`,(e,t)=>{IJ.init(e,t),V8.init(e,t)}),m5=Y(`ZodNumber`,(e,t)=>{LJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j4(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(Q0(e,t))},gte(e,t){return this.check($0(e,t))},min(e,t){return this.check($0(e,t))},lt(e,t){return this.check(X0(e,t))},lte(e,t){return this.check(Z0(e,t))},max(e,t){return this.check(Z0(e,t))},int(e){return this.check(M6(e))},safe(e){return this.check(M6(e))},positive(e){return this.check(Q0(0,e))},nonnegative(e){return this.check($0(0,e))},negative(e){return this.check(X0(0,e))},nonpositive(e){return this.check(Z0(0,e))},multipleOf(e,t){return this.check(i2(e,t))},step(e,t){return this.check(i2(e,t))},finite(){return this}}),h5=Y(`ZodNumberFormat`,(e,t)=>{RJ.init(e,t),m5.init(e,t)}),g5=Y(`ZodBoolean`,(e,t)=>{zJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M4(e,t,n,r)}),_5=Y(`ZodBigInt`,(e,t)=>{BJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N4(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check($0(e,t))},min(e,t){return this.check($0(e,t))},gt(e,t){return this.check(Q0(e,t))},lt(e,t){return this.check(X0(e,t))},lte(e,t){return this.check(Z0(e,t))},max(e,t){return this.check(Z0(e,t))},positive(e){return this.check(Q0(BigInt(0),e))},negative(e){return this.check(X0(BigInt(0),e))},nonpositive(e){return this.check(Z0(BigInt(0),e))},nonnegative(e){return this.check($0(BigInt(0),e))},multipleOf(e,t){return this.check(i2(e,t))}}),v5=Y(`ZodBigIntFormat`,(e,t)=>{VJ.init(e,t),_5.init(e,t)}),y5=Y(`ZodSymbol`,(e,t)=>{HJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P4(e,t,n,r)}),b5=Y(`ZodUndefined`,(e,t)=>{UJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I4(e,t,n,r)}),x5=Y(`ZodNull`,(e,t)=>{WJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F4(e,t,n,r)}),S5=Y(`ZodAny`,(e,t)=>{GJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r)}),C5=Y(`ZodUnknown`,(e,t)=>{KJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r)}),w5=Y(`ZodNever`,(e,t)=>{qJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R4(e,t,n,r)}),T5=Y(`ZodVoid`,(e,t)=>{JJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L4(e,t,n,r)}),E5=Y(`ZodDate`,(e,t)=>{YJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(e,t,n,r),e.min=(t,n)=>e.check($0(t,n)),e.max=(t,n)=>e.check(Z0(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),D5=Y(`ZodArray`,(e,t)=>{t6(),XJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r),e.element=t.element},{min(e,t){return this.check(l2(e,t))},nonempty(e){return this.check(l2(1,e))},max(e,t){return this.check(c2(e,t))},length(e,t){return this.check(u2(e,t))},unwrap(){return this.element}}),O5=Y(`ZodObject`,(e,t)=>{t6(),eY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),gW(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return l8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:G6()})},loose(){return this.clone({...this._zod.def,catchall:G6()})},strict(){return this.clone({...this._zod.def,catchall:K6()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return JU(this,e)},safeExtend(e){return YU(this,e)},merge(e){return XU(this,e)},pick(e){return KU(this,e)},omit(e){return qU(this,e)},partial(...e){return ZU(V5,this,e[0])},exactPartial(...e){return ZU(H5,this,e[0],`exactPartial`)},required(...e){return QU(K5,this,e[0])}}),k5=Y(`ZodUnion`,(e,t)=>{tY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),e.options=t.options}),A5=Y(`ZodXor`,(e,t)=>{k5.init(e,t),nY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),e.options=t.options}),j5=Y(`ZodDiscriminatedUnion`,(e,t)=>{k5.init(e,t),rY.init(e,t)}),M5=Y(`ZodIntersection`,(e,t)=>{iY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r)}),N5=Y(`ZodTuple`,(e,t)=>{t6(),aY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r3(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new V5({type:`optional`,innerType:e}))})}}),P5=Y(`ZodRecord`,(e,t)=>{t6(),oY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),F5=Y(`ZodMap`,(e,t)=>{t6(),sY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(o2(...t)),e.nonempty=t=>e.check(o2(1,t)),e.max=(...t)=>e.check(a2(...t)),e.size=(...t)=>e.check(s2(...t))}),I5=Y(`ZodSet`,(e,t)=>{t6(),cY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q4(e,t,n,r),e.min=(...t)=>e.check(o2(...t)),e.nonempty=t=>e.check(o2(1,t)),e.max=(...t)=>e.check(a2(...t)),e.size=(...t)=>e.check(s2(...t))}),L5=Y(`ZodEnum`,(e,t)=>{lY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new L5({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new L5({...t,checks:[],...q(r),entries:i})}}),R5=Y(`ZodLiteral`,(e,t)=>{uY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),z5=Y(`ZodFile`,(e,t)=>{dY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r),e.min=(t,n)=>e.check(o2(t,n)),e.max=(t,n)=>e.check(a2(t,n)),e.mime=(t,n)=>e.check(y2(Array.isArray(t)?t:[t],n))}),B5=Y(`ZodTransform`,(e,t)=>{t6(),fY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zW(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(lW(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(lW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),V5=Y(`ZodOptional`,(e,t)=>{pY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),H5=Y(`ZodExactOptional`,(e,t)=>{mY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),U5=Y(`ZodNullable`,(e,t)=>{hY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),W5=Y(`ZodDefault`,(e,t)=>{gY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),G5=Y(`ZodPrefault`,(e,t)=>{_Y.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),K5=Y(`ZodNonOptional`,(e,t)=>{vY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>s3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),q5=Y(`ZodSuccess`,(e,t)=>{yY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),J5=Y(`ZodCatch`,(e,t)=>{bY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Y5=Y(`ZodNaN`,(e,t)=>{xY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r)}),X5=Y(`ZodPipe`,(e,t)=>{SY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>f3(e,t,n,r),e.in=t.in,e.out=t.out}),Z5=Y(`ZodCodec`,(e,t)=>{X5.init(e,t),CY.init(e,t)}),Q5=Y(`ZodPreprocess`,(e,t)=>{X5.init(e,t),wY.init(e,t)}),$5=Y(`ZodReadonly`,(e,t)=>{TY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),e7=Y(`ZodTemplateLiteral`,(e,t)=>{EY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G4(e,t,n,r)}),t7=Y(`ZodLazy`,(e,t)=>{kY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),n7=Y(`ZodPromise`,(e,t)=>{OY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),r7=Y(`ZodFunction`,(e,t)=>{DY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r)}),i7=Y(`ZodCustom`,(e,t)=>{AY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r)}),a7=t4,o7=n4,s7=(...e)=>r4({Codec:Z5,Boolean:g5,String:B8},...e)}));function l7(e){MW({customError:e})}function u7(){return MW().customError}var d7,f7,Qre=o((()=>{w3(),d7={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},f7||={}})),p7=c({ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,date:()=>$re,datetime:()=>m7,duration:()=>tie,time:()=>eie});function m7(e){return C0(H8,e)}function $re(e){return w0(U8,e)}function eie(e){return T0(W8,e)}function tie(e){return E0(G8,e)}var h7=o((()=>{w3(),c7()}));function nie(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function g7(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function _7(e,t){if(e!==!1)return e===void 0||e===!0?$.any():y7(e,t)}function v7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=y7(iie(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>v7({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(S7)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?y7(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=y7(r,t);FU(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=y7(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!BU(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=aie(r,y7(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=g7(n.map(e=>y7(e,t)),a),s=Array.isArray(i)?void 0:_7(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=g7(i.map(e=>y7(e,t)),n),o=_7(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=y7(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function y7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=v7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>y7(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>y7(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:y7(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function b7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:nie(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??D$};return y7(n,r)}var $,x7,S7,oie=o((()=>{O$(),J(),N3(),h7(),c7(),$={...$3,...M3,iso:p7},x7=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),S7=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function C7(e){return T3(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:$6(t.options)}})}var sie=o((()=>{D3(),c7()}));function cie(e,t){if(!t?.length)return e;let n=e._zod.def;return UU(e,IU(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function w7(e){return cie(e.out,e.checks)}function lie(e){return e.in._zod.traits.has(`$ZodTransform`)?w7(e):e.in}function T7(e){return T3(e,{pipe:e=>lie(e._zod.def),default:(e,t)=>t?p8(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function E7(e){return T3(e,{pipe:e=>w7(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var uie=o((()=>{J(),D3(),c7()})),D7=c({bigint:()=>mie,boolean:()=>pie,date:()=>hie,number:()=>fie,string:()=>die});function die(e){return Q1(B8,e)}function fie(e){return O0(m5,e)}function pie(e){return F0(g5,e)}function mie(e){return L0(_5,e)}function hie(e){return J0(E5,e)}var gie=o((()=>{w3(),c7()})),O7=c({$brand:()=>LW,$input:()=>T$,$output:()=>w$,NEVER:()=>PW,TimePrecision:()=>a4,ZodAny:()=>S5,ZodArray:()=>D5,ZodBase64:()=>c5,ZodBase64URL:()=>l5,ZodBigInt:()=>_5,ZodBigIntFormat:()=>v5,ZodBoolean:()=>g5,ZodCIDRv4:()=>o5,ZodCIDRv6:()=>s5,ZodCUID:()=>Q8,ZodCUID2:()=>$8,ZodCatch:()=>J5,ZodCodec:()=>Z5,ZodCompileAsyncError:()=>K1,ZodCompileUnsupportedError:()=>q1,ZodCreditCard:()=>d5,ZodCustom:()=>i7,ZodCustomStringFormat:()=>p5,ZodDate:()=>E5,ZodDefault:()=>W5,ZodDiscriminatedUnion:()=>j5,ZodE164:()=>u5,ZodEmail:()=>K8,ZodEmoji:()=>X8,ZodEnum:()=>L5,ZodError:()=>L3,ZodExactOptional:()=>H5,ZodFile:()=>z5,ZodFirstPartyTypeKind:()=>f7,ZodFunction:()=>r7,ZodGUID:()=>q8,ZodIPv4:()=>r5,ZodIPv6:()=>a5,ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,ZodIntersection:()=>M5,ZodIssueCode:()=>d7,ZodJWT:()=>f5,ZodKSUID:()=>n5,ZodLazy:()=>t7,ZodLiteral:()=>R5,ZodMAC:()=>i5,ZodMap:()=>F5,ZodNaN:()=>Y5,ZodNanoID:()=>Z8,ZodNever:()=>w5,ZodNonOptional:()=>K5,ZodNull:()=>x5,ZodNullable:()=>U5,ZodNumber:()=>m5,ZodNumberFormat:()=>h5,ZodObject:()=>O5,ZodOptional:()=>V5,ZodPipe:()=>X5,ZodPrefault:()=>G5,ZodPreprocess:()=>Q5,ZodPromise:()=>n7,ZodReadonly:()=>$5,ZodRealError:()=>R3,ZodRecord:()=>P5,ZodSet:()=>I5,ZodString:()=>B8,ZodStringFormat:()=>V8,ZodSuccess:()=>q5,ZodSymbol:()=>y5,ZodTemplateLiteral:()=>e7,ZodTransform:()=>B5,ZodTuple:()=>N5,ZodType:()=>R8,ZodULID:()=>e5,ZodURL:()=>Y8,ZodUUID:()=>J8,ZodUndefined:()=>b5,ZodUnion:()=>k5,ZodUnknown:()=>C5,ZodVoid:()=>T5,ZodXID:()=>t5,ZodXor:()=>A5,_ZodString:()=>z8,_default:()=>_8,_function:()=>A8,any:()=>W6,array:()=>Y6,base64:()=>S6,base64url:()=>C6,bigint:()=>R6,boolean:()=>L6,catch:()=>x8,check:()=>j8,cidrv4:()=>b6,cidrv6:()=>x6,clone:()=>UU,codec:()=>w8,coerce:()=>D7,compile:()=>A$,config:()=>MW,core:()=>C3,creditCard:()=>T6,cuid:()=>f6,cuid2:()=>p6,custom:()=>M8,date:()=>J6,decode:()=>G3,decodeAsync:()=>q3,deepPartial:()=>C7,describe:()=>a7,discriminatedUnion:()=>t8,e164:()=>w6,email:()=>n6,emoji:()=>u6,encode:()=>W3,encodeAsync:()=>K3,endsWith:()=>g2,enum:()=>l8,exactOptional:()=>m8,file:()=>d8,flattenError:()=>HW,float32:()=>N6,float64:()=>P6,formatError:()=>UW,fromJSONSchema:()=>b7,function:()=>A8,getDiscriminatedOption:()=>Vq,getErrorMap:()=>u7,globalRegistry:()=>D$,gt:()=>Q0,gte:()=>$0,guid:()=>r6,hash:()=>A6,hex:()=>k6,hostname:()=>O6,httpUrl:()=>l6,includes:()=>m2,input:()=>T7,instanceof:()=>F8,int:()=>M6,int32:()=>F6,int64:()=>z6,intersection:()=>n8,invertCodec:()=>T8,ipv4:()=>_6,ipv6:()=>y6,iso:()=>p7,json:()=>I8,jwt:()=>E6,keyof:()=>X6,ksuid:()=>g6,lazy:()=>O8,length:()=>u2,literal:()=>Q,locales:()=>b$,looseObject:()=>Q6,looseRecord:()=>o8,lowercase:()=>f2,lt:()=>X0,lte:()=>Z0,mac:()=>v6,map:()=>s8,maxLength:()=>c2,maxSize:()=>a2,memoizer:()=>IY,meta:()=>o7,mime:()=>y2,minLength:()=>l2,minSize:()=>o2,multipleOf:()=>i2,nan:()=>S8,nanoid:()=>d6,nativeEnum:()=>u8,negative:()=>t2,never:()=>K6,nonnegative:()=>r2,nonoptional:()=>y8,nonpositive:()=>n2,normalize:()=>x2,null:()=>U6,nullable:()=>h8,nullish:()=>g8,number:()=>j6,object:()=>Z,optional:()=>p8,output:()=>E7,overwrite:()=>b2,parse:()=>B3,parseAsync:()=>V3,partialRecord:()=>a8,pipe:()=>C8,positive:()=>e2,prefault:()=>v8,preprocess:()=>L8,prettifyError:()=>KW,promise:()=>k8,properties:()=>v2,property:()=>_2,readonly:()=>E8,record:()=>i8,refine:()=>N8,regex:()=>d2,regexes:()=>jG,registry:()=>S$,safeDecode:()=>Y3,safeDecodeAsync:()=>Z3,safeEncode:()=>J3,safeEncodeAsync:()=>X3,safeParse:()=>H3,safeParseAsync:()=>U3,set:()=>c8,setErrorMap:()=>l7,size:()=>s2,slugify:()=>T2,startsWith:()=>h2,strictObject:()=>Z6,string:()=>X,stringFormat:()=>D6,stringbool:()=>s7,success:()=>b8,superRefine:()=>P8,symbol:()=>V6,templateLiteral:()=>D8,toJSONSchema:()=>O4,toLowerCase:()=>C2,toUpperCase:()=>w2,toZod:()=>DU,transform:()=>f8,treeifyError:()=>WW,trim:()=>S2,tuple:()=>r8,uint32:()=>I6,uint64:()=>B6,ulid:()=>m6,undefined:()=>H6,union:()=>$6,unknown:()=>G6,uppercase:()=>p2,url:()=>c6,util:()=>wU,uuid:()=>i6,uuidv4:()=>a6,uuidv6:()=>o6,uuidv7:()=>s6,validate:()=>fG,validateAsync:()=>pG,void:()=>q6,xid:()=>h6,xor:()=>e8}),k7=o((()=>{w3(),c7(),N3(),z3(),Q3(),Qre(),v3(),oie(),sie(),uie(),x$(),h7(),gie()})),_ie=o((()=>{k7(),k7()})),vie=c({$brand:()=>LW,$input:()=>T$,$output:()=>w$,NEVER:()=>PW,TimePrecision:()=>a4,ZodAny:()=>S5,ZodArray:()=>D5,ZodBase64:()=>c5,ZodBase64URL:()=>l5,ZodBigInt:()=>_5,ZodBigIntFormat:()=>v5,ZodBoolean:()=>g5,ZodCIDRv4:()=>o5,ZodCIDRv6:()=>s5,ZodCUID:()=>Q8,ZodCUID2:()=>$8,ZodCatch:()=>J5,ZodCodec:()=>Z5,ZodCompileAsyncError:()=>K1,ZodCompileUnsupportedError:()=>q1,ZodCreditCard:()=>d5,ZodCustom:()=>i7,ZodCustomStringFormat:()=>p5,ZodDate:()=>E5,ZodDefault:()=>W5,ZodDiscriminatedUnion:()=>j5,ZodE164:()=>u5,ZodEmail:()=>K8,ZodEmoji:()=>X8,ZodEnum:()=>L5,ZodError:()=>L3,ZodExactOptional:()=>H5,ZodFile:()=>z5,ZodFirstPartyTypeKind:()=>f7,ZodFunction:()=>r7,ZodGUID:()=>q8,ZodIPv4:()=>r5,ZodIPv6:()=>a5,ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,ZodIntersection:()=>M5,ZodIssueCode:()=>d7,ZodJWT:()=>f5,ZodKSUID:()=>n5,ZodLazy:()=>t7,ZodLiteral:()=>R5,ZodMAC:()=>i5,ZodMap:()=>F5,ZodNaN:()=>Y5,ZodNanoID:()=>Z8,ZodNever:()=>w5,ZodNonOptional:()=>K5,ZodNull:()=>x5,ZodNullable:()=>U5,ZodNumber:()=>m5,ZodNumberFormat:()=>h5,ZodObject:()=>O5,ZodOptional:()=>V5,ZodPipe:()=>X5,ZodPrefault:()=>G5,ZodPreprocess:()=>Q5,ZodPromise:()=>n7,ZodReadonly:()=>$5,ZodRealError:()=>R3,ZodRecord:()=>P5,ZodSet:()=>I5,ZodString:()=>B8,ZodStringFormat:()=>V8,ZodSuccess:()=>q5,ZodSymbol:()=>y5,ZodTemplateLiteral:()=>e7,ZodTransform:()=>B5,ZodTuple:()=>N5,ZodType:()=>R8,ZodULID:()=>e5,ZodURL:()=>Y8,ZodUUID:()=>J8,ZodUndefined:()=>b5,ZodUnion:()=>k5,ZodUnknown:()=>C5,ZodVoid:()=>T5,ZodXID:()=>t5,ZodXor:()=>A5,_ZodString:()=>z8,_default:()=>_8,_function:()=>A8,any:()=>W6,array:()=>Y6,base64:()=>S6,base64url:()=>C6,bigint:()=>R6,boolean:()=>L6,catch:()=>x8,check:()=>j8,cidrv4:()=>b6,cidrv6:()=>x6,clone:()=>UU,codec:()=>w8,coerce:()=>D7,compile:()=>A$,config:()=>MW,core:()=>C3,creditCard:()=>T6,cuid:()=>f6,cuid2:()=>p6,custom:()=>M8,date:()=>J6,decode:()=>G3,decodeAsync:()=>q3,deepPartial:()=>C7,default:()=>O7,describe:()=>a7,discriminatedUnion:()=>t8,e164:()=>w6,email:()=>n6,emoji:()=>u6,encode:()=>W3,encodeAsync:()=>K3,endsWith:()=>g2,enum:()=>l8,exactOptional:()=>m8,file:()=>d8,flattenError:()=>HW,float32:()=>N6,float64:()=>P6,formatError:()=>UW,fromJSONSchema:()=>b7,function:()=>A8,getDiscriminatedOption:()=>Vq,getErrorMap:()=>u7,globalRegistry:()=>D$,gt:()=>Q0,gte:()=>$0,guid:()=>r6,hash:()=>A6,hex:()=>k6,hostname:()=>O6,httpUrl:()=>l6,includes:()=>m2,input:()=>T7,instanceof:()=>F8,int:()=>M6,int32:()=>F6,int64:()=>z6,intersection:()=>n8,invertCodec:()=>T8,ipv4:()=>_6,ipv6:()=>y6,iso:()=>p7,json:()=>I8,jwt:()=>E6,keyof:()=>X6,ksuid:()=>g6,lazy:()=>O8,length:()=>u2,literal:()=>Q,locales:()=>b$,looseObject:()=>Q6,looseRecord:()=>o8,lowercase:()=>f2,lt:()=>X0,lte:()=>Z0,mac:()=>v6,map:()=>s8,maxLength:()=>c2,maxSize:()=>a2,memoizer:()=>IY,meta:()=>o7,mime:()=>y2,minLength:()=>l2,minSize:()=>o2,multipleOf:()=>i2,nan:()=>S8,nanoid:()=>d6,nativeEnum:()=>u8,negative:()=>t2,never:()=>K6,nonnegative:()=>r2,nonoptional:()=>y8,nonpositive:()=>n2,normalize:()=>x2,null:()=>U6,nullable:()=>h8,nullish:()=>g8,number:()=>j6,object:()=>Z,optional:()=>p8,output:()=>E7,overwrite:()=>b2,parse:()=>B3,parseAsync:()=>V3,partialRecord:()=>a8,pipe:()=>C8,positive:()=>e2,prefault:()=>v8,preprocess:()=>L8,prettifyError:()=>KW,promise:()=>k8,properties:()=>v2,property:()=>_2,readonly:()=>E8,record:()=>i8,refine:()=>N8,regex:()=>d2,regexes:()=>jG,registry:()=>S$,safeDecode:()=>Y3,safeDecodeAsync:()=>Z3,safeEncode:()=>J3,safeEncodeAsync:()=>X3,safeParse:()=>H3,safeParseAsync:()=>U3,set:()=>c8,setErrorMap:()=>l7,size:()=>s2,slugify:()=>T2,startsWith:()=>h2,strictObject:()=>Z6,string:()=>X,stringFormat:()=>D6,stringbool:()=>s7,success:()=>b8,superRefine:()=>P8,symbol:()=>V6,templateLiteral:()=>D8,toJSONSchema:()=>O4,toLowerCase:()=>C2,toUpperCase:()=>w2,toZod:()=>DU,transform:()=>f8,treeifyError:()=>WW,trim:()=>S2,tuple:()=>r8,uint32:()=>I6,uint64:()=>B6,ulid:()=>m6,undefined:()=>H6,union:()=>$6,unknown:()=>G6,uppercase:()=>p2,url:()=>c6,util:()=>wU,uuid:()=>i6,uuidv4:()=>a6,uuidv6:()=>o6,uuidv7:()=>s6,validate:()=>fG,validateAsync:()=>pG,void:()=>q6,xid:()=>h6,xor:()=>e8,z:()=>O7}),A7=o((()=>{k7(),_ie()}));A7();var j7=`io.modelcontextprotocol/related-task`,M7=M8(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),N7=$6([X(),j6().int()]),P7=X();Q6({ttl:j6().optional(),pollInterval:j6().optional()});var yie=Z({ttl:j6().optional()}),bie=Z({taskId:X()}),F7=Q6({progressToken:N7.optional(),[j7]:bie.optional()}),I7=Z({_meta:F7.optional()}),L7=I7.extend({task:yie.optional()}),xie=e=>L7.safeParse(e).success,R7=Z({method:X(),params:I7.loose().optional()}),z7=Z({_meta:F7.optional()}),B7=Z({method:X(),params:z7.loose().optional()}),V7=Q6({_meta:F7.optional()}),H7=$6([X(),j6().int()]),U7=Z({jsonrpc:Q(`2.0`),id:H7,...R7.shape}).strict(),W7=e=>U7.safeParse(e).success,G7=Z({jsonrpc:Q(`2.0`),...B7.shape}).strict(),Sie=e=>G7.safeParse(e).success,K7=Z({jsonrpc:Q(`2.0`),id:H7,result:V7}).strict(),q7=e=>K7.safeParse(e).success,J7;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(J7||={});var Y7=Z({jsonrpc:Q(`2.0`),id:H7.optional(),error:Z({code:j6().int(),message:X(),data:G6().optional()})}).strict(),Cie=e=>Y7.safeParse(e).success,wie=$6([U7,G7,K7,Y7]);$6([K7,Y7]);var X7=V7.strict(),Tie=z7.extend({requestId:H7.optional(),reason:X().optional()}),Z7=B7.extend({method:Q(`notifications/cancelled`),params:Tie}),Q7=Z({icons:Y6(Z({src:X(),mimeType:X().optional(),sizes:Y6(X()).optional(),theme:l8([`light`,`dark`]).optional()})).optional()}),$7=Z({name:X(),title:X().optional()}),e9=$7.extend({...$7.shape,...Q7.shape,version:X(),websiteUrl:X().optional(),description:X().optional()}),Eie=L8(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,n8(Z({form:n8(Z({applyDefaults:L6().optional()}),i8(X(),G6())).optional(),url:M7.optional()}),i8(X(),G6()).optional())),Die=Q6({list:M7.optional(),cancel:M7.optional(),requests:Q6({sampling:Q6({createMessage:M7.optional()}).optional(),elicitation:Q6({create:M7.optional()}).optional()}).optional()}),Oie=Q6({list:M7.optional(),cancel:M7.optional(),requests:Q6({tools:Q6({call:M7.optional()}).optional()}).optional()}),kie=Z({experimental:i8(X(),M7).optional(),sampling:Z({context:M7.optional(),tools:M7.optional()}).optional(),elicitation:Eie.optional(),roots:Z({listChanged:L6().optional()}).optional(),tasks:Die.optional(),extensions:i8(X(),M7).optional()}),Aie=I7.extend({protocolVersion:X(),capabilities:kie,clientInfo:e9}),jie=R7.extend({method:Q(`initialize`),params:Aie}),Mie=Z({experimental:i8(X(),M7).optional(),logging:M7.optional(),completions:M7.optional(),prompts:Z({listChanged:L6().optional()}).optional(),resources:Z({subscribe:L6().optional(),listChanged:L6().optional()}).optional(),tools:Z({listChanged:L6().optional()}).optional(),tasks:Oie.optional(),extensions:i8(X(),M7).optional()}),Nie=V7.extend({protocolVersion:X(),capabilities:Mie,serverInfo:e9,instructions:X().optional()}),Pie=B7.extend({method:Q(`notifications/initialized`),params:z7.optional()}),t9=R7.extend({method:Q(`ping`),params:I7.optional()}),Fie=Z({progress:j6(),total:p8(j6()),message:p8(X())}),Iie=Z({...z7.shape,...Fie.shape,progressToken:N7}),n9=B7.extend({method:Q(`notifications/progress`),params:Iie}),Lie=I7.extend({cursor:P7.optional()}),r9=R7.extend({params:Lie.optional()}),i9=V7.extend({nextCursor:P7.optional()}),Rie=l8([`working`,`input_required`,`completed`,`failed`,`cancelled`]),a9=Z({taskId:X(),status:Rie,ttl:$6([j6(),U6()]),createdAt:X(),lastUpdatedAt:X(),pollInterval:p8(j6()),statusMessage:p8(X())}),o9=V7.extend({task:a9}),zie=z7.merge(a9),s9=B7.extend({method:Q(`notifications/tasks/status`),params:zie}),c9=R7.extend({method:Q(`tasks/get`),params:I7.extend({taskId:X()})}),l9=V7.merge(a9),u9=R7.extend({method:Q(`tasks/result`),params:I7.extend({taskId:X()})});V7.loose();var d9=r9.extend({method:Q(`tasks/list`)}),f9=i9.extend({tasks:Y6(a9)}),p9=R7.extend({method:Q(`tasks/cancel`),params:I7.extend({taskId:X()})}),Bie=V7.merge(a9),m9=Z({uri:X(),mimeType:p8(X()),_meta:i8(X(),G6()).optional()}),h9=m9.extend({text:X()}),g9=X().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),_9=m9.extend({blob:g9}),v9=l8([`user`,`assistant`]),y9=Z({audience:Y6(v9).optional(),priority:j6().min(0).max(1).optional(),lastModified:m7({offset:!0}).optional()}),b9=Z({...$7.shape,...Q7.shape,uri:X(),description:p8(X()),mimeType:p8(X()),size:p8(j6()),annotations:y9.optional(),_meta:p8(Q6({}))}),Vie=Z({...$7.shape,...Q7.shape,uriTemplate:X(),description:p8(X()),mimeType:p8(X()),annotations:y9.optional(),_meta:p8(Q6({}))}),Hie=r9.extend({method:Q(`resources/list`)}),x9=i9.extend({resources:Y6(b9)}),Uie=r9.extend({method:Q(`resources/templates/list`)}),Wie=i9.extend({resourceTemplates:Y6(Vie)}),S9=I7.extend({uri:X()}),Gie=S9,Kie=R7.extend({method:Q(`resources/read`),params:Gie}),C9=V7.extend({contents:Y6($6([h9,_9]))}),qie=B7.extend({method:Q(`notifications/resources/list_changed`),params:z7.optional()}),Jie=S9,Yie=R7.extend({method:Q(`resources/subscribe`),params:Jie}),Xie=S9,Zie=R7.extend({method:Q(`resources/unsubscribe`),params:Xie}),Qie=z7.extend({uri:X()}),$ie=B7.extend({method:Q(`notifications/resources/updated`),params:Qie}),eae=Z({name:X(),description:p8(X()),required:p8(L6())}),tae=Z({...$7.shape,...Q7.shape,description:p8(X()),arguments:p8(Y6(eae)),_meta:p8(Q6({}))}),nae=r9.extend({method:Q(`prompts/list`)}),rae=i9.extend({prompts:Y6(tae)}),iae=I7.extend({name:X(),arguments:i8(X(),X()).optional()}),aae=R7.extend({method:Q(`prompts/get`),params:iae}),w9=Z({type:Q(`text`),text:X(),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),T9=Z({type:Q(`image`),data:g9,mimeType:X(),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),E9=Z({type:Q(`audio`),data:g9,mimeType:X(),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),oae=Z({type:Q(`tool_use`),name:X(),id:X(),input:i8(X(),G6()),_meta:i8(X(),G6()).optional()}),D9=Z({type:Q(`resource`),resource:$6([h9,_9]),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),O9=b9.extend({type:Q(`resource_link`)}),k9=$6([w9,T9,E9,O9,D9]),sae=Z({role:v9,content:k9}),cae=V7.extend({description:X().optional(),messages:Y6(sae)}),lae=B7.extend({method:Q(`notifications/prompts/list_changed`),params:z7.optional()}),uae=Z({title:X().optional(),readOnlyHint:L6().optional(),destructiveHint:L6().optional(),idempotentHint:L6().optional(),openWorldHint:L6().optional()}),dae=Z({taskSupport:l8([`required`,`optional`,`forbidden`]).optional()}),A9=Z({...$7.shape,...Q7.shape,description:X().optional(),inputSchema:Z({type:Q(`object`),properties:i8(X(),M7).optional(),required:Y6(X()).optional()}).catchall(G6()),outputSchema:Z({type:Q(`object`),properties:i8(X(),M7).optional(),required:Y6(X()).optional()}).catchall(G6()).optional(),annotations:uae.optional(),execution:dae.optional(),_meta:i8(X(),G6()).optional()}),j9=r9.extend({method:Q(`tools/list`)}),fae=i9.extend({tools:Y6(A9)}),M9=V7.extend({content:Y6(k9).default([]),structuredContent:i8(X(),G6()).optional(),isError:L6().optional()});M9.or(V7.extend({toolResult:G6()}));var pae=L7.extend({name:X(),arguments:i8(X(),G6()).optional()}),N9=R7.extend({method:Q(`tools/call`),params:pae}),mae=B7.extend({method:Q(`notifications/tools/list_changed`),params:z7.optional()});Z({autoRefresh:L6().default(!0),debounceMs:j6().int().nonnegative().default(300)});var P9=l8([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),hae=I7.extend({level:P9}),gae=R7.extend({method:Q(`logging/setLevel`),params:hae}),_ae=z7.extend({level:P9,logger:X().optional(),data:G6()}),vae=B7.extend({method:Q(`notifications/message`),params:_ae}),yae=Z({hints:Y6(Z({name:X().optional()})).optional(),costPriority:j6().min(0).max(1).optional(),speedPriority:j6().min(0).max(1).optional(),intelligencePriority:j6().min(0).max(1).optional()}),bae=Z({mode:l8([`auto`,`required`,`none`]).optional()}),xae=Z({type:Q(`tool_result`),toolUseId:X().describe(`The unique identifier for the corresponding tool call.`),content:Y6(k9).default([]),structuredContent:Z({}).loose().optional(),isError:L6().optional(),_meta:i8(X(),G6()).optional()}),Sae=t8(`type`,[w9,T9,E9]),F9=t8(`type`,[w9,T9,E9,oae,xae]),Cae=Z({role:v9,content:$6([F9,Y6(F9)]),_meta:i8(X(),G6()).optional()}),wae=L7.extend({messages:Y6(Cae),modelPreferences:yae.optional(),systemPrompt:X().optional(),includeContext:l8([`none`,`thisServer`,`allServers`]).optional(),temperature:j6().optional(),maxTokens:j6().int(),stopSequences:Y6(X()).optional(),metadata:M7.optional(),tools:Y6(A9).optional(),toolChoice:bae.optional()}),Tae=R7.extend({method:Q(`sampling/createMessage`),params:wae}),I9=V7.extend({model:X(),stopReason:p8(l8([`endTurn`,`stopSequence`,`maxTokens`]).or(X())),role:v9,content:Sae}),L9=V7.extend({model:X(),stopReason:p8(l8([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(X())),role:v9,content:$6([F9,Y6(F9)])}),Eae=Z({type:Q(`boolean`),title:X().optional(),description:X().optional(),default:L6().optional()}),Dae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),minLength:j6().optional(),maxLength:j6().optional(),format:l8([`email`,`uri`,`date`,`date-time`]).optional(),default:X().optional()}),Oae=Z({type:l8([`number`,`integer`]),title:X().optional(),description:X().optional(),minimum:j6().optional(),maximum:j6().optional(),default:j6().optional()}),kae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:Y6(X()),default:X().optional()}),Aae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),oneOf:Y6(Z({const:X(),title:X()})),default:X().optional()}),jae=$6([$6([Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:Y6(X()),enumNames:Y6(X()).optional(),default:X().optional()}),$6([kae,Aae]),$6([Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:j6().optional(),maxItems:j6().optional(),items:Z({type:Q(`string`),enum:Y6(X())}),default:Y6(X()).optional()}),Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:j6().optional(),maxItems:j6().optional(),items:Z({anyOf:Y6(Z({const:X(),title:X()}))}),default:Y6(X()).optional()})])]),Eae,Dae,Oae]),Mae=$6([L7.extend({mode:Q(`form`).optional(),message:X(),requestedSchema:Z({type:Q(`object`),properties:i8(X(),jae),required:Y6(X()).optional()})}),L7.extend({mode:Q(`url`),message:X(),elicitationId:X(),url:X().url()})]),Nae=R7.extend({method:Q(`elicitation/create`),params:Mae}),Pae=z7.extend({elicitationId:X()}),Fae=B7.extend({method:Q(`notifications/elicitation/complete`),params:Pae}),Iae=V7.extend({action:l8([`accept`,`decline`,`cancel`]),content:L8(e=>e===null?void 0:e,i8(X(),$6([X(),j6(),L6(),Y6(X())])).optional())}),Lae=Z({type:Q(`ref/resource`),uri:X()}),Rae=Z({type:Q(`ref/prompt`),name:X()}),zae=I7.extend({ref:$6([Rae,Lae]),argument:Z({name:X(),value:X()}),context:Z({arguments:i8(X(),X()).optional()}).optional()}),Bae=R7.extend({method:Q(`completion/complete`),params:zae}),Vae=V7.extend({completion:Q6({values:Y6(X()).max(100),total:p8(j6().int()),hasMore:p8(L6())})}),Hae=Z({uri:X().startsWith(`file://`),name:X().optional(),_meta:i8(X(),G6()).optional()}),Uae=R7.extend({method:Q(`roots/list`),params:I7.optional()}),Wae=V7.extend({roots:Y6(Hae)}),Gae=B7.extend({method:Q(`notifications/roots/list_changed`),params:z7.optional()});$6([t9,jie,Bae,gae,aae,nae,Hie,Uie,Kie,Yie,Zie,N9,j9,c9,u9,d9,p9]),$6([Z7,n9,Pie,Gae,s9]),$6([X7,I9,L9,Iae,Wae,l9,f9,o9]),$6([t9,Tae,Nae,Uae,c9,u9,d9,p9]),$6([Z7,n9,vae,$ie,qie,mae,lae,s9,Fae]),$6([X7,Nie,Vae,cae,rae,x9,Wie,C9,M9,fae,l9,f9,o9]);var R9=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===J7.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Kae(e.elicitations,n)}return new e(t,n,r)}},Kae=class extends R9{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(J7.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function z9(e){return e===`completed`||e===`failed`||e===`cancelled`}function B9(e){let t=A3(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=j3(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function V9(e,t){let n=k3(e,t);if(!n.success)throw n.error;return n.data}var qae=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Z7,e=>{this._oncancel(e)}),this.setNotificationHandler(n9,e=>{this._onprogress(e)}),this.setRequestHandler(t9,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(c9,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new R9(J7.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(u9,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new R9(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new R9(J7.InvalidParams,`Task not found: ${r}`);if(!z9(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(z9(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[j7]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(d9,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new R9(J7.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(p9,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new R9(J7.InvalidParams,`Task not found: ${e.params.taskId}`);if(z9(n.status))throw new R9(J7.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new R9(J7.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof R9?e:new R9(J7.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),R9.fromError(J7.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),q7(e)||Cie(e)?this._onresponse(e):W7(e)?this._onrequest(e,t):Sie(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=R9.fromError(J7.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[j7]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:J7.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=xie(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new R9(J7.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:J7.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),q7(e)?n(e):n(new R9(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(q7(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),q7(e)?r(e):r(R9.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof R9?e:new R9(J7.InternalError,String(e))}}return}let i;try{let r=await this.request(e,o9,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new R9(J7.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},z9(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new R9(J7.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new R9(J7.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof R9?e:new R9(J7.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[j7]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof R9?e:new R9(J7.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=k3(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(R9.fromError(J7.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},l9,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},f9,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Bie,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[j7]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[j7]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[j7]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=B9(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=V9(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=B9(e);this._notificationHandlers.set(n,n=>{let r=V9(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&W7(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new R9(J7.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new R9(J7.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new R9(J7.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new R9(J7.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=s9.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),z9(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new R9(J7.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(z9(a.status))throw new R9(J7.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=s9.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),z9(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function H9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Jae(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=H9(a)&&H9(i)?{...a,...i}:i}return n}var Yae=`modulepreload`,Xae=function(e,t){return new URL(e,t).href},U9={},Zae=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Xae(t,n),t=s(t),t in U9)return;U9[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Yae,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};A7(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var Qae=class extends qae{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},$ae=`2026-01-26`,W9=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=wie.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},eoe=$6([Q(`light`),Q(`dark`)]).describe(`Color theme preference for the host environment.`),G9=$6([Q(`inline`),Q(`fullscreen`),Q(`pip`)]).describe(`Display mode for UI presentation.`),toe=i8($6([Q(`--color-background-primary`),Q(`--color-background-secondary`),Q(`--color-background-tertiary`),Q(`--color-background-inverse`),Q(`--color-background-ghost`),Q(`--color-background-info`),Q(`--color-background-danger`),Q(`--color-background-success`),Q(`--color-background-warning`),Q(`--color-background-disabled`),Q(`--color-text-primary`),Q(`--color-text-secondary`),Q(`--color-text-tertiary`),Q(`--color-text-inverse`),Q(`--color-text-ghost`),Q(`--color-text-info`),Q(`--color-text-danger`),Q(`--color-text-success`),Q(`--color-text-warning`),Q(`--color-text-disabled`),Q(`--color-border-primary`),Q(`--color-border-secondary`),Q(`--color-border-tertiary`),Q(`--color-border-inverse`),Q(`--color-border-ghost`),Q(`--color-border-info`),Q(`--color-border-danger`),Q(`--color-border-success`),Q(`--color-border-warning`),Q(`--color-border-disabled`),Q(`--color-ring-primary`),Q(`--color-ring-secondary`),Q(`--color-ring-inverse`),Q(`--color-ring-info`),Q(`--color-ring-danger`),Q(`--color-ring-success`),Q(`--color-ring-warning`),Q(`--font-sans`),Q(`--font-mono`),Q(`--font-weight-normal`),Q(`--font-weight-medium`),Q(`--font-weight-semibold`),Q(`--font-weight-bold`),Q(`--font-text-xs-size`),Q(`--font-text-sm-size`),Q(`--font-text-md-size`),Q(`--font-text-lg-size`),Q(`--font-heading-xs-size`),Q(`--font-heading-sm-size`),Q(`--font-heading-md-size`),Q(`--font-heading-lg-size`),Q(`--font-heading-xl-size`),Q(`--font-heading-2xl-size`),Q(`--font-heading-3xl-size`),Q(`--font-text-xs-line-height`),Q(`--font-text-sm-line-height`),Q(`--font-text-md-line-height`),Q(`--font-text-lg-line-height`),Q(`--font-heading-xs-line-height`),Q(`--font-heading-sm-line-height`),Q(`--font-heading-md-line-height`),Q(`--font-heading-lg-line-height`),Q(`--font-heading-xl-line-height`),Q(`--font-heading-2xl-line-height`),Q(`--font-heading-3xl-line-height`),Q(`--border-radius-xs`),Q(`--border-radius-sm`),Q(`--border-radius-md`),Q(`--border-radius-lg`),Q(`--border-radius-xl`),Q(`--border-radius-full`),Q(`--border-width-regular`),Q(`--shadow-hairline`),Q(`--shadow-sm`),Q(`--shadow-md`),Q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function p4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;p4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function m4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function h4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!y4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??m4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}FU(n,r,e.length===1?e[0]:h4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=m4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function g4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of y4)if(t in e)return;let n=t.filter(e=>b4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=h4(t);else{let e=n[0],i=b4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>h4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,s4(e,r))}function _4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):s4(i,s),s4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())p4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])g4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}s4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,FU(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:S4(t,`input`,e.processors),output:S4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function v4(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return v4(r.element,n);if(r.type===`set`)return v4(r.valueType,n);if(r.type===`lazy`)return v4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return v4(r.innerType,n);if(r.type===`intersection`)return v4(r.left,n)||v4(r.right,n);if(r.type===`record`||r.type===`map`)return v4(r.keyType,n)||v4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:v4(r.in,n)||v4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(v4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(v4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(v4(e,n))return!0;return!!(r.rest&&v4(r.rest,n))}return!1}var y4,b4,x4,S4,C4=o((()=>{O$(),J(),y4=new Set([`type`,`properties`,`required`,`additionalProperties`]),b4=[`oneOf`,`anyOf`],x4=(e,t={})=>n=>{let r=c4({...n,processors:t});return u4(e,r),f4(r,e),_4(r,e)},S4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=c4({...i??{},target:a,io:t,processors:n});return u4(e,o),f4(o,e),_4(o,e)}}));function w4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?w4(t.out):t.type===`catch`?w4(t.innerType):e._zod.optin}function T4(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=T4(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>T4(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?CK:SK).source),p):p}function E4(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of i3.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=T4(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function D4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(l4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),c3):JSON.parse(o)}function O4(e,t){if(`_idmap`in e){let n=e,r=c4({...t,processors:_3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;u4(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;f4(r,n),FU(a,t,_4(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=c4({...t,processors:_3});return u4(e,n),f4(n,e),_4(n,e)}var k4,A4,j4,M4,N4,P4,F4,I4,L4,R4,z4,B4,V4,H4,U4,W4,G4,K4,q4,J4,Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3,a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,h3,g3,_3,v3=o((()=>{GK(),C4(),J(),k4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},A4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=k4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},j4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):l4(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},M4=(e,t,n,r)=>{n.type=`boolean`},N4=(e,t,n,r)=>{l4(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},P4=(e,t,n,r)=>{l4(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},F4=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},I4=(e,t,n,r)=>{l4(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},L4=(e,t,n,r)=>{l4(e,t,n,r,`Void cannot be represented in JSON Schema`)},R4=(e,t,n,r)=>{n.not={}},z4=(e,t,n,r)=>{},B4=(e,t,n,r)=>{},V4=(e,t,n,r)=>{l4(e,t,n,r,`Date cannot be represented in JSON Schema`)},H4=(e,t,n,r)=>{let i=e._zod.def,a=OU(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},U4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(l4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(l4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},W4=(e,t,n,r)=>{l4(e,t,n,r,`NaN cannot be represented in JSON Schema`)},G4=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},K4=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},q4=(e,t,n,r)=>{n.type=`boolean`},J4=(e,t,n,r)=>{l4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Y4=(e,t,n,r)=>{l4(e,t,n,r,`Function types cannot be represented in JSON Schema`)},X4=(e,t,n,r)=>{l4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Z4=(e,t,n,r)=>{l4(e,t,n,r,`Map cannot be represented in JSON Schema`)},Q4=(e,t,n,r)=>{l4(e,t,n,r,`Set cannot be represented in JSON Schema`)},$4=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=u4(a.element,t,{...r,path:[...r.path,`items`]})},e3=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&l4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)FU(i.properties,e,u4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?w4(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=u4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},t3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>u4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},n3=(e,t,n,r)=>{let i=e._zod.def,a=u4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=u4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},r3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>u4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?u4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?w4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},i3=new WeakMap,a3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=u4(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)FU(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=u4(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=i3.get(t);n||(n=[],i3.set(t,n),t.deferred.push(()=>E4(t))),n.push(e)}i.additionalProperties=u4(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&w4(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},o3=(e,t,n,r)=>{let i=e._zod.def,a=u4(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},s3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},c3=Symbol(),l3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=D4(i.defaultValue,e,t,n,r);o!==c3&&(n.default=o)},u3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=D4(i.defaultValue,e,t,n,r);o!==c3&&(n._prefault=o)},d3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{l4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},f3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;u4(o,t,r);let s=t.seen.get(e);s.ref=o},p3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},m3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},h3=(e,t,n,r)=>{let i=e._zod.def;u4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},g3=(e,t,n,r)=>{let i=e._zod.innerType;u4(i,t,r);let a=t.seen.get(e);a.ref=i},_3={string:A4,number:j4,boolean:M4,bigint:N4,symbol:P4,null:F4,undefined:I4,void:L4,never:R4,any:z4,unknown:B4,date:V4,enum:H4,literal:U4,nan:W4,template_literal:G4,file:K4,success:q4,custom:J4,function:Y4,transform:X4,map:Z4,set:Q4,array:$4,object:e3,union:t3,intersection:n3,tuple:r3,record:a3,nullable:o3,nonoptional:s3,default:l3,prefault:u3,catch:d3,pipe:f3,readonly:p3,promise:m3,optional:h3,lazy:g3}})),y3,b3=o((()=>{v3(),C4(),y3=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=c4({processors:_3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return u4(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,f4(this.ctx,e);let{"~standard":n,...r}=_4(this.ctx,e);return r}}})),x3=c({}),S3=o((()=>{})),C3=c({$ZodAny:()=>GJ,$ZodArray:()=>XJ,$ZodAsyncError:()=>RW,$ZodBase64:()=>AJ,$ZodBase64URL:()=>jJ,$ZodBigInt:()=>BJ,$ZodBigIntFormat:()=>VJ,$ZodBoolean:()=>zJ,$ZodCIDRv4:()=>OJ,$ZodCIDRv6:()=>kJ,$ZodCUID:()=>hJ,$ZodCUID2:()=>gJ,$ZodCatch:()=>bY,$ZodCheck:()=>qK,$ZodCheckBigIntFormat:()=>tq,$ZodCheckEndsWith:()=>mq,$ZodCheckGreaterThan:()=>QK,$ZodCheckIncludes:()=>fq,$ZodCheckLengthEquals:()=>sq,$ZodCheckLessThan:()=>ZK,$ZodCheckLowerCase:()=>uq,$ZodCheckMaxLength:()=>aq,$ZodCheckMaxSize:()=>nq,$ZodCheckMimeType:()=>gq,$ZodCheckMinLength:()=>oq,$ZodCheckMinSize:()=>rq,$ZodCheckMultipleOf:()=>$K,$ZodCheckNumberFormat:()=>eq,$ZodCheckOverwrite:()=>_q,$ZodCheckProperty:()=>hq,$ZodCheckRegex:()=>lq,$ZodCheckSizeEquals:()=>iq,$ZodCheckStartsWith:()=>pq,$ZodCheckStringFormat:()=>cq,$ZodCheckUpperCase:()=>dq,$ZodCodec:()=>CY,$ZodCreditCard:()=>PJ,$ZodCustom:()=>AY,$ZodCustomStringFormat:()=>IJ,$ZodCyclicError:()=>RY,$ZodDate:()=>YJ,$ZodDefault:()=>gY,$ZodDiscriminatedUnion:()=>rY,$ZodE164:()=>MJ,$ZodEmail:()=>uJ,$ZodEmoji:()=>pJ,$ZodEncodeError:()=>zW,$ZodEnum:()=>lY,$ZodError:()=>QW,$ZodExactOptional:()=>mY,$ZodFile:()=>dY,$ZodFunction:()=>DY,$ZodGUID:()=>cJ,$ZodIPv4:()=>wJ,$ZodIPv6:()=>EJ,$ZodISODate:()=>xJ,$ZodISODateTime:()=>bJ,$ZodISODuration:()=>CJ,$ZodISOTime:()=>SJ,$ZodIntersection:()=>iY,$ZodJWT:()=>FJ,$ZodKSUID:()=>yJ,$ZodLazy:()=>kY,$ZodLiteral:()=>uY,$ZodMAC:()=>DJ,$ZodMap:()=>sY,$ZodNaN:()=>xY,$ZodNanoID:()=>mJ,$ZodNever:()=>qJ,$ZodNonOptional:()=>vY,$ZodNull:()=>WJ,$ZodNullable:()=>hY,$ZodNumber:()=>LJ,$ZodNumberFormat:()=>RJ,$ZodObject:()=>$J,$ZodObjectJIT:()=>eY,$ZodOptional:()=>pY,$ZodPipe:()=>SY,$ZodPrefault:()=>_Y,$ZodPreprocess:()=>wY,$ZodPromise:()=>OY,$ZodReadonly:()=>TY,$ZodRealError:()=>$W,$ZodRecord:()=>oY,$ZodRegistry:()=>E$,$ZodSet:()=>cY,$ZodString:()=>oJ,$ZodStringFormat:()=>sJ,$ZodSuccess:()=>yY,$ZodSymbol:()=>HJ,$ZodTemplateLiteral:()=>EY,$ZodTransform:()=>fY,$ZodTuple:()=>aY,$ZodType:()=>iJ,$ZodULID:()=>_J,$ZodURL:()=>fJ,$ZodUUID:()=>lJ,$ZodUndefined:()=>UJ,$ZodUnion:()=>tY,$ZodUnknown:()=>KJ,$ZodVoid:()=>JJ,$ZodXID:()=>vJ,$ZodXor:()=>nY,$brand:()=>LW,$constructor:()=>Y,$input:()=>T$,$output:()=>w$,Doc:()=>yq,INVALID:()=>W1,JSONSchema:()=>x3,JSONSchemaGenerator:()=>y3,NEVER:()=>PW,TimePrecision:()=>a4,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>K1,ZodCompileUnsupportedError:()=>q1,_any:()=>U0,_array:()=>E2,_base64:()=>v0,_base64url:()=>y0,_bigint:()=>I0,_boolean:()=>P0,_catch:()=>G2,_check:()=>e4,_cidrv4:()=>g0,_cidrv6:()=>_0,_coercedBigint:()=>L0,_coercedBoolean:()=>F0,_coercedDate:()=>J0,_coercedNumber:()=>O0,_coercedString:()=>Q1,_creditCard:()=>x0,_cuid:()=>c0,_cuid2:()=>l0,_custom:()=>Z2,_date:()=>q0,_decode:()=>gG,_decodeAsync:()=>bG,_default:()=>H2,_discriminatedUnion:()=>k2,_e164:()=>b0,_email:()=>$1,_emoji:()=>o0,_encode:()=>mG,_encodeAsync:()=>vG,_endsWith:()=>g2,_enum:()=>F2,_file:()=>R2,_float32:()=>A0,_float64:()=>j0,_gt:()=>Q0,_gte:()=>$0,_guid:()=>e0,_includes:()=>m2,_int:()=>k0,_int32:()=>M0,_int64:()=>R0,_intersection:()=>A2,_ipv4:()=>p0,_ipv6:()=>m0,_isoDate:()=>w0,_isoDateTime:()=>C0,_isoDuration:()=>E0,_isoTime:()=>T0,_jwt:()=>S0,_ksuid:()=>f0,_lazy:()=>Y2,_length:()=>u2,_literal:()=>L2,_lowercase:()=>f2,_lt:()=>X0,_lte:()=>Z0,_mac:()=>h0,_map:()=>N2,_max:()=>Z0,_maxLength:()=>c2,_maxSize:()=>a2,_mime:()=>y2,_min:()=>$0,_minLength:()=>l2,_minSize:()=>o2,_multipleOf:()=>i2,_nan:()=>Y0,_nanoid:()=>s0,_nativeEnum:()=>I2,_negative:()=>t2,_never:()=>G0,_nonnegative:()=>r2,_nonoptional:()=>U2,_nonpositive:()=>n2,_normalize:()=>x2,_null:()=>H0,_nullable:()=>V2,_number:()=>D0,_optional:()=>B2,_overwrite:()=>b2,_parse:()=>nG,_parseAsync:()=>iG,_pipe:()=>K2,_positive:()=>e2,_promise:()=>X2,_properties:()=>v2,_property:()=>_2,_readonly:()=>q2,_record:()=>M2,_refine:()=>Q2,_regex:()=>d2,_safeDecode:()=>wG,_safeDecodeAsync:()=>OG,_safeEncode:()=>SG,_safeEncodeAsync:()=>EG,_safeParse:()=>oG,_safeParseAsync:()=>cG,_set:()=>P2,_size:()=>s2,_slugify:()=>T2,_startsWith:()=>h2,_string:()=>Z1,_stringFormat:()=>i4,_stringbool:()=>r4,_success:()=>W2,_superRefine:()=>$2,_symbol:()=>B0,_templateLiteral:()=>J2,_toLowerCase:()=>C2,_toUpperCase:()=>w2,_transform:()=>z2,_trim:()=>S2,_tuple:()=>j2,_uint32:()=>N0,_uint64:()=>z0,_ulid:()=>u0,_undefined:()=>V0,_union:()=>D2,_unknown:()=>W0,_uppercase:()=>p2,_url:()=>a0,_uuid:()=>t0,_uuidv4:()=>n0,_uuidv6:()=>r0,_uuidv7:()=>i0,_void:()=>K0,_xid:()=>d0,_xor:()=>O2,clone:()=>UU,compile:()=>A$,compileFn:()=>M$,config:()=>MW,createStandardJSONSchemaMethod:()=>S4,createToJSONSchemaMethod:()=>x4,decode:()=>_G,decodeAsync:()=>xG,describe:()=>t4,encode:()=>hG,encodeAsync:()=>yG,extractDefs:()=>f4,finalize:()=>_4,flattenError:()=>HW,formatError:()=>UW,getDiscriminatedOption:()=>Vq,globalConfig:()=>BW,globalRegistry:()=>D$,handleUnrepresentable:()=>l4,initializeContext:()=>c4,isBackEdge:()=>LY,isRecursiveSchema:()=>PY,isValidBase64:()=>Aq,isValidBase64URL:()=>jq,isValidCIDRv6:()=>kq,isValidCreditCard:()=>Nq,isValidIPv6:()=>Oq,isValidJWT:()=>Pq,locales:()=>b$,memoizer:()=>IY,mergeValues:()=>Hq,meta:()=>n4,parse:()=>rG,parseAsync:()=>aG,parseURLObject:()=>wq,prettifyError:()=>KW,process:()=>u4,regexes:()=>jG,registry:()=>S$,safeDecode:()=>TG,safeDecodeAsync:()=>kG,safeEncode:()=>CG,safeEncodeAsync:()=>DG,safeParse:()=>sG,safeParseAsync:()=>lG,standardProps:()=>Cq,stripTabAndNewline:()=>Tq,toDotPath:()=>GW,toJSONSchema:()=>O4,toZod:()=>EU,treeifyError:()=>WW,urlHostnameOk:()=>Eq,urlProtocolOk:()=>Dq,util:()=>CU,validate:()=>fG,validateAsync:()=>pG,version:()=>xq}),w3=o((()=>{VW(),AG(),eG(),jY(),GY(),vq(),Sq(),J(),GK(),x$(),O$(),bq(),X1(),o4(),C4(),v3(),b3(),S3()}));function T3(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===E3)return new kY({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,E3);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?UU(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:UU(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?UU(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:UU(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:UU(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?UU(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:UU(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:UU(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:UU(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:UU(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return UU(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var E3,D3=o((()=>{jY(),J(),E3=Symbol(`z.visit/resolving`)}));AG();function O3(e){return!!e._zod}function k3(e,t){return O3(e)?sG(e,t):e.safeParse(t)}function A3(e){if(!e)return;let t;if(t=O3(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function j3(e){if(O3(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var M3=c({endsWith:()=>g2,gt:()=>Q0,gte:()=>$0,includes:()=>m2,length:()=>u2,lowercase:()=>f2,lt:()=>X0,lte:()=>Z0,maxLength:()=>c2,maxSize:()=>a2,mime:()=>y2,minLength:()=>l2,minSize:()=>o2,multipleOf:()=>i2,negative:()=>t2,nonnegative:()=>r2,nonpositive:()=>n2,normalize:()=>x2,overwrite:()=>b2,positive:()=>e2,properties:()=>v2,property:()=>_2,regex:()=>d2,size:()=>s2,slugify:()=>T2,startsWith:()=>h2,toLowerCase:()=>C2,toUpperCase:()=>w2,trim:()=>S2,uppercase:()=>p2}),N3=o((()=>{w3()}));function P3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var F3,I3,L3,R3,z3=o((()=>{w3(),J(),F3=new WeakSet([Object.prototype,Error.prototype]),I3=(e,t)=>{QW.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);F3.has(n)||(F3.add(n),P3(n,`format`,e=>t=>UW(e,t)),P3(n,`flatten`,e=>t=>HW(e,t)),P3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,kU,2)}),P3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,kU,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},L3=Y(`ZodError`,I3),R3=Y(`ZodError`,I3,void 0,{Parent:Error})})),B3,V3,H3,U3,W3,G3,K3,q3,J3,Y3,X3,Z3,Q3=o((()=>{w3(),z3(),B3=nG(R3),V3=iG(R3),H3=oG(R3),U3=cG(R3),W3=mG(R3),G3=gG(R3),K3=vG(R3),q3=bG(R3),J3=SG(R3),Y3=wG(R3),X3=EG(R3),Z3=OG(R3)})),$3=c({ZodAny:()=>S5,ZodArray:()=>D5,ZodBase64:()=>c5,ZodBase64URL:()=>l5,ZodBigInt:()=>_5,ZodBigIntFormat:()=>v5,ZodBoolean:()=>g5,ZodCIDRv4:()=>o5,ZodCIDRv6:()=>s5,ZodCUID:()=>Q8,ZodCUID2:()=>$8,ZodCatch:()=>J5,ZodCodec:()=>Z5,ZodCreditCard:()=>d5,ZodCustom:()=>i7,ZodCustomStringFormat:()=>p5,ZodDate:()=>E5,ZodDefault:()=>W5,ZodDiscriminatedUnion:()=>j5,ZodE164:()=>u5,ZodEmail:()=>K8,ZodEmoji:()=>X8,ZodEnum:()=>L5,ZodExactOptional:()=>H5,ZodFile:()=>z5,ZodFunction:()=>r7,ZodGUID:()=>q8,ZodIPv4:()=>r5,ZodIPv6:()=>a5,ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,ZodIntersection:()=>M5,ZodJWT:()=>f5,ZodKSUID:()=>n5,ZodLazy:()=>t7,ZodLiteral:()=>R5,ZodMAC:()=>i5,ZodMap:()=>F5,ZodNaN:()=>Y5,ZodNanoID:()=>Z8,ZodNever:()=>w5,ZodNonOptional:()=>K5,ZodNull:()=>x5,ZodNullable:()=>U5,ZodNumber:()=>m5,ZodNumberFormat:()=>h5,ZodObject:()=>O5,ZodOptional:()=>V5,ZodPipe:()=>X5,ZodPrefault:()=>G5,ZodPreprocess:()=>Q5,ZodPromise:()=>n7,ZodReadonly:()=>$5,ZodRecord:()=>P5,ZodSet:()=>I5,ZodString:()=>B8,ZodStringFormat:()=>V8,ZodSuccess:()=>q5,ZodSymbol:()=>y5,ZodTemplateLiteral:()=>e7,ZodTransform:()=>B5,ZodTuple:()=>N5,ZodType:()=>R8,ZodULID:()=>e5,ZodURL:()=>Y8,ZodUUID:()=>J8,ZodUndefined:()=>b5,ZodUnion:()=>k5,ZodUnknown:()=>C5,ZodVoid:()=>T5,ZodXID:()=>t5,ZodXor:()=>A5,_ZodString:()=>z8,_default:()=>_8,_function:()=>A8,any:()=>W6,array:()=>Y6,base64:()=>S6,base64url:()=>C6,bigint:()=>R6,boolean:()=>L6,catch:()=>x8,check:()=>j8,cidrv4:()=>b6,cidrv6:()=>x6,codec:()=>w8,creditCard:()=>T6,cuid:()=>f6,cuid2:()=>p6,custom:()=>M8,date:()=>J6,describe:()=>a7,discriminatedUnion:()=>t8,e164:()=>w6,email:()=>n6,emoji:()=>u6,enum:()=>l8,exactOptional:()=>m8,file:()=>d8,float32:()=>N6,float64:()=>P6,function:()=>A8,guid:()=>r6,hash:()=>A6,hex:()=>k6,hostname:()=>O6,httpUrl:()=>l6,instanceof:()=>F8,int:()=>M6,int32:()=>F6,int64:()=>z6,intersection:()=>n8,invertCodec:()=>T8,ipv4:()=>_6,ipv6:()=>y6,json:()=>I8,jwt:()=>E6,keyof:()=>X6,ksuid:()=>g6,lazy:()=>O8,literal:()=>Q,looseObject:()=>Q6,looseRecord:()=>o8,mac:()=>v6,map:()=>s8,meta:()=>o7,nan:()=>S8,nanoid:()=>d6,nativeEnum:()=>u8,never:()=>K6,nonoptional:()=>y8,null:()=>U6,nullable:()=>h8,nullish:()=>g8,number:()=>j6,object:()=>Z,optional:()=>p8,partialRecord:()=>a8,pipe:()=>C8,prefault:()=>v8,preprocess:()=>L8,promise:()=>k8,readonly:()=>E8,record:()=>i8,refine:()=>N8,set:()=>c8,strictObject:()=>Z6,string:()=>X,stringFormat:()=>D6,stringbool:()=>s7,success:()=>b8,superRefine:()=>P8,symbol:()=>V6,templateLiteral:()=>D8,transform:()=>f8,tuple:()=>r8,uint32:()=>I6,uint64:()=>B6,ulid:()=>m6,undefined:()=>H6,union:()=>$6,unknown:()=>G6,url:()=>c6,uuid:()=>i6,uuidv4:()=>a6,uuidv6:()=>o6,uuidv7:()=>s6,void:()=>q6,xid:()=>h6,xor:()=>e8});function e6(){BW.localeError||MW(EX())}function t6(){BW.memoizer||MW({memoizer:IY()})}function X(e){return Z1(B8,e)}function n6(e){return $1(K8,e)}function r6(e){return e0(q8,e)}function i6(e){return t0(J8,e)}function a6(e){return n0(J8,e)}function o6(e){return r0(J8,e)}function s6(e){return i0(J8,e)}function c6(e){return a0(Y8,e)}function l6(e){return a0(Y8,{protocol:hK,hostname:mK,...q(e)})}function u6(e){return o0(X8,e)}function d6(e){return s0(Z8,e)}function f6(e){return c0(Q8,e)}function p6(e){return l0($8,e)}function m6(e){return u0(e5,e)}function h6(e){return d0(t5,e)}function g6(e){return f0(n5,e)}function _6(e){return p0(r5,e)}function v6(e){return h0(i5,e)}function y6(e){return m0(a5,e)}function b6(e){return g0(o5,e)}function x6(e){return _0(s5,e)}function S6(e){return v0(c5,e)}function C6(e){return y0(l5,e)}function w6(e){return b0(u5,e)}function T6(e){return x0(d5,e)}function E6(e){return S0(f5,e)}function D6(e,t,n={}){return i4(p5,e,t,n)}function O6(e){return i4(p5,`hostname`,pK,e)}function k6(e){return i4(p5,`hex`,kK,e)}function A6(e,t){let n=`${e}_${t?.enc??`hex`}`,r=jG[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return i4(p5,n,r,t)}function j6(e){return D0(m5,e)}function M6(e){return k0(h5,e)}function N6(e){return A0(h5,e)}function P6(e){return j0(h5,e)}function F6(e){return M0(h5,e)}function I6(e){return N0(h5,e)}function L6(e){return P0(g5,e)}function R6(e){return I0(_5,e)}function z6(e){return R0(v5,e)}function B6(e){return z0(v5,e)}function V6(e){return B0(y5,e)}function H6(e){return V0(b5,e)}function U6(e){return H0(x5,e)}function W6(){return U0(S5)}function G6(){return W0(C5)}function K6(e){return G0(w5,e)}function q6(e){return K0(T5,e)}function J6(e){return q0(E5,e)}function Y6(e,t){return E2(D5,e,t)}function X6(e){let t=e._zod.def.shape;return l8(Object.keys(t))}function Z(e,t){let n={type:`object`,shape:e??{},...q(t)};return new O5(n)}function Z6(e,t){return new O5({type:`object`,shape:e,catchall:K6(),...q(t)})}function Q6(e,t){return new O5({type:`object`,shape:e,catchall:G6(),...q(t)})}function $6(e,t){return new k5({type:`union`,options:e,...q(t)})}function e8(e,t){return new A5({type:`union`,options:e,inclusive:!1,...q(t)})}function t8(e,t,n){return new j5({type:`union`,options:t,discriminator:e,...q(n)})}function n8(e,t){return new M5({type:`intersection`,left:e,right:t})}function r8(e,t,n){let r=t instanceof iJ;return new N5({type:`tuple`,items:e,rest:r?t:null,...q(r?n:t)})}function i8(e,t,n){return!t||!t._zod?new P5({type:`record`,keyType:X(),valueType:e,...q(t)}):new P5({type:`record`,keyType:e,valueType:t,...q(n)})}function a8(e,t,n){return new P5({type:`record`,keyType:e,valueType:t,...q(n),partial:!0})}function o8(e,t,n){return new P5({type:`record`,keyType:e,valueType:t,mode:`loose`,...q(n)})}function s8(e,t,n){return new F5({type:`map`,keyType:e,valueType:t,...q(n)})}function c8(e,t){return new I5({type:`set`,valueType:e,...q(t)})}function l8(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new L5({type:`enum`,entries:n,...q(t)})}function u8(e,t){return new L5({type:`enum`,entries:e,...q(t)})}function Q(e,t){return new R5({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function d8(e){return R2(z5,e)}function f8(e){return new B5({type:`transform`,transform:e})}function p8(e){return new V5({type:`optional`,innerType:e})}function m8(e){return new H5({type:`optional`,innerType:e})}function h8(e){return new U5({type:`nullable`,innerType:e})}function g8(e){return p8(h8(e))}function _8(e,t){return new W5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}function v8(e,t){return new G5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}function y8(e,t){return new K5({type:`nonoptional`,innerType:e,...q(t)})}function b8(e){return new q5({type:`success`,innerType:e})}function x8(e,t){return new J5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:_W(t)})}function S8(e){return Y0(Y5,e)}function C8(e,t){return new X5({type:`pipe`,in:e,out:t})}function w8(e,t,n){return new Z5({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function T8(e){let t=e._zod.def;return new Z5({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function E8(e){return new $5({type:`readonly`,innerType:e})}function D8(e,t){return new e7({type:`template_literal`,parts:e,...q(t)})}function O8(e){return new t7({type:`lazy`,getter:e})}function k8(e){return new n7({type:`promise`,innerType:e})}function A8(e){return new r7({type:`function`,input:Array.isArray(e?.input)?r8(e?.input):e?.input??Y6(G6()),output:e?.output??G6()})}function j8(e){let t=new qK({check:`custom`});return t._zod.check=e,t}function M8(e,t){return Z2(i7,e??(()=>!0),t)}function N8(e,t={}){return Q2(i7,e,t)}function P8(e,t){return $2(e,t)}function F8(e,t={}){let n=new i7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...q(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function I8(e){let t=O8(()=>$6([X(e),j6(),L6(),U6(),Y6(t),i8(X(),t)]));return t}function L8(e,t){return new Q5({type:`pipe`,in:f8(e),out:t})}var R8,z8,B8,V8,H8,U8,W8,G8,K8,q8,J8,Y8,X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5,F5,I5,L5,R5,z5,B5,V5,H5,U5,W5,G5,K5,q5,J5,Y5,X5,Z5,Q5,$5,e7,t7,n7,r7,i7,a7,o7,s7,c7=o((()=>{w3(),v3(),C4(),OX(),N3(),Q3(),R8=Y(`ZodType`,(e,t)=>(e6(),iJ.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(IU(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return UU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(N8(e,t))},superRefine(e,t){return this.check(P8(e,t))},overwrite(e){return this.check(b2(e))},optional(){return p8(this)},exactOptional(){return m8(this)},nullable(){return h8(this)},nullish(){return p8(h8(this))},nonoptional(e){return y8(this,e)},array(){return Y6(this)},or(e){return $6([this,e])},and(e){return n8(this,e)},transform(e){return C8(this,f8(e))},default(e){return _8(this,e)},prefault(e){return v8(this,e)},catch(e){return x8(this,e)},pipe(e){return C8(this,e)},readonly(){return E8(this)},describe(e){let t=this.clone();return D$.add(t,{description:e}),t},meta(...e){if(e.length===0)return D$.get(this);let t=this.clone();return D$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return mW(this,`~standard`,{...Cq(this),jsonSchema:{input:S4(this,`input`),output:S4(this,`output`)}})},set"~standard"(e){pW(this,`~standard`,e)},parse:function e(t,n){return B3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await V3(this,t,n,{callee:e})},safeParse(e,t){return H3(this,e,t)},async safeParseAsync(e,t){return U3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){pW(this,`spa`,e)},encode:function e(t,n){return W3(this,t,n,{callee:e})},decode:function e(t,n){return G3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await K3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await q3(this,t,n,{callee:e})},safeEncode(e,t){return J3(this,e,t)},safeDecode(e,t){return Y3(this,e,t)},async safeEncodeAsync(e,t){return X3(this,e,t)},async safeDecodeAsync(e,t){return Z3(this,e,t)},toJSONSchema(e){return x4(this,{})(e)},get description(){return D$.get(this)?.description},get _def(){return this._zod.def}}),z8=Y(`_ZodString`,(e,t)=>{oJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A4(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(d2(...e))},includes(...e){return this.check(m2(...e))},startsWith(...e){return this.check(h2(...e))},endsWith(...e){return this.check(g2(...e))},min(...e){return this.check(l2(...e))},max(...e){return this.check(c2(...e))},length(...e){return this.check(u2(...e))},nonempty(...e){return this.check(l2(1,...e))},lowercase(e){return this.check(f2(e))},uppercase(e){return this.check(p2(e))},trim(){return this.check(S2())},normalize(...e){return this.check(x2(...e))},toLowerCase(){return this.check(C2())},toUpperCase(){return this.check(w2())},slugify(){return this.check(T2())}}),B8=Y(`ZodString`,(e,t)=>{oJ.init(e,t),z8.init(e,t)},{email(e){return this.check($1(K8,e))},url(e){return this.check(a0(Y8,e))},jwt(e){return this.check(S0(f5,e))},emoji(e){return this.check(o0(X8,e))},guid(e){return this.check(e0(q8,e))},uuid(e){return this.check(t0(J8,e))},uuidv4(e){return this.check(n0(J8,e))},uuidv6(e){return this.check(r0(J8,e))},uuidv7(e){return this.check(i0(J8,e))},nanoid(e){return this.check(s0(Z8,e))},cuid(e){return this.check(c0(Q8,e))},cuid2(e){return this.check(l0($8,e))},ulid(e){return this.check(u0(e5,e))},base64(e){return this.check(v0(c5,e))},base64url(e){return this.check(y0(l5,e))},xid(e){return this.check(d0(t5,e))},ksuid(e){return this.check(f0(n5,e))},ipv4(e){return this.check(p0(r5,e))},ipv6(e){return this.check(m0(a5,e))},cidrv4(e){return this.check(g0(o5,e))},cidrv6(e){return this.check(_0(s5,e))},e164(e){return this.check(b0(u5,e))},datetime(e){return this.check(C0(H8,e))},date(e){return this.check(w0(U8,e))},time(e){return this.check(T0(W8,e))},duration(e){return this.check(E0(G8,e))}}),V8=Y(`ZodStringFormat`,(e,t)=>{sJ.init(e,t),z8.init(e,t)}),H8=Y(`ZodISODateTime`,(e,t)=>{bJ.init(e,t),V8.init(e,t)}),U8=Y(`ZodISODate`,(e,t)=>{xJ.init(e,t),V8.init(e,t)}),W8=Y(`ZodISOTime`,(e,t)=>{SJ.init(e,t),V8.init(e,t)}),G8=Y(`ZodISODuration`,(e,t)=>{CJ.init(e,t),V8.init(e,t)}),K8=Y(`ZodEmail`,(e,t)=>{uJ.init(e,t),V8.init(e,t)}),q8=Y(`ZodGUID`,(e,t)=>{cJ.init(e,t),V8.init(e,t)}),J8=Y(`ZodUUID`,(e,t)=>{lJ.init(e,t),V8.init(e,t)}),Y8=Y(`ZodURL`,(e,t)=>{fJ.init(e,t),V8.init(e,t)}),X8=Y(`ZodEmoji`,(e,t)=>{pJ.init(e,t),V8.init(e,t)}),Z8=Y(`ZodNanoID`,(e,t)=>{mJ.init(e,t),V8.init(e,t)}),Q8=Y(`ZodCUID`,(e,t)=>{hJ.init(e,t),V8.init(e,t)}),$8=Y(`ZodCUID2`,(e,t)=>{gJ.init(e,t),V8.init(e,t)}),e5=Y(`ZodULID`,(e,t)=>{_J.init(e,t),V8.init(e,t)}),t5=Y(`ZodXID`,(e,t)=>{vJ.init(e,t),V8.init(e,t)}),n5=Y(`ZodKSUID`,(e,t)=>{yJ.init(e,t),V8.init(e,t)}),r5=Y(`ZodIPv4`,(e,t)=>{wJ.init(e,t),V8.init(e,t)}),i5=Y(`ZodMAC`,(e,t)=>{DJ.init(e,t),V8.init(e,t)}),a5=Y(`ZodIPv6`,(e,t)=>{EJ.init(e,t),V8.init(e,t)}),o5=Y(`ZodCIDRv4`,(e,t)=>{OJ.init(e,t),V8.init(e,t)}),s5=Y(`ZodCIDRv6`,(e,t)=>{kJ.init(e,t),V8.init(e,t)}),c5=Y(`ZodBase64`,(e,t)=>{AJ.init(e,t),V8.init(e,t)}),l5=Y(`ZodBase64URL`,(e,t)=>{jJ.init(e,t),V8.init(e,t)}),u5=Y(`ZodE164`,(e,t)=>{MJ.init(e,t),V8.init(e,t)}),d5=Y(`ZodCreditCard`,(e,t)=>{PJ.init(e,t),V8.init(e,t)}),f5=Y(`ZodJWT`,(e,t)=>{FJ.init(e,t),V8.init(e,t)}),p5=Y(`ZodCustomStringFormat`,(e,t)=>{IJ.init(e,t),V8.init(e,t)}),m5=Y(`ZodNumber`,(e,t)=>{LJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j4(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(Q0(e,t))},gte(e,t){return this.check($0(e,t))},min(e,t){return this.check($0(e,t))},lt(e,t){return this.check(X0(e,t))},lte(e,t){return this.check(Z0(e,t))},max(e,t){return this.check(Z0(e,t))},int(e){return this.check(M6(e))},safe(e){return this.check(M6(e))},positive(e){return this.check(Q0(0,e))},nonnegative(e){return this.check($0(0,e))},negative(e){return this.check(X0(0,e))},nonpositive(e){return this.check(Z0(0,e))},multipleOf(e,t){return this.check(i2(e,t))},step(e,t){return this.check(i2(e,t))},finite(){return this}}),h5=Y(`ZodNumberFormat`,(e,t)=>{RJ.init(e,t),m5.init(e,t)}),g5=Y(`ZodBoolean`,(e,t)=>{zJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M4(e,t,n,r)}),_5=Y(`ZodBigInt`,(e,t)=>{BJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N4(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check($0(e,t))},min(e,t){return this.check($0(e,t))},gt(e,t){return this.check(Q0(e,t))},lt(e,t){return this.check(X0(e,t))},lte(e,t){return this.check(Z0(e,t))},max(e,t){return this.check(Z0(e,t))},positive(e){return this.check(Q0(BigInt(0),e))},negative(e){return this.check(X0(BigInt(0),e))},nonpositive(e){return this.check(Z0(BigInt(0),e))},nonnegative(e){return this.check($0(BigInt(0),e))},multipleOf(e,t){return this.check(i2(e,t))}}),v5=Y(`ZodBigIntFormat`,(e,t)=>{VJ.init(e,t),_5.init(e,t)}),y5=Y(`ZodSymbol`,(e,t)=>{HJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P4(e,t,n,r)}),b5=Y(`ZodUndefined`,(e,t)=>{UJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I4(e,t,n,r)}),x5=Y(`ZodNull`,(e,t)=>{WJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F4(e,t,n,r)}),S5=Y(`ZodAny`,(e,t)=>{GJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r)}),C5=Y(`ZodUnknown`,(e,t)=>{KJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r)}),w5=Y(`ZodNever`,(e,t)=>{qJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R4(e,t,n,r)}),T5=Y(`ZodVoid`,(e,t)=>{JJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L4(e,t,n,r)}),E5=Y(`ZodDate`,(e,t)=>{YJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(e,t,n,r),e.min=(t,n)=>e.check($0(t,n)),e.max=(t,n)=>e.check(Z0(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),D5=Y(`ZodArray`,(e,t)=>{t6(),XJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r),e.element=t.element},{min(e,t){return this.check(l2(e,t))},nonempty(e){return this.check(l2(1,e))},max(e,t){return this.check(c2(e,t))},length(e,t){return this.check(u2(e,t))},unwrap(){return this.element}}),O5=Y(`ZodObject`,(e,t)=>{t6(),eY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),gW(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return l8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:G6()})},loose(){return this.clone({...this._zod.def,catchall:G6()})},strict(){return this.clone({...this._zod.def,catchall:K6()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return JU(this,e)},safeExtend(e){return YU(this,e)},merge(e){return XU(this,e)},pick(e){return KU(this,e)},omit(e){return qU(this,e)},partial(...e){return ZU(V5,this,e[0])},exactPartial(...e){return ZU(H5,this,e[0],`exactPartial`)},required(...e){return QU(K5,this,e[0])}}),k5=Y(`ZodUnion`,(e,t)=>{tY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),e.options=t.options}),A5=Y(`ZodXor`,(e,t)=>{k5.init(e,t),nY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),e.options=t.options}),j5=Y(`ZodDiscriminatedUnion`,(e,t)=>{k5.init(e,t),rY.init(e,t)}),M5=Y(`ZodIntersection`,(e,t)=>{iY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r)}),N5=Y(`ZodTuple`,(e,t)=>{t6(),aY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r3(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new V5({type:`optional`,innerType:e}))})}}),P5=Y(`ZodRecord`,(e,t)=>{t6(),oY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),F5=Y(`ZodMap`,(e,t)=>{t6(),sY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(o2(...t)),e.nonempty=t=>e.check(o2(1,t)),e.max=(...t)=>e.check(a2(...t)),e.size=(...t)=>e.check(s2(...t))}),I5=Y(`ZodSet`,(e,t)=>{t6(),cY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q4(e,t,n,r),e.min=(...t)=>e.check(o2(...t)),e.nonempty=t=>e.check(o2(1,t)),e.max=(...t)=>e.check(a2(...t)),e.size=(...t)=>e.check(s2(...t))}),L5=Y(`ZodEnum`,(e,t)=>{lY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new L5({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new L5({...t,checks:[],...q(r),entries:i})}}),R5=Y(`ZodLiteral`,(e,t)=>{uY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),z5=Y(`ZodFile`,(e,t)=>{dY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r),e.min=(t,n)=>e.check(o2(t,n)),e.max=(t,n)=>e.check(a2(t,n)),e.mime=(t,n)=>e.check(y2(Array.isArray(t)?t:[t],n))}),B5=Y(`ZodTransform`,(e,t)=>{t6(),fY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zW(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(lW(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(lW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),V5=Y(`ZodOptional`,(e,t)=>{pY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),H5=Y(`ZodExactOptional`,(e,t)=>{mY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),U5=Y(`ZodNullable`,(e,t)=>{hY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),W5=Y(`ZodDefault`,(e,t)=>{gY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),G5=Y(`ZodPrefault`,(e,t)=>{_Y.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),K5=Y(`ZodNonOptional`,(e,t)=>{vY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>s3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),q5=Y(`ZodSuccess`,(e,t)=>{yY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),J5=Y(`ZodCatch`,(e,t)=>{bY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Y5=Y(`ZodNaN`,(e,t)=>{xY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r)}),X5=Y(`ZodPipe`,(e,t)=>{SY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>f3(e,t,n,r),e.in=t.in,e.out=t.out}),Z5=Y(`ZodCodec`,(e,t)=>{X5.init(e,t),CY.init(e,t)}),Q5=Y(`ZodPreprocess`,(e,t)=>{X5.init(e,t),wY.init(e,t)}),$5=Y(`ZodReadonly`,(e,t)=>{TY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),e7=Y(`ZodTemplateLiteral`,(e,t)=>{EY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G4(e,t,n,r)}),t7=Y(`ZodLazy`,(e,t)=>{kY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),n7=Y(`ZodPromise`,(e,t)=>{OY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),r7=Y(`ZodFunction`,(e,t)=>{DY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r)}),i7=Y(`ZodCustom`,(e,t)=>{AY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r)}),a7=t4,o7=n4,s7=(...e)=>r4({Codec:Z5,Boolean:g5,String:B8},...e)}));function l7(e){MW({customError:e})}function u7(){return MW().customError}var d7,f7,Qre=o((()=>{w3(),d7={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},f7||={}})),p7=c({ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,date:()=>$re,datetime:()=>m7,duration:()=>tie,time:()=>eie});function m7(e){return C0(H8,e)}function $re(e){return w0(U8,e)}function eie(e){return T0(W8,e)}function tie(e){return E0(G8,e)}var h7=o((()=>{w3(),c7()}));function nie(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function g7(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function _7(e,t){if(e!==!1)return e===void 0||e===!0?$.any():y7(e,t)}function v7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=y7(iie(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>v7({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(S7)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?y7(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=y7(r,t);FU(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=y7(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!BU(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=aie(r,y7(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=g7(n.map(e=>y7(e,t)),a),s=Array.isArray(i)?void 0:_7(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=g7(i.map(e=>y7(e,t)),n),o=_7(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=y7(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function y7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=v7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>y7(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>y7(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:y7(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function b7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:nie(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??D$};return y7(n,r)}var $,x7,S7,oie=o((()=>{O$(),J(),N3(),h7(),c7(),$={...$3,...M3,iso:p7},x7=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),S7=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function C7(e){return T3(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:$6(t.options)}})}var sie=o((()=>{D3(),c7()}));function cie(e,t){if(!t?.length)return e;let n=e._zod.def;return UU(e,IU(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function w7(e){return cie(e.out,e.checks)}function lie(e){return e.in._zod.traits.has(`$ZodTransform`)?w7(e):e.in}function T7(e){return T3(e,{pipe:e=>lie(e._zod.def),default:(e,t)=>t?p8(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function E7(e){return T3(e,{pipe:e=>w7(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var uie=o((()=>{J(),D3(),c7()})),D7=c({bigint:()=>mie,boolean:()=>pie,date:()=>hie,number:()=>fie,string:()=>die});function die(e){return Q1(B8,e)}function fie(e){return O0(m5,e)}function pie(e){return F0(g5,e)}function mie(e){return L0(_5,e)}function hie(e){return J0(E5,e)}var gie=o((()=>{w3(),c7()})),O7=c({$brand:()=>LW,$input:()=>T$,$output:()=>w$,NEVER:()=>PW,TimePrecision:()=>a4,ZodAny:()=>S5,ZodArray:()=>D5,ZodBase64:()=>c5,ZodBase64URL:()=>l5,ZodBigInt:()=>_5,ZodBigIntFormat:()=>v5,ZodBoolean:()=>g5,ZodCIDRv4:()=>o5,ZodCIDRv6:()=>s5,ZodCUID:()=>Q8,ZodCUID2:()=>$8,ZodCatch:()=>J5,ZodCodec:()=>Z5,ZodCompileAsyncError:()=>K1,ZodCompileUnsupportedError:()=>q1,ZodCreditCard:()=>d5,ZodCustom:()=>i7,ZodCustomStringFormat:()=>p5,ZodDate:()=>E5,ZodDefault:()=>W5,ZodDiscriminatedUnion:()=>j5,ZodE164:()=>u5,ZodEmail:()=>K8,ZodEmoji:()=>X8,ZodEnum:()=>L5,ZodError:()=>L3,ZodExactOptional:()=>H5,ZodFile:()=>z5,ZodFirstPartyTypeKind:()=>f7,ZodFunction:()=>r7,ZodGUID:()=>q8,ZodIPv4:()=>r5,ZodIPv6:()=>a5,ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,ZodIntersection:()=>M5,ZodIssueCode:()=>d7,ZodJWT:()=>f5,ZodKSUID:()=>n5,ZodLazy:()=>t7,ZodLiteral:()=>R5,ZodMAC:()=>i5,ZodMap:()=>F5,ZodNaN:()=>Y5,ZodNanoID:()=>Z8,ZodNever:()=>w5,ZodNonOptional:()=>K5,ZodNull:()=>x5,ZodNullable:()=>U5,ZodNumber:()=>m5,ZodNumberFormat:()=>h5,ZodObject:()=>O5,ZodOptional:()=>V5,ZodPipe:()=>X5,ZodPrefault:()=>G5,ZodPreprocess:()=>Q5,ZodPromise:()=>n7,ZodReadonly:()=>$5,ZodRealError:()=>R3,ZodRecord:()=>P5,ZodSet:()=>I5,ZodString:()=>B8,ZodStringFormat:()=>V8,ZodSuccess:()=>q5,ZodSymbol:()=>y5,ZodTemplateLiteral:()=>e7,ZodTransform:()=>B5,ZodTuple:()=>N5,ZodType:()=>R8,ZodULID:()=>e5,ZodURL:()=>Y8,ZodUUID:()=>J8,ZodUndefined:()=>b5,ZodUnion:()=>k5,ZodUnknown:()=>C5,ZodVoid:()=>T5,ZodXID:()=>t5,ZodXor:()=>A5,_ZodString:()=>z8,_default:()=>_8,_function:()=>A8,any:()=>W6,array:()=>Y6,base64:()=>S6,base64url:()=>C6,bigint:()=>R6,boolean:()=>L6,catch:()=>x8,check:()=>j8,cidrv4:()=>b6,cidrv6:()=>x6,clone:()=>UU,codec:()=>w8,coerce:()=>D7,compile:()=>A$,config:()=>MW,core:()=>C3,creditCard:()=>T6,cuid:()=>f6,cuid2:()=>p6,custom:()=>M8,date:()=>J6,decode:()=>G3,decodeAsync:()=>q3,deepPartial:()=>C7,describe:()=>a7,discriminatedUnion:()=>t8,e164:()=>w6,email:()=>n6,emoji:()=>u6,encode:()=>W3,encodeAsync:()=>K3,endsWith:()=>g2,enum:()=>l8,exactOptional:()=>m8,file:()=>d8,flattenError:()=>HW,float32:()=>N6,float64:()=>P6,formatError:()=>UW,fromJSONSchema:()=>b7,function:()=>A8,getDiscriminatedOption:()=>Vq,getErrorMap:()=>u7,globalRegistry:()=>D$,gt:()=>Q0,gte:()=>$0,guid:()=>r6,hash:()=>A6,hex:()=>k6,hostname:()=>O6,httpUrl:()=>l6,includes:()=>m2,input:()=>T7,instanceof:()=>F8,int:()=>M6,int32:()=>F6,int64:()=>z6,intersection:()=>n8,invertCodec:()=>T8,ipv4:()=>_6,ipv6:()=>y6,iso:()=>p7,json:()=>I8,jwt:()=>E6,keyof:()=>X6,ksuid:()=>g6,lazy:()=>O8,length:()=>u2,literal:()=>Q,locales:()=>b$,looseObject:()=>Q6,looseRecord:()=>o8,lowercase:()=>f2,lt:()=>X0,lte:()=>Z0,mac:()=>v6,map:()=>s8,maxLength:()=>c2,maxSize:()=>a2,memoizer:()=>IY,meta:()=>o7,mime:()=>y2,minLength:()=>l2,minSize:()=>o2,multipleOf:()=>i2,nan:()=>S8,nanoid:()=>d6,nativeEnum:()=>u8,negative:()=>t2,never:()=>K6,nonnegative:()=>r2,nonoptional:()=>y8,nonpositive:()=>n2,normalize:()=>x2,null:()=>U6,nullable:()=>h8,nullish:()=>g8,number:()=>j6,object:()=>Z,optional:()=>p8,output:()=>E7,overwrite:()=>b2,parse:()=>B3,parseAsync:()=>V3,partialRecord:()=>a8,pipe:()=>C8,positive:()=>e2,prefault:()=>v8,preprocess:()=>L8,prettifyError:()=>KW,promise:()=>k8,properties:()=>v2,property:()=>_2,readonly:()=>E8,record:()=>i8,refine:()=>N8,regex:()=>d2,regexes:()=>jG,registry:()=>S$,safeDecode:()=>Y3,safeDecodeAsync:()=>Z3,safeEncode:()=>J3,safeEncodeAsync:()=>X3,safeParse:()=>H3,safeParseAsync:()=>U3,set:()=>c8,setErrorMap:()=>l7,size:()=>s2,slugify:()=>T2,startsWith:()=>h2,strictObject:()=>Z6,string:()=>X,stringFormat:()=>D6,stringbool:()=>s7,success:()=>b8,superRefine:()=>P8,symbol:()=>V6,templateLiteral:()=>D8,toJSONSchema:()=>O4,toLowerCase:()=>C2,toUpperCase:()=>w2,toZod:()=>EU,transform:()=>f8,treeifyError:()=>WW,trim:()=>S2,tuple:()=>r8,uint32:()=>I6,uint64:()=>B6,ulid:()=>m6,undefined:()=>H6,union:()=>$6,unknown:()=>G6,uppercase:()=>p2,url:()=>c6,util:()=>CU,uuid:()=>i6,uuidv4:()=>a6,uuidv6:()=>o6,uuidv7:()=>s6,validate:()=>fG,validateAsync:()=>pG,void:()=>q6,xid:()=>h6,xor:()=>e8}),k7=o((()=>{w3(),c7(),N3(),z3(),Q3(),Qre(),v3(),oie(),sie(),uie(),x$(),h7(),gie()})),_ie=o((()=>{k7(),k7()})),vie=c({$brand:()=>LW,$input:()=>T$,$output:()=>w$,NEVER:()=>PW,TimePrecision:()=>a4,ZodAny:()=>S5,ZodArray:()=>D5,ZodBase64:()=>c5,ZodBase64URL:()=>l5,ZodBigInt:()=>_5,ZodBigIntFormat:()=>v5,ZodBoolean:()=>g5,ZodCIDRv4:()=>o5,ZodCIDRv6:()=>s5,ZodCUID:()=>Q8,ZodCUID2:()=>$8,ZodCatch:()=>J5,ZodCodec:()=>Z5,ZodCompileAsyncError:()=>K1,ZodCompileUnsupportedError:()=>q1,ZodCreditCard:()=>d5,ZodCustom:()=>i7,ZodCustomStringFormat:()=>p5,ZodDate:()=>E5,ZodDefault:()=>W5,ZodDiscriminatedUnion:()=>j5,ZodE164:()=>u5,ZodEmail:()=>K8,ZodEmoji:()=>X8,ZodEnum:()=>L5,ZodError:()=>L3,ZodExactOptional:()=>H5,ZodFile:()=>z5,ZodFirstPartyTypeKind:()=>f7,ZodFunction:()=>r7,ZodGUID:()=>q8,ZodIPv4:()=>r5,ZodIPv6:()=>a5,ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,ZodIntersection:()=>M5,ZodIssueCode:()=>d7,ZodJWT:()=>f5,ZodKSUID:()=>n5,ZodLazy:()=>t7,ZodLiteral:()=>R5,ZodMAC:()=>i5,ZodMap:()=>F5,ZodNaN:()=>Y5,ZodNanoID:()=>Z8,ZodNever:()=>w5,ZodNonOptional:()=>K5,ZodNull:()=>x5,ZodNullable:()=>U5,ZodNumber:()=>m5,ZodNumberFormat:()=>h5,ZodObject:()=>O5,ZodOptional:()=>V5,ZodPipe:()=>X5,ZodPrefault:()=>G5,ZodPreprocess:()=>Q5,ZodPromise:()=>n7,ZodReadonly:()=>$5,ZodRealError:()=>R3,ZodRecord:()=>P5,ZodSet:()=>I5,ZodString:()=>B8,ZodStringFormat:()=>V8,ZodSuccess:()=>q5,ZodSymbol:()=>y5,ZodTemplateLiteral:()=>e7,ZodTransform:()=>B5,ZodTuple:()=>N5,ZodType:()=>R8,ZodULID:()=>e5,ZodURL:()=>Y8,ZodUUID:()=>J8,ZodUndefined:()=>b5,ZodUnion:()=>k5,ZodUnknown:()=>C5,ZodVoid:()=>T5,ZodXID:()=>t5,ZodXor:()=>A5,_ZodString:()=>z8,_default:()=>_8,_function:()=>A8,any:()=>W6,array:()=>Y6,base64:()=>S6,base64url:()=>C6,bigint:()=>R6,boolean:()=>L6,catch:()=>x8,check:()=>j8,cidrv4:()=>b6,cidrv6:()=>x6,clone:()=>UU,codec:()=>w8,coerce:()=>D7,compile:()=>A$,config:()=>MW,core:()=>C3,creditCard:()=>T6,cuid:()=>f6,cuid2:()=>p6,custom:()=>M8,date:()=>J6,decode:()=>G3,decodeAsync:()=>q3,deepPartial:()=>C7,default:()=>O7,describe:()=>a7,discriminatedUnion:()=>t8,e164:()=>w6,email:()=>n6,emoji:()=>u6,encode:()=>W3,encodeAsync:()=>K3,endsWith:()=>g2,enum:()=>l8,exactOptional:()=>m8,file:()=>d8,flattenError:()=>HW,float32:()=>N6,float64:()=>P6,formatError:()=>UW,fromJSONSchema:()=>b7,function:()=>A8,getDiscriminatedOption:()=>Vq,getErrorMap:()=>u7,globalRegistry:()=>D$,gt:()=>Q0,gte:()=>$0,guid:()=>r6,hash:()=>A6,hex:()=>k6,hostname:()=>O6,httpUrl:()=>l6,includes:()=>m2,input:()=>T7,instanceof:()=>F8,int:()=>M6,int32:()=>F6,int64:()=>z6,intersection:()=>n8,invertCodec:()=>T8,ipv4:()=>_6,ipv6:()=>y6,iso:()=>p7,json:()=>I8,jwt:()=>E6,keyof:()=>X6,ksuid:()=>g6,lazy:()=>O8,length:()=>u2,literal:()=>Q,locales:()=>b$,looseObject:()=>Q6,looseRecord:()=>o8,lowercase:()=>f2,lt:()=>X0,lte:()=>Z0,mac:()=>v6,map:()=>s8,maxLength:()=>c2,maxSize:()=>a2,memoizer:()=>IY,meta:()=>o7,mime:()=>y2,minLength:()=>l2,minSize:()=>o2,multipleOf:()=>i2,nan:()=>S8,nanoid:()=>d6,nativeEnum:()=>u8,negative:()=>t2,never:()=>K6,nonnegative:()=>r2,nonoptional:()=>y8,nonpositive:()=>n2,normalize:()=>x2,null:()=>U6,nullable:()=>h8,nullish:()=>g8,number:()=>j6,object:()=>Z,optional:()=>p8,output:()=>E7,overwrite:()=>b2,parse:()=>B3,parseAsync:()=>V3,partialRecord:()=>a8,pipe:()=>C8,positive:()=>e2,prefault:()=>v8,preprocess:()=>L8,prettifyError:()=>KW,promise:()=>k8,properties:()=>v2,property:()=>_2,readonly:()=>E8,record:()=>i8,refine:()=>N8,regex:()=>d2,regexes:()=>jG,registry:()=>S$,safeDecode:()=>Y3,safeDecodeAsync:()=>Z3,safeEncode:()=>J3,safeEncodeAsync:()=>X3,safeParse:()=>H3,safeParseAsync:()=>U3,set:()=>c8,setErrorMap:()=>l7,size:()=>s2,slugify:()=>T2,startsWith:()=>h2,strictObject:()=>Z6,string:()=>X,stringFormat:()=>D6,stringbool:()=>s7,success:()=>b8,superRefine:()=>P8,symbol:()=>V6,templateLiteral:()=>D8,toJSONSchema:()=>O4,toLowerCase:()=>C2,toUpperCase:()=>w2,toZod:()=>EU,transform:()=>f8,treeifyError:()=>WW,trim:()=>S2,tuple:()=>r8,uint32:()=>I6,uint64:()=>B6,ulid:()=>m6,undefined:()=>H6,union:()=>$6,unknown:()=>G6,uppercase:()=>p2,url:()=>c6,util:()=>CU,uuid:()=>i6,uuidv4:()=>a6,uuidv6:()=>o6,uuidv7:()=>s6,validate:()=>fG,validateAsync:()=>pG,void:()=>q6,xid:()=>h6,xor:()=>e8,z:()=>O7}),A7=o((()=>{k7(),_ie()}));A7();var j7=`io.modelcontextprotocol/related-task`,M7=M8(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),N7=$6([X(),j6().int()]),P7=X();Q6({ttl:j6().optional(),pollInterval:j6().optional()});var yie=Z({ttl:j6().optional()}),bie=Z({taskId:X()}),F7=Q6({progressToken:N7.optional(),[j7]:bie.optional()}),I7=Z({_meta:F7.optional()}),L7=I7.extend({task:yie.optional()}),xie=e=>L7.safeParse(e).success,R7=Z({method:X(),params:I7.loose().optional()}),z7=Z({_meta:F7.optional()}),B7=Z({method:X(),params:z7.loose().optional()}),V7=Q6({_meta:F7.optional()}),H7=$6([X(),j6().int()]),U7=Z({jsonrpc:Q(`2.0`),id:H7,...R7.shape}).strict(),W7=e=>U7.safeParse(e).success,G7=Z({jsonrpc:Q(`2.0`),...B7.shape}).strict(),Sie=e=>G7.safeParse(e).success,K7=Z({jsonrpc:Q(`2.0`),id:H7,result:V7}).strict(),q7=e=>K7.safeParse(e).success,J7;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(J7||={});var Y7=Z({jsonrpc:Q(`2.0`),id:H7.optional(),error:Z({code:j6().int(),message:X(),data:G6().optional()})}).strict(),Cie=e=>Y7.safeParse(e).success,wie=$6([U7,G7,K7,Y7]);$6([K7,Y7]);var X7=V7.strict(),Tie=z7.extend({requestId:H7.optional(),reason:X().optional()}),Z7=B7.extend({method:Q(`notifications/cancelled`),params:Tie}),Q7=Z({icons:Y6(Z({src:X(),mimeType:X().optional(),sizes:Y6(X()).optional(),theme:l8([`light`,`dark`]).optional()})).optional()}),$7=Z({name:X(),title:X().optional()}),e9=$7.extend({...$7.shape,...Q7.shape,version:X(),websiteUrl:X().optional(),description:X().optional()}),Eie=L8(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,n8(Z({form:n8(Z({applyDefaults:L6().optional()}),i8(X(),G6())).optional(),url:M7.optional()}),i8(X(),G6()).optional())),Die=Q6({list:M7.optional(),cancel:M7.optional(),requests:Q6({sampling:Q6({createMessage:M7.optional()}).optional(),elicitation:Q6({create:M7.optional()}).optional()}).optional()}),Oie=Q6({list:M7.optional(),cancel:M7.optional(),requests:Q6({tools:Q6({call:M7.optional()}).optional()}).optional()}),kie=Z({experimental:i8(X(),M7).optional(),sampling:Z({context:M7.optional(),tools:M7.optional()}).optional(),elicitation:Eie.optional(),roots:Z({listChanged:L6().optional()}).optional(),tasks:Die.optional(),extensions:i8(X(),M7).optional()}),Aie=I7.extend({protocolVersion:X(),capabilities:kie,clientInfo:e9}),jie=R7.extend({method:Q(`initialize`),params:Aie}),Mie=Z({experimental:i8(X(),M7).optional(),logging:M7.optional(),completions:M7.optional(),prompts:Z({listChanged:L6().optional()}).optional(),resources:Z({subscribe:L6().optional(),listChanged:L6().optional()}).optional(),tools:Z({listChanged:L6().optional()}).optional(),tasks:Oie.optional(),extensions:i8(X(),M7).optional()}),Nie=V7.extend({protocolVersion:X(),capabilities:Mie,serverInfo:e9,instructions:X().optional()}),Pie=B7.extend({method:Q(`notifications/initialized`),params:z7.optional()}),t9=R7.extend({method:Q(`ping`),params:I7.optional()}),Fie=Z({progress:j6(),total:p8(j6()),message:p8(X())}),Iie=Z({...z7.shape,...Fie.shape,progressToken:N7}),n9=B7.extend({method:Q(`notifications/progress`),params:Iie}),Lie=I7.extend({cursor:P7.optional()}),r9=R7.extend({params:Lie.optional()}),i9=V7.extend({nextCursor:P7.optional()}),Rie=l8([`working`,`input_required`,`completed`,`failed`,`cancelled`]),a9=Z({taskId:X(),status:Rie,ttl:$6([j6(),U6()]),createdAt:X(),lastUpdatedAt:X(),pollInterval:p8(j6()),statusMessage:p8(X())}),o9=V7.extend({task:a9}),zie=z7.merge(a9),s9=B7.extend({method:Q(`notifications/tasks/status`),params:zie}),c9=R7.extend({method:Q(`tasks/get`),params:I7.extend({taskId:X()})}),l9=V7.merge(a9),u9=R7.extend({method:Q(`tasks/result`),params:I7.extend({taskId:X()})});V7.loose();var d9=r9.extend({method:Q(`tasks/list`)}),f9=i9.extend({tasks:Y6(a9)}),p9=R7.extend({method:Q(`tasks/cancel`),params:I7.extend({taskId:X()})}),Bie=V7.merge(a9),m9=Z({uri:X(),mimeType:p8(X()),_meta:i8(X(),G6()).optional()}),h9=m9.extend({text:X()}),g9=X().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),_9=m9.extend({blob:g9}),v9=l8([`user`,`assistant`]),y9=Z({audience:Y6(v9).optional(),priority:j6().min(0).max(1).optional(),lastModified:m7({offset:!0}).optional()}),b9=Z({...$7.shape,...Q7.shape,uri:X(),description:p8(X()),mimeType:p8(X()),size:p8(j6()),annotations:y9.optional(),_meta:p8(Q6({}))}),Vie=Z({...$7.shape,...Q7.shape,uriTemplate:X(),description:p8(X()),mimeType:p8(X()),annotations:y9.optional(),_meta:p8(Q6({}))}),Hie=r9.extend({method:Q(`resources/list`)}),x9=i9.extend({resources:Y6(b9)}),Uie=r9.extend({method:Q(`resources/templates/list`)}),Wie=i9.extend({resourceTemplates:Y6(Vie)}),S9=I7.extend({uri:X()}),Gie=S9,Kie=R7.extend({method:Q(`resources/read`),params:Gie}),C9=V7.extend({contents:Y6($6([h9,_9]))}),qie=B7.extend({method:Q(`notifications/resources/list_changed`),params:z7.optional()}),Jie=S9,Yie=R7.extend({method:Q(`resources/subscribe`),params:Jie}),Xie=S9,Zie=R7.extend({method:Q(`resources/unsubscribe`),params:Xie}),Qie=z7.extend({uri:X()}),$ie=B7.extend({method:Q(`notifications/resources/updated`),params:Qie}),eae=Z({name:X(),description:p8(X()),required:p8(L6())}),tae=Z({...$7.shape,...Q7.shape,description:p8(X()),arguments:p8(Y6(eae)),_meta:p8(Q6({}))}),nae=r9.extend({method:Q(`prompts/list`)}),rae=i9.extend({prompts:Y6(tae)}),iae=I7.extend({name:X(),arguments:i8(X(),X()).optional()}),aae=R7.extend({method:Q(`prompts/get`),params:iae}),w9=Z({type:Q(`text`),text:X(),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),T9=Z({type:Q(`image`),data:g9,mimeType:X(),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),E9=Z({type:Q(`audio`),data:g9,mimeType:X(),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),oae=Z({type:Q(`tool_use`),name:X(),id:X(),input:i8(X(),G6()),_meta:i8(X(),G6()).optional()}),D9=Z({type:Q(`resource`),resource:$6([h9,_9]),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),O9=b9.extend({type:Q(`resource_link`)}),k9=$6([w9,T9,E9,O9,D9]),sae=Z({role:v9,content:k9}),cae=V7.extend({description:X().optional(),messages:Y6(sae)}),lae=B7.extend({method:Q(`notifications/prompts/list_changed`),params:z7.optional()}),uae=Z({title:X().optional(),readOnlyHint:L6().optional(),destructiveHint:L6().optional(),idempotentHint:L6().optional(),openWorldHint:L6().optional()}),dae=Z({taskSupport:l8([`required`,`optional`,`forbidden`]).optional()}),A9=Z({...$7.shape,...Q7.shape,description:X().optional(),inputSchema:Z({type:Q(`object`),properties:i8(X(),M7).optional(),required:Y6(X()).optional()}).catchall(G6()),outputSchema:Z({type:Q(`object`),properties:i8(X(),M7).optional(),required:Y6(X()).optional()}).catchall(G6()).optional(),annotations:uae.optional(),execution:dae.optional(),_meta:i8(X(),G6()).optional()}),j9=r9.extend({method:Q(`tools/list`)}),fae=i9.extend({tools:Y6(A9)}),M9=V7.extend({content:Y6(k9).default([]),structuredContent:i8(X(),G6()).optional(),isError:L6().optional()});M9.or(V7.extend({toolResult:G6()}));var pae=L7.extend({name:X(),arguments:i8(X(),G6()).optional()}),N9=R7.extend({method:Q(`tools/call`),params:pae}),mae=B7.extend({method:Q(`notifications/tools/list_changed`),params:z7.optional()});Z({autoRefresh:L6().default(!0),debounceMs:j6().int().nonnegative().default(300)});var P9=l8([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),hae=I7.extend({level:P9}),gae=R7.extend({method:Q(`logging/setLevel`),params:hae}),_ae=z7.extend({level:P9,logger:X().optional(),data:G6()}),vae=B7.extend({method:Q(`notifications/message`),params:_ae}),yae=Z({hints:Y6(Z({name:X().optional()})).optional(),costPriority:j6().min(0).max(1).optional(),speedPriority:j6().min(0).max(1).optional(),intelligencePriority:j6().min(0).max(1).optional()}),bae=Z({mode:l8([`auto`,`required`,`none`]).optional()}),xae=Z({type:Q(`tool_result`),toolUseId:X().describe(`The unique identifier for the corresponding tool call.`),content:Y6(k9).default([]),structuredContent:Z({}).loose().optional(),isError:L6().optional(),_meta:i8(X(),G6()).optional()}),Sae=t8(`type`,[w9,T9,E9]),F9=t8(`type`,[w9,T9,E9,oae,xae]),Cae=Z({role:v9,content:$6([F9,Y6(F9)]),_meta:i8(X(),G6()).optional()}),wae=L7.extend({messages:Y6(Cae),modelPreferences:yae.optional(),systemPrompt:X().optional(),includeContext:l8([`none`,`thisServer`,`allServers`]).optional(),temperature:j6().optional(),maxTokens:j6().int(),stopSequences:Y6(X()).optional(),metadata:M7.optional(),tools:Y6(A9).optional(),toolChoice:bae.optional()}),Tae=R7.extend({method:Q(`sampling/createMessage`),params:wae}),I9=V7.extend({model:X(),stopReason:p8(l8([`endTurn`,`stopSequence`,`maxTokens`]).or(X())),role:v9,content:Sae}),L9=V7.extend({model:X(),stopReason:p8(l8([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(X())),role:v9,content:$6([F9,Y6(F9)])}),Eae=Z({type:Q(`boolean`),title:X().optional(),description:X().optional(),default:L6().optional()}),Dae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),minLength:j6().optional(),maxLength:j6().optional(),format:l8([`email`,`uri`,`date`,`date-time`]).optional(),default:X().optional()}),Oae=Z({type:l8([`number`,`integer`]),title:X().optional(),description:X().optional(),minimum:j6().optional(),maximum:j6().optional(),default:j6().optional()}),kae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:Y6(X()),default:X().optional()}),Aae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),oneOf:Y6(Z({const:X(),title:X()})),default:X().optional()}),jae=$6([$6([Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:Y6(X()),enumNames:Y6(X()).optional(),default:X().optional()}),$6([kae,Aae]),$6([Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:j6().optional(),maxItems:j6().optional(),items:Z({type:Q(`string`),enum:Y6(X())}),default:Y6(X()).optional()}),Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:j6().optional(),maxItems:j6().optional(),items:Z({anyOf:Y6(Z({const:X(),title:X()}))}),default:Y6(X()).optional()})])]),Eae,Dae,Oae]),Mae=$6([L7.extend({mode:Q(`form`).optional(),message:X(),requestedSchema:Z({type:Q(`object`),properties:i8(X(),jae),required:Y6(X()).optional()})}),L7.extend({mode:Q(`url`),message:X(),elicitationId:X(),url:X().url()})]),Nae=R7.extend({method:Q(`elicitation/create`),params:Mae}),Pae=z7.extend({elicitationId:X()}),Fae=B7.extend({method:Q(`notifications/elicitation/complete`),params:Pae}),Iae=V7.extend({action:l8([`accept`,`decline`,`cancel`]),content:L8(e=>e===null?void 0:e,i8(X(),$6([X(),j6(),L6(),Y6(X())])).optional())}),Lae=Z({type:Q(`ref/resource`),uri:X()}),Rae=Z({type:Q(`ref/prompt`),name:X()}),zae=I7.extend({ref:$6([Rae,Lae]),argument:Z({name:X(),value:X()}),context:Z({arguments:i8(X(),X()).optional()}).optional()}),Bae=R7.extend({method:Q(`completion/complete`),params:zae}),Vae=V7.extend({completion:Q6({values:Y6(X()).max(100),total:p8(j6().int()),hasMore:p8(L6())})}),Hae=Z({uri:X().startsWith(`file://`),name:X().optional(),_meta:i8(X(),G6()).optional()}),Uae=R7.extend({method:Q(`roots/list`),params:I7.optional()}),Wae=V7.extend({roots:Y6(Hae)}),Gae=B7.extend({method:Q(`notifications/roots/list_changed`),params:z7.optional()});$6([t9,jie,Bae,gae,aae,nae,Hie,Uie,Kie,Yie,Zie,N9,j9,c9,u9,d9,p9]),$6([Z7,n9,Pie,Gae,s9]),$6([X7,I9,L9,Iae,Wae,l9,f9,o9]),$6([t9,Tae,Nae,Uae,c9,u9,d9,p9]),$6([Z7,n9,vae,$ie,qie,mae,lae,s9,Fae]),$6([X7,Nie,Vae,cae,rae,x9,Wie,C9,M9,fae,l9,f9,o9]);var R9=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===J7.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Kae(e.elicitations,n)}return new e(t,n,r)}},Kae=class extends R9{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(J7.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function z9(e){return e===`completed`||e===`failed`||e===`cancelled`}function B9(e){let t=A3(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=j3(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function V9(e,t){let n=k3(e,t);if(!n.success)throw n.error;return n.data}var qae=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Z7,e=>{this._oncancel(e)}),this.setNotificationHandler(n9,e=>{this._onprogress(e)}),this.setRequestHandler(t9,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(c9,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new R9(J7.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(u9,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new R9(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new R9(J7.InvalidParams,`Task not found: ${r}`);if(!z9(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(z9(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[j7]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(d9,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new R9(J7.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(p9,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new R9(J7.InvalidParams,`Task not found: ${e.params.taskId}`);if(z9(n.status))throw new R9(J7.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new R9(J7.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof R9?e:new R9(J7.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),R9.fromError(J7.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),q7(e)||Cie(e)?this._onresponse(e):W7(e)?this._onrequest(e,t):Sie(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=R9.fromError(J7.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[j7]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:J7.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=xie(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new R9(J7.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:J7.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),q7(e)?n(e):n(new R9(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(q7(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),q7(e)?r(e):r(R9.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof R9?e:new R9(J7.InternalError,String(e))}}return}let i;try{let r=await this.request(e,o9,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new R9(J7.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},z9(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new R9(J7.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new R9(J7.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof R9?e:new R9(J7.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[j7]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof R9?e:new R9(J7.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=k3(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(R9.fromError(J7.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},l9,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},f9,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Bie,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[j7]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[j7]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[j7]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=B9(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=V9(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=B9(e);this._notificationHandlers.set(n,n=>{let r=V9(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&W7(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new R9(J7.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new R9(J7.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new R9(J7.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new R9(J7.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=s9.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),z9(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new R9(J7.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(z9(a.status))throw new R9(J7.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=s9.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),z9(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function H9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Jae(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=H9(a)&&H9(i)?{...a,...i}:i}return n}var Yae=`modulepreload`,Xae=function(e,t){return new URL(e,t).href},U9={},Zae=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Xae(t,n),t=s(t),t in U9)return;U9[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Yae,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};A7(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var Qae=class extends qae{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},$ae=`2026-01-26`,W9=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=wie.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},eoe=$6([Q(`light`),Q(`dark`)]).describe(`Color theme preference for the host environment.`),G9=$6([Q(`inline`),Q(`fullscreen`),Q(`pip`)]).describe(`Display mode for UI presentation.`),toe=i8($6([Q(`--color-background-primary`),Q(`--color-background-secondary`),Q(`--color-background-tertiary`),Q(`--color-background-inverse`),Q(`--color-background-ghost`),Q(`--color-background-info`),Q(`--color-background-danger`),Q(`--color-background-success`),Q(`--color-background-warning`),Q(`--color-background-disabled`),Q(`--color-text-primary`),Q(`--color-text-secondary`),Q(`--color-text-tertiary`),Q(`--color-text-inverse`),Q(`--color-text-ghost`),Q(`--color-text-info`),Q(`--color-text-danger`),Q(`--color-text-success`),Q(`--color-text-warning`),Q(`--color-text-disabled`),Q(`--color-border-primary`),Q(`--color-border-secondary`),Q(`--color-border-tertiary`),Q(`--color-border-inverse`),Q(`--color-border-ghost`),Q(`--color-border-info`),Q(`--color-border-danger`),Q(`--color-border-success`),Q(`--color-border-warning`),Q(`--color-border-disabled`),Q(`--color-ring-primary`),Q(`--color-ring-secondary`),Q(`--color-ring-inverse`),Q(`--color-ring-info`),Q(`--color-ring-danger`),Q(`--color-ring-success`),Q(`--color-ring-warning`),Q(`--font-sans`),Q(`--font-mono`),Q(`--font-weight-normal`),Q(`--font-weight-medium`),Q(`--font-weight-semibold`),Q(`--font-weight-bold`),Q(`--font-text-xs-size`),Q(`--font-text-sm-size`),Q(`--font-text-md-size`),Q(`--font-text-lg-size`),Q(`--font-heading-xs-size`),Q(`--font-heading-sm-size`),Q(`--font-heading-md-size`),Q(`--font-heading-lg-size`),Q(`--font-heading-xl-size`),Q(`--font-heading-2xl-size`),Q(`--font-heading-3xl-size`),Q(`--font-text-xs-line-height`),Q(`--font-text-sm-line-height`),Q(`--font-text-md-line-height`),Q(`--font-text-lg-line-height`),Q(`--font-heading-xs-line-height`),Q(`--font-heading-sm-line-height`),Q(`--font-heading-md-line-height`),Q(`--font-heading-lg-line-height`),Q(`--font-heading-xl-line-height`),Q(`--font-heading-2xl-line-height`),Q(`--font-heading-3xl-line-height`),Q(`--border-radius-xs`),Q(`--border-radius-sm`),Q(`--border-radius-md`),Q(`--border-radius-lg`),Q(`--border-radius-xl`),Q(`--border-radius-full`),Q(`--border-width-regular`),Q(`--shadow-hairline`),Q(`--shadow-sm`),Q(`--shadow-md`),Q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). @@ -122,7 +122,7 @@ - omitted: host decides border`)}),Z({method:Q(`ui/request-display-mode`),params:Z({mode:G9.describe(`The display mode being requested.`)})});var poe=Z({mode:G9.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),moe=$6([Q(`model`),Q(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Z({resourceUri:X().optional(),visibility:Y6(moe).optional().describe(`Who can access this tool. Default: ["model", "app"] - "model": Tool visible to and callable by the agent - "app": Tool callable by the app from this server only`),csp:K6().optional(),permissions:K6().optional()}),Z({mimeTypes:Y6(X()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Z({method:Q(`ui/download-file`),params:Z({contents:Y6($6([D9,O9])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Z({method:Q(`ui/message`),params:Z({role:Q(`user`).describe(`Message role, currently only "user" is supported.`),content:Y6(k9).describe(`Message content blocks (text, image, etc.).`)})}),Z({method:Q(`ui/notifications/sandbox-resource-ready`),params:Z({html:X().describe(`HTML content to load into the inner iframe.`),sandbox:X().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:K9.optional().describe(`CSP configuration from resource metadata.`),permissions:q9.optional().describe(`Sandbox permissions from resource metadata.`)})});var hoe=Z({method:Q(`ui/notifications/tool-result`),params:M9.describe(`Standard MCP tool execution result.`)}),Y9=Z({toolInfo:Z({id:H7.optional().describe(`JSON-RPC id of the tools/call request.`),tool:A9.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:eoe.optional().describe(`Current color theme preference.`),styles:loe.optional().describe(`Style configuration for theming the app.`),displayMode:G9.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y6(G9).optional().describe(`Display modes the host supports.`),containerDimensions:$6([Z({height:j6().describe(`Fixed container height in pixels.`)}),Z({maxHeight:$6([j6(),H6()]).optional().describe(`Maximum container height in pixels.`)})]).and($6([Z({width:j6().describe(`Fixed container width in pixels.`)}),Z({maxWidth:$6([j6(),H6()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other -container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:X().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:X().optional().describe(`User's timezone in IANA format.`),userAgent:X().optional().describe(`Host application identifier.`),platform:$6([Q(`web`),Q(`desktop`),Q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:L6().optional().describe(`Whether the device supports touch input.`),hover:L6().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:j6().describe(`Top safe area inset in pixels.`),right:j6().describe(`Right safe area inset in pixels.`),bottom:j6().describe(`Bottom safe area inset in pixels.`),left:j6().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),goe=Z({method:Q(`ui/notifications/host-context-changed`),params:Y9.describe(`Partial context update containing only changed fields.`)});Z({method:Q(`ui/update-model-context`),params:Z({content:Y6(k9).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:i8(X(),G6().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Z({method:Q(`ui/initialize`),params:Z({appInfo:e9.describe(`App identification (name and version).`),appCapabilities:foe.describe(`Features and capabilities this app provides.`),protocolVersion:X().describe(`Protocol version this app supports.`)})});var _oe=Z({protocolVersion:X().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:e9.describe(`Host application identification and version.`),hostCapabilities:doe.describe(`Features and capabilities provided by the host.`),hostContext:Y9.describe(`Rich context about the host environment.`)}).passthrough(),voe={target:`draft-2020-12`};async function X9(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](voe);if(n.vendor===`zod`){let{z:n}=await Zae(async()=>{let{z:e}=await Promise.resolve().then(()=>(A7(),vie));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Z9(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var yoe=class e extends Qae{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:aoe,toolinputpartial:ooe,toolresult:hoe,toolcancelled:soe,hostcontextchanged:goe};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||MW({jitless:!0}),this.setRequestHandler(t9,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Jae(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Z9(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Z9(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await X9(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await X9(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(uoe,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(N9,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(j9,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},M9,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},C9,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},x9,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?L9:I9;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},ioe,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},X7,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},noe,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},roe,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},poe,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new W9(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:$ae}},_oe,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function boe({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new W9(window.parent,window.parent);if(s=new yoe(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function xoe(e){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({}),[a,o]=(0,W.useState)(),[s,c]=(0,W.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=boe({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,W.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function Soe(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}VE([ib,bO]);function Coe(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=xoe(`Fanout service performance`),[o,s]=(0,W.useState)(`activity`),c=r?.theme===`dark`;return(0,G.jsxs)(ER,{dark:c,children:[(0,G.jsx)(DR,{title:i?.data.service||`System performance`,summary:i?`Traffic, latency, and errors ${i.data.service?`for ${i.data.service}`:`across all services`}`:void 0,onRefresh:()=>t(`service_performance`),disabled:!e}),(0,G.jsx)(OR,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Loading performance signals…`:void 0,retry:()=>void t(`service_performance`)}),i&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(kR,{active:o,onChange:s,items:[{id:`activity`,label:`Activity`},{id:`latency`,label:`Latency map`},{id:`endpoints`,label:`Endpoints`,count:i.data.endpoints.length},{id:`compare`,label:`Compare`}]}),o===`activity`&&(0,G.jsx)(woe,{data:i.data,dark:c,window:i.provenance.window}),o===`latency`&&(0,G.jsx)(Toe,{data:i.data,dark:c,window:i.provenance.window}),o===`endpoints`&&(0,G.jsx)(Eoe,{endpoints:i.data.endpoints,onEndpoint:t=>Soe(e,`Investigate ${t.method} ${t.path}. Explain its latency and errors.`)}),o===`compare`&&(0,G.jsx)(Doe,{data:i.data}),(0,G.jsx)(jR,{left:SU(i.provenance.window),right:`Updated ${new Date(i.provenance.generated_at).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}`})]})]})}function woe({data:e,dark:t,window:n}){if(e.points.length===0)return(0,G.jsx)(AR,{tall:!0,icon:(0,G.jsx)(lR,{size:20,weight:`duotone`}),title:`No activity in this window`,children:`Trends will appear as activity is recorded.`});let{totals:r}=e,i=e.points.map(e=>e.time);return(0,G.jsxs)(dL,{px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,G.jsxs)(cL,{cols:{base:1,xs:3},spacing:`sm`,children:[(0,G.jsx)(MR,{label:`Operations`,value:yU.format(r.spans)}),(0,G.jsx)(MR,{label:`P95 latency`,value:xU(r.p95_ms),color:r.p95_ms>=750?`warn`:`ok`}),(0,G.jsx)(MR,{label:`Error rate`,value:bU(r.error_rate),color:r.error_rate>=.01?`bad`:`ok`})]}),(0,G.jsx)(Q9,{dark:t,labels:i,title:`Traffic and logs`,window:n,series:[{name:`Operations`,data:e.points.map(e=>e.spans),color:RR(`operations`,t)},{name:`Logs`,data:e.points.map(e=>e.log_count),color:RR(`logs`,t)}]}),(0,G.jsx)(Q9,{dark:t,labels:i,title:`Latency and error correlation`,window:n,series:[{name:`P95 latency`,data:e.points.map(e=>e.p95_ms),color:LR(t).warn},{name:`Error rate × 1000`,data:e.points.map(e=>e.error_rate*1e3),color:LR(t).bad}]})]})}function Q9({labels:e,title:t,series:n,dark:r,window:i}){let a=(0,W.useMemo)(()=>{let t=IR(r);return{color:n.map(e=>e.color),grid:{left:42,right:18,top:42,bottom:30},legend:{top:5,left:0,textStyle:{color:t.muted,fontSize:10},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:t.surface,borderColor:t.border,textStyle:{color:t.text,fontSize:10}},xAxis:{type:`category`,data:e.map(e=>CU(e,i)),boundaryGap:!1,axisLine:{lineStyle:{color:t.border}},axisTick:{show:!1},axisLabel:{color:t.muted,fontSize:9,hideOverlap:!0}},yAxis:{type:`value`,splitLine:{lineStyle:{color:t.grid}},axisLabel:{color:t.muted,fontSize:9}},series:n.map(e=>({name:e.name,type:`line`,data:e.data,smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.045}}))}},[r,e,n,i]);return(0,G.jsxs)(mF,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,G.jsx)(hI,{fw:650,size:`sm`,mb:`xs`,children:t}),(0,G.jsx)(vU,{option:a,height:210,label:t})]})}function Toe({data:e,dark:t,window:n}){let r=(0,W.useMemo)(()=>({services:[...new Set(e.heatmap.map(e=>e.service))],times:[...new Set(e.heatmap.map(e=>e.time))],values:new Map(e.heatmap.map(e=>[`${e.service}\u0000${e.time}`,e.p95_ms])),max:Math.max(...e.heatmap.map(e=>e.p95_ms),1)}),[e.heatmap]);if(r.services.length===0)return(0,G.jsx)(AR,{tall:!0,icon:(0,G.jsx)(sR,{size:20,weight:`duotone`}),title:`No latency samples yet`,children:`The heatmap will compare service latency across time buckets.`});let i=IR(t),a={grid:{left:105,right:20,top:20,bottom:45},tooltip:{position:`top`,backgroundColor:i.surface,borderColor:i.border,textStyle:{color:i.text,fontSize:10},formatter:e=>`${r.services[e.data[1]]}
${xU(e.data[2])}`},xAxis:{type:`category`,data:r.times.map(e=>CU(e,n)),splitArea:{show:!0},axisLabel:{color:i.muted,fontSize:9,hideOverlap:!0},axisLine:{lineStyle:{color:i.border}}},yAxis:{type:`category`,data:r.services,splitArea:{show:!0},axisLabel:{color:i.text,fontSize:9},axisLine:{lineStyle:{color:i.border}}},visualMap:{min:0,max:r.max,calculable:!0,orient:`horizontal`,left:`center`,bottom:0,textStyle:{color:i.muted,fontSize:8},inRange:{color:[i.grid,LR(t).warn,LR(t).bad]}},series:[{type:`heatmap`,data:r.services.flatMap((e,t)=>r.times.map((n,i)=>[i,t,r.values.get(`${e}\u0000${n}`)??0]))}]};return(0,G.jsx)(mF,{withBorder:!0,radius:`md`,mx:{base:`md`,sm:`lg`},mb:`md`,p:`xs`,children:(0,G.jsx)(vU,{option:a,height:Math.max(280,r.services.length*32+110),label:`Service P95 latency heatmap`})})}function Eoe({endpoints:e,onEndpoint:t}){let n=NR(e,8);return e.length===0?(0,G.jsx)(AR,{tall:!0,icon:(0,G.jsx)(rR,{size:20,weight:`duotone`}),title:`No endpoints detected`,children:`HTTP routes and span operations will appear here as traffic arrives.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(EL.ScrollContainer,{minWidth:700,children:(0,G.jsxs)(EL,{striped:!0,highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(EL.Thead,{children:(0,G.jsxs)(EL.Tr,{children:[(0,G.jsx)(EL.Th,{children:`Endpoint`}),(0,G.jsx)(EL.Th,{ta:`right`,children:`Calls`}),(0,G.jsx)(EL.Th,{ta:`right`,children:`P50`}),(0,G.jsx)(EL.Th,{ta:`right`,children:`P95`}),(0,G.jsx)(EL.Th,{ta:`right`,children:`P99`}),(0,G.jsx)(EL.Th,{ta:`right`,children:`Errors`})]})}),(0,G.jsx)(EL.Tbody,{children:n.pageItems.map(e=>(0,G.jsxs)(EL.Tr,{tabIndex:0,onClick:()=>t(e),onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&t(e)},style:{cursor:`pointer`},children:[(0,G.jsxs)(EL.Td,{children:[(0,G.jsx)(vI,{variant:`light`,mr:`xs`,children:e.method}),(0,G.jsx)(hI,{component:`span`,ff:`monospace`,size:`sm`,children:e.path})]}),(0,G.jsx)(EL.Td,{ta:`right`,children:yU.format(e.calls)}),(0,G.jsx)(EL.Td,{ta:`right`,children:xU(e.p50_ms)}),(0,G.jsx)(EL.Td,{ta:`right`,children:xU(e.p95_ms)}),(0,G.jsx)(EL.Td,{ta:`right`,children:xU(e.p99_ms)}),(0,G.jsx)(EL.Td,{ta:`right`,children:(0,G.jsx)(hI,{c:FR(e.health),children:bU(e.error_rate)})})]},`${e.method}-${e.path}`))})]})}),(0,G.jsx)(PR,{...n,onChange:n.setPage})]})}function Doe({data:e}){return e.comparison.length===0?(0,G.jsx)(AR,{tall:!0,icon:(0,G.jsx)(aR,{size:20,weight:`duotone`}),title:`Nothing to compare yet`,children:`Fanout compares the first and second half of the selected window.`}):(0,G.jsx)(EL.ScrollContainer,{minWidth:620,children:(0,G.jsxs)(EL,{striped:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(EL.Thead,{children:(0,G.jsxs)(EL.Tr,{children:[(0,G.jsx)(EL.Th,{children:`Signal`}),(0,G.jsx)(EL.Th,{children:`Earlier`}),(0,G.jsx)(EL.Th,{children:`Change`}),(0,G.jsx)(EL.Th,{children:`Recent`})]})}),(0,G.jsx)(EL.Tbody,{children:e.comparison.map(e=>(0,G.jsxs)(EL.Tr,{children:[(0,G.jsxs)(EL.Td,{children:[(0,G.jsx)(hI,{fw:650,children:e.label}),(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,children:e.unit})]}),(0,G.jsx)(EL.Td,{children:$9(e.before,e.unit)}),(0,G.jsxs)(EL.Td,{children:[(0,G.jsxs)(vI,{color:e.direction===`improvement`?`ok`:e.direction===`regression`?`bad`:`gray`,variant:`light`,children:[e.change_pct>0?`↑`:e.change_pct<0?`↓`:`→`,` `,Math.abs(e.change_pct).toFixed(1),`%`]}),e.significant&&(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,mt:3,children:`notable`})]}),(0,G.jsx)(EL.Td,{children:$9(e.after,e.unit)})]},e.label))})]})})}function $9(e,t){return t===`ms`?xU(e):t===`%`?`${e.toFixed(2)}%`:yU.format(e)}(0,pR.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(Coe,{})})); +container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:X().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:X().optional().describe(`User's timezone in IANA format.`),userAgent:X().optional().describe(`Host application identifier.`),platform:$6([Q(`web`),Q(`desktop`),Q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:L6().optional().describe(`Whether the device supports touch input.`),hover:L6().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:j6().describe(`Top safe area inset in pixels.`),right:j6().describe(`Right safe area inset in pixels.`),bottom:j6().describe(`Bottom safe area inset in pixels.`),left:j6().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),goe=Z({method:Q(`ui/notifications/host-context-changed`),params:Y9.describe(`Partial context update containing only changed fields.`)});Z({method:Q(`ui/update-model-context`),params:Z({content:Y6(k9).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:i8(X(),G6().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Z({method:Q(`ui/initialize`),params:Z({appInfo:e9.describe(`App identification (name and version).`),appCapabilities:foe.describe(`Features and capabilities this app provides.`),protocolVersion:X().describe(`Protocol version this app supports.`)})});var _oe=Z({protocolVersion:X().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:e9.describe(`Host application identification and version.`),hostCapabilities:doe.describe(`Features and capabilities provided by the host.`),hostContext:Y9.describe(`Rich context about the host environment.`)}).passthrough(),voe={target:`draft-2020-12`};async function X9(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](voe);if(n.vendor===`zod`){let{z:n}=await Zae(async()=>{let{z:e}=await Promise.resolve().then(()=>(A7(),vie));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Z9(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var yoe=class e extends Qae{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:aoe,toolinputpartial:ooe,toolresult:hoe,toolcancelled:soe,hostcontextchanged:goe};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||MW({jitless:!0}),this.setRequestHandler(t9,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Jae(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Z9(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Z9(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await X9(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await X9(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(uoe,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(N9,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(j9,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},M9,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},C9,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},x9,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?L9:I9;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},ioe,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},X7,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},noe,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},roe,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},poe,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new W9(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:$ae}},_oe,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function boe({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new W9(window.parent,window.parent);if(s=new yoe(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function xoe(e){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({}),[a,o]=(0,W.useState)(),[s,c]=(0,W.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=boe({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,W.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function Soe(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}VE([ib,bO]);function Coe(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=xoe(`Fanout service performance`),[o,s]=(0,W.useState)(`activity`),c=r?.theme===`dark`;return(0,G.jsxs)(TR,{dark:c,children:[(0,G.jsx)(ER,{title:i?.data.service||`System performance`,summary:i?`Traffic, latency, and errors ${i.data.service?`for ${i.data.service}`:`across all services`}`:void 0,onRefresh:()=>t(`service_performance`),disabled:!e}),(0,G.jsx)(DR,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Loading performance signals…`:void 0,retry:()=>void t(`service_performance`)}),i&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(OR,{active:o,onChange:s,items:[{id:`activity`,label:`Activity`},{id:`latency`,label:`Latency map`},{id:`endpoints`,label:`Endpoints`,count:i.data.endpoints.length},{id:`compare`,label:`Compare`}]}),o===`activity`&&(0,G.jsx)(woe,{data:i.data,dark:c,window:i.provenance.window}),o===`latency`&&(0,G.jsx)(Doe,{data:i.data,dark:c,window:i.provenance.window}),o===`endpoints`&&(0,G.jsx)(Ooe,{endpoints:i.data.endpoints,onEndpoint:t=>Soe(e,`Investigate ${t.method} ${t.path}. Explain its latency and errors.`)}),o===`compare`&&(0,G.jsx)(koe,{data:i.data}),(0,G.jsx)(AR,{left:xU(i.provenance.window),right:`Updated ${new Date(i.provenance.generated_at).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}`})]})]})}function woe({data:e,dark:t,window:n}){if(e.points.length===0)return(0,G.jsx)(kR,{tall:!0,icon:(0,G.jsx)(cR,{size:20,weight:`duotone`}),title:`No activity in this window`,children:`Trends will appear as activity is recorded.`});let{totals:r}=e,i=e.points.map(e=>e.time);return(0,G.jsxs)(uL,{px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,G.jsxs)(sL,{cols:{base:1,xs:3},spacing:`sm`,children:[(0,G.jsx)(jR,{label:`Operations`,value:vU.format(r.spans)}),(0,G.jsx)(jR,{label:`P95 latency`,value:bU(r.p95_ms),color:r.p95_ms>=750?`warn`:`ok`}),(0,G.jsx)(jR,{label:`Error rate`,value:yU(r.error_rate),color:r.error_rate>=.01?`bad`:`ok`})]}),(0,G.jsx)(Q9,{dark:t,labels:i,title:`Traffic and logs`,window:n,series:[{name:`Operations`,data:e.points.map(e=>e.spans),color:LR(`operations`,t)},{name:`Logs`,data:e.points.map(e=>e.log_count),color:LR(`logs`,t)}]}),(0,G.jsx)(Q9,{dark:t,labels:i,title:`Latency and error correlation`,window:n,series:[{name:`P95 latency`,data:e.points.map(e=>e.p95_ms),color:IR(t).warn,axis:`duration`},{name:`Error rate`,data:e.points.map(e=>e.error_rate),color:IR(t).bad,axis:`percent`}]})]})}var Toe={count:e=>vU.format(e),duration:bU,percent:yU},Eoe={count:e=>vU.format(e),duration:bU,percent:e=>`${(e*100).toFixed(e>=.1?0:2)}%`};function Q9({labels:e,title:t,series:n,dark:r,window:i}){let a=(0,W.useMemo)(()=>{let t=FR(r),a=[...new Set(n.map(e=>e.axis??`count`))],o=e=>n.find(t=>t.name===e)?.axis??`count`;return{color:n.map(e=>e.color),grid:{left:46,right:a.length>1?54:18,top:42,bottom:30},legend:{top:5,left:0,textStyle:{color:t.muted,fontSize:10},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:t.surface,borderColor:t.border,textStyle:{color:t.text,fontSize:10},formatter:e=>[e[0]?.axisValueLabel,...e.map(e=>`${e.marker}${e.seriesName}: ${Toe[o(e.seriesName)](e.value)}`)].join(`
`)},xAxis:{type:`category`,data:e.map(e=>SU(e,i)),boundaryGap:!1,axisLine:{lineStyle:{color:t.border}},axisTick:{show:!1},axisLabel:{color:t.muted,fontSize:9,hideOverlap:!0}},yAxis:a.map((e,r)=>({type:`value`,position:r===0?`left`:`right`,min:0,...e===`percent`&&!n.some(e=>e.axis===`percent`&&e.data.some(e=>e>0))?{max:.01}:{},splitLine:r===0?{lineStyle:{color:t.grid}}:{show:!1},axisLabel:{color:t.muted,fontSize:9,formatter:t=>Eoe[e](t)}})),series:n.map(e=>({name:e.name,type:`line`,yAxisIndex:a.indexOf(e.axis??`count`),data:e.data,smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.045}}))}},[r,e,n,i]);return(0,G.jsxs)(mF,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,G.jsx)(hI,{fw:650,size:`sm`,mb:`xs`,children:t}),(0,G.jsx)(_U,{option:a,height:210,label:t})]})}function Doe({data:e,dark:t,window:n}){let r=(0,W.useMemo)(()=>({services:[...new Set(e.heatmap.map(e=>e.service))],times:[...new Set(e.heatmap.map(e=>e.time))],values:new Map(e.heatmap.map(e=>[`${e.service}\u0000${e.time}`,e.p95_ms])),max:Math.max(...e.heatmap.map(e=>e.p95_ms),1)}),[e.heatmap]);if(r.services.length===0)return(0,G.jsx)(kR,{tall:!0,icon:(0,G.jsx)(oR,{size:20,weight:`duotone`}),title:`No latency samples yet`,children:`The heatmap will compare service latency across time buckets.`});let i=FR(t),a={grid:{left:105,right:20,top:20,bottom:45},tooltip:{position:`top`,backgroundColor:i.surface,borderColor:i.border,textStyle:{color:i.text,fontSize:10},formatter:e=>`${r.services[e.data[1]]}
${bU(e.data[2])}`},xAxis:{type:`category`,data:r.times.map(e=>SU(e,n)),splitArea:{show:!0},axisLabel:{color:i.muted,fontSize:9,hideOverlap:!0},axisLine:{lineStyle:{color:i.border}}},yAxis:{type:`category`,data:r.services,splitArea:{show:!0},axisLabel:{color:i.text,fontSize:9},axisLine:{lineStyle:{color:i.border}}},visualMap:{min:0,max:r.max,calculable:!0,orient:`horizontal`,left:`center`,bottom:0,textStyle:{color:i.muted,fontSize:8},inRange:{color:[i.grid,IR(t).warn,IR(t).bad]}},series:[{type:`heatmap`,data:r.services.flatMap((e,t)=>r.times.map((n,i)=>[i,t,r.values.get(`${e}\u0000${n}`)??0]))}]};return(0,G.jsx)(mF,{withBorder:!0,radius:`md`,mx:{base:`md`,sm:`lg`},mb:`md`,p:`xs`,children:(0,G.jsx)(_U,{option:a,height:Math.max(280,r.services.length*32+110),label:`Service P95 latency heatmap`})})}function Ooe({endpoints:e,onEndpoint:t}){let n=MR(e,8);return e.length===0?(0,G.jsx)(kR,{tall:!0,icon:(0,G.jsx)(nR,{size:20,weight:`duotone`}),title:`No endpoints detected`,children:`HTTP routes and span operations will appear here as traffic arrives.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(TL.ScrollContainer,{minWidth:700,children:(0,G.jsxs)(TL,{striped:!0,highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(TL.Thead,{children:(0,G.jsxs)(TL.Tr,{children:[(0,G.jsx)(TL.Th,{children:`Endpoint`}),(0,G.jsx)(TL.Th,{ta:`right`,children:`Calls`}),(0,G.jsx)(TL.Th,{ta:`right`,children:`P50`}),(0,G.jsx)(TL.Th,{ta:`right`,children:`P95`}),(0,G.jsx)(TL.Th,{ta:`right`,children:`P99`}),(0,G.jsx)(TL.Th,{ta:`right`,children:`Errors`})]})}),(0,G.jsx)(TL.Tbody,{children:n.pageItems.map(e=>(0,G.jsxs)(TL.Tr,{tabIndex:0,onClick:()=>t(e),onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&t(e)},style:{cursor:`pointer`},children:[(0,G.jsxs)(TL.Td,{children:[(0,G.jsx)(vI,{variant:`light`,mr:`xs`,children:e.method}),(0,G.jsx)(hI,{component:`span`,ff:`monospace`,size:`sm`,children:e.path})]}),(0,G.jsx)(TL.Td,{ta:`right`,children:vU.format(e.calls)}),(0,G.jsx)(TL.Td,{ta:`right`,children:bU(e.p50_ms)}),(0,G.jsx)(TL.Td,{ta:`right`,children:bU(e.p95_ms)}),(0,G.jsx)(TL.Td,{ta:`right`,children:bU(e.p99_ms)}),(0,G.jsx)(TL.Td,{ta:`right`,children:(0,G.jsx)(hI,{c:PR(e.health),children:yU(e.error_rate)})})]},`${e.method}-${e.path}`))})]})}),(0,G.jsx)(NR,{...n,onChange:n.setPage})]})}function koe({data:e}){return e.comparison.length===0?(0,G.jsx)(kR,{tall:!0,icon:(0,G.jsx)(iR,{size:20,weight:`duotone`}),title:`Nothing to compare yet`,children:`Fanout compares the first and second half of the selected window.`}):(0,G.jsx)(TL.ScrollContainer,{minWidth:620,children:(0,G.jsxs)(TL,{striped:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(TL.Thead,{children:(0,G.jsxs)(TL.Tr,{children:[(0,G.jsx)(TL.Th,{children:`Signal`}),(0,G.jsx)(TL.Th,{children:`Earlier`}),(0,G.jsx)(TL.Th,{children:`Change`}),(0,G.jsx)(TL.Th,{children:`Recent`})]})}),(0,G.jsx)(TL.Tbody,{children:e.comparison.map(e=>(0,G.jsxs)(TL.Tr,{children:[(0,G.jsxs)(TL.Td,{children:[(0,G.jsx)(hI,{fw:650,children:e.label}),(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,children:e.unit})]}),(0,G.jsx)(TL.Td,{children:$9(e.before,e.unit)}),(0,G.jsxs)(TL.Td,{children:[(0,G.jsxs)(vI,{color:e.direction===`improvement`?`ok`:e.direction===`regression`?`bad`:`gray`,variant:`light`,children:[e.change_pct>0?`↑`:e.change_pct<0?`↓`:`→`,` `,Math.abs(e.change_pct).toFixed(1),`%`]}),e.significant&&(0,G.jsx)(hI,{c:`dimmed`,size:`xs`,mt:3,children:`notable`})]}),(0,G.jsx)(TL.Td,{children:$9(e.after,e.unit)})]},e.label))})]})})}function $9(e,t){return t===`ms`?bU(e):t===`%`?`${e.toFixed(2)}%`:vU.format(e)}(0,fR.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(Coe,{})}));
diff --git a/internal/mcp/apps/topology.html b/internal/mcp/apps/topology.html index 113ecf24a..f2fada5ea 100644 --- a/internal/mcp/apps/topology.html +++ b/internal/mcp/apps/topology.html @@ -27,7 +27,7 @@ `)){var p=new JV;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,KV(XV,f,null,r,d)).on(`mouseover`,KV(ZV,m.name,null,r,d)).on(`mouseout`,KV(QV,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=sl(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=$r(h.fill);_&&_[3]===0&&(_[3]=.2,h=F(F({},h),{fill:oi(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,KV(XV,null,f,r,d)).on(`mouseover`,KV(ZV,null,f,r,d)).on(`mouseout`,KV(QV,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=sl(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};sl(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();qV(e,function(e){var r=e.type,i=new rs({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),ip(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),hu(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=jie(c,r,o,s,d,m,u),y=new JV,b=r.getModel(`textStyle`);if(he(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(Mie({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;B(w)&&w?T=w.replace(`{name}`,t??``):he(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new rs({style:op(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Qo({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Bf({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),hu(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Kg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Kg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(FC);function jie(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),qV(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:Qw(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function Mie(e){var t=e.icon||`roundRect`,n=ov(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=V.color.neutral00,n.style.lineWidth=2),n}function XV(e,t,n,r){QV(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),ZV(e,t,n,r)}function ZV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function QV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function $V(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),eH(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){L(i,function(t,n){e[t?`select`:`unSelect`](n)}),eH(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function eH(e,t){var n=t||{};return L(e.getData(),function(t){var r=t.get(`name`);if(r!==` `&&r!==``){var i=e.isSelected(r);n[r]=Ve(n,r)?n[r]&&i:i}}),n}function Nie(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,me($V,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,me($V,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,me($V,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,me($V,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,me($V,`unSelect`))}var Pie=ol(Fie);function Fie(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=Te(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Qo({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&$d(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;L([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,B(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=iH[i],o=aH[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(YV);function Rie(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function zie(e){RE(tH),e.registerComponentModel(Iie),e.registerComponentView(Lie),Rie(e)}function Bie(e){RE(tH),RE(zie)}var oH={get:function(e,t,n){var r=N((Vie[e]||{})[t]);return n&&z(r)?r[r.length-1]:r}},Vie={color:{active:[`#006edd`,`#e0ffff`],inactive:[V.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},sH=yk.mapVisual,Hie=yk.eachVisual,Uie=z,cH=L,Wie=Rs,Gie=js,lH=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&Oie(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=pe(e,this),this.controllerVisuals=WV(this.option.controller,t,e),this.targetVisuals=WV(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return cH(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Lc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return R(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){L(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],z(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(B(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(he(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=Wie([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=ue(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};P(r,n),P(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){Uie(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},cH(r,function(e,t){if(yk.isValidType(t)){var n=oH.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;cH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&N(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&N(n)||(a?s[0]:[s[0],s[0]])),c.symbol=sH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;Hie(l,function(e){e>u&&(u=e)}),c.symbolSize=sH(l,function(e){return Gie(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:V.color.transparent,borderColor:V.color.borderTint,contentColor:V.color.theme[0],inactiveColor:V.color.disabled,borderWidth:0,padding:V.size.m,textGap:10,precision:0,textStyle:{color:V.color.secondary}},t}(i_),uH=[20,140],Kie=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=uH[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=uH[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):z(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Rs((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=dH(this,`outOfRange`,this.getExtent()),n=dH(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Xu(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);qie([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=gH(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=Tf(n.handleLabelPoints[l],wf(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=gH(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=Tf(c.indicatorLabelPoint,wf(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||bH(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=Ac(u,d);this._dispatchHighDown(`downplay`,hH(f[0],n)),this._dispatchHighDown(`highlight`,hH(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(nw(e.target,function(e){var n=sl(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function tae(e,t,n,r){for(var i=t.targetVisuals[r],a=yk.prepareVisualTypes(i),o={color:tw(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(Qie,$ie),L(eae,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(nae))}function rae(e){e.registerComponentModel(Kie),e.registerComponentView(Xie),TH(e)}var iae=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],aae[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=N(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=R(this._pieceList,function(e){return e=N(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=yk.listVisualTypes(),i=this.isCategory();L(t.pieces,function(e){L(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),L(n,function(e,n){var r=!1;L(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&L(this.stateList,function(e){(t[e]||(t[e]={}))[n]=oH.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,L(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;L(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=N(e)},t.prototype.getValueState=function(e){var t=yk.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){yk.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return L(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=xh(lH.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(lH),aae={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function EH(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var oae=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=we(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),L(o.viewPieceList,function(o){var s=o.piece,u=new Xu;u.onclick=pe(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new rs({style:op(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:Te(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),Kg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:hH(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return mH(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Xu,o=this.visualMapModel.textStyleModel;a.add(new rs({style:op(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=R(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=ov(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=N(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,L(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(fH);function sae(e){e.registerComponentModel(iae),e.registerComponentView(oae),TH(e)}function cae(e){RE(rae),RE(sae)}var lae={label:{enabled:!0},decal:{show:!1}},DH=Mc(),OH=Mc(),uae=ol(dae);function dae(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=OH(e).scope||(OH(e).scope={}),i=N(lae);P(i.label,e.getLocaleModel().get(`aria`),!1),P(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Re();e.eachSeries(function(e){e.isColorBySeries()||(DH(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(he(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=l_(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=DH(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=l_(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?F(F({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=I(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=MH:-c>=MH),f=c>0?c%MH:c%MH+MH,p=!1;p=d?!0:!pi(u)&&f>=jH==!!l;var m=e+n*AH(a),h=t+r*kH(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*mae);if(d){var _=1/this._p,v=(l?1:-1)*(MH-_);this._add(`A`,n,r,g,1,+l,e+n*AH(a+v),t+r*kH(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*AH(o),b=t+r*kH(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function wae(e){return``}function BH(e,t){t||={};var n=t.newline?` `:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return Cae(i,a)+(i===`style`?o||``:Fh(o))+(t?``+n+R(t,function(e){return r(e)}).join(n)+n:``)+wae(i)}return r(e)}function Tae(e,t,n){n||={};var r=n.newline?` -`:``,i=` {`+r,a=r+`}`,o=R(de(e),function(t){return t+i+R(de(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=R(de(t),function(e){return`@keyframes `+e+i+R(de(t[e]),function(n){return n+i+R(de(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function VH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function HH(e,t,n,r){return zH(`svg`,`root`,{width:e,height:t,xmlns:IH,"xmlns:xlink":LH,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var Eae=0;function UH(){return Eae++}var WH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},GH=`transform-origin`;function Dae(e,t,n){var r=F({},e.shape);F(r,t),e.buildPath(n,r);var i=new NH;return i.reset(Oi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function Oae(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[GH]=n+`px `+r+`px`)}var kae={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function KH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Aae(e,t,n){var r=e.shape.paths,i={},a,o;if(L(r,function(e){var t=VH(n.zrId);t.animation=!0,JH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=de(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=KH(i,n);return a.replace(o,s)}}function qH(e){return B(e)?WH[e]?`cubic-bezier(`+WH[e]+`)`:Rr(e)?e:``:``}function JH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Fd){var s=Aae(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return KH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+UH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function jae(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};YH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=li(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),YH(r,t,n,!0)}}}function YH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+UH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var XH=Math.round;function ZH(e){return e&&B(e.src)}function QH(e){return e&&he(e.toDataURL)}function $H(e,t,n,r){yae(function(i,a){var o=i===`fill`||i===`stroke`;o&&Ei(a)?sU(t,e,i,r):o&&Ci(a)?cU(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),Rae(n,e,r)}function eU(e,t){var n=rte(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[Sae+`silent`]=`true`))}function tU(e){return pi(e[0]-1)&&pi(e[1])&&pi(e[2])&&pi(e[3]-1)}function Mae(e){return pi(e[4])&&pi(e[5])}function nU(e,t,n){if(t&&!(Mae(t)&&tU(t))){var r=n?10:1e4;e.transform=tU(t)?`translate(`+XH(t[4]*r)/r+` `+XH(t[5]*r)/r+`)`:gi(t)}}function rU(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;ke(f,g),ke(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=ht(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=zH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=N(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=ki(i);x&&(o.patternTransform=x);var S=zH(`pattern`,``,o,[d]),C=BH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=zH(`pattern`,T,o,[d])),t[n]=Di(T)}}function zae(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=zH(`clipPath`,a,o,[aU(e,n)])}t[`clip-path`]=Di(a)}function lU(e){return document.createTextNode(e)}function uU(e,t,n){e.insertBefore(t,n)}function dU(e,t){e.removeChild(t)}function fU(e,t){e.appendChild(t)}function pU(e){return e.parentNode}function mU(e){return e.nextSibling}function hU(e,t){e.textContent=t}var gU=58,Bae=120,Vae=zH(``,``);function _U(e){return e===void 0}function vU(e){return e!==void 0}function Hae(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function yU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function bU(e){var t,n=e.children,r=e.tag;if(vU(r)){var i=e.elm=RH(r);if(CU(Vae,e),z(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,xU(e,m,n,i,c)):SU(e,t,r,a))}function wU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(CU(e,t),_U(t.text)?vU(r)&&vU(i)?r!==i&&Uae(n,r,i):vU(i)?(vU(e.text)&&hU(n,``),xU(n,null,i,0,i.length-1)):vU(r)?SU(n,r,0,r.length-1):vU(e.text)&&hU(n,``):e.text!==t.text&&(vU(r)&&SU(n,r,0,r.length-1),hU(n,t.text)))}function Wae(e,t){if(yU(e,t))wU(e,t);else{var n=e.elm,r=pU(n);bU(t),r!==null&&(uU(r,t.elm,mU(n)),SU(r,[e],0,0))}return t}var Gae=0,Kae=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=qae(`configLayer`),this.storage=t,this._opts=n=F({},n),this.root=e,this._id=`zr`+Gae++,this._oldVNode=HH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=RH(`svg`);CU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,Wae(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return oU(e,VH(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=VH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=Jae(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=zH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=R(de(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(zH(`defs`,`defs`,{},c)),e.animation){var l=Tae(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=zH(`style`,`stl`,{},[],l);a.push(u)}}return HH(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},BH(this.renderToVNode({animation:Te(e.cssAnimation,!0),emphasis:Te(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Te(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=vE(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}var EU=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function DU(e){return`${(e*100).toFixed(e>=.1?1:2)}%`}function OU(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(e>=100?0:1)}ms`}function kU(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var AU=c({BIGINT_FORMAT_RANGES:()=>kW,CONSTANT_CATCH:()=>FW,Class:()=>jW,NUMBER_FORMAT_RANGES:()=>OW,aborted:()=>rW,allowsEval:()=>wW,assert:()=>eoe,assertEqual:()=>Xae,assertIs:()=>Qae,assertNever:()=>$ae,assertNotEqual:()=>Zae,assignProp:()=>zU,attachSchema:()=>sW,base64ToUint8Array:()=>mW,base64urlToUint8Array:()=>loe,cached:()=>PU,captureStackTrace:()=>CW,cleanEnum:()=>coe,cleanRegex:()=>IU,clone:()=>qU,cloneDef:()=>noe,codePointLength:()=>uW,constantCatch:()=>xW,createTransparentProxy:()=>soe,defineLazy:()=>RU,defineLazyInternal:()=>yW,esc:()=>VU,escapeRegex:()=>KU,explicitlyAborted:()=>iW,extend:()=>QU,finalizeIssue:()=>cW,floatSafeRemainder:()=>LU,getElementAtPath:()=>roe,getEnumValues:()=>MU,getLengthableOrigin:()=>dW,getParsedType:()=>TW,getSizableOrigin:()=>lW,hexToUint8Array:()=>doe,hide:()=>vW,installLazyProp:()=>bW,isObject:()=>UU,isPlainObject:()=>WU,issue:()=>pW,joinValues:()=>K,jsonStringifyReplacer:()=>NU,members:()=>gW,merge:()=>eW,mergeDefs:()=>BU,normalizeParams:()=>q,nullish:()=>FU,numKeys:()=>ooe,objectClone:()=>toe,omit:()=>ZU,optionalKeys:()=>YU,own:()=>_W,parsedType:()=>fW,partial:()=>tW,pick:()=>XU,prefixIssues:()=>aW,primitiveTypes:()=>DW,promiseAllObject:()=>ioe,propertyKeyTypes:()=>EW,randomString:()=>aoe,required:()=>nW,safeExtend:()=>$U,shallowClone:()=>GU,slugify:()=>HU,stringifyPrimitive:()=>JU,toZod:()=>jU,uint8ArrayToBase64:()=>hW,uint8ArrayToBase64url:()=>uoe,uint8ArrayToHex:()=>foe,unwrapMessage:()=>oW});function Xae(e){return e}function Zae(e){return e}function jU(){return e=>e}function Qae(e){}function $ae(e){throw Error(`Unexpected value in exhaustive check`)}function eoe(e){}function MU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>JU(e)).join(t)}function NU(e,t){return typeof t==`bigint`?t.toString():t}function PU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function FU(e){return e==null}function IU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function LU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function ioe(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function soe(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function JU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function YU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function XU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return qU(e,BU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&zU(e,r,n.shape[r])}return zU(this,`shape`,e),e},checks:[]}))}function ZU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return qU(e,BU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return zU(this,`shape`,r),r},checks:[]}))}function QU(e,t){if(!WU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return qU(e,BU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return zU(this,`shape`,n),n}}))}function $U(e,t){if(!WU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return qU(e,BU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return zU(this,`shape`,n),n}}))}function eW(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return qU(e,BU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return zU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function tW(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return qU(t,BU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return zU(this,`shape`,i),i},checks:[]}))}function nW(e,t,n){return qU(t,BU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return zU(this,`shape`,i),i}}))}function rW(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function oW(e){return typeof e==`string`?e:e?.message}function sW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function mW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function gW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):poe(e,n,r.value)}}function _W(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function vW(e,t,n){return _W(e,t,n,!1)}function poe(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:_W(this,t,n.bind(this))},set(e){_W(this,t,e)}})}function moe(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function yW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&MW!==e._zod){MW=void 0;return}MW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,PW);let e=NW;NW=!1;try{let r=n(this);return NW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),NW||=e,r}catch(n){throw delete this[t],NW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function bW(e,t,n,r){let i=moe(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function xW(e){let t=()=>e;return t[FW]=!0,t}var SW,CW,wW,TW,EW,DW,OW,kW,AW,jW,MW,NW,PW,FW,J=o((()=>{KW(),SW=Symbol(`evaluating`),CW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},wW=PU(()=>{if(GW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),TW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},EW=new Set([`string`,`number`,`symbol`]),DW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),OW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},kW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},AW=/[\uD800-\uDBFF]/,jW=class{constructor(...e){}},NW=!1,PW={configurable:!0,get(){NW=!0}},FW=`~constantCatch`}));function IW(e){let t=VW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return VW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){BW.value=new a(r);try{Object.defineProperty(n,"_zod",BW)}finally{BW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),gW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?IW(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function LW(e){return e&&Object.assign(GW,e),GW}var RW,zW,BW,VW,HW,UW,WW,GW,KW=o((()=>{J(),zW=Object.freeze({status:`aborted`}),BW={value:void 0,enumerable:!1},VW=`captureStackTrace`in Error?Error:null,HW=Symbol(`zod_brand`),UW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},WW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(RW=globalThis).__zod_globalConfig??(RW.__zod_globalConfig={}),GW=globalThis.__zod_globalConfig}));function qW(){let e=this._zod;return e.message??=JSON.stringify(e.def,NU,2),e.message}function JW(e){this._zod.message=e}function YW(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function XW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?YW(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ZW(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function eG(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${$W(e.path)}`);return t.join(` +`:``,i=` {`+r,a=r+`}`,o=R(de(e),function(t){return t+i+R(de(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=R(de(t),function(e){return`@keyframes `+e+i+R(de(t[e]),function(n){return n+i+R(de(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function VH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function HH(e,t,n,r){return zH(`svg`,`root`,{width:e,height:t,xmlns:IH,"xmlns:xlink":LH,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var Eae=0;function UH(){return Eae++}var WH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},GH=`transform-origin`;function Dae(e,t,n){var r=F({},e.shape);F(r,t),e.buildPath(n,r);var i=new NH;return i.reset(Oi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function Oae(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[GH]=n+`px `+r+`px`)}var kae={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function KH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Aae(e,t,n){var r=e.shape.paths,i={},a,o;if(L(r,function(e){var t=VH(n.zrId);t.animation=!0,JH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=de(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=KH(i,n);return a.replace(o,s)}}function qH(e){return B(e)?WH[e]?`cubic-bezier(`+WH[e]+`)`:Rr(e)?e:``:``}function JH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Fd){var s=Aae(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return KH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+UH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function jae(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};YH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=li(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),YH(r,t,n,!0)}}}function YH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+UH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var XH=Math.round;function ZH(e){return e&&B(e.src)}function QH(e){return e&&he(e.toDataURL)}function $H(e,t,n,r){yae(function(i,a){var o=i===`fill`||i===`stroke`;o&&Ei(a)?sU(t,e,i,r):o&&Ci(a)?cU(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),Rae(n,e,r)}function eU(e,t){var n=rte(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[Sae+`silent`]=`true`))}function tU(e){return pi(e[0]-1)&&pi(e[1])&&pi(e[2])&&pi(e[3]-1)}function Mae(e){return pi(e[4])&&pi(e[5])}function nU(e,t,n){if(t&&!(Mae(t)&&tU(t))){var r=n?10:1e4;e.transform=tU(t)?`translate(`+XH(t[4]*r)/r+` `+XH(t[5]*r)/r+`)`:gi(t)}}function rU(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;ke(f,g),ke(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=ht(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=zH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=N(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=ki(i);x&&(o.patternTransform=x);var S=zH(`pattern`,``,o,[d]),C=BH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=zH(`pattern`,T,o,[d])),t[n]=Di(T)}}function zae(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=zH(`clipPath`,a,o,[aU(e,n)])}t[`clip-path`]=Di(a)}function lU(e){return document.createTextNode(e)}function uU(e,t,n){e.insertBefore(t,n)}function dU(e,t){e.removeChild(t)}function fU(e,t){e.appendChild(t)}function pU(e){return e.parentNode}function mU(e){return e.nextSibling}function hU(e,t){e.textContent=t}var gU=58,Bae=120,Vae=zH(``,``);function _U(e){return e===void 0}function vU(e){return e!==void 0}function Hae(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function yU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function bU(e){var t,n=e.children,r=e.tag;if(vU(r)){var i=e.elm=RH(r);if(CU(Vae,e),z(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,xU(e,m,n,i,c)):SU(e,t,r,a))}function wU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(CU(e,t),_U(t.text)?vU(r)&&vU(i)?r!==i&&Uae(n,r,i):vU(i)?(vU(e.text)&&hU(n,``),xU(n,null,i,0,i.length-1)):vU(r)?SU(n,r,0,r.length-1):vU(e.text)&&hU(n,``):e.text!==t.text&&(vU(r)&&SU(n,r,0,r.length-1),hU(n,t.text)))}function Wae(e,t){if(yU(e,t))wU(e,t);else{var n=e.elm,r=pU(n);bU(t),r!==null&&(uU(r,t.elm,mU(n)),SU(r,[e],0,0))}return t}var Gae=0,Kae=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=qae(`configLayer`),this.storage=t,this._opts=n=F({},n),this.root=e,this._id=`zr`+Gae++,this._oldVNode=HH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=RH(`svg`);CU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,Wae(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return oU(e,VH(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=VH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=Jae(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=zH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=R(de(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(zH(`defs`,`defs`,{},c)),e.animation){var l=Tae(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=zH(`style`,`stl`,{},[],l);a.push(u)}}return HH(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},BH(this.renderToVNode({animation:Te(e.cssAnimation,!0),emphasis:Te(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Te(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=vE(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}var EU=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function DU(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function OU(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${OU(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function kU(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var AU=c({BIGINT_FORMAT_RANGES:()=>kW,CONSTANT_CATCH:()=>FW,Class:()=>jW,NUMBER_FORMAT_RANGES:()=>OW,aborted:()=>rW,allowsEval:()=>wW,assert:()=>eoe,assertEqual:()=>Xae,assertIs:()=>Qae,assertNever:()=>$ae,assertNotEqual:()=>Zae,assignProp:()=>zU,attachSchema:()=>sW,base64ToUint8Array:()=>mW,base64urlToUint8Array:()=>loe,cached:()=>PU,captureStackTrace:()=>CW,cleanEnum:()=>coe,cleanRegex:()=>IU,clone:()=>qU,cloneDef:()=>noe,codePointLength:()=>uW,constantCatch:()=>xW,createTransparentProxy:()=>soe,defineLazy:()=>RU,defineLazyInternal:()=>yW,esc:()=>VU,escapeRegex:()=>KU,explicitlyAborted:()=>iW,extend:()=>QU,finalizeIssue:()=>cW,floatSafeRemainder:()=>LU,getElementAtPath:()=>roe,getEnumValues:()=>MU,getLengthableOrigin:()=>dW,getParsedType:()=>TW,getSizableOrigin:()=>lW,hexToUint8Array:()=>doe,hide:()=>vW,installLazyProp:()=>bW,isObject:()=>UU,isPlainObject:()=>WU,issue:()=>pW,joinValues:()=>K,jsonStringifyReplacer:()=>NU,members:()=>gW,merge:()=>eW,mergeDefs:()=>BU,normalizeParams:()=>q,nullish:()=>FU,numKeys:()=>ooe,objectClone:()=>toe,omit:()=>ZU,optionalKeys:()=>YU,own:()=>_W,parsedType:()=>fW,partial:()=>tW,pick:()=>XU,prefixIssues:()=>aW,primitiveTypes:()=>DW,promiseAllObject:()=>ioe,propertyKeyTypes:()=>EW,randomString:()=>aoe,required:()=>nW,safeExtend:()=>$U,shallowClone:()=>GU,slugify:()=>HU,stringifyPrimitive:()=>JU,toZod:()=>jU,uint8ArrayToBase64:()=>hW,uint8ArrayToBase64url:()=>uoe,uint8ArrayToHex:()=>foe,unwrapMessage:()=>oW});function Xae(e){return e}function Zae(e){return e}function jU(){return e=>e}function Qae(e){}function $ae(e){throw Error(`Unexpected value in exhaustive check`)}function eoe(e){}function MU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>JU(e)).join(t)}function NU(e,t){return typeof t==`bigint`?t.toString():t}function PU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function FU(e){return e==null}function IU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function LU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function ioe(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function soe(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function JU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function YU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function XU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return qU(e,BU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&zU(e,r,n.shape[r])}return zU(this,`shape`,e),e},checks:[]}))}function ZU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return qU(e,BU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return zU(this,`shape`,r),r},checks:[]}))}function QU(e,t){if(!WU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return qU(e,BU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return zU(this,`shape`,n),n}}))}function $U(e,t){if(!WU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return qU(e,BU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return zU(this,`shape`,n),n}}))}function eW(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return qU(e,BU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return zU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function tW(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return qU(t,BU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return zU(this,`shape`,i),i},checks:[]}))}function nW(e,t,n){return qU(t,BU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return zU(this,`shape`,i),i}}))}function rW(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function oW(e){return typeof e==`string`?e:e?.message}function sW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function mW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function gW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):poe(e,n,r.value)}}function _W(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function vW(e,t,n){return _W(e,t,n,!1)}function poe(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:_W(this,t,n.bind(this))},set(e){_W(this,t,e)}})}function moe(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function yW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&MW!==e._zod){MW=void 0;return}MW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,PW);let e=NW;NW=!1;try{let r=n(this);return NW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),NW||=e,r}catch(n){throw delete this[t],NW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function bW(e,t,n,r){let i=moe(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function xW(e){let t=()=>e;return t[FW]=!0,t}var SW,CW,wW,TW,EW,DW,OW,kW,AW,jW,MW,NW,PW,FW,J=o((()=>{KW(),SW=Symbol(`evaluating`),CW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},wW=PU(()=>{if(GW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),TW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},EW=new Set([`string`,`number`,`symbol`]),DW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),OW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},kW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},AW=/[\uD800-\uDBFF]/,jW=class{constructor(...e){}},NW=!1,PW={configurable:!0,get(){NW=!0}},FW=`~constantCatch`}));function IW(e){let t=VW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return VW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){BW.value=new a(r);try{Object.defineProperty(n,"_zod",BW)}finally{BW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),gW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?IW(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function LW(e){return e&&Object.assign(GW,e),GW}var RW,zW,BW,VW,HW,UW,WW,GW,KW=o((()=>{J(),zW=Object.freeze({status:`aborted`}),BW={value:void 0,enumerable:!1},VW=`captureStackTrace`in Error?Error:null,HW=Symbol(`zod_brand`),UW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},WW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(RW=globalThis).__zod_globalConfig??(RW.__zod_globalConfig={}),GW=globalThis.__zod_globalConfig}));function qW(){let e=this._zod;return e.message??=JSON.stringify(e.def,NU,2),e.message}function JW(e){this._zod.message=e}function YW(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function XW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?YW(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ZW(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function eG(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${$W(e.path)}`);return t.join(` `)}var tG,nG,rG,iG,aG,oG,sG,cG=o((()=>{KW(),J(),tG={get:qW,set:JW,enumerable:!0,configurable:!0},nG={value:void 0,enumerable:!1},rG={value:void 0,enumerable:!1},iG=new WeakSet([Object.prototype,Error.prototype]),aG=(e,t)=>{e.name=`$ZodError`,nG.value=e._zod,Object.defineProperty(e,"_zod",nG),rG.value=t,Object.defineProperty(e,"issues",rG),nG.value=void 0,rG.value=void 0,Object.defineProperty(e,"message",tG);let n=Object.getPrototypeOf(e);iG.has(n)||(iG.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},oG=Y(`$ZodError`,aG),sG=Y(`$ZodError`,aG,void 0,{Parent:Error})}));function lG(e,t){return{callee:t?.callee??e,Err:t?.Err}}function uG(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[bG]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new UW;return a.issues.length===0}var dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG,jG,MG,NG,PG,FG,IG,LG,RG,zG=o((()=>{KW(),cG(),J(),dG=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new UW;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>cW(e,o,LW())));throw CW(n,a?.callee??t),n}return s.value};return t},fG=dG(sG),pG=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>cW(e,o,LW())));throw CW(n,a?.callee??t),n}return s.value};return t},mG=pG(sG),hG=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new UW;return a.issues.length?{success:!1,error:new(e??oG)(a.issues.map(e=>cW(e,i,LW())))}:{success:!0,data:a.value}},gG=hG(sG),_G=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>cW(e,i,LW())))}:{success:!0,data:a.value}},vG=_G(sG),yG=Symbol.for(`zod.compile.invalid`),bG=Symbol.for(`zod.compile.fallback`),xG=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==yG||uG(e,t,n)}),SG=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},CG=e=>{let t=dG(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,lG(n,a))};return n},wG=CG(sG),TG=e=>{let t=dG(e),n=(e,r,i,a)=>t(e,r,i,lG(n,a));return n},EG=TG(sG),DG=e=>{let t=pG(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,lG(n,a))};return n},OG=DG(sG),kG=e=>{let t=pG(e),n=async(e,r,i,a)=>await t(e,r,i,lG(n,a));return n},AG=kG(sG),jG=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return hG(e)(t,n,i)},MG=jG(sG),NG=e=>(t,n,r)=>hG(e)(t,n,r),PG=NG(sG),FG=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return _G(e)(t,n,i)},IG=FG(sG),LG=e=>async(t,n,r)=>_G(e)(t,n,r),RG=LG(sG)})),BG=c({base64:()=>bK,base64url:()=>xK,bigint:()=>AK,boolean:()=>NK,browserEmail:()=>pK,cidrv4:()=>vK,cidrv6:()=>yK,creditCard:()=>EK,cuid:()=>YG,cuid2:()=>XG,date:()=>OK,datetime:()=>KG,domain:()=>CK,duration:()=>tK,e164:()=>TK,email:()=>cK,emoji:()=>HG,extendedDuration:()=>nK,guid:()=>rK,hex:()=>RK,hostname:()=>SK,html5Email:()=>lK,httpProtocol:()=>wK,idnEmail:()=>fK,integer:()=>jK,ipv4:()=>hK,ipv6:()=>gK,ksuid:()=>$G,lowercase:()=>IK,mac:()=>_K,md5_base64:()=>BK,md5_base64url:()=>VK,md5_hex:()=>zK,nanoid:()=>eK,nanoidOfLength:()=>VG,null:()=>PK,number:()=>MK,rfc5322Email:()=>uK,sha1_base64:()=>UK,sha1_base64url:()=>WK,sha1_hex:()=>HK,sha256_base64:()=>KK,sha256_base64url:()=>qK,sha256_hex:()=>GK,sha384_base64:()=>YK,sha384_base64url:()=>XK,sha384_hex:()=>JK,sha512_base64:()=>QK,sha512_base64url:()=>$K,sha512_hex:()=>ZK,string:()=>kK,time:()=>GG,ulid:()=>ZG,undefined:()=>FK,unicodeEmail:()=>dK,uppercase:()=>LK,uuid:()=>iK,uuid4:()=>aK,uuid6:()=>oK,uuid7:()=>sK,xid:()=>QG});function VG(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function HG(){return new RegExp(mK,`u`)}function UG(e){return RegExp(`^${e}$`)}function WG(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function GG(e){return RegExp(`^${WG(e)}$`)}function KG(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${WG({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${WG({precision:e.precision})}`:n;return RegExp(`^${DK}T(?:${r})$`)}function qG(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function JG(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK,qK,JK,YK,XK,ZK,QK,$K,eq=o((()=>{J(),YG=/^[cC][0-9a-z]{6,}$/,XG=/^[0-9a-z]+$/,ZG=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,QG=/^[0-9a-vA-V]{20}$/,$G=/^[A-Za-z0-9]{27}$/,eK=/^[a-zA-Z0-9_-]{21}$/,tK=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nK=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,rK=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,iK=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,aK=iK(4),oK=iK(6),sK=iK(7),cK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,lK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,uK=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,dK=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,fK=dK,pK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,mK=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,hK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,gK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,_K=e=>{let t=KU(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},vK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,yK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xK=/^[A-Za-z0-9_-]*$/,SK=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,CK=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,wK=/^https?$/,TK=/^\+[1-9]\d{6,14}$/,EK=/^\d(?:[ -]?\d){11,18}$/,DK=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,OK=UG(DK),kK=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},AK=/^-?\d+n?$/,jK=/^-?\d+$/,MK=/^-?\d+(?:\.\d+)?$/,NK=/^(?:true|false)$/i,PK=/^null$/i,FK=/^undefined$/i,IK=/^[^A-Z]*$/,LK=/^[^a-z]*$/,RK=/^[0-9a-fA-F]*$/,zK=/^[0-9a-fA-F]{32}$/,BK=qG(22,`==`),VK=JG(22),HK=/^[0-9a-fA-F]{40}$/,UK=qG(27,`=`),WK=JG(27),GK=/^[0-9a-fA-F]{64}$/,KK=qG(43,`=`),qK=JG(43),JK=/^[0-9a-fA-F]{96}$/,YK=qG(64,``),XK=JG(64),ZK=/^[0-9a-fA-F]{128}$/,QK=qG(86,`==`),$K=JG(86)}));function tq(e,t,n){e.issues.length&&t.issues.push(...aW(n,e.issues))}var nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq,yq,bq,xq,Sq,Cq,wq,Tq,Eq,Dq=o((()=>{KW(),eq(),J(),nq=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),rq=e=>{let t=e.value;return!FU(t)&&t.size!==void 0},iq=e=>{let t=e.value;return!FU(t)&&t.length!==void 0},aq={number:`number`,bigint:`bigint`,object:`date`},oq=Y(`$ZodCheckLessThan`,(e,t)=>{nq.init(e,t);let n=aq[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{nq.init(e,t);let n=aq[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:aq[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cq=Y(`$ZodCheckMultipleOf`,(e,t)=>{nq.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):LU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),lq=Y(`$ZodCheckNumberFormat`,(e,t)=>{nq.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=OW[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=jK)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),uq=Y(`$ZodCheckBigIntFormat`,(e,t)=>{nq.init(e,t);let[n,r]=kW[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),dq=Y(`$ZodCheckMaxSize`,(e,t)=>{var n;nq.init(e,t),(n=e._zod.def).when??(n.when=rq),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:lW(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fq=Y(`$ZodCheckMinSize`,(e,t)=>{var n;nq.init(e,t),(n=e._zod.def).when??(n.when=rq),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:lW(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pq=Y(`$ZodCheckSizeEquals`,(e,t)=>{var n;nq.init(e,t),(n=e._zod.def).when??(n.when=rq),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:lW(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),mq=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;nq.init(e,t),(n=e._zod.def).when??(n.when=iq),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?uW(r):i)<=t.maximum)return;let a=dW(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),hq=Y(`$ZodCheckMinLength`,(e,t)=>{var n;nq.init(e,t),(n=e._zod.def).when??(n.when=iq),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=dW(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),gq=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;nq.init(e,t),(n=e._zod.def).when??(n.when=iq),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?uW(r):i;if(a===t.length)return;let o=dW(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),_q=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;nq.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),vq=Y(`$ZodCheckRegex`,(e,t)=>{_q.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),yq=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=IK,_q.init(e,t)}),bq=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=LK,_q.init(e,t)}),xq=Y(`$ZodCheckIncludes`,(e,t)=>{nq.init(e,t);let n=KU(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Sq=Y(`$ZodCheckStartsWith`,(e,t)=>{nq.init(e,t);let n=RegExp(`^${KU(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Cq=Y(`$ZodCheckEndsWith`,(e,t)=>{nq.init(e,t);let n=RegExp(`.*${KU(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),wq=Y(`$ZodCheckProperty`,(e,t)=>{nq.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>tq(n,e,t.property));tq(n,e,t.property)}}),Tq=Y(`$ZodCheckMimeType`,(e,t)=>{nq.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Eq=Y(`$ZodCheckOverwrite`,(e,t)=>{nq.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),Oq,kq=o((()=>{Oq=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` `)}\n};`)(...Object.values(this.closed))}}})),Aq,jq=o((()=>{Aq={major:4,minor:5,patch:4}}));function Mq(e){return{validate:t=>{try{return mJ(gG(e,t))}catch{return vG(e,t).then(mJ)}},vendor:`zod`,version:1}}function Nq(e,t){if(!t.normalize&&t.protocol?.source===wK.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function Pq(e){return e.replace(bJ,``)}function Fq(e,t){return t.lastIndex=0,t.test(e.hostname)}function Iq(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function Lq(e){if(!PJ.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function Rq(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Lq(n)}function zq(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Bq(e){if(!xK.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return zq(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Vq(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Hq(e){return EK.test(e)?Vq(e.replace(HJ,``)):!1}function Uq(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Wq(e,t,n){e.issues.length&&t.issues.push(...aW(n,e.issues)),t.value[n]=e.value}function Gq(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...aW(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function Kq(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:oY,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=YU(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function qq(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Gq(e,n,i,t,u,d))):Gq(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Jq(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!rW(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>cW(e,r,LW())))}),t)}function Yq(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>cW(e,r,LW())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Xq(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function Zq(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(WU(e)&&WU(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Zq(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Zq(t.value,n.value);if(!c.valid){if(rW(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function $q(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function eJ(e,t,n){e.issues.length&&t.issues.push(...aW(n,e.issues)),t.value[n]=e.value}function tJ(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...aW(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function nJ(e,t,n,r,i,a,o){e.issues.length&&(EW.has(typeof r)?n.issues.push(...aW(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>cW(e,o,LW()))})),t.issues.length&&(EW.has(typeof r)?n.issues.push(...aW(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>cW(e,o,LW()))})),n.value.set(e.value,t.value)}function rJ(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function iJ(e,t){return e.value=t.issues.length?void 0:t.value,e}function aJ(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function oJ(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function sJ(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>cW(e,r,LW()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function cJ(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function lJ(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>uJ(e,r,t.out,n)):uJ(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>uJ(e,r,t.in,n)):uJ(e,r,t.in,n)}}function uJ(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function dJ(e){return e.memo||(e.value=Object.freeze(e.value)),e}function fJ(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(pW(e))}}var pJ,mJ,hJ,gJ,_J,vJ,yJ,bJ,xJ,SJ,CJ,wJ,TJ,EJ,DJ,OJ,kJ,AJ,jJ,MJ,NJ,PJ,FJ,IJ,LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,rY,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,kY,AY,jY,MY,NY,PY,FY,IY,LY,RY,zY,BY=o((()=>{Dq(),KW(),kq(),zG(),eq(),J(),jq(),pJ=Y(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Aq;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=rW(t),a;for(let o of n){if(o._zod.def.when){if(iW(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new UW;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(sW(t.issues,n,e),i||=rW(t,n))});else{if(t.issues.length===n)continue;sW(t.issues,n,e),i||=rW(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(rW(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new UW;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new UW;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return vW(this,`~standard`,Mq(this))},set"~standard"(e){_W(this,`~standard`,e)}}),mJ=e=>e.success?{value:e.data}:{issues:e.error?.issues},hJ=Y(`$ZodString`,(e,t)=>{pJ.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??kK(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),gJ=Y(`$ZodStringFormat`,(e,t)=>{_q.init(e,t),hJ.init(e,t)}),_J=Y(`$ZodGUID`,(e,t)=>{t.pattern??=rK,gJ.init(e,t)}),vJ=Y(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=iK(e)}else t.pattern??=iK();gJ.init(e,t)}),yJ=Y(`$ZodEmail`,(e,t)=>{t.pattern??=cK,gJ.init(e,t)}),bJ=/[\t\n\r]/g,xJ=Y(`$ZodURL`,(e,t)=>{gJ.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Nq(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Fq(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Iq(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Pq(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),SJ=Y(`$ZodEmoji`,(e,t)=>{t.pattern??=HG(),gJ.init(e,t)}),CJ=Y(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?eK:VG(t.length),gJ.init(e,t)}),wJ=Y(`$ZodCUID`,(e,t)=>{t.pattern??=YG,gJ.init(e,t)}),TJ=Y(`$ZodCUID2`,(e,t)=>{t.pattern??=XG,gJ.init(e,t)}),EJ=Y(`$ZodULID`,(e,t)=>{t.pattern??=ZG,gJ.init(e,t)}),DJ=Y(`$ZodXID`,(e,t)=>{t.pattern??=QG,gJ.init(e,t)}),OJ=Y(`$ZodKSUID`,(e,t)=>{t.pattern??=$G,gJ.init(e,t)}),kJ=Y(`$ZodISODateTime`,(e,t)=>{t.pattern??=KG(t),gJ.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),AJ=Y(`$ZodISODate`,(e,t)=>{t.pattern??=OK,gJ.init(e,t)}),jJ=Y(`$ZodISOTime`,(e,t)=>{t.pattern??=GG(t),gJ.init(e,t)}),MJ=Y(`$ZodISODuration`,(e,t)=>{t.pattern??=tK,gJ.init(e,t)}),NJ=Y(`$ZodIPv4`,(e,t)=>{t.pattern??=hK,gJ.init(e,t),e._zod.bag.format=`ipv4`}),PJ=/^[0-9a-fA-F:.]+$/,FJ=Y(`$ZodIPv6`,(e,t)=>{t.pattern??=gK,gJ.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Lq(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),IJ=Y(`$ZodMAC`,(e,t)=>{t.pattern??=_K(t.delimiter),gJ.init(e,t),e._zod.bag.format=`mac`}),LJ=Y(`$ZodCIDRv4`,(e,t)=>{t.pattern??=vK,gJ.init(e,t)}),RJ=Y(`$ZodCIDRv6`,(e,t)=>{t.pattern??=yK,gJ.init(e,t),e._zod.check=n=>{Rq(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),zJ=Y(`$ZodBase64`,(e,t)=>{t.pattern??=bK,gJ.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{zq(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),BJ=Y(`$ZodBase64URL`,(e,t)=>{t.pattern??=xK,gJ.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Bq(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),VJ=Y(`$ZodE164`,(e,t)=>{t.pattern??=TK,gJ.init(e,t)}),HJ=/[- ]/g,UJ=Y(`$ZodCreditCard`,(e,t)=>{t.pattern??=EK,gJ.init(e,t),e._zod.check=n=>{Hq(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),WJ=Y(`$ZodJWT`,(e,t)=>{gJ.init(e,t),e._zod.check=n=>{Uq(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),GJ=Y(`$ZodCustomStringFormat`,(e,t)=>{gJ.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),KJ=Y(`$ZodNumber`,(e,t)=>{pJ.init(e,t),e._zod.pattern=e._zod.bag.pattern??MK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),qJ=Y(`$ZodNumberFormat`,(e,t)=>{lq.init(e,t),KJ.init(e,t)}),JJ=Y(`$ZodBoolean`,(e,t)=>{pJ.init(e,t),e._zod.pattern=NK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),YJ=Y(`$ZodBigInt`,(e,t)=>{pJ.init(e,t),e._zod.pattern=AK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),XJ=Y(`$ZodBigIntFormat`,(e,t)=>{uq.init(e,t),YJ.init(e,t)}),ZJ=Y(`$ZodSymbol`,(e,t)=>{pJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),QJ=Y(`$ZodUndefined`,(e,t)=>{pJ.init(e,t),e._zod.pattern=FK,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),$J=Y(`$ZodNull`,(e,t)=>{pJ.init(e,t),e._zod.pattern=PK,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),eY=Y(`$ZodAny`,(e,t)=>{pJ.init(e,t),e._zod.parse=e=>e}),tY=Y(`$ZodUnknown`,(e,t)=>{pJ.init(e,t),e._zod.parse=e=>e}),nY=Y(`$ZodNever`,(e,t)=>{pJ.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),rY=Y(`$ZodVoid`,(e,t)=>{pJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),iY=Y(`$ZodDate`,(e,t)=>{pJ.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),aY=Y(`$ZodArray`,(e,t)=>{pJ.init(e,t);let n=GW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;eWq(t,r,e))):Wq(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),oY=[],sY=new WeakMap,cY=Y(`$ZodObject`,(e,t)=>{if(pJ.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;sY.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),sY.set(t,n),n}})}let n=PU(()=>Kq(t));yW(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||zU(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=UU,i=t.catchall,a,o=GW.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>Gq(n,t,e,c,r,i))):Gq(a,t,e,c,r,i)}return i?qq(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),lY=Y(`$ZodObjectJIT`,(e,t)=>{cY.init(e,t);let n=e._zod.parse,r=PU(()=>Kq(t)),i=GW.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Oq([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` diff --git a/internal/mcp/apps/trace.html b/internal/mcp/apps/trace.html index 5bec77df9..35c8a2297 100644 --- a/internal/mcp/apps/trace.html +++ b/internal/mcp/apps/trace.html @@ -6,7 +6,7 @@ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{xe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?be(n):``}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be(`Lazy`);case 13:return e.child!==t&&t!==null?be(`Suspense Fallback`):be(`Suspense`);case 19:return be(`SuspenseList`);case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return be(`Activity`);default:return``}}function we(e){try{var t=``,n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var Ue=Math.clz32?Math.clz32:Ke,We=Math.log,Ge=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(We(e)/Ge|0)|0}var qe=256,Je=262144,Ye=4194304;function Xe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Xe(n))):i=Xe(o):i=Xe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Xe(n))):i=Xe(o)):i=Xe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $e(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function et(){var e=Ye;return Ye<<=1,!(Ye&62914560)&&(Ye=4194304),e}function tt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),mn=!1;if(pn)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){mn=!0}}),window.addEventListener(`test`,hn,hn),window.removeEventListener(`test`,hn,hn)}catch{mn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.textContent,a=i.length;for(e=0;e=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var P=!1;function ir(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function ar(e,t){if(P)return e===`compositionend`||!Xn&&nr(e,t)?(e=yn(),vn=_n=gn=null,P=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Dr(n)}}function kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ar(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vt(e.document)}return t}function jr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Mr=pn&&`documentMode`in document&&11>=document.documentMode,Nr=null,Pr=null,Fr=null,Ir=!1;function Lr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ir||Nr==null||Nr!==Vt(r)||(r=Nr,`selectionStart`in r&&jr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fr&&Er(Fr,r)||(Fr=r,r=zd(Pr,`onSelect`),0>=o,i-=o,ki=1<<32-Ue(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Ri&&ji(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Ri&&ji(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Ri&&ji(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Ri&&ji(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Ma(l)===r.type){n(e,r.sibling),c=a(r,o.props),za(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),za(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=yi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Ma(o),x(e,r,o,c)}if(re(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ra(o),c);if(o.$$typeof===b)return x(e,r,oa(e,o),c);Ba(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=_i(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{La=0;var i=x(e,t,n,r);return Ia=null,i}catch(t){if(t===Ea||t===Oa)throw t;var a=di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ha=Va(!0),Ua=Va(!1),Wa=!1;function Ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Jl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ci(e),si(e,null,n),t}return ii(e,r,t,n),ci(e)}function Ya(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}function Xa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Za=!1;function Qa(){if(Za){var e=_a;if(e!==null)throw e}}function $a(e,t,n,r){Za=!1;var i=e.updateQueue;Wa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Xl&p)===p:(r&p)===p){p!==0&&p===ga&&(Za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Wa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),iu|=o,e.lanes=o,e.memoizedState=d}}function eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function to(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=A.T,s={};A.T=s,Vs(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Bs(e,t,ba(c,r),Eu(e)):Bs(e,t,r,Eu(e))}catch(n){Bs(e,t,{then:function(){},status:`rejected`,reason:n},Eu())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function As(){}function js(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ms(e).queue;ks(e,a,t,ie,n===null?As:function(){return Ns(e),n(r)})}function Ms(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ns(e){var t=Ms(e);t.next===null&&(t=e.alternate.memoizedState),Bs(e,t.next.queue,{},Eu())}function Ps(){return aa(cp)}function Fs(){return Lo().memoizedState}function Is(){return Lo().memoizedState}function Ls(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Eu();e=qa(n);var r=Ja(t,e,n);r!==null&&(ku(r,t,n),Ya(r,t,n)),t={cache:fa()},e.payload=t;return}t=t.return}}function Rs(e,t,n){var r=Eu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Hs(e)?Us(t,n):(n=ai(e,t,n,r),n!==null&&(ku(n,e,r),Ws(n,t,r)))}function zs(e,t,n){Bs(e,t,n,Eu())}function Bs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hs(e))Us(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Tr(s,o))return ii(e,t,i,0),Yl===null&&ri(),!1}catch{}if(n=ai(e,t,i,r),n!==null)return ku(n,e,r),Ws(n,t,r),!0}return!1}function Vs(e,t,n,r){if(r={lane:2,revertLane:Td(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Hs(e)){if(t)throw Error(i(479))}else t=ai(e,n,r,2),t!==null&&ku(t,e,2)}function Hs(e){var t=e.alternate;return e===F||t!==null&&t===F}function Us(e,t){xo=bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ws(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}var Gs={readContext:aa,use:Bo,useCallback:Do,useContext:Do,useEffect:Do,useImperativeHandle:Do,useLayoutEffect:Do,useInsertionEffect:Do,useMemo:Do,useReducer:Do,useRef:Do,useState:Do,useDebugValue:Do,useDeferredValue:Do,useTransition:Do,useSyncExternalStore:Do,useId:Do,useHostTransitionStatus:Do,useFormState:Do,useActionState:Do,useOptimistic:Do,useMemoCache:Do,useCacheRefresh:Do};Gs.useEffectEvent=Do;var Ks={readContext:aa,use:Bo,useCallback:function(e,t){return Io().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:gs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ms(4194308,4,Ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ms(4194308,4,e,t)},useInsertionEffect:function(e,t){ms(4,2,e,t)},useMemo:function(e,t){var n=Io();t=t===void 0?null:t;var r=e();if(So){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Io();if(n!==void 0){var i=n(t);if(So){He(!0);try{n(t)}finally{He(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Rs.bind(null,F,e),[r.memoizedState,e]},useRef:function(e){var t=Io();return e={current:e},t.memoizedState=e},useState:function(e){e=Qo(e);var t=e.queue,n=zs.bind(null,F,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ws,useDeferredValue:function(e,t){return Ds(Io(),e,t)},useTransition:function(){var e=Qo(!1);return e=ks.bind(null,F,e.queue,!0,!1),Io().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=F,a=Io();if(Ri){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Yl===null)throw Error(i(349));Xl&127||qo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,gs(Yo.bind(null,r,o,e),[e]),r.flags|=2048,fs(9,{destroy:void 0},Jo.bind(null,r,o,n,t),null),n},useId:function(){var e=Io(),t=Yl.identifierPrefix;if(Ri){var n=Ai,r=ki;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Co++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ft]=t,o[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(qd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Bc(t)}}return Gc(t),Vc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Bc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ii,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Gd(e.nodeValue,n)),e||Hi(t,!0)}else e=Qd(e).createTextNode(r),e[ft]=t,t.stateNode=e}return Gc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ft]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gc(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(mo(t),t):(mo(t),null);if(t.flags&128)throw Error(i(558))}return Gc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ft]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gc(t),a=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(mo(t),t):(mo(t),null)}return mo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Uc(t,t.updateQueue),Gc(t),null);case 4:return he(),e===null&&Fd(t.stateNode.containerInfo),Gc(t),null;case 10:return $i(t.type),Gc(t),null;case 19:if(ce(ho),r=t.memoizedState,r===null)return Gc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Wc(r,!1);else{if(ru!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=go(e),o!==null){for(t.flags|=128,Wc(r,!1),e=o.updateQueue,t.updateQueue=e,Uc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return le(ho,ho.current&1|2),Ri&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>mu&&(t.flags|=128,a=!0,Wc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Uc(t,e),Wc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ri)return Gc(t),null}else 2*Ae()-r.renderingStartTime>mu&&n!==536870912&&(t.flags|=128,a=!0,Wc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Gc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=ho.current,le(ho,a?n&1|2:n&1),Ri&&ji(t,r.treeForkCount),e);case 22:case 23:return mo(t),oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Gc(t),t.subtreeFlags&6&&(t.flags|=8192)):Gc(t),n=t.updateQueue,n!==null&&Uc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ce(Sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$i(da),Gc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function qc(e,t){switch(Pi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $i(da),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(mo(t),t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(ho),null;case 4:return he(),null;case 10:return $i(t.type),null;case 22:case 23:return mo(t),oo(),e!==null&&ce(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $i(da),null;case 25:return null;default:return null}}function Jc(e,t){switch(Pi(t),t.tag){case 3:$i(da),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&mo(t);break;case 13:mo(t);break;case 19:ce(ho);break;case 10:$i(t.type);break;case 22:case 23:mo(t),oo(),e!==null&&ce(Sa);break;case 24:$i(da)}}function Yc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ad(t,t.return,e)}}function Xc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ad(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ad(t,t.return,e)}}function Zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{to(t,n)}catch(t){ad(e,e.return,t)}}}function Qc(e,t,n){n.props=$s(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ad(e,t,n)}}function $c(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ad(e,t,n)}}function el(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ad(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ad(e,t,n)}else n.current=null}}function tl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ad(e,e.return,t)}}function nl(e,t,n){try{var r=e.stateNode;Jd(r,e.type,n,t),r[pt]=t}catch(t){ad(e,e.return,t)}}function rl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||rl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=rn));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}function sl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);qd(t,r,n),t[ft]=e,t[pt]=n}catch(t){ad(e,e.return,t)}}var cl=!1,ll=!1,ul=!1,dl=typeof WeakSet==`function`?WeakSet:Set,fl=null;function pl(e,t){if(e=e.containerInfo,Xd=_p,e=Ar(e),jr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},_p=!1,fl=t;fl!==null;)if(t=fl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,fl=e;else for(;fl!==null;){switch(t=fl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),qd(o,r,n),o[ft]=e,Tt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Or(s,h),v=Or(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,A.T=null,n=Su,Su=null;var o=vu,s=bu;if(_u=0,yu=vu=null,bu=0,Jl&6)throw Error(i(331));var c=Jl;if(Jl|=4,Ul(o.current),Fl(o,o.current,s,n),Jl=c,vd(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{j.p=a,A.T=r,td(e,t)}}function id(e,t,n){t=xi(n,t),t=ac(e.stateNode,t,2),e=Ja(e,t,2),e!==null&&(nt(e,2),_d(e))}function ad(e,t,n){if(e.tag===3)id(e,e,n);else for(;t!==null;){if(t.tag===3){id(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gu===null||!gu.has(r))){e=xi(n,e),n=oc(2),r=Ja(t,n,2),r!==null&&(sc(n,r,t,e),nt(r,2),_d(r));break}}t=t.return}}function od(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ql;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(tu=!0,i.add(n),e=sd.bind(null,e,t,n),t.then(e,e))}function sd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yl===e&&(Xl&n)===n&&(ru===4||ru===3&&(Xl&62914560)===Xl&&300>Ae()-fu?!(Jl&2)&&Iu(e,0):ou|=n,cu===Xl&&(cu=0)),_d(e)}function cd(e,t){t===0&&(t=et()),e=oi(e,t),e!==null&&(nt(e,t),_d(e))}function ld(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cd(e,n)}function ud(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),cd(e,n)}function L(e,t){return Ee(e,t)}var dd=null,fd=null,pd=!1,md=!1,hd=!1,gd=0;function _d(e){e!==fd&&e.next===null&&(fd===null?dd=fd=e:fd=fd.next=e),md=!0,pd||(pd=!0,wd())}function vd(e,t){if(!hd&&md){hd=!0;do for(var n=!1,r=dd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ue(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Cd(r,a))}else a=Xl,a=Ze(r,r===Yl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Qe(r,a)||(n=!0,Cd(r,a))}r=r.next}while(n);hd=!1}}function yd(){bd()}function bd(){md=pd=!1;var e=0;gd!==0&&rf()&&(e=gd);for(var t=Ae(),n=null,r=dd;r!==null;){var i=r.next,a=xd(r,t);a===0?(r.next=null,n===null?dd=i:n.next=i,i===null&&(fd=n)):(n=r,(e!==0||a&3)&&(md=!0)),r=i}_u!==0&&_u!==5||vd(e,!1),gd!==0&&(gd=0)}function xd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&V(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),qd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}H.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),H.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),qd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!H.has(a)&&(e=f({rel:`modulepreload`,href:e},t),H.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),qd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=wt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=H.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);Tt(c),qd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=H.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=H.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=fe.current)?U(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=wt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=wt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),H.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},H.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=wt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ut(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),qd(t,`link`,n),Tt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ut(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),qd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Hf(n),(a=H.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),qd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,Tt(a),a):(r=n,(a=H.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Tt(a),qd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=H.get(i))&&Jf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),qd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ku()}))(),ju=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],Mu=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],Nu=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],Pu=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],Fu=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],Iu=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],Lu={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Ru={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},zu={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},Bu={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:ju,brand:Mu,ok:Nu,warn:Pu,bad:Fu,info:Iu},defaultRadius:`md`,fontFamily:zu.body,fontFamilyMonospace:zu.display,headings:{fontFamily:zu.body,fontWeight:`600`},cursorType:`pointer`},Vu=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":Lu.light.muted},dark:{}}),Hu=en(Bu);function Uu({dark:e,children:t}){return(0,M.jsx)($t,{theme:Hu,cssVariablesResolver:Vu,forceColorScheme:e?`dark`:`light`,children:(0,M.jsx)(_s,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function Wu({title:e,summary:t,onRefresh:n,disabled:r}){return(0,M.jsxs)(uc,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,M.jsxs)(P,{miw:0,children:[(0,M.jsx)(hu,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,M.jsx)(vc,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,M.jsx)(vl,{label:`Refresh this view`,children:(0,M.jsx)(ec,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,M.jsx)(Su,{size:15,weight:`bold`})})})]})}function Gu({error:e,loading:t,retry:n}){return e?(0,M.jsx)(pc,{color:`bad`,m:`md`,radius:`md`,children:(0,M.jsxs)(uc,{justify:`space-between`,children:[(0,M.jsx)(vc,{size:`sm`,children:e}),n&&(0,M.jsx)(Ac,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,M.jsxs)(Mc,{mih:160,p:`xl`,children:[(0,M.jsx)(Ks,{size:`sm`}),(0,M.jsx)(vc,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function Ku({active:e,items:t,onChange:n}){return(0,M.jsx)(us,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,M.jsx)(au,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,M.jsx)(au.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,M.jsx)(au.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,M.jsx)(xc,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function qu({icon:e,title:t,children:n,tall:r=!1}){return(0,M.jsx)(Mc,{mih:r?220:130,p:`xl`,children:(0,M.jsxs)(uc,{wrap:`nowrap`,children:[(0,M.jsx)(cu,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,M.jsxs)(P,{children:[(0,M.jsx)(vc,{fw:700,size:`sm`,children:t}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function Ju({left:e,right:t}){return(0,M.jsxs)(uc,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function Yu({label:e,value:t,color:n}){return(0,M.jsxs)(_s,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e}),(0,M.jsx)(vc,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function Xu(e,t=8){let[n,r]=(0,E.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,E.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function Zu({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,M.jsxs)(uc,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,M.jsxs)(vc,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,M.jsx)(il,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function Qu(e,t){let n=Ru[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function $u(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}var ed=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function td(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(e>=100?0:1)}ms`}function nd(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var rd=c({BIGINT_FORMAT_RANGES:()=>yf,CONSTANT_CATCH:()=>Tf,Class:()=>xf,NUMBER_FORMAT_RANGES:()=>vf,aborted:()=>Vd,allowsEval:()=>mf,assert:()=>ld,assertEqual:()=>id,assertIs:()=>sd,assertNever:()=>cd,assertNotEqual:()=>ad,assignProp:()=>vd,attachSchema:()=>Gd,base64ToUint8Array:()=>Zd,base64urlToUint8Array:()=>$d,cached:()=>fd,captureStackTrace:()=>pf,cleanEnum:()=>Xd,cleanRegex:()=>md,clone:()=>jd,cloneDef:()=>bd,codePointLength:()=>qd,constantCatch:()=>df,createTransparentProxy:()=>Md,defineLazy:()=>gd,defineLazyInternal:()=>lf,esc:()=>wd,escapeRegex:()=>Ad,explicitlyAborted:()=>Hd,extend:()=>Id,finalizeIssue:()=>B,floatSafeRemainder:()=>hd,getElementAtPath:()=>xd,getEnumValues:()=>ud,getLengthableOrigin:()=>Jd,getParsedType:()=>hf,getSizableOrigin:()=>Kd,hexToUint8Array:()=>tf,hide:()=>of,installLazyProp:()=>uf,isObject:()=>Ed,isPlainObject:()=>Dd,issue:()=>Yd,joinValues:()=>L,jsonStringifyReplacer:()=>dd,members:()=>rf,merge:()=>Rd,mergeDefs:()=>yd,normalizeParams:()=>R,nullish:()=>pd,numKeys:()=>kd,objectClone:()=>_d,omit:()=>Fd,optionalKeys:()=>Nd,own:()=>af,parsedType:()=>V,partial:()=>zd,pick:()=>Pd,prefixIssues:()=>Ud,primitiveTypes:()=>_f,promiseAllObject:()=>Sd,propertyKeyTypes:()=>gf,randomString:()=>Cd,required:()=>Bd,safeExtend:()=>Ld,shallowClone:()=>Od,slugify:()=>Td,stringifyPrimitive:()=>z,toZod:()=>od,uint8ArrayToBase64:()=>Qd,uint8ArrayToBase64url:()=>ef,uint8ArrayToHex:()=>nf,unwrapMessage:()=>Wd});function id(e){return e}function ad(e){return e}function od(){return e=>e}function sd(e){}function cd(e){throw Error(`Unexpected value in exhaustive check`)}function ld(e){}function ud(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function L(e,t=`|`){return e.map(e=>z(e)).join(t)}function dd(e,t){return typeof t==`bigint`?t.toString():t}function fd(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function pd(e){return e==null}function md(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function hd(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function Sd(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Md(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function z(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Nd(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function Pd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return jd(e,yd(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&vd(e,r,n.shape[r])}return vd(this,`shape`,e),e},checks:[]}))}function Fd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return jd(e,yd(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return vd(this,`shape`,r),r},checks:[]}))}function Id(e,t){if(!Dd(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return jd(e,yd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return vd(this,`shape`,n),n}}))}function Ld(e,t){if(!Dd(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return jd(e,yd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return vd(this,`shape`,n),n}}))}function Rd(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return jd(e,yd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return vd(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function zd(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return jd(t,yd(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return vd(this,`shape`,i),i},checks:[]}))}function Bd(e,t,n){return jd(t,yd(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return vd(this,`shape`,i),i}}))}function Vd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Wd(e){return typeof e==`string`?e:e?.message}function Gd(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Zd(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function rf(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):sf(e,n,r.value)}}function af(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function of(e,t,n){return af(e,t,n,!1)}function sf(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:af(this,t,n.bind(this))},set(e){af(this,t,e)}})}function cf(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function lf(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Sf!==e._zod){Sf=void 0;return}Sf=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,wf);let e=Cf;Cf=!1;try{let r=n(this);return Cf?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Cf||=e,r}catch(n){throw delete this[t],Cf||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function uf(e,t,n,r){let i=cf(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function df(e){let t=()=>e;return t[Tf]=!0,t}var ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,H=o((()=>{If(),ff=Symbol(`evaluating`),pf=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},mf=fd(()=>{if(Ff.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),hf=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},gf=new Set([`string`,`number`,`symbol`]),_f=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),vf={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},yf={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},bf=/[\uD800-\uDBFF]/,xf=class{constructor(...e){}},Cf=!1,wf={configurable:!0,get(){Cf=!0}},Tf=`~constantCatch`}));function Ef(e){let t=jf;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return jf=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Af.value=new a(r);try{Object.defineProperty(n,"_zod",Af)}finally{Af.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),rf(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Ef(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function Df(e){return e&&Object.assign(Ff,e),Ff}var Of,kf,Af,jf,Mf,Nf,Pf,Ff,If=o((()=>{H(),kf=Object.freeze({status:`aborted`}),Af={value:void 0,enumerable:!1},jf=`captureStackTrace`in Error?Error:null,Mf=Symbol(`zod_brand`),Nf=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Pf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(Of=globalThis).__zod_globalConfig??(Of.__zod_globalConfig={}),Ff=globalThis.__zod_globalConfig}));function Lf(){let e=this._zod;return e.message??=JSON.stringify(e.def,dd,2),e.message}function Rf(e){this._zod.message=e}function zf(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Bf(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?zf(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Vf(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Wf(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${Uf(e.path)}`);return t.join(` +`).replace(Ud,``)}function Gd(e,t){return t=Wd(t),Wd(e)===t}function B(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Xt(e,``+r);break;case`className`:Ft(e,`class`,r);break;case`tabIndex`:Ft(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ft(e,n,r);break;case`style`:$t(e,r,o);break;case`data`:if(t!==`object`){Ft(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=nn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&B(e,t,`name`,a.name,a,null),B(e,t,`formEncType`,a.formEncType,a,null),B(e,t,`formMethod`,a.formMethod,a,null),B(e,t,`formTarget`,a.formTarget,a,null)):(B(e,t,`encType`,a.encType,a,null),B(e,t,`method`,a.method,a,null),B(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=nn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=rn);break;case`onScroll`:r!=null&&z(`scroll`,e);break;case`onScrollEnd`:r!=null&&z(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=nn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:z(`beforetoggle`,e),z(`toggle`,e),Pt(e,`popover`,r);break;case`xlinkActuate`:It(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:It(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:It(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:It(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Pt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2s)break;var u=c.transferSize,d=c.initiatorType;u&&V(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),qd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}H.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),H.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),qd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!H.has(a)&&(e=f({rel:`modulepreload`,href:e},t),H.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),qd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=wt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=H.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);Tt(c),qd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=H.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=H.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=fe.current)?U(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=wt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=wt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),H.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},H.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=wt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ut(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),qd(t,`link`,n),Tt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ut(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),qd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Hf(n),(a=H.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),qd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,Tt(a),a):(r=n,(a=H.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Tt(a),qd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=H.get(i))&&Jf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),qd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ku()}))(),ju=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],Mu=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],Nu=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],Pu=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],Fu=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],Iu=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],Lu={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Ru={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},zu={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},Bu={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:ju,brand:Mu,ok:Nu,warn:Pu,bad:Fu,info:Iu},defaultRadius:`md`,fontFamily:zu.body,fontFamilyMonospace:zu.display,headings:{fontFamily:zu.body,fontWeight:`600`},cursorType:`pointer`},Vu=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":Lu.light.muted},dark:{}}),Hu=en(Bu);function Uu({dark:e,children:t}){return(0,M.jsx)($t,{theme:Hu,cssVariablesResolver:Vu,forceColorScheme:e?`dark`:`light`,children:(0,M.jsx)(_s,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function Wu({title:e,summary:t,onRefresh:n,disabled:r}){return(0,M.jsxs)(uc,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,M.jsxs)(P,{miw:0,children:[(0,M.jsx)(hu,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,M.jsx)(vc,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,M.jsx)(vl,{label:`Refresh this view`,children:(0,M.jsx)(ec,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,M.jsx)(Su,{size:15,weight:`bold`})})})]})}function Gu({error:e,loading:t,retry:n}){return e?(0,M.jsx)(pc,{color:`bad`,m:`md`,radius:`md`,children:(0,M.jsxs)(uc,{justify:`space-between`,children:[(0,M.jsx)(vc,{size:`sm`,children:e}),n&&(0,M.jsx)(Ac,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,M.jsxs)(Mc,{mih:160,p:`xl`,children:[(0,M.jsx)(Ks,{size:`sm`}),(0,M.jsx)(vc,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function Ku({active:e,items:t,onChange:n}){return(0,M.jsx)(us,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,M.jsx)(au,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,M.jsx)(au.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,M.jsx)(au.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,M.jsx)(xc,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function qu({icon:e,title:t,children:n,tall:r=!1}){return(0,M.jsx)(Mc,{mih:r?220:130,p:`xl`,children:(0,M.jsxs)(uc,{wrap:`nowrap`,children:[(0,M.jsx)(cu,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,M.jsxs)(P,{children:[(0,M.jsx)(vc,{fw:700,size:`sm`,children:t}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function Ju({left:e,right:t}){return(0,M.jsxs)(uc,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function Yu({label:e,value:t,color:n}){return(0,M.jsxs)(_s,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e}),(0,M.jsx)(vc,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function Xu(e,t=8){let[n,r]=(0,E.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,E.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function Zu({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,M.jsxs)(uc,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,M.jsxs)(vc,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,M.jsx)(il,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function Qu(e,t){let n=Ru[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function $u(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}var ed=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function td(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${td(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function nd(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var rd=c({BIGINT_FORMAT_RANGES:()=>yf,CONSTANT_CATCH:()=>Tf,Class:()=>xf,NUMBER_FORMAT_RANGES:()=>vf,aborted:()=>Vd,allowsEval:()=>mf,assert:()=>ld,assertEqual:()=>id,assertIs:()=>sd,assertNever:()=>cd,assertNotEqual:()=>ad,assignProp:()=>vd,attachSchema:()=>Gd,base64ToUint8Array:()=>Zd,base64urlToUint8Array:()=>$d,cached:()=>fd,captureStackTrace:()=>pf,cleanEnum:()=>Xd,cleanRegex:()=>md,clone:()=>jd,cloneDef:()=>bd,codePointLength:()=>qd,constantCatch:()=>df,createTransparentProxy:()=>Md,defineLazy:()=>gd,defineLazyInternal:()=>lf,esc:()=>wd,escapeRegex:()=>Ad,explicitlyAborted:()=>Hd,extend:()=>Id,finalizeIssue:()=>B,floatSafeRemainder:()=>hd,getElementAtPath:()=>xd,getEnumValues:()=>ud,getLengthableOrigin:()=>Jd,getParsedType:()=>hf,getSizableOrigin:()=>Kd,hexToUint8Array:()=>tf,hide:()=>of,installLazyProp:()=>uf,isObject:()=>Ed,isPlainObject:()=>Dd,issue:()=>Yd,joinValues:()=>L,jsonStringifyReplacer:()=>dd,members:()=>rf,merge:()=>Rd,mergeDefs:()=>yd,normalizeParams:()=>R,nullish:()=>pd,numKeys:()=>kd,objectClone:()=>_d,omit:()=>Fd,optionalKeys:()=>Nd,own:()=>af,parsedType:()=>V,partial:()=>zd,pick:()=>Pd,prefixIssues:()=>Ud,primitiveTypes:()=>_f,promiseAllObject:()=>Sd,propertyKeyTypes:()=>gf,randomString:()=>Cd,required:()=>Bd,safeExtend:()=>Ld,shallowClone:()=>Od,slugify:()=>Td,stringifyPrimitive:()=>z,toZod:()=>od,uint8ArrayToBase64:()=>Qd,uint8ArrayToBase64url:()=>ef,uint8ArrayToHex:()=>nf,unwrapMessage:()=>Wd});function id(e){return e}function ad(e){return e}function od(){return e=>e}function sd(e){}function cd(e){throw Error(`Unexpected value in exhaustive check`)}function ld(e){}function ud(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function L(e,t=`|`){return e.map(e=>z(e)).join(t)}function dd(e,t){return typeof t==`bigint`?t.toString():t}function fd(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function pd(e){return e==null}function md(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function hd(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function Sd(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Md(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function z(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Nd(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function Pd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return jd(e,yd(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&vd(e,r,n.shape[r])}return vd(this,`shape`,e),e},checks:[]}))}function Fd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return jd(e,yd(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return vd(this,`shape`,r),r},checks:[]}))}function Id(e,t){if(!Dd(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return jd(e,yd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return vd(this,`shape`,n),n}}))}function Ld(e,t){if(!Dd(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return jd(e,yd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return vd(this,`shape`,n),n}}))}function Rd(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return jd(e,yd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return vd(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function zd(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return jd(t,yd(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return vd(this,`shape`,i),i},checks:[]}))}function Bd(e,t,n){return jd(t,yd(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return vd(this,`shape`,i),i}}))}function Vd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Wd(e){return typeof e==`string`?e:e?.message}function Gd(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Zd(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function rf(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):sf(e,n,r.value)}}function af(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function of(e,t,n){return af(e,t,n,!1)}function sf(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:af(this,t,n.bind(this))},set(e){af(this,t,e)}})}function cf(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function lf(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Sf!==e._zod){Sf=void 0;return}Sf=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,wf);let e=Cf;Cf=!1;try{let r=n(this);return Cf?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Cf||=e,r}catch(n){throw delete this[t],Cf||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function uf(e,t,n,r){let i=cf(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function df(e){let t=()=>e;return t[Tf]=!0,t}var ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,H=o((()=>{If(),ff=Symbol(`evaluating`),pf=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},mf=fd(()=>{if(Ff.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),hf=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},gf=new Set([`string`,`number`,`symbol`]),_f=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),vf={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},yf={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},bf=/[\uD800-\uDBFF]/,xf=class{constructor(...e){}},Cf=!1,wf={configurable:!0,get(){Cf=!0}},Tf=`~constantCatch`}));function Ef(e){let t=jf;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return jf=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Af.value=new a(r);try{Object.defineProperty(n,"_zod",Af)}finally{Af.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),rf(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Ef(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function Df(e){return e&&Object.assign(Ff,e),Ff}var Of,kf,Af,jf,Mf,Nf,Pf,Ff,If=o((()=>{H(),kf=Object.freeze({status:`aborted`}),Af={value:void 0,enumerable:!1},jf=`captureStackTrace`in Error?Error:null,Mf=Symbol(`zod_brand`),Nf=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Pf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(Of=globalThis).__zod_globalConfig??(Of.__zod_globalConfig={}),Ff=globalThis.__zod_globalConfig}));function Lf(){let e=this._zod;return e.message??=JSON.stringify(e.def,dd,2),e.message}function Rf(e){this._zod.message=e}function zf(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Bf(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?zf(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Vf(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Wf(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${Uf(e.path)}`);return t.join(` `)}var Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf=o((()=>{If(),H(),Gf={get:Lf,set:Rf,enumerable:!0,configurable:!0},Kf={value:void 0,enumerable:!1},qf={value:void 0,enumerable:!1},Jf=new WeakSet([Object.prototype,Error.prototype]),Yf=(e,t)=>{e.name=`$ZodError`,Kf.value=e._zod,Object.defineProperty(e,"_zod",Kf),qf.value=t,Object.defineProperty(e,"issues",qf),Kf.value=void 0,qf.value=void 0,Object.defineProperty(e,"message",Gf);let n=Object.getPrototypeOf(e);Jf.has(n)||(Jf.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Xf=U(`$ZodError`,Yf),Zf=U(`$ZodError`,Yf,void 0,{Parent:Error})}));function $f(e,t){return{callee:t?.callee??e,Err:t?.Err}}function ep(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[up]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Nf;return a.issues.length===0}var tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp=o((()=>{If(),Qf(),H(),tp=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Nf;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>B(e,o,Df())));throw pf(n,a?.callee??t),n}return s.value};return t},np=tp(Zf),rp=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>B(e,o,Df())));throw pf(n,a?.callee??t),n}return s.value};return t},ip=rp(Zf),ap=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Nf;return a.issues.length?{success:!1,error:new(e??Xf)(a.issues.map(e=>B(e,i,Df())))}:{success:!0,data:a.value}},op=ap(Zf),sp=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>B(e,i,Df())))}:{success:!0,data:a.value}},cp=sp(Zf),lp=Symbol.for(`zod.compile.invalid`),up=Symbol.for(`zod.compile.fallback`),dp=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==lp||ep(e,t,n)}),fp=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},pp=e=>{let t=tp(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,$f(n,a))};return n},mp=pp(Zf),hp=e=>{let t=tp(e),n=(e,r,i,a)=>t(e,r,i,$f(n,a));return n},gp=hp(Zf),_p=e=>{let t=rp(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,$f(n,a))};return n},vp=_p(Zf),yp=e=>{let t=rp(e),n=async(e,r,i,a)=>await t(e,r,i,$f(n,a));return n},bp=yp(Zf),xp=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ap(e)(t,n,i)},Sp=xp(Zf),Cp=e=>(t,n,r)=>ap(e)(t,n,r),wp=Cp(Zf),Tp=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return sp(e)(t,n,i)},Ep=Tp(Zf),Dp=e=>async(t,n,r)=>sp(e)(t,n,r),Op=Dp(Zf)})),Ap=c({base64:()=>um,base64url:()=>dm,bigint:()=>bm,boolean:()=>Cm,browserEmail:()=>rm,cidrv4:()=>cm,cidrv6:()=>lm,creditCard:()=>gm,cuid:()=>zp,cuid2:()=>Bp,date:()=>vm,datetime:()=>Ip,domain:()=>pm,duration:()=>Gp,e164:()=>hm,email:()=>Qp,emoji:()=>Mp,extendedDuration:()=>Kp,guid:()=>qp,hex:()=>Om,hostname:()=>fm,html5Email:()=>$p,httpProtocol:()=>mm,idnEmail:()=>nm,integer:()=>xm,ipv4:()=>am,ipv6:()=>om,ksuid:()=>Up,lowercase:()=>Em,mac:()=>sm,md5_base64:()=>Am,md5_base64url:()=>jm,md5_hex:()=>km,nanoid:()=>Wp,nanoidOfLength:()=>jp,null:()=>wm,number:()=>Sm,rfc5322Email:()=>em,sha1_base64:()=>Nm,sha1_base64url:()=>Pm,sha1_hex:()=>Mm,sha256_base64:()=>Im,sha256_base64url:()=>Lm,sha256_hex:()=>Fm,sha384_base64:()=>zm,sha384_base64url:()=>Bm,sha384_hex:()=>Rm,sha512_base64:()=>Hm,sha512_base64url:()=>Um,sha512_hex:()=>Vm,string:()=>ym,time:()=>Fp,ulid:()=>Vp,undefined:()=>Tm,unicodeEmail:()=>tm,uppercase:()=>Dm,uuid:()=>Jp,uuid4:()=>Yp,uuid6:()=>Xp,uuid7:()=>Zp,xid:()=>Hp});function jp(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function Mp(){return new RegExp(im,`u`)}function Np(e){return RegExp(`^${e}$`)}function Pp(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Fp(e){return RegExp(`^${Pp(e)}$`)}function Ip(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Pp({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Pp({precision:e.precision})}`:n;return RegExp(`^${_m}T(?:${r})$`)}function Lp(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Rp(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var zp,Bp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm,Om,km,Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm=o((()=>{H(),zp=/^[cC][0-9a-z]{6,}$/,Bp=/^[0-9a-z]+$/,Vp=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Hp=/^[0-9a-vA-V]{20}$/,Up=/^[A-Za-z0-9]{27}$/,Wp=/^[a-zA-Z0-9_-]{21}$/,Gp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Kp=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qp=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Jp=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Yp=Jp(4),Xp=Jp(6),Zp=Jp(7),Qp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$p=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,em=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,tm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,nm=tm,rm=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,im=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,am=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,om=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sm=e=>{let t=Ad(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},cm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,lm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,um=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dm=/^[A-Za-z0-9_-]*$/,fm=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,pm=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,mm=/^https?$/,hm=/^\+[1-9]\d{6,14}$/,gm=/^\d(?:[ -]?\d){11,18}$/,_m=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,vm=Np(_m),ym=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},bm=/^-?\d+n?$/,xm=/^-?\d+$/,Sm=/^-?\d+(?:\.\d+)?$/,Cm=/^(?:true|false)$/i,wm=/^null$/i,Tm=/^undefined$/i,Em=/^[^A-Z]*$/,Dm=/^[^a-z]*$/,Om=/^[0-9a-fA-F]*$/,km=/^[0-9a-fA-F]{32}$/,Am=Lp(22,`==`),jm=Rp(22),Mm=/^[0-9a-fA-F]{40}$/,Nm=Lp(27,`=`),Pm=Rp(27),Fm=/^[0-9a-fA-F]{64}$/,Im=Lp(43,`=`),Lm=Rp(43),Rm=/^[0-9a-fA-F]{96}$/,zm=Lp(64,``),Bm=Rp(64),Vm=/^[0-9a-fA-F]{128}$/,Hm=Lp(86,`==`),Um=Rp(86)}));function Gm(e,t,n){e.issues.length&&t.issues.push(...Ud(n,e.issues))}var Km,qm,Jm,Ym,Xm,Zm,Qm,$m,eh,th,nh,rh,ih,ah,oh,sh,ch,lh,uh,dh,fh,ph,mh,hh,gh,_h=o((()=>{If(),Wm(),H(),Km=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),qm=e=>{let t=e.value;return!pd(t)&&t.size!==void 0},Jm=e=>{let t=e.value;return!pd(t)&&t.length!==void 0},Ym={number:`number`,bigint:`bigint`,object:`date`},Xm=U(`$ZodCheckLessThan`,(e,t)=>{Km.init(e,t);let n=Ym[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{Km.init(e,t);let n=Ym[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Ym[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qm=U(`$ZodCheckMultipleOf`,(e,t)=>{Km.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):hd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$m=U(`$ZodCheckNumberFormat`,(e,t)=>{Km.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=vf[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=xm)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),eh=U(`$ZodCheckBigIntFormat`,(e,t)=>{Km.init(e,t);let[n,r]=yf[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),th=U(`$ZodCheckMaxSize`,(e,t)=>{var n;Km.init(e,t),(n=e._zod.def).when??(n.when=qm),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Kd(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nh=U(`$ZodCheckMinSize`,(e,t)=>{var n;Km.init(e,t),(n=e._zod.def).when??(n.when=qm),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Kd(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rh=U(`$ZodCheckSizeEquals`,(e,t)=>{var n;Km.init(e,t),(n=e._zod.def).when??(n.when=qm),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Kd(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ih=U(`$ZodCheckMaxLength`,(e,t)=>{var n;Km.init(e,t),(n=e._zod.def).when??(n.when=Jm),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?qd(r):i)<=t.maximum)return;let a=Jd(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ah=U(`$ZodCheckMinLength`,(e,t)=>{var n;Km.init(e,t),(n=e._zod.def).when??(n.when=Jm),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=Jd(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),oh=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;Km.init(e,t),(n=e._zod.def).when??(n.when=Jm),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?qd(r):i;if(a===t.length)return;let o=Jd(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sh=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Km.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ch=U(`$ZodCheckRegex`,(e,t)=>{sh.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lh=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Em,sh.init(e,t)}),uh=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Dm,sh.init(e,t)}),dh=U(`$ZodCheckIncludes`,(e,t)=>{Km.init(e,t);let n=Ad(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),fh=U(`$ZodCheckStartsWith`,(e,t)=>{Km.init(e,t);let n=RegExp(`^${Ad(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ph=U(`$ZodCheckEndsWith`,(e,t)=>{Km.init(e,t);let n=RegExp(`.*${Ad(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mh=U(`$ZodCheckProperty`,(e,t)=>{Km.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Gm(n,e,t.property));Gm(n,e,t.property)}}),hh=U(`$ZodCheckMimeType`,(e,t)=>{Km.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),gh=U(`$ZodCheckOverwrite`,(e,t)=>{Km.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),vh,yh=o((()=>{vh=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` `)}\n};`)(...Object.values(this.closed))}}})),bh,xh=o((()=>{bh={major:4,minor:5,patch:4}}));function Sh(e){return{validate:t=>{try{return rg(op(e,t))}catch{return cp(e,t).then(rg)}},vendor:`zod`,version:1}}function Ch(e,t){if(!t.normalize&&t.protocol?.source===mm.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function wh(e){return e.replace(lg,``)}function Th(e,t){return t.lastIndex=0,t.test(e.hostname)}function Eh(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function Dh(e){if(!Cg.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function Oh(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Dh(n)}function kh(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Ah(e){if(!dm.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return kh(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function jh(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Mh(e){return gm.test(e)?jh(e.replace(jg,``)):!1}function Nh(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Ph(e,t,n){e.issues.length&&t.issues.push(...Ud(n,e.issues)),t.value[n]=e.value}function Fh(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Ud(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function Ih(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Yg,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Nd(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Lh(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Fh(e,n,i,t,u,d))):Fh(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Rh(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Vd(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>B(e,r,Df())))}),t)}function zh(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>B(e,r,Df())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Bh(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function Vh(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Dd(e)&&Dd(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Vh(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Vh(t.value,n.value);if(!c.valid){if(Vd(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function Uh(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Wh(e,t,n){e.issues.length&&t.issues.push(...Ud(n,e.issues)),t.value[n]=e.value}function Gh(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...Ud(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function Kh(e,t,n,r,i,a,o){e.issues.length&&(gf.has(typeof r)?n.issues.push(...Ud(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>B(e,o,Df()))})),t.issues.length&&(gf.has(typeof r)?n.issues.push(...Ud(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>B(e,o,Df()))})),n.value.set(e.value,t.value)}function qh(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function Jh(e,t){return e.value=t.issues.length?void 0:t.value,e}function Yh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Xh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Zh(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>B(e,r,Df()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function Qh(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function $h(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>eg(e,r,t.out,n)):eg(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>eg(e,r,t.in,n)):eg(e,r,t.in,n)}}function eg(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function tg(e){return e.memo||(e.value=Object.freeze(e.value)),e}function ng(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Yd(e))}}var W,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg,hg,gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg,Dg,Og,kg,Ag,jg,Mg,Ng,Pg,Fg,Ig,Lg,Rg,zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_,f_,p_,m_,h_,g_,__,v_,y_,b_,x_,S_,C_,w_,T_,E_,D_,O_,k_=o((()=>{_h(),If(),yh(),kp(),Wm(),H(),xh(),W=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=bh;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Vd(t),a;for(let o of n){if(o._zod.def.when){if(Hd(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Nf;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Gd(t.issues,n,e),i||=Vd(t,n))});else{if(t.issues.length===n)continue;Gd(t.issues,n,e),i||=Vd(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Vd(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Nf;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Nf;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return of(this,`~standard`,Sh(this))},set"~standard"(e){af(this,`~standard`,e)}}),rg=e=>e.success?{value:e.data}:{issues:e.error?.issues},ig=U(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ym(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),ag=U(`$ZodStringFormat`,(e,t)=>{sh.init(e,t),ig.init(e,t)}),og=U(`$ZodGUID`,(e,t)=>{t.pattern??=qp,ag.init(e,t)}),sg=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Jp(e)}else t.pattern??=Jp();ag.init(e,t)}),cg=U(`$ZodEmail`,(e,t)=>{t.pattern??=Qp,ag.init(e,t)}),lg=/[\t\n\r]/g,ug=U(`$ZodURL`,(e,t)=>{ag.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Ch(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Th(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Eh(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:wh(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),dg=U(`$ZodEmoji`,(e,t)=>{t.pattern??=Mp(),ag.init(e,t)}),fg=U(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Wp:jp(t.length),ag.init(e,t)}),pg=U(`$ZodCUID`,(e,t)=>{t.pattern??=zp,ag.init(e,t)}),mg=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Bp,ag.init(e,t)}),hg=U(`$ZodULID`,(e,t)=>{t.pattern??=Vp,ag.init(e,t)}),gg=U(`$ZodXID`,(e,t)=>{t.pattern??=Hp,ag.init(e,t)}),_g=U(`$ZodKSUID`,(e,t)=>{t.pattern??=Up,ag.init(e,t)}),vg=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=Ip(t),ag.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),yg=U(`$ZodISODate`,(e,t)=>{t.pattern??=vm,ag.init(e,t)}),bg=U(`$ZodISOTime`,(e,t)=>{t.pattern??=Fp(t),ag.init(e,t)}),xg=U(`$ZodISODuration`,(e,t)=>{t.pattern??=Gp,ag.init(e,t)}),Sg=U(`$ZodIPv4`,(e,t)=>{t.pattern??=am,ag.init(e,t),e._zod.bag.format=`ipv4`}),Cg=/^[0-9a-fA-F:.]+$/,wg=U(`$ZodIPv6`,(e,t)=>{t.pattern??=om,ag.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Dh(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Tg=U(`$ZodMAC`,(e,t)=>{t.pattern??=sm(t.delimiter),ag.init(e,t),e._zod.bag.format=`mac`}),Eg=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=cm,ag.init(e,t)}),Dg=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=lm,ag.init(e,t),e._zod.check=n=>{Oh(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),Og=U(`$ZodBase64`,(e,t)=>{t.pattern??=um,ag.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{kh(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),kg=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=dm,ag.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Ah(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Ag=U(`$ZodE164`,(e,t)=>{t.pattern??=hm,ag.init(e,t)}),jg=/[- ]/g,Mg=U(`$ZodCreditCard`,(e,t)=>{t.pattern??=gm,ag.init(e,t),e._zod.check=n=>{Mh(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),Ng=U(`$ZodJWT`,(e,t)=>{ag.init(e,t),e._zod.check=n=>{Nh(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Pg=U(`$ZodCustomStringFormat`,(e,t)=>{ag.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Fg=U(`$ZodNumber`,(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??Sm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Ig=U(`$ZodNumberFormat`,(e,t)=>{$m.init(e,t),Fg.init(e,t)}),Lg=U(`$ZodBoolean`,(e,t)=>{W.init(e,t),e._zod.pattern=Cm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Rg=U(`$ZodBigInt`,(e,t)=>{W.init(e,t),e._zod.pattern=bm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),zg=U(`$ZodBigIntFormat`,(e,t)=>{eh.init(e,t),Rg.init(e,t)}),Bg=U(`$ZodSymbol`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),Vg=U(`$ZodUndefined`,(e,t)=>{W.init(e,t),e._zod.pattern=Tm,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Hg=U(`$ZodNull`,(e,t)=>{W.init(e,t),e._zod.pattern=wm,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Ug=U(`$ZodAny`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),Wg=U(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),Gg=U(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Kg=U(`$ZodVoid`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),qg=U(`$ZodDate`,(e,t)=>{W.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),Jg=U(`$ZodArray`,(e,t)=>{W.init(e,t);let n=Ff.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;ePh(t,r,e))):Ph(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),Yg=[],Xg=new WeakMap,Zg=U(`$ZodObject`,(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Xg.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),Xg.set(t,n),n}})}let n=fd(()=>Ih(t));lf(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||vd(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=Ed,i=t.catchall,a,o=Ff.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>Fh(n,t,e,c,r,i))):Fh(a,t,e,c,r,i)}return i?Lh(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),Qg=U(`$ZodObjectJIT`,(e,t)=>{Zg.init(e,t);let n=e._zod.parse,r=fd(()=>Ih(t)),i=Ff.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new vh([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` diff --git a/internal/observability/latency_read_test.go b/internal/observability/latency_read_test.go index ce6d59ba9..67f652180 100644 --- a/internal/observability/latency_read_test.go +++ b/internal/observability/latency_read_test.go @@ -4,6 +4,7 @@ import ( "context" "database/sql" "math" + "strings" "testing" "time" @@ -89,3 +90,106 @@ func TestTotalsTakeLatencyFromHalvesThatServedSomething(t *testing.T) { t.Fatalf("p95 = %.0f, want the subscription figure when there is nothing else", onlyWaiting.P95MS) } } + +func TestHistogramQuantileInterpolatesInsideTheBucket(t *testing.T) { + // Six calls at 5, 10, 100, 500, 1000 and 2000ms. + cumulative := []float64{0, 0, 0, 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 6} + if got := histogramQuantile(cumulative, 6, 0.50); math.Abs(got-100) > 1e-6 { + t.Fatalf("p50 = %v, want 100", got) + } + // The bound alone would report 2000 for both, which is the tell that a + // table is reporting buckets rather than latencies. + p95, p99 := histogramQuantile(cumulative, 6, 0.95), histogramQuantile(cumulative, 6, 0.99) + if math.Abs(p95-1700) > 1e-6 || math.Abs(p99-1940) > 1e-6 { + t.Fatalf("p95/p99 = %v/%v, want 1700/1940", p95, p99) + } + if p95 >= p99 { + t.Fatalf("p95 %v should sit below p99 %v", p95, p99) + } +} + +func TestHistogramQuantileHandlesEmptyAndOverflow(t *testing.T) { + if got := histogramQuantile(nil, 0, 0.95); got != 0 { + t.Fatalf("no data = %v, want 0", got) + } + if got := histogramQuantile([]float64{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 5, 0.95); got != 300000 { + t.Fatalf("everything past the last boundary = %v, want the boundary itself", got) + } + // Ten calls somewhere in the 2.5–5ms bucket: the 95th sits near the top of + // that bucket rather than exactly on its boundary, which is the point of + // interpolating at all. + if got := histogramQuantile([]float64{0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 10, 0.95); math.Abs(got-4.875) > 1e-9 { + t.Fatalf("quantile inside the last populated bucket = %v, want 4.875", got) + } +} + +func TestComparisonIgnoresSubMillisecondLatencyMoves(t *testing.T) { + // 3.9ms to 4.0ms is 2.2%, which was enough to paint a red regression arrow + // beside a number that had not meaningfully moved. + quiet := comparisonMetric("P50 latency", "ms", 3.9, 4.0, true) + if quiet.Direction != DirectionStable { + t.Fatalf("direction = %q, want stable for a 0.1ms move", quiet.Direction) + } + if quiet.Significant { + t.Fatalf("a 0.1ms move should never be significant: %#v", quiet) + } + // A real move still reads as one. + real := comparisonMetric("P95 latency", "ms", 13690, 10410, true) + if real.Direction != DirectionImprovement || !real.Significant { + t.Fatalf("13.7s to 10.4s = %#v, want a significant improvement", real) + } + // The floor is for latency only; a rate moving by less than a point is + // still a rate that moved. + rate := comparisonMetric("Error rate", "%", 0.10, 0.40, true) + if rate.Direction != DirectionRegression { + t.Fatalf("error rate = %#v, want a regression", rate) + } +} + +func TestEndpointDurationBucketsAreConsistent(t *testing.T) { + previous := 0.0 + for _, bucket := range endpointDurationBuckets { + if bucket.Bound <= previous { + t.Fatalf("bound %v follows %v; the boundaries must increase or interpolation reads a negative bucket width", bucket.Bound, previous) + } + previous = bucket.Bound + } + // The query reads these counts positionally, so its SELECT list has to be + // this list — a reordering would report one bucket's count against + // another's boundary and quietly shift every percentile. + if !strings.Contains(endpointRollupQuery, endpointDurationColumns()) { + t.Fatalf("the rollup query does not select %q in order", endpointDurationColumns()) + } +} + +func TestComparisonFloorAlsoSilencesThePercentage(t *testing.T) { + // No traffic in the earlier half sends change through the divide-by-zero + // branch and out at 100%. Printed inside a grey "stable" badge, that is the + // same number-against-colour contradiction the floor exists to remove. + quiet := comparisonMetric("P50 latency", "ms", 0, 0.5, true) + if quiet.Direction != DirectionStable || quiet.ChangePct != 0 { + t.Fatalf("metric = %#v, want a stable reading with no percentage", quiet) + } + if quiet.Before != 0 || quiet.After != 0.5 { + t.Fatalf("metric = %#v, the underlying figures should still be reported", quiet) + } +} + +// Interpolating inside the bucket moves an endpoint whose calls sit under a +// boundary out of the class the bound alone put it in. 100 calls at 700ms are +// healthy; reporting the 750ms bound called them degraded. +func TestInterpolationGradesAnEndpointOnItsCallsNotItsBucket(t *testing.T) { + cumulative := make([]float64, len(endpointDurationBuckets)) + for i, bucket := range endpointDurationBuckets { + if bucket.Bound >= 750 { + cumulative[i] = 100 + } + } + p95 := histogramQuantile(cumulative, 100, 0.95) + if p95 >= latencyDegradedThresholdMS { + t.Fatalf("p95 = %v, want it under the %vms boundary its calls sit below", p95, latencyDegradedThresholdMS) + } + if classify(0, p95) != HealthHealthy { + t.Fatalf("health = %q, want healthy for calls that never reached the boundary", classify(0, p95)) + } +} diff --git a/internal/observability/performance.go b/internal/observability/performance.go index 5dc5ea10e..e6d639e17 100644 --- a/internal/observability/performance.go +++ b/internal/observability/performance.go @@ -54,7 +54,7 @@ FROM (SELECT DISTINCT bucket FROM endpoint_rollup LIMIT 5)` // endpointRollupQuery uses the minute cache only through its current watermark. // Raw spans cover both partial boundary minutes and any newer complete minutes, // so the cache lag cannot appear as zero traffic and raw work stays bounded. -const endpointRollupQuery = ` +var endpointRollupQuery = ` WITH params AS ( SELECT ?::TIMESTAMP AS start_time, @@ -151,42 +151,11 @@ SELECT t.method, t.path, t.calls, - CASE - WHEN duration_count = 0 THEN 0 - WHEN le_0_1 >= duration_count * 0.50 THEN 0.1 WHEN le_0_5 >= duration_count * 0.50 THEN 0.5 - WHEN le_1 >= duration_count * 0.50 THEN 1 WHEN le_2_5 >= duration_count * 0.50 THEN 2.5 - WHEN le_5 >= duration_count * 0.50 THEN 5 WHEN le_10 >= duration_count * 0.50 THEN 10 - WHEN le_25 >= duration_count * 0.50 THEN 25 WHEN le_50 >= duration_count * 0.50 THEN 50 - WHEN le_100 >= duration_count * 0.50 THEN 100 WHEN le_250 >= duration_count * 0.50 THEN 250 - WHEN le_500 >= duration_count * 0.50 THEN 500 WHEN le_750 >= duration_count * 0.50 THEN 750 - WHEN le_1000 >= duration_count * 0.50 THEN 1000 WHEN le_2000 >= duration_count * 0.50 THEN 2000 - WHEN le_5000 >= duration_count * 0.50 THEN 5000 WHEN le_30000 >= duration_count * 0.50 THEN 30000 - ELSE 300000 END AS p50_ms, - CASE - WHEN duration_count = 0 THEN 0 - WHEN le_0_1 >= duration_count * 0.95 THEN 0.1 WHEN le_0_5 >= duration_count * 0.95 THEN 0.5 - WHEN le_1 >= duration_count * 0.95 THEN 1 WHEN le_2_5 >= duration_count * 0.95 THEN 2.5 - WHEN le_5 >= duration_count * 0.95 THEN 5 WHEN le_10 >= duration_count * 0.95 THEN 10 - WHEN le_25 >= duration_count * 0.95 THEN 25 WHEN le_50 >= duration_count * 0.95 THEN 50 - WHEN le_100 >= duration_count * 0.95 THEN 100 WHEN le_250 >= duration_count * 0.95 THEN 250 - WHEN le_500 >= duration_count * 0.95 THEN 500 WHEN le_750 >= duration_count * 0.95 THEN 750 - WHEN le_1000 >= duration_count * 0.95 THEN 1000 WHEN le_2000 >= duration_count * 0.95 THEN 2000 - WHEN le_5000 >= duration_count * 0.95 THEN 5000 WHEN le_30000 >= duration_count * 0.95 THEN 30000 - ELSE 300000 END AS p95_ms, - CASE - WHEN duration_count = 0 THEN 0 - WHEN le_0_1 >= duration_count * 0.99 THEN 0.1 WHEN le_0_5 >= duration_count * 0.99 THEN 0.5 - WHEN le_1 >= duration_count * 0.99 THEN 1 WHEN le_2_5 >= duration_count * 0.99 THEN 2.5 - WHEN le_5 >= duration_count * 0.99 THEN 5 WHEN le_10 >= duration_count * 0.99 THEN 10 - WHEN le_25 >= duration_count * 0.99 THEN 25 WHEN le_50 >= duration_count * 0.99 THEN 50 - WHEN le_100 >= duration_count * 0.99 THEN 100 WHEN le_250 >= duration_count * 0.99 THEN 250 - WHEN le_500 >= duration_count * 0.99 THEN 500 WHEN le_750 >= duration_count * 0.99 THEN 750 - WHEN le_1000 >= duration_count * 0.99 THEN 1000 WHEN le_2000 >= duration_count * 0.99 THEN 2000 - WHEN le_5000 >= duration_count * 0.99 THEN 5000 WHEN le_30000 >= duration_count * 0.99 THEN 30000 - ELSE 300000 END AS p99_ms, - t.error_rate + t.error_rate, + t.duration_count, + ` + endpointDurationColumns() + ` FROM endpoint_totals t -ORDER BY t.calls DESC, p95_ms DESC +ORDER BY t.calls DESC, (t.duration_count - le_100) DESC, t.method, t.path LIMIT ?` var performanceHeatmapQueryTemplate = ` @@ -318,7 +287,7 @@ func (s *Service) queryEndpoints(ctx context.Context, scope Scope, service strin if ready { query = endpointRollupQuery args = []any{scope.Start, scope.End, watermark, scope.Namespace, service, limit} - source = "endpoint_rollup + raw spans (histogram upper-bound percentiles)" + source = "endpoint_rollup + raw spans (interpolated histogram percentiles)" } rows, err := s.db.QueryContext(ctx, query, args...) if err != nil { @@ -329,7 +298,20 @@ func (s *Service) queryEndpoints(ctx context.Context, scope Scope, service strin endpoints := make([]Endpoint, 0) for rows.Next() { var endpoint Endpoint - if err := rows.Scan(&endpoint.Method, &endpoint.Path, &endpoint.Calls, &endpoint.P50MS, &endpoint.P95MS, &endpoint.P99MS, &endpoint.ErrorRate); err != nil { + if ready { + var total float64 + cumulative := make([]float64, len(endpointDurationBuckets)) + targets := []any{&endpoint.Method, &endpoint.Path, &endpoint.Calls, &endpoint.ErrorRate, &total} + for i := range cumulative { + targets = append(targets, &cumulative[i]) + } + if err := rows.Scan(targets...); err != nil { + return nil, "", fmt.Errorf("scan endpoint: %w", err) + } + endpoint.P50MS = histogramQuantile(cumulative, total, 0.50) + endpoint.P95MS = histogramQuantile(cumulative, total, 0.95) + endpoint.P99MS = histogramQuantile(cumulative, total, 0.99) + } else if err := rows.Scan(&endpoint.Method, &endpoint.Path, &endpoint.Calls, &endpoint.P50MS, &endpoint.P95MS, &endpoint.P99MS, &endpoint.ErrorRate); err != nil { return nil, "", fmt.Errorf("scan endpoint: %w", err) } endpoint.Health = classify(endpoint.ErrorRate, endpoint.P95MS) @@ -341,6 +323,75 @@ func (s *Service) queryEndpoints(ctx context.Context, scope Scope, service strin return endpoints, source, nil } +// endpointDurationBuckets pairs each histogram boundary with the column that +// counts it, and both the query's column list and the interpolation read from +// here. +// +// The two were written out separately at first, which couples them by position +// alone: reordering one list, or adding a boundary to the rollup without adding +// it here, would go on compiling and quietly report one bucket's count against +// another's boundary. Percentiles would shift and nothing would look broken. +// The boundaries themselves must stay in step with the histogram the rollup +// writes (endpointRollupInsertSQL, in internal/query). Nothing here can check +// that at compile time; TestEndpointRollupQueryMergesBucketsAndExactBoundaries +// is what catches a drift, because it fills a real rollup row by column name +// and reads the percentiles back out. +var endpointDurationBuckets = []struct { + Column string + Bound float64 +}{ + {"le_0_1", 0.1}, {"le_0_5", 0.5}, {"le_1", 1}, {"le_2_5", 2.5}, + {"le_5", 5}, {"le_10", 10}, {"le_25", 25}, {"le_50", 50}, + {"le_100", 100}, {"le_250", 250}, {"le_500", 500}, {"le_750", 750}, + {"le_1000", 1000}, {"le_2000", 2000}, {"le_5000", 5000}, + {"le_30000", 30000}, {"le_300000", 300000}, +} + +// endpointDurationColumns is the SELECT list for those counts, in the order +// histogramQuantile expects to read them. +func endpointDurationColumns() string { + names := make([]string, len(endpointDurationBuckets)) + for i, bucket := range endpointDurationBuckets { + names[i] = bucket.Column + } + return strings.Join(names, ", ") +} + +// histogramQuantile reads a quantile out of cumulative bucket counts, +// interpolating inside the bucket it lands in. +// +// Reporting the bucket's upper bound instead — which is what the rollup query +// used to do — makes a table that reads as broken: every endpoint whose P95 and +// P99 fall in one bucket shows the same number twice, and a page of "25.0ms / +// 25.0ms" invites the reader to distrust the whole view. Interpolation also +// stops a busy endpoint reporting 50ms when almost all of its calls sit just +// above 25ms. +// +// Values beyond the last boundary are reported at that boundary: the rollup +// stops counting there, so it is the most the data can support. +func histogramQuantile(cumulative []float64, total, quantile float64) float64 { + if total <= 0 || len(cumulative) == 0 { + return 0 + } + rank := quantile * total + previousBound, previousCount := 0.0, 0.0 + for i, count := range cumulative { + if i >= len(endpointDurationBuckets) { + break + } + bound := endpointDurationBuckets[i].Bound + if count >= rank { + width, inBucket := bound-previousBound, count-previousCount + if width <= 0 || inBucket <= 0 { + return bound + } + return previousBound + width*((rank-previousCount)/inBucket) + } + previousBound, previousCount = bound, count + } + return endpointDurationBuckets[len(endpointDurationBuckets)-1].Bound +} + func (s *Service) endpointCacheState(ctx context.Context) (bool, time.Time, error) { rows, err := s.db.QueryContext(ctx, endpointRollupStatusQuery) if err != nil { @@ -463,6 +514,12 @@ func totalsOf(before, after performanceAggregate) PerformanceTotals { return totals } +// latencyNoiseMS is the smallest latency move worth calling a change. A p50 +// that goes from 3.9ms to 4.0ms is not a regression, but as a percentage it is +// 2.2% — enough to have been painted red beside an arrow, which spends the +// colour that should mean "look here" on sampling noise. +const latencyNoiseMS = 1.0 + func comparisonMetric(label, unit string, before, after float64, lowerIsBetter bool) ComparisonMetric { change := 0.0 if before != 0 { @@ -471,6 +528,12 @@ func comparisonMetric(label, unit string, before, after float64, lowerIsBetter b change = 100 } direction := DirectionStable + if unit == "ms" && math.Abs(after-before) < latencyNoiseMS { + // The percentage goes too. Passing it through printed "↑ 100.0%" inside + // a grey "stable" badge whenever the earlier half had no traffic — the + // same number-against-colour contradiction this floor exists to remove. + return ComparisonMetric{Label: label, Unit: unit, Before: before, After: after, Direction: direction} + } if math.Abs(change) >= 1 { improved := change > 0 if lowerIsBetter { diff --git a/internal/observability/performance_rollup_test.go b/internal/observability/performance_rollup_test.go index 46a0350f2..8e5adc938 100644 --- a/internal/observability/performance_rollup_test.go +++ b/internal/observability/performance_rollup_test.go @@ -109,12 +109,20 @@ WHERE bucket >= ? AND bucket < ? AND namespace = 'prod' AND service = 'checkout' if err != nil { t.Fatalf("queryEndpoints: %v", err) } - if source != "endpoint_rollup + raw spans (histogram upper-bound percentiles)" || len(got) != 1 { + if source != "endpoint_rollup + raw spans (interpolated histogram percentiles)" || len(got) != 1 { t.Fatalf("queryEndpoints = (%#v, %q), want one rollup endpoint", got, source) } endpoint := got[0] - if endpoint.Calls != 6 || endpoint.P50MS != 100 || endpoint.P95MS != 2000 || endpoint.P99MS != 2000 { - t.Fatalf("endpoint = %#v, want calls=6 p50=100 p95=p99=2000", endpoint) + // The six merged calls are 5, 10, 100, 500, 1000 and 2000ms. Reporting the + // containing bucket's upper bound put P95 and P99 both at 2000ms — the same + // number twice, which reads as a broken table. Interpolating inside the + // 1000–2000ms bucket separates them: rank 5.7 of 6 lands at 1700ms, rank + // 5.94 at 1940ms. + if endpoint.Calls != 6 || endpoint.P50MS != 100 { + t.Fatalf("endpoint = %#v, want calls=6 p50=100", endpoint) + } + if math.Abs(endpoint.P95MS-1700) > 1e-6 || math.Abs(endpoint.P99MS-1940) > 1e-6 { + t.Fatalf("p95/p99 = %v/%v, want 1700/1940 interpolated inside the bucket", endpoint.P95MS, endpoint.P99MS) } if math.Abs(endpoint.ErrorRate-2.0/6.0) > 1e-9 { t.Fatalf("error rate = %v, want %v", endpoint.ErrorRate, 2.0/6.0) diff --git a/internal/observability/service.go b/internal/observability/service.go index f78cc5eb6..b6a64590b 100644 --- a/internal/observability/service.go +++ b/internal/observability/service.go @@ -71,10 +71,16 @@ func (s *Service) normalizeScope(scope Scope) (Scope, error) { return scope, nil } +// timelineBucketWidth keeps a chart readable as the window grows. A day at five +// minutes is 288 points drawn across a card a few hundred pixels wide: the line +// becomes a band and its shape stops being legible, so the buckets widen with +// the window instead. func timelineBucketWidth(window time.Duration) string { switch { - case window <= 24*time.Hour: + case window <= 6*time.Hour: return "5 minutes" + case window <= 24*time.Hour: + return "15 minutes" case window <= 7*24*time.Hour: return "30 minutes" case window <= 30*24*time.Hour: @@ -109,11 +115,20 @@ func (s *Service) provenanceFor(scope Scope, source string) Provenance { } } +// The thresholds a service or endpoint is graded against. ui/health.ts mirrors +// them so a table can colour each figure by the signal that produced it. +const ( + latencyDegradedThresholdMS = 750.0 + latencyUnhealthyThresholdMS = 2000.0 + errorRateDegraded = 0.01 + errorRateUnhealthy = 0.05 +) + func classify(errorRate, p95MS float64) Health { switch { - case errorRate >= 0.05 || p95MS >= 2000: + case errorRate >= errorRateUnhealthy || p95MS >= latencyUnhealthyThresholdMS: return HealthUnhealthy - case errorRate >= 0.01 || p95MS >= 750: + case errorRate >= errorRateDegraded || p95MS >= latencyDegradedThresholdMS: return HealthDegraded default: return HealthHealthy diff --git a/internal/observability/service_test.go b/internal/observability/service_test.go index c2fac08dd..cd0477421 100644 --- a/internal/observability/service_test.go +++ b/internal/observability/service_test.go @@ -2,6 +2,7 @@ package observability import ( "context" + "database/sql/driver" "errors" "math" "regexp" @@ -79,7 +80,11 @@ func TestTimelineBucketWidth(t *testing.T) { window time.Duration want string }{ - {24 * time.Hour, "5 minutes"}, + {6 * time.Hour, "5 minutes"}, + {12 * time.Hour, "15 minutes"}, + // A day at five minutes is 288 points on one card; the line stops being + // a shape and becomes a band. + {24 * time.Hour, "15 minutes"}, {48 * time.Hour, "30 minutes"}, {7 * 24 * time.Hour, "30 minutes"}, {30 * 24 * time.Hour, "4 hours"}, @@ -204,10 +209,20 @@ func TestPerformanceReturnsAllVisualizationDatasets(t *testing.T) { AddRow(start, int64(120), 0.10, 80.0, 220.0, int64(30), int64(8))) mock.ExpectQuery(regexp.QuoteMeta(endpointRollupStatusQuery)). WillReturnRows(sqlmock.NewRows([]string{"ready", "watermark"}).AddRow(true, end.UnixNano())) + // The rollup path returns cumulative histogram counts and the percentiles + // are interpolated from them; 50 calls all at or under 250ms put p95 inside + // the 100–250ms bucket. + endpointColumns := []string{"method", "path", "calls", "error_rate", "duration_count"} + endpointCounts := []driver.Value{"GET", "/pay", int64(50), 0.08, 50.0} + for _, count := range []float64{0, 0, 0, 0, 0, 0, 0, 10, 40, 50, 50, 50, 50, 50, 50, 50, 50} { + endpointCounts = append(endpointCounts, count) + } + for _, bucket := range endpointDurationBuckets { + endpointColumns = append(endpointColumns, bucket.Column) + } mock.ExpectQuery(regexp.QuoteMeta(endpointRollupQuery)). WithArgs(start, end, end, "prod", "checkout", 25). - WillReturnRows(sqlmock.NewRows([]string{"method", "path", "calls", "p50_ms", "p95_ms", "p99_ms", "error_rate"}). - AddRow("GET", "/pay", int64(50), 75.0, 210.0, 350.0, 0.08)) + WillReturnRows(sqlmock.NewRows(endpointColumns).AddRow(endpointCounts...)) mock.ExpectQuery(regexp.QuoteMeta(performanceHeatmapSQL(time.Hour))). WithArgs(start, end, "prod", "prod", start, end, "prod", "prod"). WillReturnRows(sqlmock.NewRows([]string{"point_time", "service", "p95_ms"}). diff --git a/internal/ui/dist/assets/dashboard-BxZStHQX.js b/internal/ui/dist/assets/dashboard-MXM_0_fM.js similarity index 60% rename from internal/ui/dist/assets/dashboard-BxZStHQX.js rename to internal/ui/dist/assets/dashboard-MXM_0_fM.js index a6b0043cd..9042a97e6 100644 --- a/internal/ui/dist/assets/dashboard-BxZStHQX.js +++ b/internal/ui/dist/assets/dashboard-MXM_0_fM.js @@ -2,23 +2,23 @@ import{$ as e,A as t,C as n,D as r,E as i,G as a,J as o,N as s,O as c,Q as l,R a `,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} `,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&Di(e.body,`react-draggable-transparent-selection`)}function Ti(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{Ei(e)}):Ei(e)}function Ei(e){if(e)try{e.body&&Oi(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function Di(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function Oi(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function ki(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:Ii(r);let i=Li(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+ti(s.paddingLeft)+ti(o.marginLeft),top:-i.offsetTop+ti(s.paddingTop)+ti(o.marginTop),right:gi(a)-mi(i)-i.offsetLeft+ti(s.paddingRight)-ti(o.marginRight),bottom:hi(a)-pi(i)-i.offsetTop+ti(s.paddingBottom)-ti(o.marginBottom)}}return ei(r.right)&&(t=Math.min(t,r.right)),ei(r.bottom)&&(n=Math.min(n,r.bottom)),ei(r.left)&&(t=Math.max(t,r.left)),ei(r.top)&&(n=Math.max(n,r.top)),[t,n]}function Ai(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function ji(e){return e.props.axis===`both`||e.props.axis===`x`}function Mi(e){return e.props.axis===`both`||e.props.axis===`y`}function Ni(e,t,n){let r=typeof t==`number`?xi(e,t):null;if(typeof t==`number`&&!r)return null;let i=Li(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return _i(r||e,a,n.props.scale)}function Pi(e,t,n){let r=!ei(e.lastX),i=Li(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function Fi(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function Ii(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function Li(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var Ri=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},zi={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},Bi=zi.mouse,Vi=class extends R.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!ui(e.target,this.props.handle,t)||this.props.cancel&&ui(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=Si(e);this.touchIdentifier=r;let i=Ni(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=Pi(this,a,o);Ri(`DraggableCore: handleDragStart: %j`,s),Ri(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&wi(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,di(n,Bi.move,this.handleDrag),di(n,Bi.stop,this.handleDragStop))},this.handleDrag=e=>{let t=Ni(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=Ai(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=Pi(this,n,r);if(Ri(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=Ni(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=Ai(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=Pi(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&Ti(a.ownerDocument),Ri(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(Ri(`DraggableCore: Removing handlers`),fi(a.ownerDocument,Bi.move,this.handleDrag),fi(a.ownerDocument,Bi.stop,this.handleDragStop))},this.onMouseDown=e=>(Bi=zi.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(Bi=zi.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(Bi=zi.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(Bi=zi.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&di(e,zi.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;fi(t,zi.mouse.move,this.handleDrag),fi(t,zi.touch.move,this.handleDrag),fi(t,zi.mouse.stop,this.handleDragStop),fi(t,zi.touch.stop,this.handleDragStop),fi(e,zi.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&Ti(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Zr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(Ri(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return R.cloneElement(R.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Vi.displayName=`DraggableCore`,Vi.propTypes={allowAnyClick:Xr.default.bool,allowMobileScroll:Xr.default.bool,children:Xr.default.node.isRequired,disabled:Xr.default.bool,enableUserSelectHack:Xr.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Xr.default.arrayOf(Xr.default.number),handle:Xr.default.string,cancel:Xr.default.string,nodeRef:Xr.default.object,nonce:Xr.default.string,onStart:Xr.default.func,onDrag:Xr.default.func,onStop:Xr.default.func,onMouseDown:Xr.default.func,scale:Xr.default.number,className:ni,style:ni,transform:ni},Vi.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Hi=class extends R.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(Ri(`Draggable: onDragStart: %j`,t),this.props.onStart(e,Fi(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;Ri(`Draggable: onDrag: %j`,t);let n=Fi(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=ki(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,Fi(this,t))===!1)return!1;Ri(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(Ri(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Zr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:s,position:c,positionOffset:l,scale:u,...d}=this.props,f={},p=null,m=!c||this.state.dragging,h=c||r,g={x:ji(this)&&m?this.state.x:h.x,y:Mi(this)&&m?this.state.y:h.y};this.state.isElementSVG?p=yi(g,l):f=vi(g,l);let _=R.Children.only(n),v=o(_.props.className||``,i,{[a]:this.state.dragging,[s]:this.state.dragged});return R.createElement(Vi,{...d,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},R.cloneElement(_,{className:v,style:{..._.props.style,...f},transform:p}))}};Hi.displayName=`Draggable`,Hi.propTypes={...Vi.propTypes,axis:Xr.default.oneOf([`both`,`x`,`y`,`none`]),bounds:Xr.default.oneOfType([Xr.default.shape({left:Xr.default.number,right:Xr.default.number,top:Xr.default.number,bottom:Xr.default.number}),Xr.default.string,Xr.default.oneOf([!1])]),defaultClassName:Xr.default.string,defaultClassNameDragging:Xr.default.string,defaultClassNameDragged:Xr.default.string,defaultPosition:Xr.default.shape({x:Xr.default.number,y:Xr.default.number}),positionOffset:Xr.default.shape({x:Xr.default.oneOfType([Xr.default.number,Xr.default.string]),y:Xr.default.oneOfType([Xr.default.number,Xr.default.string])}),position:Xr.default.shape({x:Xr.default.number,y:Xr.default.number}),className:ni,style:ni,transform:ni},Hi.defaultProps={...Vi.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1};var Ui=b(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},u=(e,t,i)=>(i=e==null?{}:n(o(e)),l(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),d=e=>l(r({},`__esModule`,{value:!0}),e),f={};c(f,{DraggableCore:()=>De,default:()=>Oe}),t.exports=d(f);var p=u(S()),m=u(Yr()),h=u(k()),g=Ui();function _(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&_(e.changedTouches,e=>t===e.identifier)}function se(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function ce(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function le(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??ce();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} `,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} -`,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&ue(e.body,`react-draggable-transparent-selection`)}function I(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{L(e)}):L(e)}function L(e){if(e)try{e.body&&de(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function ue(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function de(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function fe(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:ye(r);let i=be(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+b(s.paddingLeft)+b(o.marginLeft),top:-i.offsetTop+b(s.paddingTop)+b(o.marginTop),right:F(a)-te(i)-i.offsetLeft+b(s.paddingRight)-b(o.marginRight),bottom:P(a)-N(i)-i.offsetTop+b(s.paddingBottom)-b(o.marginBottom)}}return y(r.right)&&(t=Math.min(t,r.right)),y(r.bottom)&&(n=Math.min(n,r.bottom)),y(r.left)&&(t=Math.max(t,r.left)),y(r.top)&&(n=Math.max(n,r.top)),[t,n]}function pe(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function me(e){return e.props.axis===`both`||e.props.axis===`x`}function he(e){return e.props.axis===`both`||e.props.axis===`y`}function ge(e,t,n){let r=typeof t==`number`?oe(e,t):null;if(typeof t==`number`&&!r)return null;let i=be(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return ne(r||e,a,n.props.scale)}function _e(e,t,n){let r=!y(e.lastX),i=be(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function ve(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function ye(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function be(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var xe=u(S()),Se=u(Yr()),Ce=u(k()),we=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},Te={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},Ee=Te.mouse,De=class extends xe.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!j(e.target,this.props.handle,t)||this.props.cancel&&j(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=se(e);this.touchIdentifier=r;let i=ge(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=_e(this,a,o);we(`DraggableCore: handleDragStart: %j`,s),we(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&le(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,ee(n,Ee.move,this.handleDrag),ee(n,Ee.stop,this.handleDragStop))},this.handleDrag=e=>{let t=ge(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=pe(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=_e(this,n,r);if(we(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=ge(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=pe(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=_e(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&I(a.ownerDocument),we(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(we(`DraggableCore: Removing handlers`),M(a.ownerDocument,Ee.move,this.handleDrag),M(a.ownerDocument,Ee.stop,this.handleDragStop))},this.onMouseDown=e=>(Ee=Te.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(Ee=Te.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(Ee=Te.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(Ee=Te.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&ee(e,Te.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;M(t,Te.mouse.move,this.handleDrag),M(t,Te.touch.move,this.handleDrag),M(t,Te.mouse.stop,this.handleDragStop),M(t,Te.touch.stop,this.handleDragStop),M(e,Te.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&I(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Ce.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(we(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return xe.cloneElement(xe.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};De.displayName=`DraggableCore`,De.propTypes={allowAnyClick:Se.default.bool,allowMobileScroll:Se.default.bool,children:Se.default.node.isRequired,disabled:Se.default.bool,enableUserSelectHack:Se.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Se.default.arrayOf(Se.default.number),handle:Se.default.string,cancel:Se.default.string,nodeRef:Se.default.object,nonce:Se.default.string,onStart:Se.default.func,onDrag:Se.default.func,onStop:Se.default.func,onMouseDown:Se.default.func,scale:Se.default.number,className:x,style:x,transform:x},De.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Oe=class extends p.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(we(`Draggable: onDragStart: %j`,t),this.props.onStart(e,ve(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;we(`Draggable: onDrag: %j`,t);let n=ve(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=fe(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,ve(this,t))===!1)return!1;we(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(we(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=h.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,m=!s||this.state.dragging,h=s||r,_={x:me(this)&&m?this.state.x:h.x,y:he(this)&&m?this.state.y:h.y};this.state.isElementSVG?f=ie(_,c):d=re(_,c);let v=p.Children.only(n),y=(0,g.clsx)(v.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return p.createElement(De,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},p.cloneElement(v,{className:y,style:{...v.props.style,...d},transform:f}))}};Oe.displayName=`Draggable`,Oe.propTypes={...De.propTypes,axis:m.default.oneOf([`both`,`x`,`y`,`none`]),bounds:m.default.oneOfType([m.default.shape({left:m.default.number,right:m.default.number,top:m.default.number,bottom:m.default.number}),m.default.string,m.default.oneOf([!1])]),defaultClassName:m.default.string,defaultClassNameDragging:m.default.string,defaultClassNameDragged:m.default.string,defaultPosition:m.default.shape({x:m.default.number,y:m.default.number}),positionOffset:m.default.shape({x:m.default.oneOfType([m.default.number,m.default.string]),y:m.default.oneOfType([m.default.number,m.default.string])}),position:m.default.shape({x:m.default.number,y:m.default.number}),className:x,style:x,transform:x},Oe.defaultProps={...De.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1},0&&(t.exports={DraggableCore:De})})),Gi=b(((e,t)=>{var n=Wi(),r=n.DraggableCore,i=n.default||n;t.exports=i,t.exports.default=i,t.exports.DraggableCore=r})),Ki=b((e=>{e.__esModule=!0,e.cloneElement=c;var t=n(S());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{e.__esModule=!0,e.resizableProps=void 0;var t=n(Yr());Gi();function n(e){return e&&e.__esModule?e:{default:e}}e.resizableProps={axis:t.default.oneOf([`both`,`x`,`y`,`none`]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:typeof Element<`u`?t.default.instanceOf(Element):t.default.any,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`y`?t.default.number.isRequired(...e):t.default.number(...e)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),transformScale:t.default.number,width:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`x`?t.default.number.isRequired(...e):t.default.number(...e)}}})),Ji=b((e=>{e.__esModule=!0,e.default=void 0;var t=o(S()),n=Gi(),r=Ki(),i=qi(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.abs(i*n)?t=e/n:e=t*n}let o=e,s=t,c=this.slack||[0,0],l=c[0],u=c[1];return e+=l,t+=u,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[l+(o-e),u+(s-t)],[e,t]}resizeHandler(e,t){return(n,r)=>{let i=r.node,a=r.deltaX,o=r.deltaY;e===`onResizeStart`&&this.resetData();let s=(this.props.axis===`both`||this.props.axis===`x`)&&t!==`n`&&t!==`s`,c=(this.props.axis===`both`||this.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!s&&!c)return;let l=t[0],u=t[t.length-1],d=i.getBoundingClientRect();if(this.lastHandleRect!=null){if(u===`w`){let e=d.left-this.lastHandleRect.left;a+=e}if(l===`n`){let e=d.top-this.lastHandleRect.top;o+=e}}this.lastHandleRect=d,u===`w`&&(a=-a),l===`n`&&(o=-o);let f=this.lastSize?.width??this.props.width,p=this.lastSize?.height??this.props.height,m=f+(s?a/this.props.transformScale:0),h=p+(c?o/this.props.transformScale:0);var g=this.runConstraints(m,h);if(m=g[0],h=g[1],e===`onResizeStop`&&this.lastSize){var _=this.lastSize;m=_.width,h=_.height}let v=m!==f||h!==p;e!==`onResizeStop`&&(this.lastSize={width:m,height:h});let y=typeof this.props[e]==`function`?this.props[e]:null;y&&(e!==`onResize`||v)&&(n.persist==null||n.persist(),y(n,{node:i,size:{width:m,height:h},handle:t})),e===`onResizeStop`&&this.resetData()}}renderResizeHandle(e,n){let r=this.props.handle;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-`+e,ref:n});if(typeof r==`function`)return r(e,n);let i=typeof r.type==`string`,a=u({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)}render(){let e=this.props,i=e.children,o=e.className,l=e.draggableOpts;e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart;let d=e.resizeHandles;e.transformScale;let f=c(e,a);return(0,r.cloneElement)(i,u(u({},f),{},{className:(o?o+` `:``)+`react-resizable`,children:[...t.Children.toArray(i.props.children),...d.map(e=>{let r=this.handleRefs[e]??(this.handleRefs[e]=t.createRef());return t.createElement(n.DraggableCore,s({},l,{nodeRef:r,key:`resizableHandle-`+e,onStop:this.resizeHandler(`onResizeStop`,e),onStart:this.resizeHandler(`onResizeStart`,e),onDrag:this.resizeHandler(`onResize`,e)}),this.renderResizeHandle(e,r))})]}))}};e.default=m,m.propTypes=i.resizableProps,m.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Yi=b((e=>{e.__esModule=!0,e.default=void 0;var t=s(S()),n=o(Yr()),r=o(Ji()),i=qi(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n=t.size;this.props.onResize?(e.persist==null||e.persist(),this.setState(n,()=>this.props.onResize&&this.props.onResize(e,t))):this.setState(n)}}static getDerivedStateFromProps(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null}render(){let e=this.props,n=e.handle,i=e.handleSize;e.onResize;let o=e.onResizeStart,s=e.onResizeStop,l=e.draggableOpts,d=e.minConstraints,f=e.maxConstraints,p=e.lockAspectRatio,h=e.axis;e.width,e.height;let g=e.resizeHandles,_=e.style,v=e.transformScale,y=m(e,a);return t.createElement(r.default,{axis:h,draggableOpts:l,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:f,minConstraints:d,onResizeStart:o,onResize:this.onResize,onResizeStop:s,resizeHandles:g,transformScale:v,width:this.state.width},t.createElement(`div`,c({},y,{style:u(u({},_),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))}};e.default=h,h.propTypes=u(u({},i.resizableProps),{},{children:n.default.element})})),Xi=b(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Ji().default,t.exports.ResizableBox=Yi().default})),Zi=b(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function ee(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=ee,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),Qi=Xi(),$i=Zi();function ea(e){let{children:t,cols:n,containerWidth:r,margin:i,containerPadding:a,rowHeight:s,maxRows:c,isDraggable:l,isResizable:u,isBounded:d,static:f,useCSSTransforms:p=!0,usePercentages:m=!1,transformScale:h=1,positionStrategy:g,dragThreshold:_=0,droppingPosition:v,className:y=``,style:b,handle:x=``,cancel:S=``,x:C,y:w,w:T,h:E,minW:D=1,maxW:O=1/0,minH:k=1,maxH:A=1/0,i:j,resizeHandles:ee,resizeHandle:M,constraints:N=cr,layoutItem:te,layout:P=[],onDragStart:F,onDrag:ne,onDragStop:re,onResizeStart:ie,onResize:ae,onResizeStop:oe}=e,[se,ce]=(0,R.useState)(!1),[le,I]=(0,R.useState)(!1),L=(0,R.useRef)(null),ue=(0,R.useRef)({left:0,top:0}),de=(0,R.useRef)({top:0,left:0,width:0,height:0}),fe=(0,R.useRef)(void 0),pe=(0,R.useRef)(P);pe.current=P;let me=(0,R.useRef)(null),he=(0,R.useRef)(null),ge=(0,R.useRef)(!1),_e=(0,R.useRef)({x:0,y:0}),ve=(0,R.useRef)(!1),ye=(0,R.useMemo)(()=>({cols:n,containerPadding:a,containerWidth:r,margin:i,maxRows:c,rowHeight:s}),[n,a,r,i,c,s]),be=(0,R.useMemo)(()=>({cols:n,maxRows:c,containerWidth:r,containerHeight:0,rowHeight:s,margin:i,layout:[]}),[n,c,r,s,i]),xe=(0,R.useCallback)(()=>({...be,layout:pe.current}),[be]),Se=(0,R.useMemo)(()=>te??{i:j,x:C,y:w,w:T,h:E,minW:D,maxW:O,minH:k,maxH:A},[te,j,C,w,T,E,D,O,k,A]),Ce=(0,R.useCallback)(e=>{if(g?.calcStyle)return g.calcStyle(e);if(p)return dr(e);let t=fr(e);return m?{...t,left:pr(e.left/r),width:pr(e.width/r)}:t},[g,p,m,r]),we=(0,R.useCallback)((e,{node:t})=>{if(!F)return;let{offsetParent:n}=t;if(!n)return;let r=n.getBoundingClientRect(),i=t.getBoundingClientRect(),a=i.left/h,o=r.left/h,s=i.top/h,c=r.top/h,l;if(g?.calcDragPosition){let t=e;l=g.calcDragPosition(t.clientX,t.clientY,t.clientX-i.left,t.clientY-i.top)}else l={left:a-o+n.scrollLeft,top:s-c+n.scrollTop};if(ue.current=l,_>0){let t=e;_e.current={x:t.clientX,y:t.clientY},ge.current=!0,ve.current=!1,ce(!0);return}ce(!0);let u=Hn(ye,l.top,l.left),{x:d,y:f}=lr(N,Se,u.x,u.y,xe());F(j,d,f,{e,node:t,newPosition:l})},[F,h,ye,g,_,N,Se,xe,j]),Te=(0,R.useCallback)((e,{node:t,deltaX:n,deltaY:a})=>{if(!ne||!se)return;let o=e;if(ge.current&&!ve.current){let n=o.clientX-_e.current.x,r=o.clientY-_e.current.y;if(Math.hypot(n,r)<_)return;if(ve.current=!0,ge.current=!1,F){let n=Hn(ye,ue.current.top,ue.current.left),{x:r,y:i}=lr(N,Se,n.x,n.y,xe());F(j,r,i,{e,node:t,newPosition:ue.current})}}let c=ue.current.top+a,l=ue.current.left+n;if(d){let{offsetParent:e}=t;if(e){let t=e.clientHeight-zn(E,s,i[1]);c=Wn(c,0,t);let n=Rn(ye),a=r-zn(T,n,i[0]);l=Wn(l,0,a)}}let u={top:c,left:l};ue.current=u;let f=Hn(ye,c,l),{x:p,y:m}=lr(N,Se,f.x,f.y,xe());ne(j,p,m,{e,node:t,newPosition:u})},[ne,F,se,_,d,E,s,i,ye,r,T,j,N,Se,xe]),Ee=(0,R.useCallback)((e,{node:t})=>{if(!re||!se)return;let n=ge.current;if(ge.current=!1,ve.current=!1,_e.current={x:0,y:0},n){ce(!1),ue.current={left:0,top:0};return}let{left:r,top:i}=ue.current,a={top:i,left:r};ce(!1),ue.current={left:0,top:0};let o=Hn(ye,i,r),{x:s,y:c}=lr(N,Se,o.x,o.y,xe());re(j,s,c,{e,node:t,newPosition:a})},[re,se,ye,N,Se,xe,j]);me.current=we,he.current=Te;let De=(0,R.useCallback)((e,{node:t,size:n,handle:i},a,o)=>{let s=o===`onResizeStart`?ie:o===`onResize`?ae:oe;if(!s)return;let c;c=t?Cr(i,a,n,r):{...n,top:a.top,left:a.left},de.current=c;let l=Un(ye,c.width,c.height),{w:u,h:d}=ur(N,Se,l.w,l.h,i,xe());s(j,u,d,{e:e.nativeEvent??e,node:t,size:c,handle:i})},[ie,ae,oe,r,ye,j,N,Se,xe]),Oe=(0,R.useCallback)((e,t)=>{I(!0);let n=Bn(ye,C,w,T,E),r={...t,handle:t.handle};De(e,r,n,`onResizeStart`)},[De,ye,C,w,T,E]),ke=(0,R.useCallback)((e,t)=>{let n=Bn(ye,C,w,T,E),r={...t,handle:t.handle};De(e,r,n,`onResize`)},[De,ye,C,w,T,E]),Ae=(0,R.useCallback)((e,t)=>{I(!1),de.current={top:0,left:0,width:0,height:0};let n=Bn(ye,C,w,T,E),r={...t,handle:t.handle};De(e,r,n,`onResizeStop`)},[De,ye,C,w,T,E]);(0,R.useEffect)(()=>{if(!v)return;let e=L.current;if(!e)return;let t=fe.current||{left:0,top:0},n=se&&(v.left!==t.left||v.top!==t.top);if(!se){let t={node:e,deltaX:v.left,deltaY:v.top,lastX:0,lastY:0,x:v.left,y:v.top};me.current?.(v.e,t)}else if(n){let t={node:e,deltaX:v.left-ue.current.left,deltaY:v.top-ue.current.top,lastX:ue.current.left,lastY:ue.current.top,x:v.left,y:v.top};he.current?.(v.e,t)}fe.current=v},[v,se,j]);let je=Bn(ye,C,w,T,E,se?ue.current:null,le?de.current:null),Me=R.Children.only(t),Ne=Rn(ye),Pe=[zn(D,Ne,i[0]),zn(k,s,i[1])],Fe=[zn(O,Ne,i[0]),zn(A,s,i[1])],Ie=Me.props,Le=Ie.className,Re=Ie.style,ze=R.cloneElement(Me,{ref:L,className:o(`react-grid-item`,Le,y,{static:f,resizing:le,"react-draggable":l,"react-draggable-dragging":se,dropping:!!v,cssTransforms:p}),style:{...b,...Re,...Ce(je)}}),Be=M;return ze=(0,z.jsx)(Qi.Resizable,{draggableOpts:{disabled:!u},className:u?void 0:`react-resizable-hide`,width:je.width,height:je.height,minConstraints:Pe,maxConstraints:Fe,onResizeStart:Oe,onResize:ke,onResizeStop:Ae,transformScale:h,resizeHandles:ee,handle:Be,children:ze}),ze=(0,z.jsx)(Vi,{disabled:!l,onStart:we,onDrag:Te,onStop:Ee,handle:x,cancel:`.react-resizable-handle`+(S?`,`+S:``),scale:h,nodeRef:L,children:ze}),ze}var ta=()=>{},na=`react-grid-layout`,ra=!1;try{ra=/firefox/i.test(navigator.userAgent)}catch{}function ia(e,t){let n=R.Children.toArray(e),r=R.Children.toArray(t);if(n.length!==r.length)return!1;for(let e=0;e{if(!R.isValidElement(t)||t.key===null)return;let n=String(t.key);a.add(n);let r=e.find(e=>e.i===n);if(r)i.push(er(r));else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Zn(i),w:1,h:1})}});let o=ir(i,{cols:n});return r.compact(o,n)}function oa(e){let{children:t,width:n,gridConfig:r,dragConfig:i,resizeConfig:a,dropConfig:s,positionStrategy:c=Dr,compactor:l,constraints:u=cr,layout:d=[],droppingItem:f,autoSize:p=!0,className:m=``,style:h={},innerRef:g,onLayoutChange:_=ta,onDragStart:v=ta,onDrag:y=ta,onDragStop:b=ta,onResizeStart:x=ta,onResize:S=ta,onResizeStop:C=ta,onDrop:w=ta,onDropDragOver:T=ta}=e,E=(0,R.useMemo)(()=>({...Or,...r}),[r]),D=(0,R.useMemo)(()=>({...kr,...i}),[i]),O=(0,R.useMemo)(()=>({...Ar,...a}),[a]),k=(0,R.useMemo)(()=>({...jr,...s}),[s]),{cols:A,rowHeight:j,maxRows:ee,margin:M,containerPadding:N}=E,{enabled:te,bounded:P,handle:F,cancel:ne,threshold:re}=D,{enabled:ie,handles:ae,handleComponent:oe}=O,{enabled:se,defaultItem:ce,onDragOver:le}=k,I=l??Vr(`vertical`),L=I.type,ue=I.allowOverlap,de=I.preventCollision??!1,fe=(0,R.useMemo)(()=>f??{i:`__dropping-elem__`,...ce},[f,ce]),pe=c.type===`transform`,me=c.scale,he=N??M,[ge,_e]=(0,R.useState)(!1),[ve,ye]=(0,R.useState)(()=>aa(d,t,A,I)),[be,xe]=(0,R.useState)(null),[Se,Ce]=(0,R.useState)(!1),[we,Te]=(0,R.useState)(null),[Ee,De]=(0,R.useState)(),Oe=(0,R.useRef)(null),ke=(0,R.useRef)(null),Ae=(0,R.useRef)(null),je=(0,R.useRef)(0),Me=(0,R.useRef)(ve),Ne=(0,R.useRef)(d),Pe=(0,R.useRef)(t),Fe=(0,R.useRef)(L),Ie=(0,R.useRef)(ve);Ie.current=ve,(0,R.useEffect)(()=>{_e(!0),(0,$i.deepEqual)(ve,d)||_(ve)},[]),(0,R.useEffect)(()=>{if(be||we)return;let e=!(0,$i.deepEqual)(d,Ne.current),n=!ia(t,Pe.current),r=L!==Fe.current;if(e||n||r){let n=aa(e?d:ve,t,A,I);(0,$i.deepEqual)(n,ve)||ye(n)}Ne.current=d,Pe.current=t,Fe.current=L},[d,t,A,L,I,be,we,ve]),(0,R.useEffect)(()=>{if(!be&&!(0,$i.deepEqual)(ve,Me.current)){Me.current=ve;let e=ve.filter(e=>e.i!==fe.i);_(e)}},[ve,be,_,fe.i]);let Le=(0,R.useMemo)(()=>{if(!p)return;let e=Zn(ve),t=he[1];return e*j+(e-1)*M[1]+t*2+`px`},[p,ve,j,M,he]),Re=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=Qn(i,e);if(!a)return;let o={w:a.w,h:a.h,x:a.x,y:a.y,i:e};Oe.current=er(a),Ae.current=i,xe(o),v(i,a,a,null,r.e,r.node)},[v]),ze=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=Oe.current,o=Qn(i,e);if(!o)return;let s={w:o.w,h:o.h,x:o.x,y:o.y,i:e},c=ar(i,o,t,n,!0,de,L,A,ue);y(c,a,o,s,r.e,r.node),ye(I.compact(c,A)),xe(s)},[de,L,A,ue,I,y]),Be=(0,R.useCallback)((e,t,n,r)=>{if(!be)return;let i=Ie.current,a=Oe.current,o=Qn(i,e);if(!o)return;let s=ar(i,o,t,n,!0,de,L,A,ue),c=I.compact(s,A);b(c,a,o,null,r.e,r.node);let l=Ae.current;Oe.current=null,Ae.current=null,xe(null),ye(c),l&&!(0,$i.deepEqual)(l,c)&&_(c)},[be,de,L,A,ue,I,b,_]),Ve=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=Qn(i,e);a&&(ke.current=er(a),Ae.current=i,Ce(!0),x(i,a,a,null,r.e,r.node))},[x]),He=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=ke.current,{handle:o}=r,s=!1,c,l,[u,d]=rr(i,e,e=>(c=e.x,l=e.y,[`sw`,`w`,`nw`,`n`,`ne`].includes(o)&&([`sw`,`nw`,`w`].includes(o)&&(c=e.x+(e.w-t),t=e.x!==c&&c<0?e.w:t,c=c<0?0:c),[`ne`,`n`,`nw`].includes(o)&&(l=e.y+(e.h-n),n=e.y!==l&&l<0?e.h:n,l=l<0?0:l),s=!0),de&&!ue&&qn(i,{...e,w:t,h:n,x:c??e.x,y:l??e.y}).filter(t=>t.i!==e.i).length>0&&(l=e.y,n=e.h,c=e.x,t=e.w,s=!1),e.w=t,e.h=n,e));if(!d)return;let f=u;s&&c!==void 0&&l!==void 0&&(f=ar(u,d,c,l,!0,de,L,A,ue));let p={w:d.w,h:d.h,x:d.x,y:d.y,i:e,static:!0};S(f,a,d,p,r.e,r.node),ye(I.compact(f,A)),xe(p)},[de,L,A,ue,I,S]),Ue=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=ke.current,o=Qn(i,e),s=I.compact(i,A);C(s,a,o??null,null,r.e,r.node);let c=Ae.current;ke.current=null,Ae.current=null,xe(null),Ce(!1),ye(s),c&&!(0,$i.deepEqual)(c,s)&&_(s)},[A,I,C,_]),We=(0,R.useCallback)(()=>{let e=Ie.current;if(!e.some(e=>e.i===fe.i)){Te(null),xe(null),De(void 0);return}let t=I.compact(e.filter(e=>e.i!==fe.i),A);ye(t),Te(null),xe(null),De(void 0)},[fe.i,A,I]),Ge=(0,R.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),ra&&!e.nativeEvent.target?.classList.contains(na))return!1;let t=le?le(e.nativeEvent):T(e);if(t===!1)return we&&We(),!1;let{dragOffsetX:r=0,dragOffsetY:i=0,...a}=t??{},o={...fe,...a},s=e.currentTarget.getBoundingClientRect(),c={cols:A,margin:M,maxRows:ee,rowHeight:j,containerWidth:n,containerPadding:he},l=Rn(c),u=zn(o.w,l,M[0]),d=zn(o.h,j,M[1]),f=u/2,p=d/2,m=e.clientX-s.left+r-f,h=e.clientY-s.top+i-p,g=Math.max(0,m),_=Math.max(0,h),v={left:g/me,top:_/me,e:e.nativeEvent};if(we)Ee&&(Ee.left!==v.left||Ee.top!==v.top)&&De(v);else{let e=Vn(c,_,g,o.w,o.h);Te((0,z.jsx)(`div`,{},o.i)),De(v);let t=Ie.current.filter(e=>e.i!==o.i);ye([...t,{...o,x:e.x,y:e.y,static:!1,isDraggable:!0}])}},[we,Ee,fe,le,T,We,me,A,M,ee,j,n,he]),Ke=(0,R.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),je.current--,je.current<0&&(je.current=0),je.current===0&&We()},[We]),qe=(0,R.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),je.current++},[]),Je=(0,R.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=Ie.current,n=t.find(e=>e.i===fe.i);je.current=0,We(),w(t,n,e.nativeEvent)},[fe.i,We,w]),Ye=(0,R.useCallback)((e,t)=>{if(!e||!e.key)return null;let r=Qn(ve,String(e.key));if(!r)return null;let i=typeof r.isDraggable==`boolean`?r.isDraggable:!r.static&&te,a=typeof r.isResizable==`boolean`?r.isResizable:!r.static&&ie,o=r.resizeHandles||[...ae],s=i&&P&&r.isBounded!==!1,l=oe;return(0,z.jsx)(ea,{containerWidth:n,cols:A,margin:M,containerPadding:he,maxRows:ee,rowHeight:j,cancel:ne,handle:F,onDragStart:Re,onDrag:ze,onDragStop:Be,onResizeStart:Ve,onResize:He,onResizeStop:Ue,isDraggable:i,isResizable:a,isBounded:s,useCSSTransforms:pe&&ge,usePercentages:!ge,transformScale:me,positionStrategy:c,dragThreshold:re,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:t?Ee:void 0,resizeHandles:o,resizeHandle:l,constraints:u,layoutItem:r,layout:ve,children:e},r.i)},[ve,n,A,M,he,ee,j,ne,F,Re,ze,Be,Ve,He,Ue,te,ie,P,pe,ge,me,c,re,Ee,ae,oe,u]),Xe=()=>be?(0,z.jsx)(ea,{w:be.w,h:be.h,x:be.x,y:be.y,i:be.i,className:`react-grid-placeholder ${Se?`placeholder-resizing`:``}`,containerWidth:n,cols:A,margin:M,containerPadding:he,maxRows:ee,rowHeight:j,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:pe,transformScale:me,constraints:u,layout:ve,children:(0,z.jsx)(`div`,{})}):null,Ze=o(na,m),Qe={height:Le,...h};return(0,z.jsxs)(`div`,{ref:g,className:Ze,style:Qe,onDrop:se?Je:void 0,onDragLeave:se?Ke:void 0,onDragEnter:se?qe:void 0,onDragOver:se?Ge:void 0,children:[R.Children.map(t,e=>R.isValidElement(e)?Ye(e):null),se&&we&&Ye(we,!0),Xe()]})}var sa={lg:1200,md:996,sm:768,xs:480,xxs:0},ca={lg:12,md:10,sm:6,xs:4,xxs:2},la=()=>{};function ua(e,t,n,r){let i=[];R.Children.forEach(t,t=>{if(!R.isValidElement(t)||t.key===null)return;let n=String(t.key),r=e.find(e=>e.i===n);if(r)i.push({...r,i:n});else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Zn(i),w:1,h:1})}});let a=ir(i,{cols:n});return r.compact(a,n)}function da(e){let{children:t,width:n,breakpoint:r,breakpoints:i=sa,cols:a=ca,layouts:o={},rowHeight:s=150,maxRows:c=1/0,margin:l=[10,10],containerPadding:u=null,compactor:d,onBreakpointChange:f=la,onLayoutChange:p=la,onWidthChange:m=la,...h}=e,g=d??Vr(`vertical`),_=g.type,v=g.allowOverlap,y=(0,R.useMemo)(()=>r??Ur(i,n),[]),b=(0,R.useMemo)(()=>Wr(y,a),[y,a]),x=(0,R.useMemo)(()=>Gr(o,i,y,y,b,_),[]),[S,C]=(0,R.useState)(y),[w,T]=(0,R.useState)(b),[E,D]=(0,R.useState)(x),[O,k]=(0,R.useState)(o),A=(0,R.useRef)(n),j=(0,R.useRef)(r),ee=(0,R.useRef)(i),M=(0,R.useRef)(a),N=(0,R.useRef)(o),te=(0,R.useRef)(_),P=(0,R.useRef)(O);(0,R.useEffect)(()=>{P.current=O},[O]);let F=(0,R.useMemo)(()=>(0,$i.deepEqual)(o,N.current)?null:Gr(o,i,S,S,w,g),[o,i,S,w,g]),ne=F??E;(0,R.useEffect)(()=>{F!==null&&(D(F),k(o),P.current=o,N.current=o)},[F,o]),(0,R.useEffect)(()=>{if(_!==te.current){let e=g.compact(tr(ne),w),t={...P.current,[S]:e};D(e),k(t),P.current=t,p(e,t),te.current=_}},[_,g,ne,w,v,S,p]),(0,R.useEffect)(()=>{let e=n!==A.current,o=r!==j.current,s=!(0,$i.deepEqual)(i,ee.current),c=!(0,$i.deepEqual)(a,M.current);if(e||o||s||c){let e=r??Ur(i,n),o=Wr(e,a),d=S;if(d!==e||s||c){let n={...P.current};n[d]||(n[d]=tr(E));let r=Gr(n,i,e,d,o,g);r=ua(r,t,o,g),n[e]=r,C(e),T(o),D(r),k(n),P.current=n,f(e,o),p(r,n)}let h=Kr(l,e),_=u?Kr(u,e):null;m(n,h,o,_),A.current=n,j.current=r,ee.current=i,M.current=a}},[n,r,i,a,S,w,E,t,g,_,v,l,u,f,p,m]);let re=(0,R.useCallback)(e=>{let t={...P.current,[S]:e};D(e),k(t),P.current=t,p(e,t)},[S,p]),ie=(0,R.useMemo)(()=>Kr(l,S),[l,S]),ae=(0,R.useMemo)(()=>u===null?null:Kr(u,S),[u,S]),oe=(0,R.useMemo)(()=>({cols:w,rowHeight:s,maxRows:c,margin:ie,containerPadding:ae}),[w,s,c,ie,ae]);return(0,z.jsx)(oa,{...h,width:n,gridConfig:oe,compactor:g,onLayoutChange:re,layout:ne,children:t})}function fa(e){let{children:t,width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,rowHeight:u,maxRows:d,margin:f,containerPadding:p,droppingItem:m,compactType:h,preventCollision:g=!1,allowOverlap:_=!1,verticalCompact:v,isDraggable:y=!0,isBounded:b=!1,draggableHandle:x,draggableCancel:S,isResizable:C=!0,resizeHandles:w=[`se`],resizeHandle:T,isDroppable:E=!1,useCSSTransforms:D=!0,transformScale:O=1,autoSize:k,className:A,style:j,innerRef:ee,onDragStart:M,onDrag:N,onDragStop:te,onResizeStart:P,onResize:F,onResizeStop:ne,onDrop:re,onDropDragOver:ie}=e,ae=h===void 0?`vertical`:h;v===!1&&(ae=null);let oe={enabled:y,bounded:b,handle:x,cancel:S},se={enabled:C,handles:w,handleComponent:T},ce={enabled:E},le;le=D?O===1?wr:Er(O):Tr;let I=Vr(ae,_,g);return(0,z.jsx)(da,{width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,rowHeight:u,maxRows:d,margin:f,containerPadding:p,compactor:I,dragConfig:oe,resizeConfig:se,dropConfig:ce,positionStrategy:le,droppingItem:m,autoSize:k,className:A,style:j,innerRef:ee,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,onDragStart:M,onDrag:N,onDragStop:te,onResizeStart:P,onResize:F,onResizeStop:ne,onDrop:re,onDropDragOver:ie,children:t})}fa.displayName=`ResponsiveReactGridLayout`;var pa=fa,ma=`react-grid-layout`;function ha(e){function t(t){let{measureBeforeMount:n=!1,className:r,style:i,...a}=t,[s,c]=(0,R.useState)(1280),[l,u]=(0,R.useState)(!1),d=(0,R.useRef)(null),f=(0,R.useRef)(null);return(0,R.useEffect)(()=>{u(!0)},[]),(0,R.useEffect)(()=>{let e=d.current;if(!(e instanceof HTMLElement))return;let t=null,n=new ResizeObserver(e=>{if(e[0]){let n=Math.round(e[0].contentRect.width);t!==null&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{c(e=>e===n?e:n),t=null})}});return n.observe(e),f.current=n,()=>{t!==null&&cancelAnimationFrame(t),n.unobserve(e),n.disconnect()}},[l]),n&&!l?(0,z.jsx)(`div`,{className:o(r,ma),style:i,ref:d}):(0,z.jsx)(e,{innerRef:d,className:r,style:i,...a,width:s})}return t.displayName=`WidthProvider(${e.displayName||e.name||`Component`})`,t}function ga(e){return e.reduce((e,t)=>Math.max(e,t.y+t.h),0)}function _a(e,t){return e.map(e=>({...e,x:0,w:t,minW:Math.min(e.minW??1,t)}))}var va=[`overview`,`topology`,`activity`,`assistant`,`performance`,`trace`,`logs`],ya={overview:{w:4,h:3,minW:3,minH:3},activity:{w:4,h:5,minW:3,minH:4},assistant:{w:4,h:3,minW:3,minH:3},topology:{w:8,h:5,minW:4,minH:4},performance:{w:8,h:5,minW:4,minH:4},logs:{w:8,h:5,minW:4,minH:4},trace:{w:8,h:4,minW:4,minH:4}};function ba(e,t){return e.xe.y)),o=(t,r)=>!e.some(e=>ba(e,{x:t,y:a,w:r,h:n}));for(let e=0;e+t<=r;e+=1)if(o(e,t))return{x:e,y:a,w:t};let s=e.reduce((e,t)=>ba(t,{x:0,y:a,w:r,h:n})?Math.max(e,t.x+t.w):e,0),c={x:s,w:0};for(let e=Math.min(s,r);ec.w&&(c={x:e,w:t-e}),e=t}return c.w>=i?{x:c.x,y:a,w:c.w}:{x:0,y:ga(e),w:t}}var Sa=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function Ca(e){return`${(e*100).toFixed(e>=.1?1:2)}%`}function wa(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(e>=100?0:1)}ms`}function Ta(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}var Ea=function(e,t){return Ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ea(e,t)};function B(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Ea(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Da=`12px sans-serif`,Oa=20,ka=100,Aa=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ja(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;c=Ka&&(Ga=0),Ga++}function Ja(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function V(e){if(typeof e!=`object`||!e)return e;var t=e,n=Ia.call(e);if(n===`[object Array]`){if(!To(e)){t=[];for(var r=0,i=e.length;r`u`&&typeof self<`u`?Io.worker=!0:!Io.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Io.node=!0,Io.svgSupported=!0):Lo(navigator.userAgent,Io);function Lo(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Ro=`.`,zo=`___EC__COMPONENT__CONTAINER___`,Bo=`___EC__EXTENDED_CLASS___`;function Vo(e){var t={main:``,sub:``};if(e){var n=e.split(Ro);t.main=n[0]||``,t.sub=n[1]||``}return t}function Ho(e){xo(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Uo(e){return!!(e&&e[Bo])}function Wo(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Go(t)?n=function(e){B(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},$a(n,this)),H(n.prototype,e),n[Bo]=!0,n.extend=this.extend,n.superCall=Yo,n.superApply=Xo,n.superClass=t,n}}function Go(e){return K(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Ko(e,t){e.extend=t.extend}var qo=Math.round(Math.random()*10);function Jo(e){var t=[`__\0is_clz`,qo++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Yo(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function Xo(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Zo(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){Ho(r),e.prototype.type=r;var i=Vo(r);if(!i.sub)t[i.main]=e;else if(i.sub!==zo){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[zo]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Vo(e),r=[],i=t[n.main];return i&&i[zo]?U(i,function(e,t){t!==zo&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Vo(e).main]},e.getAllClassMainTypes=function(){var e=[];return U(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Vo(e).main];return n&&n[zo]};function n(e){var n=t[e.main];return(!n||!n[zo])&&(n=t[e.main]={},n[zo]=!0),n}}function Qo(e,t){for(var n=0;n=0||i&&Qa(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var $o=Qo([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),es=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return $o(this,e,t)},e}(),ts=function(){function e(e){this.value=e}return e}(),ns=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new ts(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),rs=function(){function e(e){this._list=new ns,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new ts(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),is=new rs(50);function as(e){if(typeof e==`string`){var t=is.get(e);return t&&t.image}return e}function os(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=is.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!cs(t)&&a.pending.push(o)):(t=Na.loadImage(e,ss,ss),t.__zrImageSrc=e,is.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function ss(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;tu||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){Zs(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&Zs(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Vs.x=Us.x=t.x,Vs.y=Ws.y=t.y,Hs.x=Ws.x=t.x+t.width,Hs.y=Us.y=t.y+t.height,Vs.transform(n),Ws.transform(n),Hs.transform(n),Us.transform(n),e.x=Is(Vs.x,Hs.x,Us.x,Ws.x),e.y=Is(Vs.y,Hs.y,Us.y,Ws.y);var s=Ls(Vs.x,Hs.x,Us.x,Ws.x),c=Ls(Vs.y,Hs.y,Us.y,Ws.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=us(e||[]),ps(e,e,bs(rc,-t.x,-t.y)),hs(e,e,bs(rc,r,i)),ps(e,e,bs(rc,n.x,n.y)),e},e}(),Ys=Z.create,Xs=Z.set,Zs=Z.copy,Qs=Z.calculateTransform,$s=Z.applyTransform,ec=Z.contain,tc=new Z(0,0,0,0),nc=new Z(0,0,0,0),rc=[];function ic(e,t,n,r,i,a,o,s){var c=Rs(t-n),l=Rs(r-e),u=Is(c,l),d=zs[i],f=zs[1-i],p=Bs[i];t=l||!Gs.bidirectional)&&(Ks[d]=-l,Ks[f]=0,Gs.useDir&&Gs.calcDirMTV())))}function ac(){var e=0,t=new Fs,n=new Fs,r={minTv:new Fs,maxTv:new Fs,useDir:!1,dirMinTv:new Fs,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Ls(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=uc)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Na.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?lc=uc:i>2&&lc++,t}}var lc=0,uc=5;function dc(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=cc(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function fc(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Na.measureText(t,e.font).width,n.put(t,r)),r}function pc(e,t,n,r){var i=fc(oc(t),e),a=_c(t);return new Z(hc(0,i,n),gc(0,a,r),i,a)}function mc(e,t,n,r){var i=((e||``)+``).split(` -`);if(i.length===1)return pc(i[0],t,n,r);for(var a=new Z(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function yc(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=vc(r[0],n.width),l+=vc(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var bc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function xc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(` -`);a=Sc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l=s;l++)c-=s;var u=fc(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Cc(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=fc(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?wc(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=fc(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function wc(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Sc(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Cc(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=oc(l),S=0;S<_.length;S++)w=Math.max(fc(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Ec=function(){function e(){}return e}(),Dc=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Oc=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function kc(e,t,n,r,i){var a=new Oc,o=Rc(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=bc.lastIndex=0,h;(h=bc.exec(o))!=null;){var g=h.index;g>m&&Ac(a,o.substring(m,g),t,p),Ac(a,h[2],t,p,h[1]),m=bc.lastIndex}md){var te=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` -`),l=!0),r.accumWidth=m}else{var h=Pc(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` -`);for(var g=oc(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Mc=no(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Nc(e){return!jc(e)||!!Mc[e]}function Pc(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=oc(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Fc(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;Z.set(Ic,hc(n,o,i),gc(r,s,a),o,s),Z.intersect(t,Ic,null,Lc);var c=Lc.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=hc(c.x,c.width,i,!0),e.baseY=gc(c.y,c.height,a,!0)}}var Ic=new Z(0,0,0,0),Lc={outIntersectRect:{},clamp:!0};function Rc(e){return e==null?e=``:e+=``}function zc(e){var t=Rc(e.text),n=e.font;return Bc(e,fc(oc(n),t),_c(n),null)}function Bc(e,t,n,r){var i=new Z(hc(e.x||0,t,e.textAlign),gc(e.y||0,n,e.textBaseline),t,n),a=r??(Vc(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Vc(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Hc=us,Uc=5e-5;function Wc(e){return e>Uc||e<-Uc}var Gc=[],Kc=[],qc=ls(),Jc=Math.abs,Yc=function(){function e(){}return e.prototype.getLocalTransform=function(e){return Xc(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Wc(this.rotation)||Wc(this.x)||Wc(this.y)||Wc(this.scaleX-1)||Wc(this.scaleY-1)||Wc(this.skewX)||Wc(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Hc(n),this.invTransform=null);return}n||=ls(),t?this.getLocalTransform(n):Hc(n),e&&(t?fs(n,e,n):ds(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||ls(),gs(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Gc);var n=Gc[0]<0?-1:1,r=Gc[1]<0?-1:1,i=((Gc[0]-n)*t+n)/Gc[0]||0,a=((Gc[1]-r)*t+r)/Gc[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||ls(),fs(Kc,e.invTransform,t),t=Kc);var n=this.originX,r=this.originY;(n||r)&&(qc[4]=n,qc[5]=r,fs(Kc,t,qc),Kc[4]-=n,Kc[5]-=r,t=Kc),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Ms(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Ms(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Jc(e[0]-1)>1e-10&&Jc(e[3]-1)>1e-10?Math.sqrt(Jc(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){$c(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&ms(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),Xc=Yc.getLocalTransform;function Zc(){return new Yc}var Qc=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function $c(e,t){return Xa(e,t,Qc)}var el={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-el.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?el.bounceIn(e*2)*.5:el.bounceOut(e*2-1)*.5+.5}},tl=Math.pow,nl=Math.sqrt,rl=1e-8,il=1e-4,al=nl(3),ol=1/3,sl=_s(),cl=_s(),ll=_s();function ul(e){return e>-rl&&erl||e<-rl}function fl(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function pl(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function ml(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(ul(u)&&ul(d)){if(ul(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(ul(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=nl(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-tl(-y,ol):tl(y,ol),b=b<0?-tl(-b,ol):tl(b,ol);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*nl(u*u*u)),S=Math.acos(x)/3,C=nl(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+al*Math.sin(S)))/(3*o),T=(-s+C*(w-al*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function hl(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(ul(o)){if(dl(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(ul(u))i[0]=-a/(2*o);else if(u>0){var d=nl(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function gl(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function _l(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;sl[0]=c,sl[1]=l;for(var v=0;v<1;v+=.05)cl[0]=fl(e,n,i,o,v),cl[1]=fl(t,r,a,s,v),g=js(sl,cl),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(ul(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=nl(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Sl(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Cl(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function wl(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;sl[0]=o,sl[1]=s;for(var f=0;f<1;f+=.05){cl[0]=yl(e,n,i,f),cl[1]=yl(t,r,a,f);var p=js(sl,cl);p=0&&p=1?1:ml(0,r,a,1,e,s)&&fl(0,i,o,1,s[0])}}}var Ol=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||No,this.ondestroy=e.ondestroy||No,this.onrestart=e.onrestart||No,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=K(e)?e:el[e]||Dl(e)},e}(),kl={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Al(e){return e=Math.round(e),e<0?0:e>255?255:e}function jl(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ml(e){return e<0?0:e>1?1:e}function Nl(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Al(parseFloat(t)/100*255):Al(parseInt(t,10))}function Pl(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ml(parseFloat(t)/100):Ml(parseFloat(t))}function Fl(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Il(e,t,n){return e+(t-e)*n}function Ll(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Rl(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var zl=new rs(20),Bl=null;function Vl(e,t){Bl&&Rl(Bl,t),Bl=zl.put(e,Bl||t.slice())}function Hl(e,t){if(e){t||=[];var n=zl.get(e);if(n)return Rl(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in kl)return Rl(t,kl[r]),Vl(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Ll(t,0,0,0,1);return}return Ll(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Vl(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ll(t,0,0,0,1);return}return Ll(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Vl(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Ll(t,+l[0],+l[1],+l[2],1):Ll(t,0,0,0,1);u=Pl(l.pop());case`rgb`:if(l.length>=3)return Ll(t,Nl(l[0]),Nl(l[1]),Nl(l[2]),l.length===3?u:Pl(l[3])),Vl(e,t),t;Ll(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Ll(t,0,0,0,1);return}return l[3]=Pl(l[3]),Ul(l,t),Vl(e,t),t;case`hsl`:if(l.length!==3){Ll(t,0,0,0,1);return}return Ul(l,t),Vl(e,t),t;default:return}}Ll(t,0,0,0,1)}}function Ul(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Pl(e[1]),i=Pl(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Ll(t,Al(Fl(o,a,n+1/3)*255),Al(Fl(o,a,n)*255),Al(Fl(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Wl(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Gl(e,t){var n=Hl(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Xl(n,n.length===4?`rgba`:`rgb`)}}function Kl(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Al(Il(o[0],s[0],c)),n[1]=Al(Il(o[1],s[1],c)),n[2]=Al(Il(o[2],s[2],c)),n[3]=Ml(Il(o[3],s[3],c)),n}}function ql(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Hl(t[i]),s=Hl(t[a]),c=r-i,l=Xl([Al(Il(o[0],s[0],c)),Al(Il(o[1],s[1],c)),Al(Il(o[2],s[2],c)),Ml(Il(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Jl(e,t,n,r){var i=Hl(e);if(e)return i=Wl(i),t!=null&&(i[0]=jl(K(t)?t(i[0]):t)),n!=null&&(i[1]=Pl(K(n)?n(i[1]):n)),r!=null&&(i[2]=Pl(K(r)?r(i[2]):r)),Xl(Ul(i),`rgba`)}function Yl(e,t){var n=Hl(e);if(n&&t!=null)return n[3]=Ml(t),Xl(n,`rgba`)}function Xl(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Zl(e,t){var n=Hl(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Ql=new rs(100);function $l(e){if(q(e)){var t=Ql.get(e);return t||(t=Gl(e,-.1),Ql.put(e,t)),t}if(ho(e)){var n=H({},e);return n.colorStops=W(e.colorStops,function(e){return{offset:e.offset,color:Gl(e.color,-.1)}}),n}return e}var eu=Math.round;function tu(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Hl(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var nu=1e-4;function ru(e){return e-nu}function iu(e){return eu(e*1e3)/1e3}function au(e){return eu(e*1e4)/1e4}function ou(e){return`matrix(`+iu(e[0])+`,`+iu(e[1])+`,`+iu(e[2])+`,`+iu(e[3])+`,`+au(e[4])+`,`+au(e[5])+`)`}var su={left:`start`,right:`end`,center:`middle`,middle:`middle`};function cu(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function lu(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function uu(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function du(e){return e&&!!e.image}function fu(e){return e&&!!e.svgElement}function pu(e){return du(e)||fu(e)}function mu(e){return e.type===`linear`}function hu(e){return e.type===`radial`}function gu(e){return e&&(e.type===`linear`||e.type===`radial`)}function _u(e){return`url(#`+e+`)`}function vu(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function yu(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Po,i=Y(e.scaleX,1),a=Y(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+eu(o*Po)+`deg, `+eu(s*Po)+`deg)`),c.join(` `)}var bu=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),xu=Array.prototype.slice;function Su(e,t,n){return(t-e)*n+e}function Cu(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Ru,s=t;if(to(t)){var c=ju(t);o=c,(c===1&&!uo(t[0])||c===2&&!uo(t[0][0]))&&(a=!0)}else if(uo(t)&&!go(t))o=Mu;else if(q(t)){if(!isNaN(+t))o=Mu;else{var l=Hl(t);l&&(s=l,o=Fu)}}else if(ho(t)){var u=H({},s);u.colorStops=W(t.colorStops,function(e){return{offset:e.offset,color:Hl(e.color)}}),mu(t)?o=Iu:hu(t)&&(o=Lu),s=u}i===0?this.valType=o:(o!==this.valType||o===Ru)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=K(n)?n:el[n]||Dl(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Bu(r),c=zu(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Vu:e[s];if((Bu(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Bu(i))i===Nu?Cu(g,f[r],p[r],h):wu(g,f[r],p[r],h);else if(zu(i)){var _=f[r],v=p[r],y=i===Iu;e[s]={type:y?`linear`:`radial`,x:Su(_.x,v.x,h),y:Su(_.y,v.y,h),colorStops:W(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Su(e.offset,n.offset,h),color:Au(Cu([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Su(_.x2,v.x2,h),e[s].y2=Su(_.y2,v.y2,h)):e[s].r=Su(_.r,v.r,h)}else if(c)Cu(g,f[r],p[r],h),n||(e[s]=Au(g));else{var b=Su(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Mu?e[n]=e[n]+r:t===Fu?(Hl(e[n],Vu),Tu(Vu,Vu,r,1),e[n]=Au(Vu)):t===Nu?Tu(e[n],e[n],r,1):t===Pu&&Eu(e[n],e[n],r,1)},e}(),Uu=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Ja(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ao(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,ku(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ku(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Wu=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Yu:Ju},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Hl(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Xl(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},H(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(J(e))for(var n=ao(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Zu,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Zu;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(Qa(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Ja(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=dd(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,pd(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=Qa(r,e),a=Qa(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var md=`__zr_style_`+Math.round(Math.random()*10),hd={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},gd={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};hd[md]=!0;var _d=[`z`,`z2`,`invisible`],vd=[`invisible`],yd=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=ao(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Od[0]=Ed(i)*n+e,Od[1]=Td(i)*r+t,kd[0]=Ed(a)*n+e,kd[1]=Td(a)*r+t,l(s,Od,kd),u(c,Od,kd),i%=Dd,i<0&&(i+=Dd),a%=Dd,a<0&&(a+=Dd),i>a&&!o?a+=Dd:ii&&(Ad[0]=Ed(p)*n+e,Ad[1]=Td(p)*r+t,l(s,Ad,s),u(c,Ad,c))}var Rd={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},zd=[],Bd=[],Vd=[],Hd=[],Ud=[],Wd=[],Gd=Math.min,Kd=Math.max,qd=Math.cos,Jd=Math.sin,Yd=Math.abs,Xd=Math.PI,Zd=Xd*2,Qd=typeof Float32Array<`u`,$d=[];function ef(e){return Math.round(e/Xd*1e8)/1e8%2*Xd}function tf(e,t){var n=ef(e[0]);n<0&&(n+=Zd);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Zd?i=n+Zd:t&&n-i>=Zd?i=n-Zd:!t&&n>i?i=n+(Zd-ef(n-i)):t&&n0&&(this._ux=Yd(n/Ku/e)||0,this._uy=Yd(n/Ku/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Rd.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Yd(e-this._xi),r=Yd(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Rd.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Rd.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Rd.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),$d[0]=r,$d[1]=i,tf($d,a),r=$d[0],i=$d[1];var o=i-r;return this.addData(Rd.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=qd(i)*n+e,this._yi=Jd(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Rd.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Rd.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Qd&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Vd[0]=Vd[1]=Ud[0]=Ud[1]=Number.MAX_VALUE,Hd[0]=Hd[1]=Wd[0]=Wd[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Yd(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Rd.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=vl(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Rd.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Tl(i,a,y,b,h,g,10),i=h,a=g;break;case Rd.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=qd(D)*T+C,s=Jd(D)*E+w),m=Kd(T,E)*Gd(Zd,Math.abs(O)),i=qd(k)*T+C,a=Jd(k)*E+w;break;case Rd.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Rd.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Rd.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Rd.L:u=n[x++],d=n[x++];var w=Yd(u-c),T=Yd(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Rd.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],M=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;gl(c,k,j,M,D,zd),gl(l,A,ee,N,D,Bd),e.bezierCurveTo(zd[1],Bd[1],zd[2],Bd[2],zd[3],Bd[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,M,N),c=M,l=N;break;case Rd.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Cl(c,k,j,D,zd),Cl(l,A,ee,D,Bd),e.quadraticCurveTo(zd[1],Bd[1],zd[2],Bd[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Rd.A:var te=n[x++],P=n[x++],F=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=!n[x++],se=F>ne?F:ne,ce=Yd(F-ne)>.001,le=re+ie,I=!1;if(f){var E=p[g++];h+E>_&&(le=re+ie*(_-h)/E,I=!0),h+=E}if(ce&&e.ellipse?e.ellipse(te,P,F,ne,ae,re,le,oe):e.arc(te,P,se,re,le,oe),I)break lo;C&&(o=qd(re)*F+te,s=Jd(re)*ne+P),c=qd(le)*F+te,l=Jd(le)*ne+P;break;case Rd.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var L=n[x++],ue=n[x++];if(f){var E=p[g++];if(h+E>_){var de=_-h;e.moveTo(u,d),e.lineTo(u+Gd(de,L),d),de-=L,de>0&&e.lineTo(u+L,d+Gd(de,ue)),de-=ue,de>0&&e.lineTo(u+Kd(L-de,0),d+ue),de-=L,de>0&&e.lineTo(u,d+Kd(ue-de,0));break lo}h+=E}e.rect(u,d,L,ue);break;case Rd.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Rd,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function rf(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=lf);var f=Math.atan2(c,s);return f<0&&(f+=lf),f>=r&&f<=i||f+lf>=r&&f+lf<=i}function df(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var ff=nf.CMD,pf=Math.PI*2,mf=1e-4;function hf(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&vf(),p=fl(t,r,a,s,_f[0]),f>1&&(m=fl(t,r,a,s,_f[1]))),f===2?g<_f[0]?d+=pt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=yl(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);gf[0]=-c,gf[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=pf-1e-4){r=0,i=pf;var u=a?1:-1;return o>=gf[0]+e&&o<=gf[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=pf,i+=pf);for(var f=0,p=0;p<2;p++){var m=gf[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=pf+h),(h>=r&&h<=i||h+pf>=r&&h+pf<=i)&&(h>Math.PI/2&&h1&&(n||(s+=df(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case ff.M:u=a[m++],d=a[m++],c=u,l=d;break;case ff.L:if(n){if(rf(c,l,a[m],a[m+1],t,r,i))return!0}else s+=df(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ff.C:if(n){if(af(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=yf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ff.Q:if(n){if(of(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=bf(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ff.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=df(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(uf(_,v,b,x,x+S,C,t,w,i))return!0}else s+=xf(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case ff.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(rf(u,d,f,d,t,r,i)||rf(f,d,f,p,t,r,i)||rf(f,p,u,p,t,r,i)||rf(u,p,u,d,t,r,i))return!0}else s+=df(f,d,f,p,r,i),s+=df(u,p,u,d,r,i);break;case ff.Z:if(n){if(rf(c,l,u,d,t,r,i))return!0}else s+=df(c,l,u,d,r,i);c=u,l=d}}return!n&&!hf(l,d)&&(s+=df(c,l,u,d,r,i)||0),s!==0}function Cf(e,t,n){return Sf(e,0,!1,t,n)}function wf(e,t,n,r){return Sf(e,t,!0,n,r)}var Tf=Za({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},hd),Ef={style:Za({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},gd.style)},Df=Qc.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Of=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Ju:t>.2?Xu:Yu}if(e)return Yu}return Ju},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(q(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Zl(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new nf(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),wf(a,o/s,e,t)))return!0}if(this.hasFill())return Cf(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:H(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return jo(Tf,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=H({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=H({},r.shape),H(c,n.shape)):(c=H({},i?this.shape:r.shape),H(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=H({},this.shape);for(var l={},u=ao(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var If=Math.round;function Lf(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(If(r*2)===If(i*2)&&(e.x1=e.x2=zf(r,s,!0)),If(a*2)===If(o*2)&&(e.y1=e.y2=zf(a,s,!0)),e):e}}function Rf(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=zf(r,s,!0),e.y=zf(i,s,!0),e.width=Math.max(zf(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(zf(i+o,s,!1)-e.y,o===0?0:1),e):e}}function zf(e,t,n){if(!t)return e;var r=If(e*2);return(r+If(t))%2==0?r/2:(r+(n?1:-1))/2}var Bf=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Vf={},Hf=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Bf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Rf(Vf,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Ff(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Of);Hf.prototype.type=`rect`;var Uf={fill:`#000`},Wf=2,Gf={},Kf={style:Za({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},gd.style)},qf=function(e){B(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Uf,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&op(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=ip(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Af),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=rp(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=np(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Wf,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=vo(s.opacity,t.opacity,1),Qf(p,s),y&&(p.lineWidth=vo(s.lineWidth,t.lineWidth,g),p.lineDash=Y(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Bc(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Hf),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=Y(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Pf),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=Y(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=vo(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return $f(e)&&(t=[e.fontStyle,e.fontWeight,Zf(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&So(t)||e.textFont||e.font},t}(yd),Jf={left:!0,right:1,center:1},Yf={top:1,bottom:1,middle:1},Xf=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Zf(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Qf(e,t){for(var n=0;n0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var Sp=Cp;function Cp(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return wp(e,t,n)}function wp(e,t,n){return q(e)?Ep(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Tp(e){return q(e)&&Ep(e)}function Ep(e){return!!lp(e).match(/%$/)}function Dp(e,t,n){return isNaN(t)?n?``+e:+e:(t=up(dp(0,t),cp),e=(+e).toFixed(t),n?e:+e)}function Op(e){return e.sort(function(e,t){return e-t}),e}function kp(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(pp(e*t)/t===e)return n}return Ap(e)}function Ap(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return dp(0,(a<0?0:i-1-a)-r)}function jp(e,t,n){var r=fp(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=_p(2*fp(n||1)*fp(r))/vp,a=_p(fp(t))/vp,o=dp(0,hp(-i+a));return isFinite(o)||(o=NaN),o}function Mp(e,t){var n=dp(kp(e),kp(t)),r=e+t;return n>cp?r:Dp(r,n)}var Np=gp(2,53)-1;function Pp(e){var t=yp*2;return(e%t+t)%t}function Fp(e){return e>-sp&&e=10&&t++,t}function Bp(e,t){var n=zp(e),r=gp(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,Dp(e,-n)}function Vp(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Fm(){return[1/0,-1/0]}function Im(e,t){Bm(t)&&(te[1]&&(e[1]=t))}function Lm(e,t){Bm(t)&&te[1]&&(e[1]=t)}function zm(e,t){Vm(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Bm(e){return e!=null&&isFinite(e)}function Vm(e,t){return Bm(e)&&Bm(t)&&e<=t}function Hm(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Um(e){Vm(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Wm(){var e=`__ec_once_`+Gm++;return function(t,n){Mo(t,e)||(t[e]=1,n())}}var Gm=Wp();function Km(e,t,n){var r=X(),i=0;U(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function qm(e){return e.value+``}function Jm(e){return e+``}function Ym(e,t){return Y(t,!0)?e.seriesIndex+2:0}function Xm(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Zm(e,t){return{seriesType:e,overallReset:t}}function Qm(e){return{overallReset:e}}var $m=wm(),eh=function(e,t,n,r){if(r){var i=$m(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=$m(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},th=`series`,nh=X([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),rh=`original`,ih=`arrayRows`,ah=`objectRows`,oh=`keyedColumns`,sh=`typedArray`,ch=`unknown`,lh=`column`,uh=`Roam`,dh=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],fh=function(){function e(e){U(dh,function(t){this[t]=so(e[t],e)},this)}return e}();function ph(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var mh=1,hh={},gh=wm(),_h=wm(),vh=[`emphasis`,`blur`,`select`],yh=[`normal`,`emphasis`,`blur`,`select`],bh=`highlight`,xh=`downplay`,Sh=`select`,Ch=`unselect`,wh=`toggleSelect`,Th=`selectchanged`;function Eh(e){return e!=null&&e!==`none`}function Dh(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Oh(e){Dh(e,`emphasis`,2)}function kh(e){e.hoverState===2&&Dh(e,`normal`,0)}function Ah(e){Dh(e,`blur`,1)}function jh(e){e.hoverState===1&&Dh(e,`normal`,0)}function Mh(e){e.selected=!0}function Nh(e){e.selected=!1}function Ph(e,t,n){t(e,n)}function Fh(e,t,n){Ph(e,t,n),e.isGroup&&e.traverse(function(e){Ph(e,t,n)})}function Ih(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Lh(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof Of){var o=gh(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Eh(s)||Eh(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=H({},r),l=H({},l),l.fill=s):!Eh(l.fill)&&Eh(s)?(a=!0,r=H({},r),l=H({},l),l.fill=$l(s)):!Eh(l.stroke)&&Eh(c)&&(a||(r=H({},r),l=H({},l)),l.stroke=$l(c)),r.style=l}}if(r&&r.z2==null){a||(r=H({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function zh(e,t,n){if(n&&n.z2==null){n=H({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Bh(e,t,n){var r=Qa(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Lh(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=H({},n),o=H({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Vh(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Rh(this,e,t,n);if(e===`blur`)return Bh(this,e,n);if(e===`select`)return zh(this,e,n)}return n}function Hh(e){e.stateProxy=Vh;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Vh),n&&(n.stateProxy=Vh)}function Uh(e,t){!Zh(e,t)&&!e.__highByOuter&&Fh(e,Oh)}function Wh(e,t){!Zh(e,t)&&!e.__highByOuter&&Fh(e,kh)}function Gh(e,t){e.__highByOuter|=1<<(t||0),Fh(e,Oh)}function Kh(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Fh(e,kh)}function qh(e){Fh(e,Ah)}function Jh(e){Fh(e,jh)}function Yh(e){Fh(e,Mh)}function Xh(e){Fh(e,Nh)}function Zh(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Qh(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=_h(i),o=ph(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){jh(e)}),s&&n.push(i)),a.isBlured=!1}),U(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function $h(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function cg(e,t,n){hg(e,!0),Fh(e,Hh),dg(e,t,n)}function lg(e){hg(e,!1)}function ug(e,t,n,r){r?lg(e):cg(e,t,n)}function dg(e,t,n){var r=$m(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var fg=[`emphasis`,`blur`,`select`],pg={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function mg(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Eg(m),s*=Eg(m));var h=(i===a?-1:1)*Eg((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Og(d)*g-Dg(d)*_,y=(t+r)/2+Dg(d)*g+Og(d)*_,b=Mg([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Mg(x,S);if(jg(x,S)<=-1&&(C=kg),jg(x,S)>=1&&(C=0),C<0){var w=Math.round(C/kg*1e6)/1e6;C=kg*2+w%2*kg}u.addData(l,v,y,o,s,b,C,d,a)}var Pg=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Fg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ig(e){var t=new nf;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=nf.CMD,c=e.match(Pg);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=Qa(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Qa(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function s_(e){var t;if(G(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function c_(e,t){var n,r=n_(t.r,0),i=n_(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=e_(c-s),p=f>Yg&&f%Yg;if(p>i_&&(f=p),!(r>i_))e.moveTo(l,u);else if(f>Yg-i_)e.moveTo(l+r*Zg(s),u+r*Xg(s)),e.arc(l,u,r,s,c,!d),i>i_&&(e.moveTo(l+i*Zg(c),u+i*Xg(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Zg(s),j=r*Xg(s),ee=i*Zg(c),M=i*Xg(c),N=f>i_;if(N){var te=t.cornerRadius;te&&(n=s_(te),m=n[0],h=n[1],g=n[2],_=n[3]);var P=e_(r-i)/2;if(v=r_(P,g),y=r_(P,_),b=r_(P,m),x=r_(P,h),w=S=n_(v,y),T=C=n_(b,x),(S>i_||C>i_)&&(E=r*Zg(c),D=r*Xg(c),O=i*Zg(s),k=i*Xg(s),fi_){var ce=r_(g,w),le=r_(_,w),I=o_(O,k,A,j,r,ce,d),L=o_(E,D,ee,M,r,le,d);e.moveTo(l+I.cx+I.x0,u+I.cy+I.y0),w0&&e.arc(l+I.cx,u+I.cy,ce,$g(I.y0,I.x0),$g(I.y1,I.x1),!d),e.arc(l,u,r,$g(I.cy+I.y1,I.cx+I.x1),$g(L.cy+L.y1,L.cx+L.x1),!d),le>0&&e.arc(l+L.cx,u+L.cy,le,$g(L.y1,L.x1),$g(L.y0,L.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>i_)||!N)e.lineTo(l+ee,u+M);else if(T>i_){var ce=r_(m,T),le=r_(h,T),I=o_(ee,M,E,D,i,-le,d),L=o_(A,j,O,k,i,-ce,d);e.lineTo(l+I.cx+I.x0,u+I.cy+I.y0),T0&&e.arc(l+I.cx,u+I.cy,le,$g(I.y0,I.x0),$g(I.y1,I.x1),!d),e.arc(l,u,i,$g(I.cy+I.y1,I.cx+I.x1),$g(L.cy+L.y1,L.cx+L.x1),d),ce>0&&e.arc(l+L.cx,u+L.cy,ce,$g(L.y1,L.x1),$g(L.y0,L.x0),!d))}else e.lineTo(l+ee,u+M),e.arc(l,u,i,c,s,d)}e.closePath()}}}var l_=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),u_=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new l_},t.prototype.buildPath=function(e,t){c_(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Of);u_.prototype.type=`sector`;var d_=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),f_=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new d_},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Of);f_.prototype.type=`ring`;function p_(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=p_(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sI_[1]){if(i=!1,L_.negativeSize||n)return i;var s=P_(I_[0]-F_[1]),c=P_(F_[0]-I_[1]);M_(s,c)>z_.len()&&(s=c||!L_.bidirectional)&&(Fs.scale(R_,o,-c*r),L_.useDir&&L_.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function K_(e,t,n,r,i,a){G_(`update`,e,t,n,r,i,a)}function q_(e,t,n,r,i,a){G_(`enter`,e,t,n,r,i,a)}function J_(e){if(!e.__zr)return!0;for(var t=0;tD_,BezierCurve:()=>T_,BoundingRect:()=>Z,Circle:()=>Gg,CompoundPath:()=>O_,Ellipse:()=>qg,Group:()=>Ug,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Pf,IncrementalDisplayable:()=>H_,Line:()=>x_,LinearGradient:()=>A_,OrientedBoundingRect:()=>B_,Path:()=>Of,Point:()=>Fs,Polygon:()=>g_,Polyline:()=>v_,RadialGradient:()=>j_,Rect:()=>Hf,Ring:()=>f_,Sector:()=>u_,Text:()=>qf,WH:()=>nv,XY:()=>tv,applyTransform:()=>_v,calcZ2Range:()=>Bv,clipPointsByRect:()=>Sv,clipRectByRect:()=>Cv,createIcon:()=>wv,decomposeTransform:()=>Wv,ensureCopyRect:()=>Lv,ensureCopyTransform:()=>Rv,expandOrShrinkRect:()=>kv,extendPath:()=>av,extendShape:()=>rv,getCurrentCanvasPainter:()=>Kv,getShapeClass:()=>sv,getTransform:()=>gv,groupTransition:()=>xv,initProps:()=>q_,isBoundingRectAxisAligned:()=>Fv,isElementRemoved:()=>J_,lineLineIntersect:()=>Ev,linePolygonIntersect:()=>Tv,makeImage:()=>lv,makePath:()=>cv,mergePath:()=>dv,payloadDisableAnimation:()=>Uv,registerShape:()=>ov,removeElement:()=>Y_,removeElementWithFadeOut:()=>Z_,resizePath:()=>fv,retrieveZInfo:()=>zv,setTooltipConfig:()=>Mv,subPixelOptimize:()=>hv,subPixelOptimizeLine:()=>pv,subPixelOptimizeRect:()=>mv,transformDirection:()=>vv,traverseElements:()=>Pv,traverseUpdateZ:()=>Vv,updateProps:()=>K_}),ev={},tv=[`x`,`y`],nv=[`width`,`height`];function rv(e){return Of.extend(e)}var iv=Vg;function av(e,t){return iv(e,t)}function ov(e,t){ev[e]=t}function sv(e){if(ev.hasOwnProperty(e))return ev[e]}function cv(e,t,n,r){var i=Bg(e,t);return n&&(r===`center`&&(n=uv(n,i.getBoundingRect())),fv(i,n)),i}function lv(e,t,n){var r=new Pf({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(uv(t,i))}}});return r}function uv(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var dv=Hg;function fv(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function pv(e,t){return Lf(e,e,{lineWidth:t}),e}function mv(e,t){return Rf(e,e,t),e}var hv=zf;function gv(e,t){for(var n=us([]);e&&e!==t;)fs(n,e.getLocalTransform(),n),e=e.parent;return n}function _v(e,t,n){return t&&!to(t)&&(t=Yc.getLocalTransform(t)),n&&(t=gs([],t)),Ms([],e,t)}function vv(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:fp(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:fp(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=_v(a,t,n),fp(a[0])>fp(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function yv(e){return!e.isGroup}function bv(e){return e.shape!=null}function xv(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){yv(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return bv(e)&&(t.shape=V(e.shape)),t}var a=r(e);t.traverse(function(e){if(yv(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),K_(e,r,n,$m(e).dataIndex)}}})}function Sv(e,t){return W(e,function(e){var n=e[0];n=dp(n,t.x),n=up(n,t.x+t.width);var r=e[1];return r=dp(r,t.y),r=up(r,t.y+t.height),[n,r]})}function Cv(e,t){var n=dp(e.x,t.x),r=up(e.x+e.width,t.x+t.width),i=dp(e.y,t.y),a=up(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function wv(e,t,n){var r=H({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),Za(i,n),new Pf(r)):cv(e.replace(`path://`,``),r,n,`center`)}function Tv(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Dv(p,m,u,d)/f;return!(g<0||g>1)}function Dv(e,t,n,r){return e*r-n*t}function Ov(e){return e<=1e-6&&e>=-1e-6}function kv(e,t,n,r,i){return t==null?e:(uo(t)?Av[0]=Av[1]=Av[2]=Av[3]=t:(Av[0]=t[0],Av[1]=t[1],Av[2]=t[2],Av[3]=t[3]),r&&(Av[0]=dp(0,Av[0]),Av[1]=dp(0,Av[1]),Av[2]=dp(0,Av[2]),Av[3]=dp(0,Av[3])),n&&(Av[0]=-Av[0],Av[1]=-Av[1],Av[2]=-Av[2],Av[3]=-Av[3]),jv(e,Av,`x`,`width`,3,1,i&&i[0]||0),jv(e,Av,`y`,`height`,0,2,i&&i[1]||0),e)}var Av=[0,0,0,0];function jv(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=dp(0,up(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:fp(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Mv(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=q(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&U(ao(c),function(e){Mo(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=$m(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:Za({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Nv(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Pv(e,t){if(e){if(G(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Vv(e,t,n){Hv(e,t,n,-1/0)}function Hv(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};qy=(e={},e[ih+`_`+lh]={pure:!0,appendData:i},e[ih+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[ah]={pure:!0,appendData:i},e[oh]={pure:!0,appendData:function(e){var t=this._data;U(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[rh]={appendData:i},e[sh]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){uo(t)||$p(``),this._opFn=hb[e],this._rvalFloat=Hp(t)}return e.prototype.evaluate=function(e){return uo(e)?this._opFn(e,this._rvalFloat):this._opFn(Hp(e),this._rvalFloat)},e})();var gb=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=uo(e)?e:Hp(e),r=uo(t)?t:Hp(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=q(e),s=q(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Hp(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Hp(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function _b(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function vb(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,bb=typeof Uint16Array>`u`?Array:Uint16Array,xb=typeof Int32Array>`u`?Array:Int32Array,Sb=typeof Float64Array>`u`?Array:Float64Array,Cb={float:Sb,int:xb,ordinal:Array,number:Array,time:Sb},wb;function Tb(e){return e>65535?yb:bb}function Eb(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Db(e,t,n,r,i){var a=Cb[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=W(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Tb(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return mb(e[r],this._dimensions[r])}wb={arrayRows:e,objectRows:function(e,t,n,r){return mb(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return mb(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),kb=wm(),Ab={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},jb=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Pb(this.source))},e.prototype.getSourceDimensionIndex=function(e){return Y(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Hy(this.source),n=!Fb(e),r=``,i=[],a=0,o=0;a30}var Ib=J,Lb=W,Rb=typeof Int32Array>`u`?Array:Int32Array,zb=`e\0\0`,Bb=-1,Vb=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Hb=[`_approximateExtent`],Ub,Wb,Gb,Kb,qb,Jb,Yb,Xb=function(){function e(e,t){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`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Mb(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),G(i)?i=i.slice():Ib(i)&&(i=H({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Ib(t)?H(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Ib(e)?H(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?H(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){eh(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){U(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Lb(this.dimensions,this._getDimInfo,this),this.hostModel),qb(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];K(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(yo(arguments)))})},e.internalField=function(){Ub=function(e){var t=e._invertedIndicesMap;U(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Rb(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Zb(e,t){Ny(e)||(e=Fy(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=X(),a=[],o=Qb(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Fb(o),c=r===e.dimensionsDefine,l=c?Pb(e):Nb(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=X(u),f=new xb(o),p=0;p0&&(e.name+=t-1)}),new jb({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Qb(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return U(t,function(e){var t;J(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function $b(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var ex={},tx={},nx=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(ex,!0),this._normalMasterList=n(tx,!1);function n(n,r){var i=[];return U(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){U(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){ex[e]=t;return}tx[e]=t},e.get=function(e){return tx[e]||ex[e]},e}();function rx(e){return!!ex[e]}var ix=X();function ax(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=ix.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function ox(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!rx(n)&&(i=0))}return{coordSysType:n,kind:i}}function sx(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=ox(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var cx=function(){function e(e){this.coordSysDims=[],this.axisMap=X(),this.categoryAxisMap=X(),this.coordSysName=e}return e}();function lx(e){var t=e.get(`coordinateSystem`),n=new cx(t),r=ux[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var ux={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Om).models[0],a=e.getReferringComponents(`yAxis`,Om).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),dx(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),dx(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Om).models[0];t.coordSysDims=[`single`],n.set(`single`,i),dx(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Om).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),dx(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),dx(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();U(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),dx(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Om).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function dx(e){return e.get(`type`)===`category`}function fx(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;px(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(U(a,function(e,t){q(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),U(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;U(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function px(e){return!Mb(e.schema)}function mx(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function hx(e,t){return mx(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function gx(e,t){var n=e.get(`coordinateSystem`),r=nx.get(n),i;return t&&t.coordSysDims&&(i=W(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=db(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function _x(e,t,n){var r,i;return n&&U(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function vx(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Fy(e)):(i=r.getSource(),a=i.sourceFormat===rh);var o=lx(t),s=gx(t,o),c=n.useEncodeDefaulter,l=K(c)?c:c?co(Dy,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Zb(i,u),f=_x(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=fx(t,{schema:d,store:p}),h=new Xb(d,t);h.setCalculationInfo(m);var g=f!=null&&yx(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function yx(e){if(e.sourceFormat===`original`)return!G(om(bx(e.data||[])))}function bx(e){for(var t=0;t=0&&n.push(e)}),n}}function Ex(e,t){return Ya(Ya({},e,!0),t,!0)}var Dx=Math.log(2);function Ox(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){U(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Ix(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?kx(s,o):kx(o,s))}function Lx(e){return e.nodeName.toUpperCase()===`CANVAS`}var Rx=/([&<>"'])/g,zx={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Bx(e){return e==null?``:(e+``).replace(Rx,function(e,t){return zx[t]})}var Vx={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},Hx={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Ux=`ZH`,Wx=`EN`,Gx=Wx,Kx={},qx={},Jx=Io.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Gx).toUpperCase().indexOf(Ux)>-1?Ux:Gx}():Gx;function Yx(e,t){e=e.toUpperCase(),qx[e]=new by(t),Kx[e]=t}function Xx(e){if(q(e)){var t=Kx[e.toUpperCase()]||{};return e===Ux||e===Wx?V(t):Ya(V(t),V(Kx[Gx]),!1)}return Ya(V(e),V(Kx[Gx]),!1)}function Zx(e){return qx[e]}function Qx(){return qx[Gx]}Yx(Wx,Vx),Yx(Ux,Hx);var $x=null;function eS(){return $x}function tS(e,t){var n=eS(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function nS(e){var t=e.brk;return t?t.breaks:[]}function rS(e){var t=e.brk;return t?t.hasBreaks():!1}var iS=1e3,aS=iS*60,oS=aS*60,sS=oS*24,cS=sS*365,lS={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},uS={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},dS=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,fS=`{yyyy}-{MM}-{dd}`,pS={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:fS,hour:fS+` `+uS.hour,minute:fS+` `+uS.minute,second:fS+` `+uS.second,millisecond:dS},mS=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],hS=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function gS(e){return!q(e)&&!K(e)?_S(e):e}function _S(e){e||={};var t={},n=!0;return U(mS,function(t){n&&=e[t]==null}),U(mS,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=mS[s],l=J(a)&&!G(a)?a[c]:a,u=void 0;G(l)?(u=l.slice(),o=u[0]||``):q(l)?(o=l,u=[o]):(o==null?o=uS[r]:lS[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function vS(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function yS(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function bS(e){return e===yS(e)}function xS(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function SS(e,t,n,r){var i=Lp(e),a=i[ES(n)](),o=i[DS(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[OS(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[kS(n)](),d=(u-1)%12+1,f=i[AS(n)](),p=i[jS(n)](),m=i[MS(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof by?r:Zx(r||Jx)||Qx()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,vS(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,vS(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,vS(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,vS(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,vS(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,vS(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,vS(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,vS(m,3)).replace(/{S}/g,m+``)}function CS(e,t,n,r,i){var a=null;if(q(n))a=n;else if(K(n)){var o={time:e.time,level:e.time?e.time.level:0},s=eS();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=wS(e.value,i);a=n[u][u][0]}}return SS(new Date(e.value),a,i,r)}function wS(e,t){var n=Lp(e),r=n[DS(t)]()+1,i=n[OS(t)](),a=n[kS(t)](),o=n[AS(t)](),s=n[jS(t)](),c=n[MS(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function TS(e,t,n){switch(t){case`year`:e[PS(n)](0);case`month`:e[FS(n)](1);case`day`:e[IS(n)](0);case`hour`:e[LS(n)](0);case`minute`:e[RS(n)](0);case`second`:e[zS(n)](0)}return e}function ES(e){return e?`getUTCFullYear`:`getFullYear`}function DS(e){return e?`getUTCMonth`:`getMonth`}function OS(e){return e?`getUTCDate`:`getDate`}function kS(e){return e?`getUTCHours`:`getHours`}function AS(e){return e?`getUTCMinutes`:`getMinutes`}function jS(e){return e?`getUTCSeconds`:`getSeconds`}function MS(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function NS(e){return e?`setUTCFullYear`:`setFullYear`}function PS(e){return e?`setUTCMonth`:`setMonth`}function FS(e){return e?`setUTCDate`:`setDate`}function IS(e){return e?`setUTCHours`:`setHours`}function LS(e){return e?`setUTCMinutes`:`setMinutes`}function RS(e){return e?`setUTCSeconds`:`setSeconds`}function zS(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function BS(e){if(!Up(e))return q(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function VS(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var HS=bo;function US(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&So(e)?e:`-`}function a(e){return qp(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Lp(e):e;if(!isNaN(+c))return SS(c,r,n);if(s)return`-`}if(t===`ordinal`)return lo(e)?i(e):uo(e)&&a(e)?e+``:`-`;var l=Hp(e);return a(l)?BS(l):lo(e)?i(e):typeof e==`boolean`?e+``:`-`}var WS=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],GS=function(e,t){return`{`+e+(t??``)+`}`};function KS(e,t,n){G(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function JS(e,t){return t||=`transparent`,q(e)?e:J(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var YS=U,XS=[`left`,`right`,`top`,`bottom`,`width`,`height`],ZS=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function QS(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var $S=QS;co(QS,`vertical`),co(QS,`horizontal`);function eC(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function tC(e,t,n){n=HS(n||0);var r=t.width,i=t.height,a=Sp(e.left,r),o=Sp(e.top,i),s=Sp(e.right,r),c=Sp(e.bottom,i),l=Sp(e.width,r),u=Sp(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Z((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function nC(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=Ya(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return km(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return eC(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(by);Ko(dC,by),Zo(dC),Cx(dC),Tx(dC,fC);function fC(e){var t=[];return U(dC.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=W(t,function(e){return Vo(e).main}),e!==`dataset`&&Qa(t,`dataset`)<=0&&t.unshift(`dataset`),t}var pC=wm(),mC=wm(),hC=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=rm(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return vC(this,pC,r,i,e,t,n)},e.prototype.clearColorPalette=function(){yC(this,pC)},e}();function gC(e,t,n,r){return vC(e,mC,rm(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function _C(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function vC(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:_C(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function yC(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var bC=/\{@(.+?)\}/g,xC=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&G(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),K(i))return s.status=t,s.dimensionIndex=r,i(s);if(q(i))return KS(i,s).replace(bC,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=sb(o,e,i);if(a&&G(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return sb(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function SC(e){var t,n;return J(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function CC(e){return new wC(e)}var wC=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(RC(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=po(o)?sh:rh,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=Y(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=Y(u.sourceHeader,d.sourceHeader),m=Y(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Py(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Py(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&zC(``);var i,a=[],o=[];return U(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&zC(``),a.push(t),o.push(e._getVersionSign())}),n?i=PC(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Iy(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t{L(e)}):L(e)}function L(e){if(e)try{e.body&&de(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function ue(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function de(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function fe(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:ye(r);let i=be(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+b(s.paddingLeft)+b(o.marginLeft),top:-i.offsetTop+b(s.paddingTop)+b(o.marginTop),right:F(a)-te(i)-i.offsetLeft+b(s.paddingRight)-b(o.marginRight),bottom:P(a)-N(i)-i.offsetTop+b(s.paddingBottom)-b(o.marginBottom)}}return y(r.right)&&(t=Math.min(t,r.right)),y(r.bottom)&&(n=Math.min(n,r.bottom)),y(r.left)&&(t=Math.max(t,r.left)),y(r.top)&&(n=Math.max(n,r.top)),[t,n]}function pe(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function me(e){return e.props.axis===`both`||e.props.axis===`x`}function he(e){return e.props.axis===`both`||e.props.axis===`y`}function ge(e,t,n){let r=typeof t==`number`?oe(e,t):null;if(typeof t==`number`&&!r)return null;let i=be(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return ne(r||e,a,n.props.scale)}function _e(e,t,n){let r=!y(e.lastX),i=be(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function ve(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function ye(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function be(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var xe=u(S()),Se=u(Yr()),Ce=u(k()),we=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},Te={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},Ee=Te.mouse,De=class extends xe.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!j(e.target,this.props.handle,t)||this.props.cancel&&j(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=se(e);this.touchIdentifier=r;let i=ge(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=_e(this,a,o);we(`DraggableCore: handleDragStart: %j`,s),we(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&le(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,ee(n,Ee.move,this.handleDrag),ee(n,Ee.stop,this.handleDragStop))},this.handleDrag=e=>{let t=ge(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=pe(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=_e(this,n,r);if(we(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=ge(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=pe(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=_e(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&I(a.ownerDocument),we(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(we(`DraggableCore: Removing handlers`),M(a.ownerDocument,Ee.move,this.handleDrag),M(a.ownerDocument,Ee.stop,this.handleDragStop))},this.onMouseDown=e=>(Ee=Te.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(Ee=Te.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(Ee=Te.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(Ee=Te.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&ee(e,Te.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;M(t,Te.mouse.move,this.handleDrag),M(t,Te.touch.move,this.handleDrag),M(t,Te.mouse.stop,this.handleDragStop),M(t,Te.touch.stop,this.handleDragStop),M(e,Te.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&I(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Ce.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(we(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return xe.cloneElement(xe.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};De.displayName=`DraggableCore`,De.propTypes={allowAnyClick:Se.default.bool,allowMobileScroll:Se.default.bool,children:Se.default.node.isRequired,disabled:Se.default.bool,enableUserSelectHack:Se.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Se.default.arrayOf(Se.default.number),handle:Se.default.string,cancel:Se.default.string,nodeRef:Se.default.object,nonce:Se.default.string,onStart:Se.default.func,onDrag:Se.default.func,onStop:Se.default.func,onMouseDown:Se.default.func,scale:Se.default.number,className:x,style:x,transform:x},De.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Oe=class extends p.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(we(`Draggable: onDragStart: %j`,t),this.props.onStart(e,ve(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;we(`Draggable: onDrag: %j`,t);let n=ve(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=fe(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,ve(this,t))===!1)return!1;we(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(we(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=h.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,m=!s||this.state.dragging,h=s||r,_={x:me(this)&&m?this.state.x:h.x,y:he(this)&&m?this.state.y:h.y};this.state.isElementSVG?f=ie(_,c):d=re(_,c);let v=p.Children.only(n),y=(0,g.clsx)(v.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return p.createElement(De,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},p.cloneElement(v,{className:y,style:{...v.props.style,...d},transform:f}))}};Oe.displayName=`Draggable`,Oe.propTypes={...De.propTypes,axis:m.default.oneOf([`both`,`x`,`y`,`none`]),bounds:m.default.oneOfType([m.default.shape({left:m.default.number,right:m.default.number,top:m.default.number,bottom:m.default.number}),m.default.string,m.default.oneOf([!1])]),defaultClassName:m.default.string,defaultClassNameDragging:m.default.string,defaultClassNameDragged:m.default.string,defaultPosition:m.default.shape({x:m.default.number,y:m.default.number}),positionOffset:m.default.shape({x:m.default.oneOfType([m.default.number,m.default.string]),y:m.default.oneOfType([m.default.number,m.default.string])}),position:m.default.shape({x:m.default.number,y:m.default.number}),className:x,style:x,transform:x},Oe.defaultProps={...De.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1},0&&(t.exports={DraggableCore:De})})),Gi=b(((e,t)=>{var n=Wi(),r=n.DraggableCore,i=n.default||n;t.exports=i,t.exports.default=i,t.exports.DraggableCore=r})),Ki=b((e=>{e.__esModule=!0,e.cloneElement=c;var t=n(S());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{e.__esModule=!0,e.resizableProps=void 0;var t=n(Yr());Gi();function n(e){return e&&e.__esModule?e:{default:e}}e.resizableProps={axis:t.default.oneOf([`both`,`x`,`y`,`none`]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:typeof Element<`u`?t.default.instanceOf(Element):t.default.any,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`y`?t.default.number.isRequired(...e):t.default.number(...e)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),transformScale:t.default.number,width:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`x`?t.default.number.isRequired(...e):t.default.number(...e)}}})),Ji=b((e=>{e.__esModule=!0,e.default=void 0;var t=o(S()),n=Gi(),r=Ki(),i=qi(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.abs(i*n)?t=e/n:e=t*n}let o=e,s=t,c=this.slack||[0,0],l=c[0],u=c[1];return e+=l,t+=u,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[l+(o-e),u+(s-t)],[e,t]}resizeHandler(e,t){return(n,r)=>{let i=r.node,a=r.deltaX,o=r.deltaY;e===`onResizeStart`&&this.resetData();let s=(this.props.axis===`both`||this.props.axis===`x`)&&t!==`n`&&t!==`s`,c=(this.props.axis===`both`||this.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!s&&!c)return;let l=t[0],u=t[t.length-1],d=i.getBoundingClientRect();if(this.lastHandleRect!=null){if(u===`w`){let e=d.left-this.lastHandleRect.left;a+=e}if(l===`n`){let e=d.top-this.lastHandleRect.top;o+=e}}this.lastHandleRect=d,u===`w`&&(a=-a),l===`n`&&(o=-o);let f=this.lastSize?.width??this.props.width,p=this.lastSize?.height??this.props.height,m=f+(s?a/this.props.transformScale:0),h=p+(c?o/this.props.transformScale:0);var g=this.runConstraints(m,h);if(m=g[0],h=g[1],e===`onResizeStop`&&this.lastSize){var _=this.lastSize;m=_.width,h=_.height}let v=m!==f||h!==p;e!==`onResizeStop`&&(this.lastSize={width:m,height:h});let y=typeof this.props[e]==`function`?this.props[e]:null;y&&(e!==`onResize`||v)&&(n.persist==null||n.persist(),y(n,{node:i,size:{width:m,height:h},handle:t})),e===`onResizeStop`&&this.resetData()}}renderResizeHandle(e,n){let r=this.props.handle;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-`+e,ref:n});if(typeof r==`function`)return r(e,n);let i=typeof r.type==`string`,a=u({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)}render(){let e=this.props,i=e.children,o=e.className,l=e.draggableOpts;e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart;let d=e.resizeHandles;e.transformScale;let f=c(e,a);return(0,r.cloneElement)(i,u(u({},f),{},{className:(o?o+` `:``)+`react-resizable`,children:[...t.Children.toArray(i.props.children),...d.map(e=>{let r=this.handleRefs[e]??(this.handleRefs[e]=t.createRef());return t.createElement(n.DraggableCore,s({},l,{nodeRef:r,key:`resizableHandle-`+e,onStop:this.resizeHandler(`onResizeStop`,e),onStart:this.resizeHandler(`onResizeStart`,e),onDrag:this.resizeHandler(`onResize`,e)}),this.renderResizeHandle(e,r))})]}))}};e.default=m,m.propTypes=i.resizableProps,m.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Yi=b((e=>{e.__esModule=!0,e.default=void 0;var t=s(S()),n=o(Yr()),r=o(Ji()),i=qi(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n=t.size;this.props.onResize?(e.persist==null||e.persist(),this.setState(n,()=>this.props.onResize&&this.props.onResize(e,t))):this.setState(n)}}static getDerivedStateFromProps(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null}render(){let e=this.props,n=e.handle,i=e.handleSize;e.onResize;let o=e.onResizeStart,s=e.onResizeStop,l=e.draggableOpts,d=e.minConstraints,f=e.maxConstraints,p=e.lockAspectRatio,h=e.axis;e.width,e.height;let g=e.resizeHandles,_=e.style,v=e.transformScale,y=m(e,a);return t.createElement(r.default,{axis:h,draggableOpts:l,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:f,minConstraints:d,onResizeStart:o,onResize:this.onResize,onResizeStop:s,resizeHandles:g,transformScale:v,width:this.state.width},t.createElement(`div`,c({},y,{style:u(u({},_),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))}};e.default=h,h.propTypes=u(u({},i.resizableProps),{},{children:n.default.element})})),Xi=b(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Ji().default,t.exports.ResizableBox=Yi().default})),Zi=b(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function ee(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=ee,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),Qi=Xi(),$i=Zi();function ea(e){let{children:t,cols:n,containerWidth:r,margin:i,containerPadding:a,rowHeight:s,maxRows:c,isDraggable:l,isResizable:u,isBounded:d,static:f,useCSSTransforms:p=!0,usePercentages:m=!1,transformScale:h=1,positionStrategy:g,dragThreshold:_=0,droppingPosition:v,className:y=``,style:b,handle:x=``,cancel:S=``,x:C,y:w,w:T,h:E,minW:D=1,maxW:O=1/0,minH:k=1,maxH:A=1/0,i:j,resizeHandles:ee,resizeHandle:M,constraints:N=cr,layoutItem:te,layout:P=[],onDragStart:F,onDrag:ne,onDragStop:re,onResizeStart:ie,onResize:ae,onResizeStop:oe}=e,[se,ce]=(0,R.useState)(!1),[le,I]=(0,R.useState)(!1),L=(0,R.useRef)(null),ue=(0,R.useRef)({left:0,top:0}),de=(0,R.useRef)({top:0,left:0,width:0,height:0}),fe=(0,R.useRef)(void 0),pe=(0,R.useRef)(P);pe.current=P;let me=(0,R.useRef)(null),he=(0,R.useRef)(null),ge=(0,R.useRef)(!1),_e=(0,R.useRef)({x:0,y:0}),ve=(0,R.useRef)(!1),ye=(0,R.useMemo)(()=>({cols:n,containerPadding:a,containerWidth:r,margin:i,maxRows:c,rowHeight:s}),[n,a,r,i,c,s]),be=(0,R.useMemo)(()=>({cols:n,maxRows:c,containerWidth:r,containerHeight:0,rowHeight:s,margin:i,layout:[]}),[n,c,r,s,i]),xe=(0,R.useCallback)(()=>({...be,layout:pe.current}),[be]),Se=(0,R.useMemo)(()=>te??{i:j,x:C,y:w,w:T,h:E,minW:D,maxW:O,minH:k,maxH:A},[te,j,C,w,T,E,D,O,k,A]),Ce=(0,R.useCallback)(e=>{if(g?.calcStyle)return g.calcStyle(e);if(p)return dr(e);let t=fr(e);return m?{...t,left:pr(e.left/r),width:pr(e.width/r)}:t},[g,p,m,r]),we=(0,R.useCallback)((e,{node:t})=>{if(!F)return;let{offsetParent:n}=t;if(!n)return;let r=n.getBoundingClientRect(),i=t.getBoundingClientRect(),a=i.left/h,o=r.left/h,s=i.top/h,c=r.top/h,l;if(g?.calcDragPosition){let t=e;l=g.calcDragPosition(t.clientX,t.clientY,t.clientX-i.left,t.clientY-i.top)}else l={left:a-o+n.scrollLeft,top:s-c+n.scrollTop};if(ue.current=l,_>0){let t=e;_e.current={x:t.clientX,y:t.clientY},ge.current=!0,ve.current=!1,ce(!0);return}ce(!0);let u=Hn(ye,l.top,l.left),{x:d,y:f}=lr(N,Se,u.x,u.y,xe());F(j,d,f,{e,node:t,newPosition:l})},[F,h,ye,g,_,N,Se,xe,j]),Te=(0,R.useCallback)((e,{node:t,deltaX:n,deltaY:a})=>{if(!ne||!se)return;let o=e;if(ge.current&&!ve.current){let n=o.clientX-_e.current.x,r=o.clientY-_e.current.y;if(Math.hypot(n,r)<_)return;if(ve.current=!0,ge.current=!1,F){let n=Hn(ye,ue.current.top,ue.current.left),{x:r,y:i}=lr(N,Se,n.x,n.y,xe());F(j,r,i,{e,node:t,newPosition:ue.current})}}let c=ue.current.top+a,l=ue.current.left+n;if(d){let{offsetParent:e}=t;if(e){let t=e.clientHeight-zn(E,s,i[1]);c=Wn(c,0,t);let n=Rn(ye),a=r-zn(T,n,i[0]);l=Wn(l,0,a)}}let u={top:c,left:l};ue.current=u;let f=Hn(ye,c,l),{x:p,y:m}=lr(N,Se,f.x,f.y,xe());ne(j,p,m,{e,node:t,newPosition:u})},[ne,F,se,_,d,E,s,i,ye,r,T,j,N,Se,xe]),Ee=(0,R.useCallback)((e,{node:t})=>{if(!re||!se)return;let n=ge.current;if(ge.current=!1,ve.current=!1,_e.current={x:0,y:0},n){ce(!1),ue.current={left:0,top:0};return}let{left:r,top:i}=ue.current,a={top:i,left:r};ce(!1),ue.current={left:0,top:0};let o=Hn(ye,i,r),{x:s,y:c}=lr(N,Se,o.x,o.y,xe());re(j,s,c,{e,node:t,newPosition:a})},[re,se,ye,N,Se,xe,j]);me.current=we,he.current=Te;let De=(0,R.useCallback)((e,{node:t,size:n,handle:i},a,o)=>{let s=o===`onResizeStart`?ie:o===`onResize`?ae:oe;if(!s)return;let c;c=t?Cr(i,a,n,r):{...n,top:a.top,left:a.left},de.current=c;let l=Un(ye,c.width,c.height),{w:u,h:d}=ur(N,Se,l.w,l.h,i,xe());s(j,u,d,{e:e.nativeEvent??e,node:t,size:c,handle:i})},[ie,ae,oe,r,ye,j,N,Se,xe]),Oe=(0,R.useCallback)((e,t)=>{I(!0);let n=Bn(ye,C,w,T,E),r={...t,handle:t.handle};De(e,r,n,`onResizeStart`)},[De,ye,C,w,T,E]),ke=(0,R.useCallback)((e,t)=>{let n=Bn(ye,C,w,T,E),r={...t,handle:t.handle};De(e,r,n,`onResize`)},[De,ye,C,w,T,E]),Ae=(0,R.useCallback)((e,t)=>{I(!1),de.current={top:0,left:0,width:0,height:0};let n=Bn(ye,C,w,T,E),r={...t,handle:t.handle};De(e,r,n,`onResizeStop`)},[De,ye,C,w,T,E]);(0,R.useEffect)(()=>{if(!v)return;let e=L.current;if(!e)return;let t=fe.current||{left:0,top:0},n=se&&(v.left!==t.left||v.top!==t.top);if(!se){let t={node:e,deltaX:v.left,deltaY:v.top,lastX:0,lastY:0,x:v.left,y:v.top};me.current?.(v.e,t)}else if(n){let t={node:e,deltaX:v.left-ue.current.left,deltaY:v.top-ue.current.top,lastX:ue.current.left,lastY:ue.current.top,x:v.left,y:v.top};he.current?.(v.e,t)}fe.current=v},[v,se,j]);let je=Bn(ye,C,w,T,E,se?ue.current:null,le?de.current:null),Me=R.Children.only(t),Ne=Rn(ye),Pe=[zn(D,Ne,i[0]),zn(k,s,i[1])],Fe=[zn(O,Ne,i[0]),zn(A,s,i[1])],Ie=Me.props,Le=Ie.className,Re=Ie.style,ze=R.cloneElement(Me,{ref:L,className:o(`react-grid-item`,Le,y,{static:f,resizing:le,"react-draggable":l,"react-draggable-dragging":se,dropping:!!v,cssTransforms:p}),style:{...b,...Re,...Ce(je)}}),Be=M;return ze=(0,z.jsx)(Qi.Resizable,{draggableOpts:{disabled:!u},className:u?void 0:`react-resizable-hide`,width:je.width,height:je.height,minConstraints:Pe,maxConstraints:Fe,onResizeStart:Oe,onResize:ke,onResizeStop:Ae,transformScale:h,resizeHandles:ee,handle:Be,children:ze}),ze=(0,z.jsx)(Vi,{disabled:!l,onStart:we,onDrag:Te,onStop:Ee,handle:x,cancel:`.react-resizable-handle`+(S?`,`+S:``),scale:h,nodeRef:L,children:ze}),ze}var ta=()=>{},na=`react-grid-layout`,ra=!1;try{ra=/firefox/i.test(navigator.userAgent)}catch{}function ia(e,t){let n=R.Children.toArray(e),r=R.Children.toArray(t);if(n.length!==r.length)return!1;for(let e=0;e{if(!R.isValidElement(t)||t.key===null)return;let n=String(t.key);a.add(n);let r=e.find(e=>e.i===n);if(r)i.push(er(r));else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Zn(i),w:1,h:1})}});let o=ir(i,{cols:n});return r.compact(o,n)}function oa(e){let{children:t,width:n,gridConfig:r,dragConfig:i,resizeConfig:a,dropConfig:s,positionStrategy:c=Dr,compactor:l,constraints:u=cr,layout:d=[],droppingItem:f,autoSize:p=!0,className:m=``,style:h={},innerRef:g,onLayoutChange:_=ta,onDragStart:v=ta,onDrag:y=ta,onDragStop:b=ta,onResizeStart:x=ta,onResize:S=ta,onResizeStop:C=ta,onDrop:w=ta,onDropDragOver:T=ta}=e,E=(0,R.useMemo)(()=>({...Or,...r}),[r]),D=(0,R.useMemo)(()=>({...kr,...i}),[i]),O=(0,R.useMemo)(()=>({...Ar,...a}),[a]),k=(0,R.useMemo)(()=>({...jr,...s}),[s]),{cols:A,rowHeight:j,maxRows:ee,margin:M,containerPadding:N}=E,{enabled:te,bounded:P,handle:F,cancel:ne,threshold:re}=D,{enabled:ie,handles:ae,handleComponent:oe}=O,{enabled:se,defaultItem:ce,onDragOver:le}=k,I=l??Vr(`vertical`),L=I.type,ue=I.allowOverlap,de=I.preventCollision??!1,fe=(0,R.useMemo)(()=>f??{i:`__dropping-elem__`,...ce},[f,ce]),pe=c.type===`transform`,me=c.scale,he=N??M,[ge,_e]=(0,R.useState)(!1),[ve,ye]=(0,R.useState)(()=>aa(d,t,A,I)),[be,xe]=(0,R.useState)(null),[Se,Ce]=(0,R.useState)(!1),[we,Te]=(0,R.useState)(null),[Ee,De]=(0,R.useState)(),Oe=(0,R.useRef)(null),ke=(0,R.useRef)(null),Ae=(0,R.useRef)(null),je=(0,R.useRef)(0),Me=(0,R.useRef)(ve),Ne=(0,R.useRef)(d),Pe=(0,R.useRef)(t),Fe=(0,R.useRef)(L),Ie=(0,R.useRef)(ve);Ie.current=ve,(0,R.useEffect)(()=>{_e(!0),(0,$i.deepEqual)(ve,d)||_(ve)},[]),(0,R.useEffect)(()=>{if(be||we)return;let e=!(0,$i.deepEqual)(d,Ne.current),n=!ia(t,Pe.current),r=L!==Fe.current;if(e||n||r){let n=aa(e?d:ve,t,A,I);(0,$i.deepEqual)(n,ve)||ye(n)}Ne.current=d,Pe.current=t,Fe.current=L},[d,t,A,L,I,be,we,ve]),(0,R.useEffect)(()=>{if(!be&&!(0,$i.deepEqual)(ve,Me.current)){Me.current=ve;let e=ve.filter(e=>e.i!==fe.i);_(e)}},[ve,be,_,fe.i]);let Le=(0,R.useMemo)(()=>{if(!p)return;let e=Zn(ve),t=he[1];return e*j+(e-1)*M[1]+t*2+`px`},[p,ve,j,M,he]),Re=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=Qn(i,e);if(!a)return;let o={w:a.w,h:a.h,x:a.x,y:a.y,i:e};Oe.current=er(a),Ae.current=i,xe(o),v(i,a,a,null,r.e,r.node)},[v]),ze=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=Oe.current,o=Qn(i,e);if(!o)return;let s={w:o.w,h:o.h,x:o.x,y:o.y,i:e},c=ar(i,o,t,n,!0,de,L,A,ue);y(c,a,o,s,r.e,r.node),ye(I.compact(c,A)),xe(s)},[de,L,A,ue,I,y]),Be=(0,R.useCallback)((e,t,n,r)=>{if(!be)return;let i=Ie.current,a=Oe.current,o=Qn(i,e);if(!o)return;let s=ar(i,o,t,n,!0,de,L,A,ue),c=I.compact(s,A);b(c,a,o,null,r.e,r.node);let l=Ae.current;Oe.current=null,Ae.current=null,xe(null),ye(c),l&&!(0,$i.deepEqual)(l,c)&&_(c)},[be,de,L,A,ue,I,b,_]),Ve=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=Qn(i,e);a&&(ke.current=er(a),Ae.current=i,Ce(!0),x(i,a,a,null,r.e,r.node))},[x]),He=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=ke.current,{handle:o}=r,s=!1,c,l,[u,d]=rr(i,e,e=>(c=e.x,l=e.y,[`sw`,`w`,`nw`,`n`,`ne`].includes(o)&&([`sw`,`nw`,`w`].includes(o)&&(c=e.x+(e.w-t),t=e.x!==c&&c<0?e.w:t,c=c<0?0:c),[`ne`,`n`,`nw`].includes(o)&&(l=e.y+(e.h-n),n=e.y!==l&&l<0?e.h:n,l=l<0?0:l),s=!0),de&&!ue&&qn(i,{...e,w:t,h:n,x:c??e.x,y:l??e.y}).filter(t=>t.i!==e.i).length>0&&(l=e.y,n=e.h,c=e.x,t=e.w,s=!1),e.w=t,e.h=n,e));if(!d)return;let f=u;s&&c!==void 0&&l!==void 0&&(f=ar(u,d,c,l,!0,de,L,A,ue));let p={w:d.w,h:d.h,x:d.x,y:d.y,i:e,static:!0};S(f,a,d,p,r.e,r.node),ye(I.compact(f,A)),xe(p)},[de,L,A,ue,I,S]),Ue=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=ke.current,o=Qn(i,e),s=I.compact(i,A);C(s,a,o??null,null,r.e,r.node);let c=Ae.current;ke.current=null,Ae.current=null,xe(null),Ce(!1),ye(s),c&&!(0,$i.deepEqual)(c,s)&&_(s)},[A,I,C,_]),We=(0,R.useCallback)(()=>{let e=Ie.current;if(!e.some(e=>e.i===fe.i)){Te(null),xe(null),De(void 0);return}let t=I.compact(e.filter(e=>e.i!==fe.i),A);ye(t),Te(null),xe(null),De(void 0)},[fe.i,A,I]),Ge=(0,R.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),ra&&!e.nativeEvent.target?.classList.contains(na))return!1;let t=le?le(e.nativeEvent):T(e);if(t===!1)return we&&We(),!1;let{dragOffsetX:r=0,dragOffsetY:i=0,...a}=t??{},o={...fe,...a},s=e.currentTarget.getBoundingClientRect(),c={cols:A,margin:M,maxRows:ee,rowHeight:j,containerWidth:n,containerPadding:he},l=Rn(c),u=zn(o.w,l,M[0]),d=zn(o.h,j,M[1]),f=u/2,p=d/2,m=e.clientX-s.left+r-f,h=e.clientY-s.top+i-p,g=Math.max(0,m),_=Math.max(0,h),v={left:g/me,top:_/me,e:e.nativeEvent};if(we)Ee&&(Ee.left!==v.left||Ee.top!==v.top)&&De(v);else{let e=Vn(c,_,g,o.w,o.h);Te((0,z.jsx)(`div`,{},o.i)),De(v);let t=Ie.current.filter(e=>e.i!==o.i);ye([...t,{...o,x:e.x,y:e.y,static:!1,isDraggable:!0}])}},[we,Ee,fe,le,T,We,me,A,M,ee,j,n,he]),Ke=(0,R.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),je.current--,je.current<0&&(je.current=0),je.current===0&&We()},[We]),qe=(0,R.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),je.current++},[]),Je=(0,R.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=Ie.current,n=t.find(e=>e.i===fe.i);je.current=0,We(),w(t,n,e.nativeEvent)},[fe.i,We,w]),Ye=(0,R.useCallback)((e,t)=>{if(!e||!e.key)return null;let r=Qn(ve,String(e.key));if(!r)return null;let i=typeof r.isDraggable==`boolean`?r.isDraggable:!r.static&&te,a=typeof r.isResizable==`boolean`?r.isResizable:!r.static&&ie,o=r.resizeHandles||[...ae],s=i&&P&&r.isBounded!==!1,l=oe;return(0,z.jsx)(ea,{containerWidth:n,cols:A,margin:M,containerPadding:he,maxRows:ee,rowHeight:j,cancel:ne,handle:F,onDragStart:Re,onDrag:ze,onDragStop:Be,onResizeStart:Ve,onResize:He,onResizeStop:Ue,isDraggable:i,isResizable:a,isBounded:s,useCSSTransforms:pe&&ge,usePercentages:!ge,transformScale:me,positionStrategy:c,dragThreshold:re,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:t?Ee:void 0,resizeHandles:o,resizeHandle:l,constraints:u,layoutItem:r,layout:ve,children:e},r.i)},[ve,n,A,M,he,ee,j,ne,F,Re,ze,Be,Ve,He,Ue,te,ie,P,pe,ge,me,c,re,Ee,ae,oe,u]),Xe=()=>be?(0,z.jsx)(ea,{w:be.w,h:be.h,x:be.x,y:be.y,i:be.i,className:`react-grid-placeholder ${Se?`placeholder-resizing`:``}`,containerWidth:n,cols:A,margin:M,containerPadding:he,maxRows:ee,rowHeight:j,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:pe,transformScale:me,constraints:u,layout:ve,children:(0,z.jsx)(`div`,{})}):null,Ze=o(na,m),Qe={height:Le,...h};return(0,z.jsxs)(`div`,{ref:g,className:Ze,style:Qe,onDrop:se?Je:void 0,onDragLeave:se?Ke:void 0,onDragEnter:se?qe:void 0,onDragOver:se?Ge:void 0,children:[R.Children.map(t,e=>R.isValidElement(e)?Ye(e):null),se&&we&&Ye(we,!0),Xe()]})}var sa={lg:1200,md:996,sm:768,xs:480,xxs:0},ca={lg:12,md:10,sm:6,xs:4,xxs:2},la=()=>{};function ua(e,t,n,r){let i=[];R.Children.forEach(t,t=>{if(!R.isValidElement(t)||t.key===null)return;let n=String(t.key),r=e.find(e=>e.i===n);if(r)i.push({...r,i:n});else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Zn(i),w:1,h:1})}});let a=ir(i,{cols:n});return r.compact(a,n)}function da(e){let{children:t,width:n,breakpoint:r,breakpoints:i=sa,cols:a=ca,layouts:o={},rowHeight:s=150,maxRows:c=1/0,margin:l=[10,10],containerPadding:u=null,compactor:d,onBreakpointChange:f=la,onLayoutChange:p=la,onWidthChange:m=la,...h}=e,g=d??Vr(`vertical`),_=g.type,v=g.allowOverlap,y=(0,R.useMemo)(()=>r??Ur(i,n),[]),b=(0,R.useMemo)(()=>Wr(y,a),[y,a]),x=(0,R.useMemo)(()=>Gr(o,i,y,y,b,_),[]),[S,C]=(0,R.useState)(y),[w,T]=(0,R.useState)(b),[E,D]=(0,R.useState)(x),[O,k]=(0,R.useState)(o),A=(0,R.useRef)(n),j=(0,R.useRef)(r),ee=(0,R.useRef)(i),M=(0,R.useRef)(a),N=(0,R.useRef)(o),te=(0,R.useRef)(_),P=(0,R.useRef)(O);(0,R.useEffect)(()=>{P.current=O},[O]);let F=(0,R.useMemo)(()=>(0,$i.deepEqual)(o,N.current)?null:Gr(o,i,S,S,w,g),[o,i,S,w,g]),ne=F??E;(0,R.useEffect)(()=>{F!==null&&(D(F),k(o),P.current=o,N.current=o)},[F,o]),(0,R.useEffect)(()=>{if(_!==te.current){let e=g.compact(tr(ne),w),t={...P.current,[S]:e};D(e),k(t),P.current=t,p(e,t),te.current=_}},[_,g,ne,w,v,S,p]),(0,R.useEffect)(()=>{let e=n!==A.current,o=r!==j.current,s=!(0,$i.deepEqual)(i,ee.current),c=!(0,$i.deepEqual)(a,M.current);if(e||o||s||c){let e=r??Ur(i,n),o=Wr(e,a),d=S;if(d!==e||s||c){let n={...P.current};n[d]||(n[d]=tr(E));let r=Gr(n,i,e,d,o,g);r=ua(r,t,o,g),n[e]=r,C(e),T(o),D(r),k(n),P.current=n,f(e,o),p(r,n)}let h=Kr(l,e),_=u?Kr(u,e):null;m(n,h,o,_),A.current=n,j.current=r,ee.current=i,M.current=a}},[n,r,i,a,S,w,E,t,g,_,v,l,u,f,p,m]);let re=(0,R.useCallback)(e=>{let t={...P.current,[S]:e};D(e),k(t),P.current=t,p(e,t)},[S,p]),ie=(0,R.useMemo)(()=>Kr(l,S),[l,S]),ae=(0,R.useMemo)(()=>u===null?null:Kr(u,S),[u,S]),oe=(0,R.useMemo)(()=>({cols:w,rowHeight:s,maxRows:c,margin:ie,containerPadding:ae}),[w,s,c,ie,ae]);return(0,z.jsx)(oa,{...h,width:n,gridConfig:oe,compactor:g,onLayoutChange:re,layout:ne,children:t})}function fa(e){let{children:t,width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,rowHeight:u,maxRows:d,margin:f,containerPadding:p,droppingItem:m,compactType:h,preventCollision:g=!1,allowOverlap:_=!1,verticalCompact:v,isDraggable:y=!0,isBounded:b=!1,draggableHandle:x,draggableCancel:S,isResizable:C=!0,resizeHandles:w=[`se`],resizeHandle:T,isDroppable:E=!1,useCSSTransforms:D=!0,transformScale:O=1,autoSize:k,className:A,style:j,innerRef:ee,onDragStart:M,onDrag:N,onDragStop:te,onResizeStart:P,onResize:F,onResizeStop:ne,onDrop:re,onDropDragOver:ie}=e,ae=h===void 0?`vertical`:h;v===!1&&(ae=null);let oe={enabled:y,bounded:b,handle:x,cancel:S},se={enabled:C,handles:w,handleComponent:T},ce={enabled:E},le;le=D?O===1?wr:Er(O):Tr;let I=Vr(ae,_,g);return(0,z.jsx)(da,{width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,rowHeight:u,maxRows:d,margin:f,containerPadding:p,compactor:I,dragConfig:oe,resizeConfig:se,dropConfig:ce,positionStrategy:le,droppingItem:m,autoSize:k,className:A,style:j,innerRef:ee,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,onDragStart:M,onDrag:N,onDragStop:te,onResizeStart:P,onResize:F,onResizeStop:ne,onDrop:re,onDropDragOver:ie,children:t})}fa.displayName=`ResponsiveReactGridLayout`;var pa=fa,ma=`react-grid-layout`;function ha(e){function t(t){let{measureBeforeMount:n=!1,className:r,style:i,...a}=t,[s,c]=(0,R.useState)(1280),[l,u]=(0,R.useState)(!1),d=(0,R.useRef)(null),f=(0,R.useRef)(null);return(0,R.useEffect)(()=>{u(!0)},[]),(0,R.useEffect)(()=>{let e=d.current;if(!(e instanceof HTMLElement))return;let t=null,n=new ResizeObserver(e=>{if(e[0]){let n=Math.round(e[0].contentRect.width);t!==null&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{c(e=>e===n?e:n),t=null})}});return n.observe(e),f.current=n,()=>{t!==null&&cancelAnimationFrame(t),n.unobserve(e),n.disconnect()}},[l]),n&&!l?(0,z.jsx)(`div`,{className:o(r,ma),style:i,ref:d}):(0,z.jsx)(e,{innerRef:d,className:r,style:i,...a,width:s})}return t.displayName=`WidthProvider(${e.displayName||e.name||`Component`})`,t}function ga(e){return e.reduce((e,t)=>Math.max(e,t.y+t.h),0)}function _a(e,t){return e.map(e=>({...e,x:0,w:t,minW:Math.min(e.minW??1,t)}))}var va=[`overview`,`topology`,`activity`,`assistant`,`performance`,`trace`,`logs`],ya={overview:{w:4,h:3,minW:3,minH:3},activity:{w:4,h:5,minW:3,minH:4},assistant:{w:4,h:3,minW:3,minH:3},topology:{w:8,h:5,minW:4,minH:4},performance:{w:8,h:5,minW:4,minH:4},logs:{w:8,h:5,minW:4,minH:4},trace:{w:8,h:4,minW:4,minH:4}};function ba(e,t){return e.xe.y)),o=(t,r)=>!e.some(e=>ba(e,{x:t,y:a,w:r,h:n}));for(let e=0;e+t<=r;e+=1)if(o(e,t))return{x:e,y:a,w:t};let s=e.reduce((e,t)=>ba(t,{x:0,y:a,w:r,h:n})?Math.max(e,t.x+t.w):e,0),c={x:s,w:0};for(let e=Math.min(s,r);ec.w&&(c={x:e,w:t-e}),e=t}return c.w>=i?{x:c.x,y:a,w:c.w}:{x:0,y:ga(e),w:t}}var Sa=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function Ca(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function wa(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${wa(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function Ta(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}function Ea(e){if(e>=2e3)return`bad`;if(e>=750)return`warn`}function Da(e){return e>=.05?`bad`:e>=.01?`warn`:`dimmed`}var Oa=function(e,t){return Oa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Oa(e,t)};function B(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Oa(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ka=`12px sans-serif`,Aa=20,ja=100,Ma=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function Na(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;c=Ja&&(qa=0),qa++}function Xa(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function V(e){if(typeof e!=`object`||!e)return e;var t=e,n=Ra.call(e);if(n===`[object Array]`){if(!Do(e)){t=[];for(var r=0,i=e.length;r`u`&&typeof self<`u`?Ro.worker=!0:!Ro.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Ro.node=!0,Ro.svgSupported=!0):zo(navigator.userAgent,Ro);function zo(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Bo=`.`,Vo=`___EC__COMPONENT__CONTAINER___`,Ho=`___EC__EXTENDED_CLASS___`;function Uo(e){var t={main:``,sub:``};if(e){var n=e.split(Bo);t.main=n[0]||``,t.sub=n[1]||``}return t}function Wo(e){Co(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Go(e){return!!(e&&e[Ho])}function Ko(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return qo(t)?n=function(e){B(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},to(n,this)),H(n.prototype,e),n[Ho]=!0,n.extend=this.extend,n.superCall=Zo,n.superApply=Qo,n.superClass=t,n}}function qo(e){return K(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Jo(e,t){e.extend=t.extend}var Yo=Math.round(Math.random()*10);function Xo(e){var t=[`__\0is_clz`,Yo++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Zo(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function Qo(e,t,n){return this.superClass.prototype[t].apply(e,n)}function $o(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){Wo(r),e.prototype.type=r;var i=Uo(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Vo){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Vo]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Uo(e),r=[],i=t[n.main];return i&&i[Vo]?U(i,function(e,t){t!==Vo&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Uo(e).main]},e.getAllClassMainTypes=function(){var e=[];return U(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Uo(e).main];return n&&n[Vo]};function n(e){var n=t[e.main];return(!n||!n[Vo])&&(n=t[e.main]={},n[Vo]=!0),n}}function es(e,t){for(var n=0;n=0||i&&eo(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var ts=es([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),ns=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return ts(this,e,t)},e}(),rs=function(){function e(e){this.value=e}return e}(),is=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new rs(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),as=function(){function e(e){this._list=new is,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new rs(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),os=new as(50);function ss(e){if(typeof e==`string`){var t=os.get(e);return t&&t.image}return e}function cs(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=os.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!us(t)&&a.pending.push(o)):(t=Fa.loadImage(e,ls,ls),t.__zrImageSrc=e,os.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function ls(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;tu||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){$s(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&$s(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Us.x=Gs.x=t.x,Us.y=Ks.y=t.y,Ws.x=Ks.x=t.x+t.width,Ws.y=Gs.y=t.y+t.height,Us.transform(n),Ks.transform(n),Ws.transform(n),Gs.transform(n),e.x=Rs(Us.x,Ws.x,Gs.x,Ks.x),e.y=Rs(Us.y,Ws.y,Gs.y,Ks.y);var s=zs(Us.x,Ws.x,Gs.x,Ks.x),c=zs(Us.y,Ws.y,Gs.y,Ks.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=fs(e||[]),hs(e,e,Ss(ac,-t.x,-t.y)),_s(e,e,Ss(ac,r,i)),hs(e,e,Ss(ac,n.x,n.y)),e},e}(),Zs=Z.create,Qs=Z.set,$s=Z.copy,ec=Z.calculateTransform,tc=Z.applyTransform,nc=Z.contain,rc=new Z(0,0,0,0),ic=new Z(0,0,0,0),ac=[];function oc(e,t,n,r,i,a,o,s){var c=Bs(t-n),l=Bs(r-e),u=Rs(c,l),d=Vs[i],f=Vs[1-i],p=Hs[i];t=l||!qs.bidirectional)&&(Js[d]=-l,Js[f]=0,qs.useDir&&qs.calcDirMTV())))}function sc(){var e=0,t=new Ls,n=new Ls,r={minTv:new Ls,maxTv:new Ls,useDir:!1,dirMinTv:new Ls,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=zs(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=fc)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Fa.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?dc=fc:i>2&&dc++,t}}var dc=0,fc=5;function pc(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=uc(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function mc(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Fa.measureText(t,e.font).width,n.put(t,r)),r}function hc(e,t,n,r){var i=mc(cc(t),e),a=yc(t);return new Z(_c(0,i,n),vc(0,a,r),i,a)}function gc(e,t,n,r){var i=((e||``)+``).split(` +`);if(i.length===1)return hc(i[0],t,n,r);for(var a=new Z(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function xc(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=bc(r[0],n.width),l+=bc(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var Sc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Cc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(` +`);a=wc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l=s;l++)c-=s;var u=mc(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Tc(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=mc(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Ec(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=mc(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Ec(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=wc(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Tc(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=cc(l),S=0;S<_.length;S++)w=Math.max(mc(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Oc=function(){function e(){}return e}(),kc=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Ac=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function jc(e,t,n,r,i){var a=new Ac,o=Bc(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Sc.lastIndex=0,h;(h=Sc.exec(o))!=null;){var g=h.index;g>m&&Mc(a,o.substring(m,g),t,p),Mc(a,h[2],t,p,h[1]),m=Sc.lastIndex}md){var te=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` +`),l=!0),r.accumWidth=m}else{var h=Ic(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` +`);for(var g=cc(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Pc=io(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Fc(e){return!Nc(e)||!!Pc[e]}function Ic(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=cc(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Lc(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;Z.set(Rc,_c(n,o,i),vc(r,s,a),o,s),Z.intersect(t,Rc,null,zc);var c=zc.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=_c(c.x,c.width,i,!0),e.baseY=vc(c.y,c.height,a,!0)}}var Rc=new Z(0,0,0,0),zc={outIntersectRect:{},clamp:!0};function Bc(e){return e==null?e=``:e+=``}function Vc(e){var t=Bc(e.text),n=e.font;return Hc(e,mc(cc(n),t),yc(n),null)}function Hc(e,t,n,r){var i=new Z(_c(e.x||0,t,e.textAlign),vc(e.y||0,n,e.textBaseline),t,n),a=r??(Uc(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Uc(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Wc=fs,Gc=5e-5;function Kc(e){return e>Gc||e<-Gc}var qc=[],Jc=[],Yc=ds(),Xc=Math.abs,Zc=function(){function e(){}return e.prototype.getLocalTransform=function(e){return Qc(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Kc(this.rotation)||Kc(this.x)||Kc(this.y)||Kc(this.scaleX-1)||Kc(this.scaleY-1)||Kc(this.skewX)||Kc(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Wc(n),this.invTransform=null);return}n||=ds(),t?this.getLocalTransform(n):Wc(n),e&&(t?ms(n,e,n):ps(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||ds(),vs(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(qc);var n=qc[0]<0?-1:1,r=qc[1]<0?-1:1,i=((qc[0]-n)*t+n)/qc[0]||0,a=((qc[1]-r)*t+r)/qc[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||ds(),ms(Jc,e.invTransform,t),t=Jc);var n=this.originX,r=this.originY;(n||r)&&(Yc[4]=n,Yc[5]=r,ms(Jc,t,Yc),Jc[4]-=n,Jc[5]-=r,t=Jc),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Ps(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Ps(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Xc(e[0]-1)>1e-10&&Xc(e[3]-1)>1e-10?Math.sqrt(Xc(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){tl(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&gs(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),Qc=Zc.getLocalTransform;function $c(){return new Zc}var el=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function tl(e,t){return Qa(e,t,el)}var nl={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-nl.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?nl.bounceIn(e*2)*.5:nl.bounceOut(e*2-1)*.5+.5}},rl=Math.pow,il=Math.sqrt,al=1e-8,ol=1e-4,sl=il(3),cl=1/3,ll=ys(),ul=ys(),dl=ys();function fl(e){return e>-al&&eal||e<-al}function ml(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function hl(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function gl(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(fl(u)&&fl(d)){if(fl(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(fl(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=il(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-rl(-y,cl):rl(y,cl),b=b<0?-rl(-b,cl):rl(b,cl);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*il(u*u*u)),S=Math.acos(x)/3,C=il(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+sl*Math.sin(S)))/(3*o),T=(-s+C*(w-sl*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function _l(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(fl(o)){if(pl(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(fl(u))i[0]=-a/(2*o);else if(u>0){var d=il(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function vl(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function yl(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;ll[0]=c,ll[1]=l;for(var v=0;v<1;v+=.05)ul[0]=ml(e,n,i,o,v),ul[1]=ml(t,r,a,s,v),g=Ns(ll,ul),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(fl(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=il(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function wl(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Tl(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function El(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;ll[0]=o,ll[1]=s;for(var f=0;f<1;f+=.05){ul[0]=xl(e,n,i,f),ul[1]=xl(t,r,a,f);var p=Ns(ll,ul);p=0&&p=1?1:gl(0,r,a,1,e,s)&&ml(0,i,o,1,s[0])}}}var Al=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Fo,this.ondestroy=e.ondestroy||Fo,this.onrestart=e.onrestart||Fo,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=K(e)?e:nl[e]||kl(e)},e}(),jl={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ml(e){return e=Math.round(e),e<0?0:e>255?255:e}function Nl(e){return e=Math.round(e),e<0?0:e>360?360:e}function Pl(e){return e<0?0:e>1?1:e}function Fl(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ml(parseFloat(t)/100*255):Ml(parseInt(t,10))}function Il(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Pl(parseFloat(t)/100):Pl(parseFloat(t))}function Ll(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Rl(e,t,n){return e+(t-e)*n}function zl(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Bl(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Vl=new as(20),Hl=null;function Ul(e,t){Hl&&Bl(Hl,t),Hl=Vl.put(e,Hl||t.slice())}function Wl(e,t){if(e){t||=[];var n=Vl.get(e);if(n)return Bl(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in jl)return Bl(t,jl[r]),Ul(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){zl(t,0,0,0,1);return}return zl(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Ul(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){zl(t,0,0,0,1);return}return zl(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Ul(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?zl(t,+l[0],+l[1],+l[2],1):zl(t,0,0,0,1);u=Il(l.pop());case`rgb`:if(l.length>=3)return zl(t,Fl(l[0]),Fl(l[1]),Fl(l[2]),l.length===3?u:Il(l[3])),Ul(e,t),t;zl(t,0,0,0,1);return;case`hsla`:if(l.length!==4){zl(t,0,0,0,1);return}return l[3]=Il(l[3]),Gl(l,t),Ul(e,t),t;case`hsl`:if(l.length!==3){zl(t,0,0,0,1);return}return Gl(l,t),Ul(e,t),t;default:return}}zl(t,0,0,0,1)}}function Gl(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Il(e[1]),i=Il(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],zl(t,Ml(Ll(o,a,n+1/3)*255),Ml(Ll(o,a,n)*255),Ml(Ll(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Kl(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function ql(e,t){var n=Wl(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Ql(n,n.length===4?`rgba`:`rgb`)}}function Jl(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Ml(Rl(o[0],s[0],c)),n[1]=Ml(Rl(o[1],s[1],c)),n[2]=Ml(Rl(o[2],s[2],c)),n[3]=Pl(Rl(o[3],s[3],c)),n}}function Yl(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Wl(t[i]),s=Wl(t[a]),c=r-i,l=Ql([Ml(Rl(o[0],s[0],c)),Ml(Rl(o[1],s[1],c)),Ml(Rl(o[2],s[2],c)),Pl(Rl(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Xl(e,t,n,r){var i=Wl(e);if(e)return i=Kl(i),t!=null&&(i[0]=Nl(K(t)?t(i[0]):t)),n!=null&&(i[1]=Il(K(n)?n(i[1]):n)),r!=null&&(i[2]=Il(K(r)?r(i[2]):r)),Ql(Gl(i),`rgba`)}function Zl(e,t){var n=Wl(e);if(n&&t!=null)return n[3]=Pl(t),Ql(n,`rgba`)}function Ql(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function $l(e,t){var n=Wl(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var eu=new as(100);function tu(e){if(q(e)){var t=eu.get(e);return t||(t=ql(e,-.1),eu.put(e,t)),t}if(_o(e)){var n=H({},e);return n.colorStops=W(e.colorStops,function(e){return{offset:e.offset,color:ql(e.color,-.1)}}),n}return e}var nu=Math.round;function ru(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Wl(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var iu=1e-4;function au(e){return e-iu}function ou(e){return nu(e*1e3)/1e3}function su(e){return nu(e*1e4)/1e4}function cu(e){return`matrix(`+ou(e[0])+`,`+ou(e[1])+`,`+ou(e[2])+`,`+ou(e[3])+`,`+su(e[4])+`,`+su(e[5])+`)`}var lu={left:`start`,right:`end`,center:`middle`,middle:`middle`};function uu(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function du(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function fu(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function pu(e){return e&&!!e.image}function mu(e){return e&&!!e.svgElement}function hu(e){return pu(e)||mu(e)}function gu(e){return e.type===`linear`}function _u(e){return e.type===`radial`}function vu(e){return e&&(e.type===`linear`||e.type===`radial`)}function yu(e){return`url(#`+e+`)`}function bu(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function xu(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Io,i=Y(e.scaleX,1),a=Y(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+nu(o*Io)+`deg, `+nu(s*Io)+`deg)`),c.join(` `)}var Su=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),Cu=Array.prototype.slice;function wu(e,t,n){return(t-e)*n+e}function Tu(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Bu,s=t;if(ro(t)){var c=Nu(t);o=c,(c===1&&!po(t[0])||c===2&&!po(t[0][0]))&&(a=!0)}else if(po(t)&&!vo(t))o=Pu;else if(q(t)){if(!isNaN(+t))o=Pu;else{var l=Wl(t);l&&(s=l,o=Lu)}}else if(_o(t)){var u=H({},s);u.colorStops=W(t.colorStops,function(e){return{offset:e.offset,color:Wl(e.color)}}),gu(t)?o=Ru:_u(t)&&(o=zu),s=u}i===0?this.valType=o:(o!==this.valType||o===Bu)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=K(n)?n:nl[n]||kl(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Hu(r),c=Vu(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Uu:e[s];if((Hu(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Hu(i))i===Fu?Tu(g,f[r],p[r],h):Eu(g,f[r],p[r],h);else if(Vu(i)){var _=f[r],v=p[r],y=i===Ru;e[s]={type:y?`linear`:`radial`,x:wu(_.x,v.x,h),y:wu(_.y,v.y,h),colorStops:W(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:wu(e.offset,n.offset,h),color:Mu(Tu([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=wu(_.x2,v.x2,h),e[s].y2=wu(_.y2,v.y2,h)):e[s].r=wu(_.r,v.r,h)}else if(c)Tu(g,f[r],p[r],h),n||(e[s]=Mu(g));else{var b=wu(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Pu?e[n]=e[n]+r:t===Lu?(Wl(e[n],Uu),Du(Uu,Uu,r,1),e[n]=Mu(Uu)):t===Fu?Du(e[n],e[n],r,1):t===Iu&&Ou(e[n],e[n],r,1)},e}(),Gu=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Xa(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,so(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,ju(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ju(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Ku=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Zu:Xu},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Wl(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Ql(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},H(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(J(e))for(var n=so(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState($u,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===$u;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(eo(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Xa(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=pd(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,hd(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=eo(r,e),a=eo(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var gd=`__zr_style_`+Math.round(Math.random()*10),_d={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},vd={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};_d[gd]=!0;var yd=[`z`,`z2`,`invisible`],bd=[`invisible`],xd=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=so(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Ad[0]=Od(i)*n+e,Ad[1]=Dd(i)*r+t,jd[0]=Od(a)*n+e,jd[1]=Dd(a)*r+t,l(s,Ad,jd),u(c,Ad,jd),i%=kd,i<0&&(i+=kd),a%=kd,a<0&&(a+=kd),i>a&&!o?a+=kd:ii&&(Md[0]=Od(p)*n+e,Md[1]=Dd(p)*r+t,l(s,Md,s),u(c,Md,c))}var Bd={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Vd=[],Hd=[],Ud=[],Wd=[],Gd=[],Kd=[],qd=Math.min,Jd=Math.max,Yd=Math.cos,Xd=Math.sin,Zd=Math.abs,Qd=Math.PI,$d=Qd*2,ef=typeof Float32Array<`u`,tf=[];function nf(e){return Math.round(e/Qd*1e8)/1e8%2*Qd}function rf(e,t){var n=nf(e[0]);n<0&&(n+=$d);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=$d?i=n+$d:t&&n-i>=$d?i=n-$d:!t&&n>i?i=n+($d-nf(n-i)):t&&n0&&(this._ux=Zd(n/Ju/e)||0,this._uy=Zd(n/Ju/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Bd.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Zd(e-this._xi),r=Zd(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Bd.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Bd.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Bd.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),tf[0]=r,tf[1]=i,rf(tf,a),r=tf[0],i=tf[1];var o=i-r;return this.addData(Bd.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Yd(i)*n+e,this._yi=Xd(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Bd.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Bd.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&ef&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Ud[0]=Ud[1]=Gd[0]=Gd[1]=Number.MAX_VALUE,Wd[0]=Wd[1]=Kd[0]=Kd[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Zd(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Bd.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=bl(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Bd.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Dl(i,a,y,b,h,g,10),i=h,a=g;break;case Bd.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Yd(D)*T+C,s=Xd(D)*E+w),m=Jd(T,E)*qd($d,Math.abs(O)),i=Yd(k)*T+C,a=Xd(k)*E+w;break;case Bd.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Bd.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Bd.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Bd.L:u=n[x++],d=n[x++];var w=Zd(u-c),T=Zd(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Bd.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],M=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;vl(c,k,j,M,D,Vd),vl(l,A,ee,N,D,Hd),e.bezierCurveTo(Vd[1],Hd[1],Vd[2],Hd[2],Vd[3],Hd[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,M,N),c=M,l=N;break;case Bd.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Tl(c,k,j,D,Vd),Tl(l,A,ee,D,Hd),e.quadraticCurveTo(Vd[1],Hd[1],Vd[2],Hd[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Bd.A:var te=n[x++],P=n[x++],F=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=!n[x++],se=F>ne?F:ne,ce=Zd(F-ne)>.001,le=re+ie,I=!1;if(f){var E=p[g++];h+E>_&&(le=re+ie*(_-h)/E,I=!0),h+=E}if(ce&&e.ellipse?e.ellipse(te,P,F,ne,ae,re,le,oe):e.arc(te,P,se,re,le,oe),I)break lo;C&&(o=Yd(re)*F+te,s=Xd(re)*ne+P),c=Yd(le)*F+te,l=Xd(le)*ne+P;break;case Bd.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var L=n[x++],ue=n[x++];if(f){var E=p[g++];if(h+E>_){var de=_-h;e.moveTo(u,d),e.lineTo(u+qd(de,L),d),de-=L,de>0&&e.lineTo(u+L,d+qd(de,ue)),de-=ue,de>0&&e.lineTo(u+Jd(L-de,0),d+ue),de-=L,de>0&&e.lineTo(u,d+Jd(ue-de,0));break lo}h+=E}e.rect(u,d,L,ue);break;case Bd.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Bd,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function of(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=df);var f=Math.atan2(c,s);return f<0&&(f+=df),f>=r&&f<=i||f+df>=r&&f+df<=i}function pf(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var mf=af.CMD,hf=Math.PI*2,gf=1e-4;function _f(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&bf(),p=ml(t,r,a,s,yf[0]),f>1&&(m=ml(t,r,a,s,yf[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=xl(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);vf[0]=-c,vf[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=hf-1e-4){r=0,i=hf;var u=a?1:-1;return o>=vf[0]+e&&o<=vf[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=hf,i+=hf);for(var f=0,p=0;p<2;p++){var m=vf[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=hf+h),(h>=r&&h<=i||h+hf>=r&&h+hf<=i)&&(h>Math.PI/2&&h1&&(n||(s+=pf(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case mf.M:u=a[m++],d=a[m++],c=u,l=d;break;case mf.L:if(n){if(of(c,l,a[m],a[m+1],t,r,i))return!0}else s+=pf(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case mf.C:if(n){if(sf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=xf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case mf.Q:if(n){if(cf(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Sf(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case mf.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=pf(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(ff(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Cf(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case mf.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(of(u,d,f,d,t,r,i)||of(f,d,f,p,t,r,i)||of(f,p,u,p,t,r,i)||of(u,p,u,d,t,r,i))return!0}else s+=pf(f,d,f,p,r,i),s+=pf(u,p,u,d,r,i);break;case mf.Z:if(n){if(of(c,l,u,d,t,r,i))return!0}else s+=pf(c,l,u,d,r,i);c=u,l=d}}return!n&&!_f(l,d)&&(s+=pf(c,l,u,d,r,i)||0),s!==0}function Tf(e,t,n){return wf(e,0,!1,t,n)}function Ef(e,t,n,r){return wf(e,t,!0,n,r)}var Df=$a({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},_d),Of={style:$a({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},vd.style)},kf=el.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Af=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Xu:t>.2?Qu:Zu}if(e)return Zu}return Xu},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(q(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==$l(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new af(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Ef(a,o/s,e,t)))return!0}if(this.hasFill())return Tf(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:H(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return No(Df,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=H({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=H({},r.shape),H(c,n.shape)):(c=H({},i?this.shape:r.shape),H(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=H({},this.shape);for(var l={},u=so(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Rf=Math.round;function zf(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Rf(r*2)===Rf(i*2)&&(e.x1=e.x2=Vf(r,s,!0)),Rf(a*2)===Rf(o*2)&&(e.y1=e.y2=Vf(a,s,!0)),e):e}}function Bf(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Vf(r,s,!0),e.y=Vf(i,s,!0),e.width=Math.max(Vf(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Vf(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Vf(e,t,n){if(!t)return e;var r=Rf(e*2);return(r+Rf(t))%2==0?r/2:(r+(n?1:-1))/2}var Hf=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Uf={},Wf=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Hf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Bf(Uf,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Lf(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Af);Wf.prototype.type=`rect`;var Gf={fill:`#000`},Kf=2,qf={},Jf={style:$a({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},vd.style)},Yf=function(e){B(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Gf,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&cp(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=op(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Mf),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ap(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=ip(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Kf,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=bo(s.opacity,t.opacity,1),ep(p,s),y&&(p.lineWidth=bo(s.lineWidth,t.lineWidth,g),p.lineDash=Y(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Hc(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Wf),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=Y(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(If),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=Y(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=bo(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return tp(e)&&(t=[e.fontStyle,e.fontWeight,$f(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&wo(t)||e.textFont||e.font},t}(xd),Xf={left:!0,right:1,center:1},Zf={top:1,bottom:1,middle:1},Qf=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function $f(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function ep(e,t){for(var n=0;n0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var wp=Tp;function Tp(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Ep(e,t,n)}function Ep(e,t,n){return q(e)?Op(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Dp(e){return q(e)&&Op(e)}function Op(e){return!!dp(e).match(/%$/)}function kp(e,t,n){return isNaN(t)?n?``+e:+e:(t=fp(pp(0,t),up),e=(+e).toFixed(t),n?e:+e)}function Ap(e){return e.sort(function(e,t){return e-t}),e}function jp(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(hp(e*t)/t===e)return n}return Mp(e)}function Mp(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return pp(0,(a<0?0:i-1-a)-r)}function Np(e,t,n){var r=mp(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=yp(2*mp(n||1)*mp(r))/bp,a=yp(mp(t))/bp,o=pp(0,_p(-i+a));return isFinite(o)||(o=NaN),o}function Pp(e,t){var n=pp(jp(e),jp(t)),r=e+t;return n>up?r:kp(r,n)}var Fp=vp(2,53)-1;function Ip(e){var t=xp*2;return(e%t+t)%t}function Lp(e){return e>-lp&&e=10&&t++,t}function Hp(e,t){var n=Vp(e),r=vp(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,kp(e,-n)}function Up(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Lm(){return[1/0,-1/0]}function Rm(e,t){Hm(t)&&(te[1]&&(e[1]=t))}function zm(e,t){Hm(t)&&te[1]&&(e[1]=t)}function Vm(e,t){Um(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Hm(e){return e!=null&&isFinite(e)}function Um(e,t){return Hm(e)&&Hm(t)&&e<=t}function Wm(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Gm(e){Um(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Km(){var e=`__ec_once_`+qm++;return function(t,n){Po(t,e)||(t[e]=1,n())}}var qm=Kp();function Jm(e,t,n){var r=X(),i=0;U(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Ym(e){return e.value+``}function Xm(e){return e+``}function Zm(e,t){return Y(t,!0)?e.seriesIndex+2:0}function Qm(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function $m(e,t){return{seriesType:e,overallReset:t}}function eh(e){return{overallReset:e}}var th=Em(),nh=function(e,t,n,r){if(r){var i=th(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=th(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},rh=`series`,ih=X([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),ah=`original`,oh=`arrayRows`,sh=`objectRows`,ch=`keyedColumns`,lh=`typedArray`,uh=`unknown`,dh=`column`,fh=`Roam`,ph=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],mh=function(){function e(e){U(ph,function(t){this[t]=lo(e[t],e)},this)}return e}();function hh(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var gh=1,_h={},vh=Em(),yh=Em(),bh=[`emphasis`,`blur`,`select`],xh=[`normal`,`emphasis`,`blur`,`select`],Sh=`highlight`,Ch=`downplay`,wh=`select`,Th=`unselect`,Eh=`toggleSelect`,Dh=`selectchanged`;function Oh(e){return e!=null&&e!==`none`}function kh(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Ah(e){kh(e,`emphasis`,2)}function jh(e){e.hoverState===2&&kh(e,`normal`,0)}function Mh(e){kh(e,`blur`,1)}function Nh(e){e.hoverState===1&&kh(e,`normal`,0)}function Ph(e){e.selected=!0}function Fh(e){e.selected=!1}function Ih(e,t,n){t(e,n)}function Lh(e,t,n){Ih(e,t,n),e.isGroup&&e.traverse(function(e){Ih(e,t,n)})}function Rh(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function zh(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof Af){var o=vh(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Oh(s)||Oh(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=H({},r),l=H({},l),l.fill=s):!Oh(l.fill)&&Oh(s)?(a=!0,r=H({},r),l=H({},l),l.fill=tu(s)):!Oh(l.stroke)&&Oh(c)&&(a||(r=H({},r),l=H({},l)),l.stroke=tu(c)),r.style=l}}if(r&&r.z2==null){a||(r=H({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Vh(e,t,n){if(n&&n.z2==null){n=H({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Hh(e,t,n){var r=eo(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:zh(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=H({},n),o=H({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Uh(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Bh(this,e,t,n);if(e===`blur`)return Hh(this,e,n);if(e===`select`)return Vh(this,e,n)}return n}function Wh(e){e.stateProxy=Uh;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Uh),n&&(n.stateProxy=Uh)}function Gh(e,t){!$h(e,t)&&!e.__highByOuter&&Lh(e,Ah)}function Kh(e,t){!$h(e,t)&&!e.__highByOuter&&Lh(e,jh)}function qh(e,t){e.__highByOuter|=1<<(t||0),Lh(e,Ah)}function Jh(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Lh(e,jh)}function Yh(e){Lh(e,Mh)}function Xh(e){Lh(e,Nh)}function Zh(e){Lh(e,Ph)}function Qh(e){Lh(e,Fh)}function $h(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function eg(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=yh(i),o=hh(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Nh(e)}),s&&n.push(i)),a.isBlured=!1}),U(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function tg(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function ug(e,t,n){_g(e,!0),Lh(e,Wh),pg(e,t,n)}function dg(e){_g(e,!1)}function fg(e,t,n,r){r?dg(e):ug(e,t,n)}function pg(e,t,n){var r=th(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var mg=[`emphasis`,`blur`,`select`],hg={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function gg(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Og(m),s*=Og(m));var h=(i===a?-1:1)*Og((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Ag(d)*g-kg(d)*_,y=(t+r)/2+kg(d)*g+Ag(d)*_,b=Pg([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Pg(x,S);if(Ng(x,S)<=-1&&(C=jg),Ng(x,S)>=1&&(C=0),C<0){var w=Math.round(C/jg*1e6)/1e6;C=jg*2+w%2*jg}u.addData(l,v,y,o,s,b,C,d,a)}var Ig=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Lg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Rg(e){var t=new af;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=af.CMD,c=e.match(Ig);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=eo(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=eo(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function l_(e){var t;if(G(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function u_(e,t){var n,r=i_(t.r,0),i=i_(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=n_(c-s),p=f>Zg&&f%Zg;if(p>o_&&(f=p),!(r>o_))e.moveTo(l,u);else if(f>Zg-o_)e.moveTo(l+r*$g(s),u+r*Qg(s)),e.arc(l,u,r,s,c,!d),i>o_&&(e.moveTo(l+i*$g(c),u+i*Qg(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*$g(s),j=r*Qg(s),ee=i*$g(c),M=i*Qg(c),N=f>o_;if(N){var te=t.cornerRadius;te&&(n=l_(te),m=n[0],h=n[1],g=n[2],_=n[3]);var P=n_(r-i)/2;if(v=a_(P,g),y=a_(P,_),b=a_(P,m),x=a_(P,h),w=S=i_(v,y),T=C=i_(b,x),(S>o_||C>o_)&&(E=r*$g(c),D=r*Qg(c),O=i*$g(s),k=i*Qg(s),fo_){var ce=a_(g,w),le=a_(_,w),I=c_(O,k,A,j,r,ce,d),L=c_(E,D,ee,M,r,le,d);e.moveTo(l+I.cx+I.x0,u+I.cy+I.y0),w0&&e.arc(l+I.cx,u+I.cy,ce,t_(I.y0,I.x0),t_(I.y1,I.x1),!d),e.arc(l,u,r,t_(I.cy+I.y1,I.cx+I.x1),t_(L.cy+L.y1,L.cx+L.x1),!d),le>0&&e.arc(l+L.cx,u+L.cy,le,t_(L.y1,L.x1),t_(L.y0,L.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>o_)||!N)e.lineTo(l+ee,u+M);else if(T>o_){var ce=a_(m,T),le=a_(h,T),I=c_(ee,M,E,D,i,-le,d),L=c_(A,j,O,k,i,-ce,d);e.lineTo(l+I.cx+I.x0,u+I.cy+I.y0),T0&&e.arc(l+I.cx,u+I.cy,le,t_(I.y0,I.x0),t_(I.y1,I.x1),!d),e.arc(l,u,i,t_(I.cy+I.y1,I.cx+I.x1),t_(L.cy+L.y1,L.cx+L.x1),d),ce>0&&e.arc(l+L.cx,u+L.cy,ce,t_(L.y1,L.x1),t_(L.y0,L.x0),!d))}else e.lineTo(l+ee,u+M),e.arc(l,u,i,c,s,d)}e.closePath()}}}var d_=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),f_=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new d_},t.prototype.buildPath=function(e,t){u_(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Af);f_.prototype.type=`sector`;var p_=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),m_=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new p_},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Af);m_.prototype.type=`ring`;function h_(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=h_(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sR_[1]){if(i=!1,z_.negativeSize||n)return i;var s=I_(R_[0]-L_[1]),c=I_(L_[0]-R_[1]);P_(s,c)>V_.len()&&(s=c||!z_.bidirectional)&&(Ls.scale(B_,o,-c*r),z_.useDir&&z_.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function J_(e,t,n,r,i,a){q_(`update`,e,t,n,r,i,a)}function Y_(e,t,n,r,i,a){q_(`enter`,e,t,n,r,i,a)}function X_(e){if(!e.__zr)return!0;for(var t=0;tk_,BezierCurve:()=>D_,BoundingRect:()=>Z,Circle:()=>qg,CompoundPath:()=>A_,Ellipse:()=>Yg,Group:()=>Gg,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>If,IncrementalDisplayable:()=>W_,Line:()=>C_,LinearGradient:()=>M_,OrientedBoundingRect:()=>H_,Path:()=>Af,Point:()=>Ls,Polygon:()=>v_,Polyline:()=>b_,RadialGradient:()=>N_,Rect:()=>Wf,Ring:()=>m_,Sector:()=>f_,Text:()=>Yf,WH:()=>iv,XY:()=>rv,applyTransform:()=>yv,calcZ2Range:()=>Hv,clipPointsByRect:()=>wv,clipRectByRect:()=>Tv,createIcon:()=>Ev,decomposeTransform:()=>Kv,ensureCopyRect:()=>zv,ensureCopyTransform:()=>Bv,expandOrShrinkRect:()=>jv,extendPath:()=>sv,extendShape:()=>av,getCurrentCanvasPainter:()=>Jv,getShapeClass:()=>lv,getTransform:()=>vv,groupTransition:()=>Cv,initProps:()=>Y_,isBoundingRectAxisAligned:()=>Lv,isElementRemoved:()=>X_,lineLineIntersect:()=>Ov,linePolygonIntersect:()=>Dv,makeImage:()=>dv,makePath:()=>uv,mergePath:()=>pv,payloadDisableAnimation:()=>Gv,registerShape:()=>cv,removeElement:()=>Z_,removeElementWithFadeOut:()=>$_,resizePath:()=>mv,retrieveZInfo:()=>Vv,setTooltipConfig:()=>Pv,subPixelOptimize:()=>_v,subPixelOptimizeLine:()=>hv,subPixelOptimizeRect:()=>gv,transformDirection:()=>bv,traverseElements:()=>Iv,traverseUpdateZ:()=>Uv,updateProps:()=>J_}),nv={},rv=[`x`,`y`],iv=[`width`,`height`];function av(e){return Af.extend(e)}var ov=Ug;function sv(e,t){return ov(e,t)}function cv(e,t){nv[e]=t}function lv(e){if(nv.hasOwnProperty(e))return nv[e]}function uv(e,t,n,r){var i=Hg(e,t);return n&&(r===`center`&&(n=fv(n,i.getBoundingRect())),mv(i,n)),i}function dv(e,t,n){var r=new If({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(fv(t,i))}}});return r}function fv(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var pv=Wg;function mv(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function hv(e,t){return zf(e,e,{lineWidth:t}),e}function gv(e,t){return Bf(e,e,t),e}var _v=Vf;function vv(e,t){for(var n=fs([]);e&&e!==t;)ms(n,e.getLocalTransform(),n),e=e.parent;return n}function yv(e,t,n){return t&&!ro(t)&&(t=Zc.getLocalTransform(t)),n&&(t=vs([],t)),Ps([],e,t)}function bv(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:mp(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:mp(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=yv(a,t,n),mp(a[0])>mp(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function xv(e){return!e.isGroup}function Sv(e){return e.shape!=null}function Cv(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){xv(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return Sv(e)&&(t.shape=V(e.shape)),t}var a=r(e);t.traverse(function(e){if(xv(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),J_(e,r,n,th(e).dataIndex)}}})}function wv(e,t){return W(e,function(e){var n=e[0];n=pp(n,t.x),n=fp(n,t.x+t.width);var r=e[1];return r=pp(r,t.y),r=fp(r,t.y+t.height),[n,r]})}function Tv(e,t){var n=pp(e.x,t.x),r=fp(e.x+e.width,t.x+t.width),i=pp(e.y,t.y),a=fp(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function Ev(e,t,n){var r=H({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),$a(i,n),new If(r)):uv(e.replace(`path://`,``),r,n,`center`)}function Dv(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=kv(p,m,u,d)/f;return!(g<0||g>1)}function kv(e,t,n,r){return e*r-n*t}function Av(e){return e<=1e-6&&e>=-1e-6}function jv(e,t,n,r,i){return t==null?e:(po(t)?Mv[0]=Mv[1]=Mv[2]=Mv[3]=t:(Mv[0]=t[0],Mv[1]=t[1],Mv[2]=t[2],Mv[3]=t[3]),r&&(Mv[0]=pp(0,Mv[0]),Mv[1]=pp(0,Mv[1]),Mv[2]=pp(0,Mv[2]),Mv[3]=pp(0,Mv[3])),n&&(Mv[0]=-Mv[0],Mv[1]=-Mv[1],Mv[2]=-Mv[2],Mv[3]=-Mv[3]),Nv(e,Mv,`x`,`width`,3,1,i&&i[0]||0),Nv(e,Mv,`y`,`height`,0,2,i&&i[1]||0),e)}var Mv=[0,0,0,0];function Nv(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=pp(0,fp(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:mp(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Pv(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=q(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&U(so(c),function(e){Po(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=th(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:$a({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Fv(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Iv(e,t){if(e){if(G(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Uv(e,t,n){Wv(e,t,n,-1/0)}function Wv(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Yy=(e={},e[oh+`_`+dh]={pure:!0,appendData:i},e[oh+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[sh]={pure:!0,appendData:i},e[ch]={pure:!0,appendData:function(e){var t=this._data;U(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[ah]={appendData:i},e[lh]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){po(t)||tm(``),this._opFn=_b[e],this._rvalFloat=Wp(t)}return e.prototype.evaluate=function(e){return po(e)?this._opFn(e,this._rvalFloat):this._opFn(Wp(e),this._rvalFloat)},e})();var vb=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=po(e)?e:Wp(e),r=po(t)?t:Wp(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=q(e),s=q(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Wp(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Wp(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function yb(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function bb(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,Sb=typeof Uint16Array>`u`?Array:Uint16Array,Cb=typeof Int32Array>`u`?Array:Int32Array,wb=typeof Float64Array>`u`?Array:Float64Array,Tb={float:wb,int:Cb,ordinal:Array,number:Array,time:wb},Eb;function Db(e){return e>65535?xb:Sb}function Ob(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function kb(e,t,n,r,i){var a=Tb[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=W(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Db(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return gb(e[r],this._dimensions[r])}Eb={arrayRows:e,objectRows:function(e,t,n,r){return gb(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return gb(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),jb=Em(),Mb={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Nb=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Ib(this.source))},e.prototype.getSourceDimensionIndex=function(e){return Y(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Wy(this.source),n=!Lb(e),r=``,i=[],a=0,o=0;a30}var Rb=J,zb=W,Bb=typeof Int32Array>`u`?Array:Int32Array,Vb=`e\0\0`,Hb=-1,Ub=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Wb=[`_approximateExtent`],Gb,Kb,qb,Jb,Yb,Xb,Zb,Qb=function(){function e(e,t){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`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Pb(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),G(i)?i=i.slice():Rb(i)&&(i=H({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Rb(t)?H(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Rb(e)?H(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?H(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){nh(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){U(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:zb(this.dimensions,this._getDimInfo,this),this.hostModel),Yb(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];K(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(xo(arguments)))})},e.internalField=function(){Gb=function(e){var t=e._invertedIndicesMap;U(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Bb(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function $b(e,t){Fy(e)||(e=Ly(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=X(),a=[],o=ex(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Lb(o),c=r===e.dimensionsDefine,l=c?Ib(e):Fb(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=X(u),f=new Cb(o),p=0;p0&&(e.name+=t-1)}),new Nb({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function ex(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return U(t,function(e){var t;J(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function tx(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var nx={},rx={},ix=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(nx,!0),this._normalMasterList=n(rx,!1);function n(n,r){var i=[];return U(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){U(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){nx[e]=t;return}rx[e]=t},e.get=function(e){return rx[e]||nx[e]},e}();function ax(e){return!!nx[e]}var ox=X();function sx(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=ox.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function cx(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!ax(n)&&(i=0))}return{coordSysType:n,kind:i}}function lx(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=cx(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var ux=function(){function e(e){this.coordSysDims=[],this.axisMap=X(),this.categoryAxisMap=X(),this.coordSysName=e}return e}();function dx(e){var t=e.get(`coordinateSystem`),n=new ux(t),r=fx[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var fx={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Am).models[0],a=e.getReferringComponents(`yAxis`,Am).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),px(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),px(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Am).models[0];t.coordSysDims=[`single`],n.set(`single`,i),px(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Am).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),px(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),px(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();U(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),px(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Am).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function px(e){return e.get(`type`)===`category`}function mx(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;hx(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(U(a,function(e,t){q(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),U(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;U(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function hx(e){return!Pb(e.schema)}function gx(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function _x(e,t){return gx(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function vx(e,t){var n=e.get(`coordinateSystem`),r=ix.get(n),i;return t&&t.coordSysDims&&(i=W(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=pb(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function yx(e,t,n){var r,i;return n&&U(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function bx(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Ly(e)):(i=r.getSource(),a=i.sourceFormat===ah);var o=dx(t),s=vx(t,o),c=n.useEncodeDefaulter,l=K(c)?c:c?uo(ky,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=$b(i,u),f=yx(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=mx(t,{schema:d,store:p}),h=new Qb(d,t);h.setCalculationInfo(m);var g=f!=null&&xx(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function xx(e){if(e.sourceFormat===`original`)return!G(cm(Sx(e.data||[])))}function Sx(e){for(var t=0;t=0&&n.push(e)}),n}}function Ox(e,t){return Za(Za({},e,!0),t,!0)}var kx=Math.log(2);function Ax(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){U(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Rx(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?jx(s,o):jx(o,s))}function zx(e){return e.nodeName.toUpperCase()===`CANVAS`}var Bx=/([&<>"'])/g,Vx={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Hx(e){return e==null?``:(e+``).replace(Bx,function(e,t){return Vx[t]})}var Ux={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},Wx={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Gx=`ZH`,Kx=`EN`,qx=Kx,Jx={},Yx={},Xx=Ro.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||qx).toUpperCase().indexOf(Gx)>-1?Gx:qx}():qx;function Zx(e,t){e=e.toUpperCase(),Yx[e]=new Sy(t),Jx[e]=t}function Qx(e){if(q(e)){var t=Jx[e.toUpperCase()]||{};return e===Gx||e===Kx?V(t):Za(V(t),V(Jx[qx]),!1)}return Za(V(e),V(Jx[qx]),!1)}function $x(e){return Yx[e]}function eS(){return Yx[qx]}Zx(Kx,Ux),Zx(Gx,Wx);var tS=null;function nS(){return tS}function rS(e,t){var n=nS(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function iS(e){var t=e.brk;return t?t.breaks:[]}function aS(e){var t=e.brk;return t?t.hasBreaks():!1}var oS=1e3,sS=oS*60,cS=sS*60,lS=cS*24,uS=lS*365,dS={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},fS={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},pS=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,mS=`{yyyy}-{MM}-{dd}`,hS={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:mS,hour:mS+` `+fS.hour,minute:mS+` `+fS.minute,second:mS+` `+fS.second,millisecond:pS},gS=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],_S=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function vS(e){return!q(e)&&!K(e)?yS(e):e}function yS(e){e||={};var t={},n=!0;return U(gS,function(t){n&&=e[t]==null}),U(gS,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=gS[s],l=J(a)&&!G(a)?a[c]:a,u=void 0;G(l)?(u=l.slice(),o=u[0]||``):q(l)?(o=l,u=[o]):(o==null?o=fS[r]:dS[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function bS(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function xS(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function SS(e){return e===xS(e)}function CS(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function wS(e,t,n,r){var i=zp(e),a=i[OS(n)](),o=i[kS(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[AS(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[jS(n)](),d=(u-1)%12+1,f=i[MS(n)](),p=i[NS(n)](),m=i[PS(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof Sy?r:$x(r||Xx)||eS()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,bS(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,bS(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,bS(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,bS(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,bS(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,bS(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,bS(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,bS(m,3)).replace(/{S}/g,m+``)}function TS(e,t,n,r,i){var a=null;if(q(n))a=n;else if(K(n)){var o={time:e.time,level:e.time?e.time.level:0},s=nS();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=ES(e.value,i);a=n[u][u][0]}}return wS(new Date(e.value),a,i,r)}function ES(e,t){var n=zp(e),r=n[kS(t)]()+1,i=n[AS(t)](),a=n[jS(t)](),o=n[MS(t)](),s=n[NS(t)](),c=n[PS(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function DS(e,t,n){switch(t){case`year`:e[IS(n)](0);case`month`:e[LS(n)](1);case`day`:e[RS(n)](0);case`hour`:e[zS(n)](0);case`minute`:e[BS(n)](0);case`second`:e[VS(n)](0)}return e}function OS(e){return e?`getUTCFullYear`:`getFullYear`}function kS(e){return e?`getUTCMonth`:`getMonth`}function AS(e){return e?`getUTCDate`:`getDate`}function jS(e){return e?`getUTCHours`:`getHours`}function MS(e){return e?`getUTCMinutes`:`getMinutes`}function NS(e){return e?`getUTCSeconds`:`getSeconds`}function PS(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function FS(e){return e?`setUTCFullYear`:`setFullYear`}function IS(e){return e?`setUTCMonth`:`setMonth`}function LS(e){return e?`setUTCDate`:`setDate`}function RS(e){return e?`setUTCHours`:`setHours`}function zS(e){return e?`setUTCMinutes`:`setMinutes`}function BS(e){return e?`setUTCSeconds`:`setSeconds`}function VS(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function HS(e){if(!Gp(e))return q(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function US(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var WS=So;function GS(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&wo(e)?e:`-`}function a(e){return Yp(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?zp(e):e;if(!isNaN(+c))return wS(c,r,n);if(s)return`-`}if(t===`ordinal`)return fo(e)?i(e):po(e)&&a(e)?e+``:`-`;var l=Wp(e);return a(l)?HS(l):fo(e)?i(e):typeof e==`boolean`?e+``:`-`}var KS=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],qS=function(e,t){return`{`+e+(t??``)+`}`};function JS(e,t,n){G(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function XS(e,t){return t||=`transparent`,q(e)?e:J(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var ZS=U,QS=[`left`,`right`,`top`,`bottom`,`width`,`height`],$S=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function eC(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var tC=eC;uo(eC,`vertical`),uo(eC,`horizontal`);function nC(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function rC(e,t,n){n=WS(n||0);var r=t.width,i=t.height,a=wp(e.left,r),o=wp(e.top,i),s=wp(e.right,r),c=wp(e.bottom,i),l=wp(e.width,r),u=wp(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Z((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function iC(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=Za(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return jm(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return nC(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(Sy);Jo(pC,Sy),$o(pC),Ex(pC),Dx(pC,mC);function mC(e){var t=[];return U(pC.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=W(t,function(e){return Uo(e).main}),e!==`dataset`&&eo(t,`dataset`)<=0&&t.unshift(`dataset`),t}var hC=Em(),gC=Em(),_C=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=am(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return bC(this,hC,r,i,e,t,n)},e.prototype.clearColorPalette=function(){xC(this,hC)},e}();function vC(e,t,n,r){return bC(e,gC,am(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function yC(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function bC(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:yC(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function xC(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var SC=/\{@(.+?)\}/g,CC=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&G(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),K(i))return s.status=t,s.dimensionIndex=r,i(s);if(q(i))return JS(i,s).replace(SC,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=lb(o,e,i);if(a&&G(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return lb(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function wC(e){var t,n;return J(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function TC(e){return new EC(e)}var EC=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(BC(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ho(o)?lh:ah,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=Y(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=Y(u.sourceHeader,d.sourceHeader),m=Y(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Iy(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Iy(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&VC(``);var i,a=[],o=[];return U(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&VC(``),a.push(t),o.push(e._getVersionSign())}),n?i=IC(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Ry(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return U(e.blocks,function(e){var n=ZC(e);n>=t&&(t=n+ +(r&&(!n||YC(e)&&!e.noHeader)))}),t}return 0}function QC(e,t,n,r){var i=t.noHeader,a=tw(ZC(t)),o=[],s=t.blocks||[];xo(!s||G(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Mo(l,c)){var u=new gb(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}U(s,function(n,i){var s=t.valueFormatter,c=XC(n)(s?H(H({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):nw(r,o.join(``),i?n:a.html);if(i)return d;var f=US(t.header,`ordinal`,e.useUTC),p=GC(r,e.renderMode).nameStyle,m=WC(r);return e.renderMode===`richText`?aw(e,f,p)+a.richText+d:nw(r,`
`+Bx(f)+`
`+d,n)}function $C(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=G(e)?e:[e],W(e,function(e,t){return US(e,G(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:US(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=GC(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:aw(e,f,v))+(o?``:ow(e,m,h,g,y)):nw(r,(s?``:d)+(a?``:rw(f,!s,v))+(o?``:iw(m,h,g,y)),n)}}function ew(e,t,n,r,i,a){if(e)return XC(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function tw(e){return{html:KC[e],richText:qC[e]}}function nw(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=WC(e);return`
`+t+r+`
`}function rw(e,t,n){var r=t?`margin-left:2px`:``;return``+Bx(e)+``}function iw(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=G(e)?e:[e],``+W(e,function(e){return Bx(e)}).join(`  `)+``}function aw(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function ow(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(G(t)?t.join(` `):t,a)}function sw(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return JS(n)}function cw(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var lw=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Wp()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=qS({color:t,type:e,renderMode:n,markerId:r});return q(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};G(t)?U(t,function(e){return H(n,e)}):H(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function uw(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=G(s),l=sw(t,n),u,d,f,p;if(o>1||c&&!o){var m=dw(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=sb(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=vm(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return JC(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[JC(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!So(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function dw(e,t,n,r,i){var a=t.getData(),o=no(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?U(r,function(e){u(sb(a,n,e),e)}):U(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(JC(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var fw=wm();function pw(e,t){return e.getName(t)||e.getId(t)}var mw=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=CC({count:_w,reset:vw}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(fw(this).sourceManager=new LC(this)).prepareSource();var r=this.getInitialData(e,n);bw(r,this),this.dataTask.context.data=r,fw(this).dataBeforeProcessed=r,hw(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=oC(this),r=n?cC(e):{},i=this.subType;dC.hasClass(i)&&(i+=`Series`),Ya(e,t.getTheme().get(this.subType)),Ya(e,this.getDefaultOption()),im(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&sC(e,r,n)},t.prototype.mergeOption=function(e,t){e=Ya(this.option,e,!0),this.fillDataTextStyle(e.data);var n=oC(this);n&&sC(this.option,e,n);var r=fw(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);bw(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,fw(this).dataBeforeProcessed=i,hw(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!po(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return uw({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Io.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=hC.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[pw(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){J(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return dC.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(dC);eo(mw,xC),eo(mw,hC),Ko(mw,dC);function hw(e){var t=e.name;vm(e)||(e.name=gw(e)||t)}function gw(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return U(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function _w(e){return e.model.getRawData().count()}function vw(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),yw}function yw(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function bw(e,t){U(Ao(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,co(xw,t))})}function xw(e,t){var n=Sw(e);return n&&n.setOutputEnd((t||this).count()),t}function Sw(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Cw=Of.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),ww={line:x_,rect:Hf,roundRect:Hf,square:Hf,circle:Gg,diamond:Of.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Of.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Of.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Cw},Tw={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Ew={};U(ww,function(e,t){Ew[t]=new e});var Dw=Of.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=yc(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Ew[r];i||=(r=`rect`,Ew[r]),Tw[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Ow(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function kw(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?lv(e.slice(8),new Z(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?cv(e.slice(7),{},new Z(t,n,r,i),o?`center`:`cover`):new Dw({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Ow,a&&c.setColor(a),c}function Aw(e){return G(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function jw(e,t){if(e!=null)return G(e)||(e=[e,e]),[Sp(e[0],t[0])||0,Sp(Y(e[1],e[0]),t[1])||0]}var Mw=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return vx(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Ug,n=kw(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=kw(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(mw);function Nw(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=sb(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var Fw=function(e){B(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=kw(e,-1,-1,2,2,null,a);o.attr({z2:Y(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Iw,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Gh(this.childAt(0))},t.prototype.downplay=function(){Kh(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):K_(f,p,o,n),Q_(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,q_(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Zv(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=jw(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Pf){var S=a.style;a.useStyle(H({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(H({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Xv(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Nw(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),ug(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=$m(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Y_(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Y_(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Aw(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Ug);function Iw(e,t){this.parent.drift(e,t)}function Lw(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Rw(e){return e!=null&&!J(e)&&(e={isIgnore:e}),e||{}}function zw(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Zv(t),cursorStyle:t.get(`cursor`)}}function Bw(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Vw=function(){function e(e){this.group=new Ug,this._SymbolCtor=e||Fw}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Rw(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=zw(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Lw(e,i,r,t)&&Bw(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Lw(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):K_(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function Ww(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Gw(e,t){return!isFinite(e)||!isFinite(t)}var Kw=typeof Float32Array<`u`?Float32Array:void 0,qw=typeof Float64Array<`u`?Float64Array:void 0;function Jw(e){return Yw({ctor:Kw},e).arr}function Yw(e,t){var n=e.arr,r=e.ctor;if(t>Np&&(t=Np),!n||e.typed&&n.length=i||h<0)break;if(Gw(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||Gw(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,M=C-v,N=void 0,te=void 0;if(s===`x`){N=Math.abs(A),te=Math.abs(j);var P=E>0?1:-1;p=_-P*N*o,m=v,O=_+P*te*o,k=v}else if(s===`y`){N=Math.abs(ee),te=Math.abs(M);var F=D>0?1:-1;p=_,m=v-F*N*o,O=_,k=v+F*te*o}else N=Math.sqrt(A*A+ee*ee),te=Math.sqrt(j*j+M*M),T=te/(te+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=Qw(O,$w(S,_)),k=Qw(k,$w(C,v)),O=$w(O,Qw(S,_)),k=$w(k,Qw(C,v)),E=O-_,D=k-v,p=_-E*N/te,m=v-D*N/te,p=Qw(p,$w(l,_)),m=Qw(m,$w(u,v)),p=$w(p,Qw(l,_)),m=$w(m,Qw(u,v)),E=_-p,D=v-m,O=_+E*te/N,k=v+D*te/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var tT=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),nT=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new tT},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Gw(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?ml(i,u,f,m,e,s):ml(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?fl(a,d,p,h,b):fl(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(Of),rT=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(tT),iT=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new rT},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Gw(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){MT(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),MT(r,e,t,n)},freeze:function(){}};function MT(e,t,n,r){Vm(n,r)&&(e[t][0]=n,e[t][1]=r)}function NT(e){return PT(e)||IT(e)}function PT(e){return e.type===`interval`}function FT(e){return e.type===`time`}function IT(e){return e.type===`log`}function LT(e){return e.type===`ordinal`}function RT(e){var t=zp(e),n=gp(10,t),r=pp(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Dp(r*n,-t)}function zT(e){return kp(e)+2}function BT(e,t){return _p(e)/_p(t)}function VT(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var KT=function(e){B(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,wT(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new bT({}),G(i)&&(i=new bT({categories:W(i,function(e){return J(e)?e.value:e})})),r._ordinalMeta=i;var a=CT(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,TT(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:q(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=pp(e),e},t.prototype.getTicks=function(){var e=[];return GT(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=up(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=up(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Dp(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Dp(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Dp(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return qT(this,e,nS(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=kp(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),BS(Dp(e.value,n,!0))},t.type=`interval`,t}(vT);vT.registerClass(JT);var YT=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function eE(e){var t=30*sS;return e/=t,e>6?6:e>3?3:e>2?2:1}function tE(e){return e/=oS,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function nE(e,t){return e/=t?aS:iS,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function rE(e){return dp(Bp(e,!0),1)}function iE(e,t,n){var r=Math.max(0,Qa(mS,t)-1);return TS(new Date(e),mS[r],n).getTime()}function aE(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function oE(e,t,n,r,i,a){var o=hS,s=0;function c(e,t,n,i,o,c,l){for(var u=aE(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!QT(yS(e),r[0],r[1],n)){s&&(i=[{value:iE(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=ro(W(u,function(e){return ro(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=ZT.length,l=Math.min(YT(ZT,a,0,c),c-1),u=ZT[l][1],d=ZT[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};vT.registerClass(XT);var cE=0,lE=1,uE=2,dE=function(e){B(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=JT.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[cE]=i[lE]=a[cE]=a[lE]=NaN,wT(r,t.mapperMethods);var s=eS(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},uE,l),r.powStub=new JT({breakParsed:l.original}),r.intervalStub=new JT({breakParsed:l.transformed}),TT(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=eS(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return W(i.getTicks(e||{}),function(e){var i=e.value,o=VT(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,nS(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return qT(this,e,nS(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(BT(e,this.base))},scale:function(e){return VT(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=BT(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return fE.depth=n,pE.lookup=this._lookup,VT(n===2?e:this.intervalStub.transformOut(e,fE),this.base,pE)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Vm(t,n)||t<=0||n<=0)){var r=mE,i=mE;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[cE]=t,r[lE]=n);var o=this.base;this.intervalStub.setExtent2(e,i[cE]=BT(t,o),i[lE]=BT(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Vm(t[0],t[1])&&qp(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(vT);vT.registerClass(dE);var fE={},pE={},mE=[],hE={value:1,category:1,time:1,log:1},gE=wm();function _E(e){var t=e.get(`type`);return(t==null||!Mo(hE,t)&&!vT.getClass(t))&&(t=`value`),t}function vE(e,t,n){var r=eS(),i;switch(r&&(i=kE(e,t,n)),t){case`category`:return new KT({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Fm()});case`time`:return new XT({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new dE({logBase:e.get(`logBase`),breakOption:i});case`value`:return new JT({breakOption:i});default:return new((vT.getClass(t))||JT)({})}}function yE(e,t,n){var r=n?DT(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Vm(i,a)?i===t||a===t?2:it?1:3:3}function bE(e){gE(e).noOnMyZero=!0}function xE(e){return gE(e).noOnMyZero}function SE(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=gS(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(q(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(K(t)){if(e.type===`category`)return function(n,r){return t(CE(e,n),n.value-e.scale.getExtent()[0],null)};var r=eS();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(CE(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function CE(e,t){var n=e.scale;return LT(n)?n.getLabel(t):t.value}function wE(e){return e.get(`interval`)??`auto`}function TE(e){return e.type===`category`&&wE(e.getLabelModel())===0}function EE(e,t){var n={};return U(e.mapDimensionsAll(t),function(t){n[hx(e,t)]=!0}),ao(n)}function DE(e){return e===`middle`||e===`center`}function OE(e){return e.getShallow(`show`)}function kE(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!eS()||!n||!AE(t)?void 0:r}function AE(e){return e!==`category`}function jE(e,t,n,r,i,a){var o=IT(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=UT(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function ME(e,t){return LT(e)?e.getRawOrdinalNumber(t.value):t.value}function NE(e,t){return LT(e)&&!!t.get(`boundaryGap`)}function PE(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function VE(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=W(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=BE(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;U(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new A_(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function HE(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&UE(a,t))){var o=t.mapDimension(a.dim),s={};return U(a.getViewLabels(),function(e){e.tick.offInterval||(s[ME(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function UE(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function WE(e){for(var t=e.length/2;t>0&&Gw(e[t*2-2],e[t*2-1]);t--);return t-1}function GE(e,t){return[e[t*2],e[t*2+1]]}function KE(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function qE(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}$m(f).seriesIndex=e.seriesIndex,ug(f,k,A,j);var M=LE(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:M,smoothMonotone:N,connectNulls:x}),p){var te=a.getCalculationInfo(`stackedOnSeries`),P=0;p.useStyle(Za(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),te&&(P=LE(te.get(`smooth`))),p.setShape({smooth:M,stackedOnSmooth:P,smoothMonotone:N,connectNulls:x}),mg(p,e,`areaStyle`),$m(p).seriesIndex=e.seriesIndex,ug(p,k,A,j)}var F=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var ne=e.get(`triggerEvent`),re=e.get(`triggerLineEvent`),ie=re===!0||ne===!0||ne===`line`,ae=re===!0||ne===!0||ne===`area`;this.packEventData(e,f,ie),p&&this.packEventData(e,p,ae)},t.prototype.packEventData=function(e,t,n){$m(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Cm(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Gw(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Fw(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else cT.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Cm(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else cT.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Ih(this._polyline,e),t&&Ih(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new nT({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new iT({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);K(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=K(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=K(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(qE(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new qf({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=WE(o);c>=0&&(Xv(a,Zv(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Nw(i,e):Pw(i,n)},enableTextSetter:!0},YE(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=KE(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=GE(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Pm(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=GE(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=sy(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=Zw(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=zE(u.stackedOnCurrent,u.current,n,i,o),d=zE(u.current,null,n,i,o),m=zE(u.stackedOnNext,u.next,n,i,o),p=zE(u.next,null,n,i,o)),IE(d,p)>3e3||c&&IE(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),K_(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),K_(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;q(i)?p=QE[i]:K(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,$E))}}}}}function tD(e){e.registerChartView(XE),e.registerSeriesModel(Mw),e.registerLayout(ZE(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,eD(`line`))}var nD=wm(),rD=wm(),iD={estimate:1,determine:2};function aD(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function oD(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:W(cD(n,r),function(t,n){return{formattedLabel:SE(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?lD(e,t):fD(e)}function sD(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:cD(i,r)}:e.type===`category`?dD(e,t):{ticks:r.getTicks(n)}}function cD(e,t){var n=t.getExtent(),r=[];return U(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Km(r,Jm,null),Op(r),W(r,function(e){return{value:e}})}function lD(e,t){var n=e.getLabelModel(),r=uD(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function uD(e,t,n){var r=mD(e),i=wE(t),a=n.kind===iD.estimate;if(!a){var o=gD(r,i);if(o)return o}var s,c;K(i)?s=CD(e,i,!1):(c=i===`auto`?vD(e,n):i,s=CD(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return _D(r,i,l),!0}):_D(r,i,l),l}function dD(e,t){var n=pD(e),r=wE(t),i=gD(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),K(r))a=CD(e,r,!0);else if(r===`auto`){var s=uD(e,e.getLabelModel(),aD(iD.determine));o=s.labelCategoryInterval,a=W(s.labels,function(e){return e.tick})}else o=r,a=CD(e,o,!0);return _D(n,r,{ticks:a,tickCategoryInterval:o})}function fD(e){var t=e.scale.getTicks(),n=SE(e);return{labels:W(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var pD=hD(`axisTick`),mD=hD(`axisLabel`);function hD(e){return function(t){return rD(t)[e]||(rD(t)[e]={list:[]})}}function gD(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=mc(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===iD.estimate?(t.out.noPxChangeTryDetermine.push(so(bD,null,e,S,c)),S):xD(e,S,c)??S}function bD(e,t,n){return xD(e,t,n)==null}function xD(e,t,n){var r=nD(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function SD(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function CD(e,t,n){var r=SE(e),i=e.scale,a=[],o=K(t);return GT(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var wD=wm();function TD(e){wD(e).prepare={}}function ED(e){wD(e).fullUpdate={}}function DD(e){return wD(e).prepare}function OD(e){return wD(e).fullUpdate}var kD=Wm(),AD=wm(),jD=wm();function MD(e,t){var n=e.model,r=AD(OD(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function ND(e,t){return ID(MD(e,t))}function PD(e,t){var n=[];return FD(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),qp(n)&&n>0&&qp(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*YD,e.w2=e.w*n/r)}var $D=[0,1],eO=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),xp(e,$D,tO(this),t)},e.prototype.coordToData=function(e,t){var n=xp(e,tO(this),$D,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=W(sD(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(ME(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=nO(this,n,r);return W(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(LT(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),W(this.scale.getMinorTicks(e),function(e){return W(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=aD(iD.determine),oD(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return XD(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=aD(iD.determine),yD(this,e)},e}();function tO(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function nO(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=XD(e).w;if(!i)return!1;U(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var rO=function(e){B(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(eO),iO=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],aO=1,oO=2,sO=aO|oO;function cO(e,t,n){n||=sO,t?e.dirty|=n:e.dirty&=~n}function lO(e,t){return t||=sO,e.dirty==null||!!(e.dirty&t)}function uO(e){if(e)return lO(e)&&dO(e,e.label,e),e}function dO(e,t,n){var r=t.getComputedTransform();e.transform=Rv(e.transform,r);var i=e.localRect=Lv(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=ly.textMargin);for(var d=0;d<4;d++)fO[d]=u===ly.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===ly.textMargin&&kv(i,fO,!1,!1);var f=e.rect=Lv(e.rect,i);return r&&f.applyTransform(r),u===ly.minMargin&&kv(f,fO,!1,!1),e.axisAligned=Fv(r),(e.label=e.label||{}).ignore=t.ignore,cO(e,!1),cO(e,!0,oO),e}var fO=[0,0,0,0];function pO(e,t,n){return e.transform=Rv(e.transform,n),e.localRect=Lv(e.localRect,t),e.rect=Lv(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Fv(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function mO(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function hO(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Z(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var kO=ls(),AO=new Z(0,0,0,0),jO=function(e,t,n,r,i,a){if(DE(e.nameLocation)){var o=a.stOccupiedRect;o&&MO(pO({},o,a.transGroup.transform),r,i)}else NO(a.labelInfoList,a.dirVec,r,i)};function MO(e,t,n){var r=new Fs;vO(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&mO(t,r)}function NO(e,t,n,r){for(var i=Fs.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Fp(r-SO)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),FO=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],IO={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Ms(u,u,l),Ms(d,d,l));var p=H({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&rS(r.axis.scale))bO().buildAxisBreakLine(r,i,a,m);else{var h=new x_(H({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));pv(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);q(g)&&(g=[g,g]),(q(_)||uo(_))&&(_=[_,_]);var v=jw(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];U([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=kw(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){GO(t,i,s)&&LO(e,t,n,r,i,a,o,iD.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){GO(t,i,s)&&LO(e,t,n,r,i,a,o,iD.determine);var c=UO(e,i,a,r);BO(e,t.labelLayoutList,c),WO(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(QO(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Fs(0,0),_=new Fs(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=ls();_.transform(ms(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*SO/180);var b,x;DE(u)?b=PO.innerTextLayout(e.rotation,y??e.rotation,d):(b=RO(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=_o(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new qf({x:g.x,y:g.y,rotation:b.rotation,silent:PO.isLabelSilent(r),style:Qv(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Mv({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=PO.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,$m(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=uO({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:DE(u)?CO[E]:wO[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function LO(e,t,n,r,i,a,o,s){qO(t)||KO(e,t,i,s,r,o);var c=t.labelLayoutList;YO(e,r,c,a),ek(r,e.rotation,c);var l=e.optionHideOverlap;zO(r,c,l),l&&_O(ro(c,function(e){return e&&!e.label.ignore})),OO(e,n,r,c)}function RO(e,t,n,r){var i=Pp(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Fp(i-SO/2)?(o=c?`bottom`:`top`,a=`center`):Fp(i-SO*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iSO/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function zO(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(TE(r))return;function a(e,a,o){var s=uO(t[a]),c=uO(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=TO(s.label).labelInfo.tick;if(FT(l)&&u.notNice||LT(l)&&u.offInterval){VO(s.label);return}}if(e===!1||s.suggestIgnore){VO(s.label);return}if(c.suggestIgnore){VO(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=hO({marginForce:f},s),c=hO({marginForce:f},c)}vO(s,c,null,{touchThreshold:d})&&VO(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function BO(e,t,n){e.showMinorTicks||U(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=uk(e,t.get(`startValue`,!0)),x=b!=null;!qp(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),qp(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),lk(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),lk(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function lk(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Um(t))}function uk(e,t){return t==null?null:go(t)?NaN:e.parse(t)}function dk(e,t){var n;if(LT(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=G(r)?r:[r,r]}return[fk(n[0]),fk(n[1])]}function fk(e){return vc(typeof e==`boolean`?0:e,1)||0}function pk(e){var t=ok(e.scale);return t.extent||=Fm(),t}function mk(e,t){pk(e).dimIdxInCoord=t.get(e.dim)}function hk(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||gk(n,e,i,r,t)}function gk(e,t,n,r,i){var a=pk(t),o=a.extent,s=!1;LD(t,function(r){if(r.boxCoordinateSystem){var i=ax(r).coord,c=a.dimIdxInCoord;if(c>=0&&G(i)){var l=i[c];l!=null&&!G(l)&&Im(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;U(EE(u,n),function(e){zm(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Sk(e,t,r);vk(e,new ck(e,r,o,s,c),i),a.extent=null}function _k(e,t){var n=e.scale;vk(n,new ck(n,e.model,t,!1,!1),sk)}function vk(e,t,n){e.rawExtentInfo=t,t.from=n}function yk(e,t){bk.set(e,t)}var bk=X();function xk(e,t,n,r,i){e.rawExtentInfo||_k({scale:e,model:t},i||Fm());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Sk(e,t,n){var r=NE(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return VD(t,function(e){a=!!bk.get(e)||a}),a}function Ck(e,t,n,r){if(n.ctnShp){var i;if(VD(e,function(t){var n=bk.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Lm(i,a[0]),Rm(i,a[1]),bE(e))}}),i){var a=t.getExtent();if(LT(t))e.onBand||t.setExtent2(1,up(a[0],a[0]+i[0]),dp(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=up(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=dp(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function wk(){UD(`liPosMinGap`,Tk)}function Tk(e,t,n){var r=X(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=_b(u);function f(n){zD(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Yw(Ek,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var Ek=Yw({ctor:qw},50);function Dk(e){return function(t,n){var r=XD(t,{fromStat:{key:e}});if(qp(r.w2))return[-r.w2/2,r.w2/2]}}function Ok(e,t){return e+`|&`+t}function kk(e){return wk(),{liPosMinGap:!LT(e.scale)}}function Ak(e,t,n,r){qD(e,{key:t,seriesType:n,coordSysType:r,getMetrics:kk})}function jk(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var Mk={left:0,right:0,top:0,bottom:0},Nk=[`25%`,`25%`],Pk=`cartesian2d`,Fk=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=cC(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&sC(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&sC(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Mk,outerBoundsContain:`all`,outerBoundsClampWidth:Nk[0],outerBoundsClampHeight:Nk[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(dC),Ik=Wm(),Lk=`__ec_stack_`;function Rk(e){return e.get(`stack`)||Lk+e.seriesIndex}function zk(e,t){var n=Bk(e,t);return n.columnMap=Vk(n),n}function Bk(e,t){var n=Ok(t,Pk),r=[],i=XD(e,{fromStat:{key:n},min:1});return RD(e,n,function(e){r.push({barWidth:Sp(e.get(`barWidth`),i.w),barMaxWidth:Sp(e.get(`barMaxWidth`),i.w),barMinWidth:Sp(e.get(`barMinWidth`)||(Wk(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Rk(e)})}),{bandWidthResult:i,seriesInfo:r}}function Vk(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};U(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Mo(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=up(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=dp(35-o.length*4,15)+`%`;var c=Sp(i,t),l=Sp(a,1),u=(n-c)/(r+(r-1)*l);u=dp(u,0),U(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=up(o,i)),a&&(o=dp(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&io&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=dp(u,0);var d=0,f;U(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return U(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function Hk(e){return{seriesType:e,overallReset:function(t){var n=Ok(e,Pk);BD(t,n,function(t){var r=zk(t,e);RD(t,n,function(e){var t=r.columnMap[Rk(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function Uk(e){return{seriesType:e,plan:aT(),reset:function(e){if(nk(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=mx(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(jk(i))),p=Wk(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Jw(r*3),c=p&&s&&Jw(r*3),l=p&&Jw(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,fp(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(mw);mw.registerClass(qk);var Jk=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return vx(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Xm(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Ex(qk.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:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(qk),Yk=`\0__throttleOriginMethod`,Xk=`\0__throttleRate`,Zk=`\0__throttleType`;function Qk(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function $k(e,t,n,r){var i=e[t];if(i){var a=i[Yk]||i,o=i[Zk];if(i[Xk]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Qk(a,n,r===`debounce`),i[Yk]=a,i[Zk]=r,i[Xk]=n}return i}}function eA(e,t){var n=e[t];n&&n[Yk]&&(n.clear&&n.clear(),e[t]=n[Yk])}var tA=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),nA=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new tA},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Z_(t,e,$m(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(cT),dA={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=cA(t.x,e.x),s=lA(t.x+t.width,i),c=cA(t.y,e.y),l=lA(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=lA(t.r,e.r),a=cA(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},fA={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Hf({shape:H({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?nA:u_,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=rA(xA(i),{isRoundCap:l===nA}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?K_:q_)(u,{shape:p},a)}return u}};function pA(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function mA(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?K_:q_)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?K_:q_)(n,{shape:l},u,i)}function hA(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function bA(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function xA(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function SA(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;H(u,sA(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?jA(i,a.coordinateSystem):MA(i,a.coordinateSystem),p=Zv(r);Xv(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Nw(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,iA(e,h===`outside`?f:h,xA(o),r.get([`label`,`rotate`]))}cy(m,p,a.getRawValue(n),function(e){return Pw(t,e)});var g=r.getModel([`emphasis`]);ug(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),mg(e,r),bA(i)&&(e.style.fill=`none`,e.style.stroke=`none`,U(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function CA(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var wA=function(){function e(){}return e}(),TA=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new wA},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function OA(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function kA(e,t,n){if(_T(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function AA(e,t,n){return new(e.type===`polar`?u_:Hf)({shape:kA(t,n,e),silent:!0,z2:0})}function jA(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function MA(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function NA(e){e.registerChartView(uA),e.registerSeriesModel(Jk),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Hk(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Uk(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,eD(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),Kk(e)}function PA(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),LA=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),RA=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new LA(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new LA(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new LA(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new LA(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new LA(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new LA(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),zA=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,BA=[],VA=Io.browser.firefox&&+Io.browser.version.split(`.`)[0]<39;function HA(e,t,n,r){return n||={},r?UA(e,t,n):VA&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?UA(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function UA(e,t,n){if(Io.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Lx(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Px(BA,e,r,i)){n.zrX=BA[0],n.zrY=BA[1];return}}n.zrX=n.zrY=0}function WA(e){return e||window.event}function GA(e,t,n){if(t=WA(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&HA(e,i,t,n)}else{HA(e,t,t,n);var a=KA(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&zA.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function KA(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function qA(e,t,n,r){e.addEventListener(t,n,r)}function JA(e,t,n,r){e.removeEventListener(t,n,r)}var YA=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function XA(e){return e.which===2||e.which===3}var ZA=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=QA(r)/QA(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=$A(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},tj=`silent`;function nj(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:rj}}function rj(){YA(this.event)}var ij=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Wu),aj=function(){function e(e,t){this.x=e,this.y=t}return e}(),oj=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],sj=new Z(0,0,0,0),cj=function(e){B(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new aj(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new ij,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new RA(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(U(oj,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=dj(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new aj(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new aj(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=nj(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new aj(e,t);if(uj(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Z(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(sj.copy(u.getBoundingRect()),u.transform&&sj.applyTransform(u.transform),sj.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function lj(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||tj}return!1}function uj(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=lj(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==tj)){t.target=o;break}}}function dj(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var fj=32,pj=7;function mj(e){for(var t=0;e>=fj;)t|=e&1,e>>=1;return e+t}function hj(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function gj(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function vj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function yj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function bj(e,t){var n=pj,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=pj||m>=pj);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-vj(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=pj||g>=pj);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),_j(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Sj=!1;function Cj(){Sj||(Sj=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function wj(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Tj=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=wj}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Ej=Io.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function Dj(){return new Date().getTime()}var Oj=function(e){B(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=Dj()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Ej(t),!e._paused&&e.update())}Ej(t)},t.prototype.start=function(){this._running||(this._time=Dj(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=Dj(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=Dj()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Uu(e,t.loop);return this.addAnimator(n),n},t}(Wu),kj=300,Aj=Io.domSupported,jj=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:W(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Mj={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Nj=!1;function Pj(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Fj(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Ij(e){e&&(e.zrByTouch=!0)}function Lj(e,t){return GA(e.dom,new zj(e,t),!0)}function Rj(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var zj=function(){function e(e,t){this.stopPropagation=No,this.stopImmediatePropagation=No,this.preventDefault=No,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Bj={mousedown:function(e){e=GA(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=GA(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=GA(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=GA(this.dom,e);var t=e.toElement||e.relatedTarget;Rj(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Nj=!0,e=GA(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Nj||(e=GA(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=GA(this.dom,e),Ij(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Bj.mousemove.call(this,e),Bj.mousedown.call(this,e)},touchmove:function(e){e=GA(this.dom,e),Ij(e),this.handler.processGesture(e,`change`),Bj.mousemove.call(this,e)},touchend:function(e){e=GA(this.dom,e),Ij(e),this.handler.processGesture(e,`end`),Bj.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!ym(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[mM],e},t.prototype.setTheme=function(e){this._theme=new by(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function DM(e,t){return e.join(`,`)===t.join(`,`)}var OM=U,kM=J,AM=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function jM(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=AM.length;n0?e[n-1].seriesModel:null)}),eN(e))})}function eN(e){U(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Mp(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var tN=function(){function e(){this.group=new Ug,this.uid=Sx(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Wo(tN),Zo(tN);var nN=wm(),rN={itemStyle:Qo(_y,!0),lineStyle:Qo(my,!0)},iN={lineStyle:`stroke`,itemStyle:`fill`};function aN(e,t){return e.visualStyleMapper||rN[t]||(console.warn(`Unknown style type '`+t+`'.`),rN.itemStyle)}function oN(e,t){return e.visualDrawType||iN[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var sN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=aN(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=oN(e,r),c=a[s],l=K(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||K(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||K(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=H({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},cN=new by,lN={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=aN(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){cN.option=n[r];var o=i(cN);H(e.ensureUniqueItemVisual(t,`style`),o),cN.option.decal&&(e.setItemVisual(t,`decal`,cN.option.decal),cN.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},uN={performRawSeries:!0,overallReset:function(e){var t=X();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();nN(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=nN(e).scope,a=oN(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},dN=Math.PI;function fN(e,t){t||={},Za(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Ug,r=new Hf({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new qf({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Hf({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new D_({shape:{startAngle:-dN/2,endAngle:-dN/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:dN*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:dN*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var pN=function(){function e(e,t,n,r){this._stageTaskMap=X(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Xm(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=X();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;U(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});xo(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;U(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=X(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||CC({plan:vN,reset:yN,count:SN}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||CC({reset:mN});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=X(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;xo(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):U(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,CC({reset:hN,onDirty:_N})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return K(e)&&(e={overallReset:e,seriesType:CN(e)}),e.uid=Sx(`stageHandler`),t&&(e.visualType=t),e},e}();function mN(e){e.overallReset(e.ecModel,e.api,e.payload)}function hN(e){return e.dirtyOnOverallProgress&&gN}function gN(){this.agent.dirty(),this.getDownstream().dirty()}function _N(){this.agent&&this.agent.dirty()}function vN(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function yN(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=rm(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?W(t,function(e,t){return xN(t)}):bN}var bN=xN(0);function xN(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),NN=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],PN=NN.concat([`symbolKeepAspect`]),FN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&XN(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function $N(e,t,n){for(var r=t.type===`radial`?QN(e,t,n):ZN(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:uo(e)?[e]:G(e)?e:null}function iP(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&rP(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=W(n,function(e){return e/i}),r/=i)}return[n,r]}var aP=new nf(!0);function oP(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function sP(e){return typeof e==`string`&&e!==`none`}function cP(e){var t=e.fill;return t!=null&&t!==`none`}function lP(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function uP(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function dP(e,t,n){var r=os(t.image,t.__image,n);if(cs(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Po),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function fP(e,t,n,r,i){var a,o=oP(n),s=cP(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||aP,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?$N(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?$N(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?dP(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?dP(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=iP(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&uP(e,n),s&&lP(e,n)):(s&&lP(e,n),o&&uP(e,n)),T&&e.setLineDash([])}function pP(e,t,n){var r=t.__image=os(n.image,t.__image,t,t.onload);if(r&&cs(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function mP(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=iP(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(oP(n)&&e.strokeText(i,n.x,n.y),cP(n)&&e.fillText(i,n.x,n.y)):(cP(n)&&e.fillText(i,n.x,n.y),oP(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var hP=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],gP=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function _P(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){OP(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?hd.opacity:o}(r||t.blend!==n.blend)&&(a||=(OP(e,i),!0),e.globalCompositeOperation=t.blend||hd.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[cF]){if(this._disposed){this.id;return}var r,i,a;if(J(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[cF]=!0,BF(this),!this._model||t){var o=new CM(this._api),s=this._theme,c=this._model=new gM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},JF);var l={seriesTransition:a,optionChanged:!0};if(n)this[uF]={silent:r,updateParams:l},this[cF]=!1,this.getZr().wakeUp();else{try{SF(this),TF.update.call(this,null,l)}catch(e){throw this[uF]=null,this[cF]=!1,e}this._ssr||this._zr.flush(),this[uF]=null,this[cF]=!1,kF.call(this,r),AF.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[cF]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[uF]&&(r??=this[uF].silent,i=this[uF].updateParams,this[uF]=null),this[cF]=!0,BF(this);try{this._updateTheme(e),n.setTheme(this._theme),SF(this),TF.update.call(this,{type:`setTheme`},i)}catch(e){throw this[cF]=!1,e}this[cF]=!1,kF.call(this,r),AF.call(this,r)}}},t.prototype._updateTheme=function(e){q(e)&&(e=XF[e]),e&&(e=V(e),e&&ZM(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Io.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return U(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;U(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return U(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if($F[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();U(QF,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(V(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=Na.createCanvas(),h=$j(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return U(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Hf({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),U(u,function(e){var t=new Pf({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return EF(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return EF(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return EF(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return U(Em(n,e),function(e,n){n.indexOf(`Models`)>=0&&U(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Em(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?RN(i,t):LN(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;U(UF,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&BN(i,function(e){var t=$m(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=H({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;U(KF,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),FA(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&jm(this.getDom(),tI,``);var e=this,t=e._api,n=e._model;U(e._componentsViews,function(e){e.dispose(n,t)}),U(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete QF[e.id]},t.prototype.resize=function(e){if(!this[cF]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[uF]&&(r??=this[uF].silent,n=!0,this[uF]=null),this[cF]=!0,BF(this);try{n&&SF(this),TF.update.call(this,{type:`resize`,animation:H({duration:0},e&&e.animation)})}catch(e){throw this[cF]=!1,e}this[cF]=!1,kF.call(this,r),AF.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(J(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),ZF[e]){var n=ZF[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=H({},e);return t.type=GF[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(J(t)||(t={silent:!!t}),WF[e.type]&&this._model){if(this[cF]){this._pendingActions.push(e);return}var n=t.silent;OF.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Io.browser.weChat&&this._throttledZrFlush(),kF.call(this,n),AF.call(this,n)}},t.prototype.updateLabelLayout=function(){VN.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){SF=function(e){TD(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),CF(e,!0),CF(e,!1),t.plan()},CF=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cY(t.get(`hoverLayerThreshold`),cM.hoverLayerThreshold)&&!Io.node&&!Io.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=zv(e);t.eachRendered(function(e){return Vv(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!J_(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(J_(e))return;if(e instanceof Of&&bg(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}IF=function(e){return new(function(t){B(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Gh(t,n),RF(e)},n.prototype.leaveEmphasis=function(t,n){Kh(t,n),RF(e)},n.prototype.enterBlur=function(t){qh(t),RF(e)},n.prototype.leaveBlur=function(t){Jh(t),RF(e)},n.prototype.enterSelect=function(t){Yh(t),RF(e)},n.prototype.leaveSelect=function(t){Xh(t),RF(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[lF]},n.prototype.usingTHL=function(){return e._usingTHL},n}(fh))(e)},LF=function(e){function t(e,t){for(var n=0;n=0)){mI.push(n);var o=pN.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function gI(e,t){ZF[e]=t}function _I(e,t,n){var r=WN(`registerMap`);r&&r(e,t,n)}var vI=NC;pI($P,sN),pI(nF,lN),pI(nF,uN),pI($P,FN),pI(nF,IN),pI(oF,HP),aI(ZM),oI(KP,QM),gI(`default`,fN),uI({type:bh,event:bh,update:bh},No),uI({type:xh,event:xh,update:xh},No),uI({type:Sh,event:Th,update:Sh,action:No,refineEvent:yI,publishNonRefinedEvent:!0}),uI({type:Ch,event:Th,update:Ch,action:No,refineEvent:yI,publishNonRefinedEvent:!0}),uI({type:wh,event:Th,update:wh,action:No,refineEvent:yI,publishNonRefinedEvent:!0});function yI(e,t,n,r){return{eventContent:{selected:sg(n),isFromClick:t.isFromClick||!1}}}iI(`default`,{}),iI(`dark`,jN);var bI=[],xI={registerPreprocessor:aI,registerProcessor:oI,registerPostInit:sI,registerPostUpdate:cI,registerUpdateLifecycle:lI,registerAction:uI,registerCoordinateSystem:dI,registerLayout:fI,registerVisual:pI,registerTransform:vI,registerLoading:gI,registerMap:_I,registerImpl:UN,PRIORITY:sF,ComponentModel:dC,ComponentView:tN,SeriesModel:mw,ChartView:cT,registerComponentModel:function(e){dC.registerClass(e)},registerComponentView:function(e){tN.registerClass(e)},registerSeriesModel:function(e){mw.registerClass(e)},registerChartView:function(e){cT.registerClass(e)},registerCustomSeries:function(e,t){KN(e,t)},registerSubTypeDefaulter:function(e,t){dC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){eM(e,t)}};function SI(e){if(G(e)){U(e,function(e){SI(e)});return}Qa(bI,e)>=0||(bI.push(e),K(e)&&(e={install:e}),e.install(xI))}var CI=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),wI=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Om).models[0]},t.type=`cartesian2dAxis`,t}(dC);eo(wI,CI);var TI={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:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},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,color:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},EI=Ya({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},TI),DI=Ya({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},TI),OI={category:EI,value:DI,time:Ya({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},DI),log:Za({logBase:10},DI)};function kI(e,t,n,r){U(hE,function(i,a){var o=Ya(Ya({},OI[a],!0),r,!0),s=function(e){B(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=oC(this),r=n?cC(e):{};Ya(e,t.getTheme().get(a+`Axis`)),Ya(e,this.getDefaultOption()),e.type=AI(e),n&&sC(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=bT.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=bO();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,AI)}function AI(e){return e.type||(e.data?`category`:`value`)}var jI=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return W(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ro(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),MI=[`x`,`y`];function NI(e){return(e.type===`interval`||e.type===`time`)&&!rS(e)}var PI=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Pk,t.dimensions=MI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(NI(e)&&NI(t)){var n=DT(e,null),r=DT(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=gs([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Z(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Ms(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Ms(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Z(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(jI);function FI(e,t){var n=e.scale,r=e.model,i=xk(n,r,r.ecModel,e,null),a=IT(n),o=IT(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=fp(l[0].value-l[1].value),g=fp(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=Dp(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Dp(hp(C[0]/E)*E,D),O=Dp(mp(C[1]/E)*E,D);var e=pp((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=mp(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}jE(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function II(e,t){var n=IT(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=HT(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?RI(r,t):LI(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=zT(d)),i[0]||(s[0]=Dp(mp(s[0]/u)*u,l)),i[1]||(s[1]=Dp(hp(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),jE(e,i,o,s,a,c)}function LI(e,t){var n=WT(t.splitNumber,5),r=kT(e),i=t.minInterval,a=t.maxInterval,o=Bp(r/n,!0);i!=null&&oa&&(o=a);var s=zT(o),c=e.getExtent(),l=[Dp(hp(c[0]/o)*o,s),Dp(mp(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function RI(e,t){var n=WT(t.splitNumber,10),r=e.getExtent(),i=kT(e),a=dp(Rp(i),1);n/i*a<=.5&&(a*=10);var o=zT(a),s=[Dp(hp(r[0]/a)*a,o),Dp(mp(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function zI(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;BI(t,n,r,i,null)}function BI(e,t,n,r,i){var a=xk(e,t,r,n,i),o=PT(e)||FT(e);VI(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Ck(n,e,a,r)}function VI(e,t){HI[e.type](e,t)}var HI={interval:II,log:II,time:sE,ordinal:No},UI=[[3,1],[0,2]],WI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=MI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;U(this._axesList,function(e){hk(e,1);var t=e.scale;LT(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=ao(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):zI(i)}U(n,function(e){YI(e,e.__alignTo)?zI(e):FI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};U(n.x,function(e){KI(n,`y`,e,i)}),U(n.y,function(e){KI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=iC(e,t),i=this._rect=tC(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(ZI(a,i),!n){var c=tL(i,o,a,s,t),l=void 0;if(s)$I?($I(this._axesList,i),ZI(a,i)):l=eL(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=rL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=eL(d,f,p,i,a,c,r))}nL(i,a,iD.determine,null,l,r),U(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];NT(a.scale)&&kE(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&U(r,function(e){e.__alignTo=n})}function YI(e,t){return rS(e.scale)||rS(t.scale)||t.scale.getTicks().length<2}function XI(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function ZI(e,t){U(e.x,function(e){return QI(e,t.x,t.width)}),U(e.y,function(e){return QI(e,t.y,t.height)})}function QI(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),XI(e,t)}var $I;function eL(e,t,n,r,i,a,o){nL(r,i,iD.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=io(s,function(e){return e>0})==null;return kv(r,s,!0,!0,n),ZI(i,r),c;function l(e){U(i[tv[e]],function(t){if(OE(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!go(t)&&t>1e-4&&(e/=t),e}}function tL(e,t,n,r,i){var a=new DO(iL);return U(n,function(n){return U(n,function(n){if(OE(n.model)){var o=!r;n.axisBuilder=ik(e,t,n.model,i,a,o)}})}),a}function nL(e,t,n,r,i,a){var o=n===iD.determine;U(t,function(t){return U(t,function(t){OE(t.model)&&(ak(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[tv[1-t]]=e[nv[t]]<=a.refContainer[nv[t]]*.5?0:1-t==1?2:1}U(t,function(e,t){return U(e,function(e){OE(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function rL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=tC(e.get(`outerBounds`,!0)||Mk,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||Qa([`all`,`axisLabel`],a)<0?`all`:a,s=[wp(Y(e.get(`outerBoundsClampWidth`,!0),Nk[0]),t.width),wp(Y(e.get(`outerBoundsClampHeight`,!0),Nk[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var iL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;jO(e,t,n,r,i,a),DE(e.nameLocation)||U(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&NO(e.labelInfoList,e.dirVec,r,i)})};function aL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return oL(n,e,t),n.seriesInvolved&&cL(n,e),n}function oL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];U(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=hL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(U(n.getAxes(),co(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&U(f.baseAxes,co(p,!d||`cross`,u)),d&&U(f.otherAxes,co(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||mL(d))){s??=d.get(`triggerTooltip`),d=r?sL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=hL(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:mL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=lL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function sL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};U(s,function(e){c[e]=V(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&Za(l,u.textStyle)}return e.model.getModel(`axisPointer`,new by(c,n,r))}function cL(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&U(e.coordSysAxesInfo[hL(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function lL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function dL(e){var t=fL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=mL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(AL(this._zr,`globalPan`)||PL(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(YA(r.event),r.__ecRoamConsumed=!0,VL(e,t,n,r,i))},t}(Wu);function PL(e){return e.__ecRoamConsumed}var FL=wm();function IL(e){var t=FL(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function LL(e,t,n,r){for(var i=IL(e).roam,a=i[t]=i[t]||[],o=0;o1e-6;NR[0]=o?(i[0]-r.x)/a:i[0],NR[1]=o?(i[1]-r.y)/a:i[1],Ms(NR,NR,e.mtRawInv);var s=kR(e,NR);PR(t,s,a),U(n,function(e){e!==t&&PR(e,s.slice(),a)})}var NR=[];function PR(e,t,n){var r=e.option;r.center=t,r.zoom=n}function FR(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function IR(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=UL(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function LR(e,t,n,r,i,a,o,s){if(!wR(e)){n.disable();return}n.enable(Y(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Uv(Za({type:zR(r,e.subType,uh)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}new Z(0,0,0,0);function RR(e,t,n){var r=zR(t,n,uh);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Am(e,t,n),function(t){CR(e,t),TR(e,t,r,i)})})}function zR(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function BR(e){return e.zoom!=null}function VR(e,t,n,r,i,a,o){var s=new GL(null,jR(e.ecModel,t));return nR(s,n,r,i,a),o?rR(s,o.x,o.y,o.width,o.height):rR(s,n,r,i,a),tR(s,e),s}var HR=wm();function UR(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,XR(t,n,e),U(n,function(n){U(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,co(WR,e))})}),t.wrapMethod(`cloneShallow`,co(KR,e)),U(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,co(GR,e))}),xo(n[t.dataType]===t)}function WR(e,t){if(YR(this)){var n=H({},HR(this).datas);n[this.dataType]=t,XR(t,n,e)}else ZR(t,this.dataType,HR(this).mainData,e);return t}function GR(e,t){return e.struct&&e.struct.update(),t}function KR(e,t){return U(HR(t).datas,function(n,r){n!==t&&ZR(n.cloneShallow(),r,t,e)}),t}function qR(e){var t=HR(this).mainData;return e==null||t==null?t:HR(t).datas[e]}function JR(){var e=HR(this).mainData;return e==null?[{data:e}]:W(ao(HR(e).datas),function(t){return{type:t,data:HR(e).datas[t]}})}function YR(e){return HR(e).mainData===e}function XR(e,t,n){HR(e).datas={},U(t,function(t,r){ZR(t,r,e,n)})}function ZR(e,t,n,r){HR(n).datas[t]=e,HR(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=qR,e.getLinkedDataAll=JR}var QR=U,$R=J,ez=-1,tz=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=V(t);this.type=r,this.mappingMethod=n,this._normalizeData=pz[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(iz(i),nz(i)):n===`category`?i.categories?rz(i):iz(i,!0):(xo(n!==`linear`||i.dataExtent),iz(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return so(this._normalizeData,this)},e.listVisualTypes=function(){return ao(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){J(e)?U(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=G(t)?[]:J(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&QR(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(G(e))e=e.slice();else if($R(e)){var t=[];QR(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function iz(e,t){var n=e.visual,r=[];J(n)?QR(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),fz(e,r)}function az(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:uz([0,1])}}function oz(e){var t=this.option.visual;return t[Math.round(xp(e,[0,1],[0,t.length-1],!0))]||{}}function sz(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function cz(e){var t=this.option.visual;return t[this.option.loop&&e!==ez?e%t.length:e]}function lz(){return this.option.visual[0]}function uz(e){return{linear:function(t){return xp(t,e,this.option.visual,!0)},category:cz,piecewise:function(t,n){var r=dz.call(this,n);return r??=xp(t,e,this.option.visual,!0),r},fixed:lz}}function dz(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[tz.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function fz(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=W(t,function(e){return Hl(e)||[0,0,0,1]})),t}var pz={linear:function(e){return xp(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=tz.findPieceIndex(e,t,!0);if(n!=null)return xp(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??ez},fixed:No};function mz(e,t,n){return e?t<=n:t=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof _z||(t=this._nodesMap[hz(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),vz=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=X(),t=X();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function yz(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}eo(_z,yz(`hostGraph`,`data`)),eo(vz,yz(`hostGraph`,`edgeData`));function bz(e,t,n,r,i){for(var a=new gz(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=vx(e,n);else{var h=nx.get(p),g=h&&h.dimensions||[];Qa(g,`value`)<0&&g.concat([`value`]);var _=Zb(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new Xb(_,n),m.initData(e)}var v=new Xb([`value`],n);return v.initData(c,s),i&&i(m,v),UR({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var xz=`-->`,Sz=function(e){return e.get(`autoCurveness`)||null},Cz=function(e,t){var n=Sz(e),r=20,i=[];if(uo(n))r=n;else if(G(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return uw({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=W(this.option.categories||[],function(e){return e.value==null?H({value:0},e):e}),t=new Xb([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return vR(e)&&e},t.type=`series.`+Mz,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Q.color.primary}}},t}(mw);function Pz(e){return e instanceof Array||(e=[e,e]),e}var Fz=Zm(Mz,Iz);function Iz(e){e.eachSeriesByType(Mz,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=Pz(e.get(`edgeSymbol`)),i=Pz(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=Pz(r.getShallow(`symbol`,!0)),o=Pz(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(H(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function Lz(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),Rz(n,e)}}function Rz(e,t){e.eachEdge(function(e,n){var r=vo(e.getModel().get([`lineStyle`,`curveness`]),-jz(e,t,n,!0),0),i=ys(e.node1.getLayout()),a=ys(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var zz=Zm(Mz,Bz);function Bz(e,t){e.eachSeriesByType(Mz,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];U(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Ug),mB=function(){function e(e){this.group=new Ug,this._LineCtor=e||pB}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=gB(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=gB(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!hB(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function gB(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Zv(t)}}function _B(e){return isNaN(e[0])||isNaN(e[1])}function vB(e){return e&&!_B(e[0])&&!_B(e[1])}var yB=[],bB=[],xB=[],SB=yl,CB=js,wB=Math.abs;function TB(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){yB[0]=SB(r[0],i[0],a[0],u),yB[1]=SB(r[1],i[1],a[1],u);var d=wB(CB(yB,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function EB(e,t){var n=[],r=Cl,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[ys(c[0]),ys(c[1])],c[2]&&c.__original.push(ys(c[2])));var d=c.__original;if(c[2]!=null){if(vs(i[0],d[0]),vs(i[1],d[2]),vs(i[2],d[1]),l&&l!==`none`){var f=Hz(e.node1),p=TB(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=Hz(e.node2),p=TB(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}vs(c[0],i[0]),vs(c[1],i[2]),vs(c[2],i[1])}else{if(vs(a[0],d[0]),vs(a[1],d[1]),Cs(o,a[1],a[0]),Ds(o,o),l&&l!==`none`){var f=Hz(e.node1);Ss(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=Hz(e.node2);Ss(a[1],a[1],o,-f*t)}vs(c[0],a[0]),vs(c[1],a[1])}})}var DB=wm();function OB(e){if(e)return DB(e).bridge}var kB=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Mz,t}return t.prototype.init=function(e,t){var n=new Vw,r=new mB,i=this.group,a=new Ug;this._controller=new NL(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=wR(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&yR(o,2,i,this._firstRender?null:e),EB(e.getGraph(),Vz(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&LR(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),Gz(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),Rz(e.getGraph(),e),r.updateLayout(e)}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&($m(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&($m(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){qz(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=wR(t);this._active&&r&&(yR(this._mainGroup,2,r,null),BR(e)&&(this._updateNodeAndLinkScale(),EB(t.getGraph(),Vz(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=Vz(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(EB(e.getGraph(),Vz(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=OB(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(qL(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Ug,o=n.group.children(),s=r.group.children(),c=new Ug,l=new Ug;a.add(l),a.add(c);for(var u=0;ua&&(t[1-r]=Mp(t[r],d.sign*a)),t}function IB(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function LB(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var RB=wm(),zB=V,BB=so,VB=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Ug,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=co(HB,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}KB(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&XD(r).w>o)return!0;if(a){var s=fL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=RB(e).pointerEl=new $_[i.type](zB(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=RB(e).labelEl=new qf(zB(t.label));e.add(i),WB(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=RB(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=RB(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),WB(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=wv(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){YA(e.event)},onmousedown:BB(this._onHandleDragMove,this,0,0),drift:BB(this._onHandleDragMove,this),ondragend:BB(this._onHandleDragEnd,this)}),n.add(r)),KB(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);G(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,$k(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){HB(this._axisPointerModel,!t&&this._moveAnimation,this._handle,GB(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(GB(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(GB(r)),RB(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),eA(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function HB(e,t,n,r){UB(RB(n).lastProp,r)||(RB(n).lastProp=r,t?K_(n,r,e):(n.stopAnimation(),n.attr(r)))}function UB(e,t){if(J(e)&&J(t)){var n=!0;return U(t,function(t,r){n&&=UB(e[r],t)}),!!n}return e===t}function WB(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function GB(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function KB(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function qB(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function JB(e,t,n,r,i){var a=XB(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=HS(o.get(`padding`)||0),c=o.getFont(),l=mc(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),YB(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Qv(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function YB(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function XB(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:CE(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};U(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),q(o)?a=o.replace(`{value}`,a):K(o)&&(a=o(s))}return a}function ZB(e,t,n){var r=ls();return ms(r,r,n.rotation),ps(r,r,n.position),_v([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function QB(e,t,n,r,i,a){var o=PO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),JB(t,r,i,a,{position:ZB(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function $B(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function eV(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function tV(e,t,n){return XD(e,{fromStat:{sers:W(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function nV(e,t,n){return[dp(up(t[0],t[1]),e-n/2),up(e+n/2,dp(t[0],t[1]))]}var rV=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=iV(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=qB(r),f=aV[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}QB(t,e,tk(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=tk(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=ZB(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=iV(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=up(o[1],l[c]),l[c]=dp(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(VB);function iV(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var aV={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:$B([t,r[0]],[t,r[1]],oV(e))}},shadow:function(e,t,n,r,i,a){var o=tV(e,i,a),s=r[1]-r[0],c=nV(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:eV([l,r[0]],[u-l,s],oV(e))}}};function oV(e){return e.dim===`x`?0:1}var sV=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.color.accent60,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:Q.color.accent40,throttle:40}},t}(dC),cV=wm(),lV=U;function uV(e,t,n){if(!Io.node){var r=t.getZr();cV(r).records||(cV(r).records={}),dV(r,t);var i=cV(r).records[e]||(cV(r).records[e]={});i.handler=n}}function dV(e,t){if(cV(e).initialized)return;cV(e).initialized=!0,n(`click`,co(mV,`click`)),n(`mousemove`,co(mV,`mousemove`)),n(`mousewheel`,co(mV,`mousewheel`)),n(`globalout`,pV);function n(n,r){e.on(n,function(n){var i=hV(t);lV(cV(e).records,function(e){e&&r(e,n,i.dispatchAction)}),fV(i.pendings,t)})}}function fV(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function pV(e,t,n){e.handler(`leave`,null,n)}function mV(e,t,n,r){t.handler(e,n,r)}function hV(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function gV(e,t){if(!Io.node){var n=t.getZr();(cV(n).records||{})[e]&&(cV(n).records[e]=null)}}var _V=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;uV(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){gV(`axisPointer`,t)},t.prototype.dispose=function(e,t){gV(`axisPointer`,t)},t.type=`axisPointer`,t}(tN);function vV(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Cm(a,e);if(o==null||o<0||G(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(W(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var yV=wm();function bV(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||so(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){AV(i)&&(i=vV({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=AV(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||AV(i),f={},p={},m={list:[],map:{}},h={showPointer:co(CV,p),showTooltip:co(wV,m)};U(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);U(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=OV(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&xV(e,o,h,!1,f)}})});var g={};return U(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&U(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,kV(t),kV(e)))),g[e.key]=a}})}),U(g,function(e,t){xV(u[t],e,h,!0,f)}),TV(p,u,f),EV(m,i,e,o),DV(u,o,n),f}}function xV(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=SV(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&H(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function SV(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return U(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(qp(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),U(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function CV(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function wV(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=hL(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function TV(e,t,n){var r=n.axesInfo=[];U(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function EV(e,t,n,r){if(AV(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function DV(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=yV(r)[i]||{},o=yV(r)[i]={};U(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&U(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}U(a,function(e,t){!o[t]&&c.push(l(e))}),U(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function OV(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function kV(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function AV(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function jV(e){_L.registerAxisPointerClass(`CartesianAxisPointer`,rV),e.registerComponentModel(sV),e.registerComponentView(_V),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=aL(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},bV)}function MV(e){SI(OL),SI(jV)}function NV(e,t){var n=HS(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Hf({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var PV=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(dC);function FV(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function IV(e){if(Io.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function KV(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(Io.transformSupported?``+HV+i:`,left`+i+`,top`+i)),VV+`:`+a}function qV(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Io.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Io.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+HV+`:`+o+`;`:[[`top`,0],[`left`,0],[LV,o]]}function JV(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=Y(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),U([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function YV(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=cw(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(KV(a,n,r)),o&&i.push(`background-color:`+o),U([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=VS(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(JV(d)),f!=null&&i.push(`padding:`+HS(f).join(`px `)+`px`),i.join(`;`)+`;`}function XV(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Mx(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var ZV=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Io.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(q(i)?document.querySelector(i):mo(i)?i:K(i)&&i(e.getDom()));XV(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;GA(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=BV(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=UV+YV(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+qV(i[0],i[1],!0)+(`border-color:`+JS(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(q(i)&&n.get(`trigger`)===`item`&&!FV(n)&&(o=GV(n,r,i)),q(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,G(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Io.node&&n.getDom()){var i=aH(r,n);this._ticket=``;var a=r.dataByCoordSys,o=uH(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=nH;c.x=r.x,c.y=r.y,c.update(),$m(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=vV(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(aH(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&iH([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if($m(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;BN(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||($m(e).dataIndex==null?$m(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=so(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=iH([t.tooltipOption],r),o=this._renderMode,s=[],c=JC(`section`,{blocks:[],noHeader:!0}),l=[],u=new lw;U(e,function(e){U(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=XB(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=JC(`section`,{header:f,noHeader:!So(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),U(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=CE(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,JS(m.color),o);var h=SC(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=iH([a],r).get(`valueFormatter`);p.blocks.push(_?H({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=ew(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` +`];function XC(e,t){return t.type=e,t}function ZC(e){return e.type===`section`}function QC(e){return ZC(e)?ew:tw}function $C(e){if(ZC(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return U(e.blocks,function(e){var n=$C(e);n>=t&&(t=n+ +(r&&(!n||ZC(e)&&!e.noHeader)))}),t}return 0}function ew(e,t,n,r){var i=t.noHeader,a=rw($C(t)),o=[],s=t.blocks||[];Co(!s||G(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Po(l,c)){var u=new vb(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}U(s,function(n,i){var s=t.valueFormatter,c=QC(n)(s?H(H({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):iw(r,o.join(``),i?n:a.html);if(i)return d;var f=GS(t.header,`ordinal`,e.useUTC),p=qC(r,e.renderMode).nameStyle,m=KC(r);return e.renderMode===`richText`?sw(e,f,p)+a.richText+d:iw(r,`
`+Hx(f)+`
`+d,n)}function tw(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=G(e)?e:[e],W(e,function(e,t){return GS(e,G(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:GS(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=qC(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:sw(e,f,v))+(o?``:cw(e,m,h,g,y)):iw(r,(s?``:d)+(a?``:aw(f,!s,v))+(o?``:ow(m,h,g,y)),n)}}function nw(e,t,n,r,i,a){if(e)return QC(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function rw(e){return{html:JC[e],richText:YC[e]}}function iw(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=KC(e);return`
`+t+r+`
`}function aw(e,t,n){var r=t?`margin-left:2px`:``;return``+Hx(e)+``}function ow(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=G(e)?e:[e],``+W(e,function(e){return Hx(e)}).join(`  `)+``}function sw(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function cw(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(G(t)?t.join(` `):t,a)}function lw(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return XS(n)}function uw(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var dw=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Kp()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=YS({color:t,type:e,renderMode:n,markerId:r});return q(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};G(t)?U(t,function(e){return H(n,e)}):H(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function fw(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=G(s),l=lw(t,n),u,d,f,p;if(o>1||c&&!o){var m=pw(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=lb(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=bm(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return XC(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[XC(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!wo(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function pw(e,t,n,r,i){var a=t.getData(),o=io(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?U(r,function(e){u(lb(a,n,e),e)}):U(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(XC(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var mw=Em();function hw(e,t){return e.getName(t)||e.getId(t)}var gw=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=TC({count:yw,reset:bw}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(mw(this).sourceManager=new zC(this)).prepareSource();var r=this.getInitialData(e,n);Sw(r,this),this.dataTask.context.data=r,mw(this).dataBeforeProcessed=r,_w(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=cC(this),r=n?uC(e):{},i=this.subType;pC.hasClass(i)&&(i+=`Series`),Za(e,t.getTheme().get(this.subType)),Za(e,this.getDefaultOption()),om(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&lC(e,r,n)},t.prototype.mergeOption=function(e,t){e=Za(this.option,e,!0),this.fillDataTextStyle(e.data);var n=cC(this);n&&lC(this.option,e,n);var r=mw(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Sw(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,mw(this).dataBeforeProcessed=i,_w(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ho(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return fw({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ro.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=_C.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[hw(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){J(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return pC.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(pC);no(gw,CC),no(gw,_C),Jo(gw,pC);function _w(e){var t=e.name;bm(e)||(e.name=vw(e)||t)}function vw(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return U(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function yw(e){return e.model.getRawData().count()}function bw(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),xw}function xw(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Sw(e,t){U(Mo(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,uo(Cw,t))})}function Cw(e,t){var n=ww(e);return n&&n.setOutputEnd((t||this).count()),t}function ww(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Tw=Af.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Ew={line:C_,rect:Wf,roundRect:Wf,square:Wf,circle:qg,diamond:Af.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Af.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Af.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Tw},Dw={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Ow={};U(Ew,function(e,t){Ow[t]=new e});var kw=Af.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=xc(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Ow[r];i||=(r=`rect`,Ow[r]),Dw[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Aw(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function jw(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?dv(e.slice(8),new Z(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?uv(e.slice(7),{},new Z(t,n,r,i),o?`center`:`cover`):new kw({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Aw,a&&c.setColor(a),c}function Mw(e){return G(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Nw(e,t){if(e!=null)return G(e)||(e=[e,e]),[wp(e[0],t[0])||0,wp(Y(e[1],e[0]),t[1])||0]}var Pw=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return bx(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Gg,n=jw(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=jw(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(gw);function Fw(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=lb(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var Lw=function(e){B(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=jw(e,-1,-1,2,2,null,a);o.attr({z2:Y(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Rw,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){qh(this.childAt(0))},t.prototype.downplay=function(){Jh(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):J_(f,p,o,n),ev(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Y_(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=$v(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Nw(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof If){var S=a.style;a.useStyle(H({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(H({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Qv(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Fw(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),fg(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=th(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Z_(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Z_(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Mw(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Gg);function Rw(e,t){this.parent.drift(e,t)}function zw(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Bw(e){return e!=null&&!J(e)&&(e={isIgnore:e}),e||{}}function Vw(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:$v(t),cursorStyle:t.get(`cursor`)}}function Hw(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Uw=function(){function e(e){this.group=new Gg,this._SymbolCtor=e||Lw}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Bw(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Vw(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);zw(e,i,r,t)&&Hw(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!zw(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):J_(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function Kw(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function qw(e,t){return!isFinite(e)||!isFinite(t)}var Jw=typeof Float32Array<`u`?Float32Array:void 0,Yw=typeof Float64Array<`u`?Float64Array:void 0;function Xw(e){return Zw({ctor:Jw},e).arr}function Zw(e,t){var n=e.arr,r=e.ctor;if(t>Fp&&(t=Fp),!n||e.typed&&n.length=i||h<0)break;if(qw(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||qw(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,M=C-v,N=void 0,te=void 0;if(s===`x`){N=Math.abs(A),te=Math.abs(j);var P=E>0?1:-1;p=_-P*N*o,m=v,O=_+P*te*o,k=v}else if(s===`y`){N=Math.abs(ee),te=Math.abs(M);var F=D>0?1:-1;p=_,m=v-F*N*o,O=_,k=v+F*te*o}else N=Math.sqrt(A*A+ee*ee),te=Math.sqrt(j*j+M*M),T=te/(te+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=eT(O,tT(S,_)),k=eT(k,tT(C,v)),O=tT(O,eT(S,_)),k=tT(k,eT(C,v)),E=O-_,D=k-v,p=_-E*N/te,m=v-D*N/te,p=eT(p,tT(l,_)),m=eT(m,tT(u,v)),p=tT(p,eT(l,_)),m=tT(m,eT(u,v)),E=_-p,D=v-m,O=_+E*te/N,k=v+D*te/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var rT=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),iT=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new rT},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&qw(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?gl(i,u,f,m,e,s):gl(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?ml(a,d,p,h,b):ml(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(Af),aT=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(rT),oT=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new aT},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&qw(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){PT(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),PT(r,e,t,n)},freeze:function(){}};function PT(e,t,n,r){Um(n,r)&&(e[t][0]=n,e[t][1]=r)}function FT(e){return IT(e)||RT(e)}function IT(e){return e.type===`interval`}function LT(e){return e.type===`time`}function RT(e){return e.type===`log`}function zT(e){return e.type===`ordinal`}function BT(e){var t=Vp(e),n=vp(10,t),r=hp(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,kp(r*n,-t)}function VT(e){return jp(e)+2}function HT(e,t){return yp(e)/yp(t)}function UT(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var JT=function(e){B(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,ET(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new ST({}),G(i)&&(i=new ST({categories:W(i,function(e){return J(e)?e.value:e})})),r._ordinalMeta=i;var a=TT(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,DT(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:q(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=hp(e),e},t.prototype.getTicks=function(){var e=[];return qT(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=fp(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=fp(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=kp(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=kp(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?kp(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return YT(this,e,iS(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=jp(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),HS(kp(e.value,n,!0))},t.type=`interval`,t}(bT);bT.registerClass(XT);var ZT=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function nE(e){var t=30*lS;return e/=t,e>6?6:e>3?3:e>2?2:1}function rE(e){return e/=cS,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function iE(e,t){return e/=t?sS:oS,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function aE(e){return pp(Hp(e,!0),1)}function oE(e,t,n){var r=Math.max(0,eo(gS,t)-1);return DS(new Date(e),gS[r],n).getTime()}function sE(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function cE(e,t,n,r,i,a){var o=_S,s=0;function c(e,t,n,i,o,c,l){for(var u=sE(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!eE(xS(e),r[0],r[1],n)){s&&(i=[{value:oE(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=ao(W(u,function(e){return ao(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=$T.length,l=Math.min(ZT($T,a,0,c),c-1),u=$T[l][1],d=$T[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};bT.registerClass(QT);var uE=0,dE=1,fE=2,pE=function(e){B(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=XT.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[uE]=i[dE]=a[uE]=a[dE]=NaN,ET(r,t.mapperMethods);var s=nS(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},fE,l),r.powStub=new XT({breakParsed:l.original}),r.intervalStub=new XT({breakParsed:l.transformed}),DT(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=nS(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return W(i.getTicks(e||{}),function(e){var i=e.value,o=UT(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,iS(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return YT(this,e,iS(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(HT(e,this.base))},scale:function(e){return UT(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=HT(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return mE.depth=n,hE.lookup=this._lookup,UT(n===2?e:this.intervalStub.transformOut(e,mE),this.base,hE)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Um(t,n)||t<=0||n<=0)){var r=gE,i=gE;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[uE]=t,r[dE]=n);var o=this.base;this.intervalStub.setExtent2(e,i[uE]=HT(t,o),i[dE]=HT(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Um(t[0],t[1])&&Yp(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(bT);bT.registerClass(pE);var mE={},hE={},gE=[],_E={value:1,category:1,time:1,log:1},vE=Em();function yE(e){var t=e.get(`type`);return(t==null||!Po(_E,t)&&!bT.getClass(t))&&(t=`value`),t}function bE(e,t,n){var r=nS(),i;switch(r&&(i=jE(e,t,n)),t){case`category`:return new JT({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Lm()});case`time`:return new QT({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new pE({logBase:e.get(`logBase`),breakOption:i});case`value`:return new XT({breakOption:i});default:return new((bT.getClass(t))||XT)({})}}function xE(e,t,n){var r=n?kT(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Um(i,a)?i===t||a===t?2:it?1:3:3}function SE(e){vE(e).noOnMyZero=!0}function CE(e){return vE(e).noOnMyZero}function wE(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=vS(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(q(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(K(t)){if(e.type===`category`)return function(n,r){return t(TE(e,n),n.value-e.scale.getExtent()[0],null)};var r=nS();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(TE(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function TE(e,t){var n=e.scale;return zT(n)?n.getLabel(t):t.value}function EE(e){return e.get(`interval`)??`auto`}function DE(e){return e.type===`category`&&EE(e.getLabelModel())===0}function OE(e,t){var n={};return U(e.mapDimensionsAll(t),function(t){n[_x(e,t)]=!0}),so(n)}function kE(e){return e===`middle`||e===`center`}function AE(e){return e.getShallow(`show`)}function jE(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!nS()||!n||!ME(t)?void 0:r}function ME(e){return e!==`category`}function NE(e,t,n,r,i,a){var o=RT(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=GT(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function PE(e,t){return zT(e)?e.getRawOrdinalNumber(t.value):t.value}function FE(e,t){return zT(e)&&!!t.get(`boundaryGap`)}function IE(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function UE(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=W(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=HE(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;U(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new M_(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function WE(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&GE(a,t))){var o=t.mapDimension(a.dim),s={};return U(a.getViewLabels(),function(e){e.tick.offInterval||(s[PE(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function GE(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function KE(e){for(var t=e.length/2;t>0&&qw(e[t*2-2],e[t*2-1]);t--);return t-1}function qE(e,t){return[e[t*2],e[t*2+1]]}function JE(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function YE(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}th(f).seriesIndex=e.seriesIndex,fg(f,k,A,j);var M=zE(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:M,smoothMonotone:N,connectNulls:x}),p){var te=a.getCalculationInfo(`stackedOnSeries`),P=0;p.useStyle($a(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),te&&(P=zE(te.get(`smooth`))),p.setShape({smooth:M,stackedOnSmooth:P,smoothMonotone:N,connectNulls:x}),gg(p,e,`areaStyle`),th(p).seriesIndex=e.seriesIndex,fg(p,k,A,j)}var F=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var ne=e.get(`triggerEvent`),re=e.get(`triggerLineEvent`),ie=re===!0||ne===!0||ne===`line`,ae=re===!0||ne===!0||ne===`area`;this.packEventData(e,f,ie),p&&this.packEventData(e,p,ae)},t.prototype.packEventData=function(e,t,n){th(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Tm(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(qw(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Lw(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else uT.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Tm(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else uT.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Rh(this._polyline,e),t&&Rh(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new iT({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new oT({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);K(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=K(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=K(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(YE(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Yf({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=KE(o);c>=0&&(Qv(a,$v(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Fw(i,e):Iw(i,n)},enableTextSetter:!0},ZE(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=JE(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=qE(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Im(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=qE(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=ly(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=$w(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=VE(u.stackedOnCurrent,u.current,n,i,o),d=VE(u.current,null,n,i,o),m=VE(u.stackedOnNext,u.next,n,i,o),p=VE(u.next,null,n,i,o)),RE(d,p)>3e3||c&&RE(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),J_(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),J_(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;q(i)?p=eD[i]:K(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,tD))}}}}}function rD(e){e.registerChartView(QE),e.registerSeriesModel(Pw),e.registerLayout($E(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,nD(`line`))}var iD=Em(),aD=Em(),oD={estimate:1,determine:2};function sD(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function cD(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:W(uD(n,r),function(t,n){return{formattedLabel:wE(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?dD(e,t):mD(e)}function lD(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:uD(i,r)}:e.type===`category`?pD(e,t):{ticks:r.getTicks(n)}}function uD(e,t){var n=t.getExtent(),r=[];return U(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Jm(r,Xm,null),Ap(r),W(r,function(e){return{value:e}})}function dD(e,t){var n=e.getLabelModel(),r=fD(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function fD(e,t,n){var r=gD(e),i=EE(t),a=n.kind===oD.estimate;if(!a){var o=vD(r,i);if(o)return o}var s,c;K(i)?s=TD(e,i,!1):(c=i===`auto`?bD(e,n):i,s=TD(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return yD(r,i,l),!0}):yD(r,i,l),l}function pD(e,t){var n=hD(e),r=EE(t),i=vD(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),K(r))a=TD(e,r,!0);else if(r===`auto`){var s=fD(e,e.getLabelModel(),sD(oD.determine));o=s.labelCategoryInterval,a=W(s.labels,function(e){return e.tick})}else o=r,a=TD(e,o,!0);return yD(n,r,{ticks:a,tickCategoryInterval:o})}function mD(e){var t=e.scale.getTicks(),n=wE(e);return{labels:W(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var hD=_D(`axisTick`),gD=_D(`axisLabel`);function _D(e){return function(t){return aD(t)[e]||(aD(t)[e]={list:[]})}}function vD(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=gc(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===oD.estimate?(t.out.noPxChangeTryDetermine.push(lo(SD,null,e,S,c)),S):CD(e,S,c)??S}function SD(e,t,n){return CD(e,t,n)==null}function CD(e,t,n){var r=iD(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function wD(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function TD(e,t,n){var r=wE(e),i=e.scale,a=[],o=K(t);return qT(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var ED=Em();function DD(e){ED(e).prepare={}}function OD(e){ED(e).fullUpdate={}}function kD(e){return ED(e).prepare}function AD(e){return ED(e).fullUpdate}var jD=Km(),MD=Em(),ND=Em();function PD(e,t){var n=e.model,r=MD(AD(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function FD(e,t){return RD(PD(e,t))}function ID(e,t){var n=[];return LD(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Yp(n)&&n>0&&Yp(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*ZD,e.w2=e.w*n/r)}var tO=[0,1],nO=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),Cp(e,tO,rO(this),t)},e.prototype.coordToData=function(e,t){var n=Cp(e,rO(this),tO,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=W(lD(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(PE(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=iO(this,n,r);return W(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(zT(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),W(this.scale.getMinorTicks(e),function(e){return W(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=sD(oD.determine),cD(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return QD(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=sD(oD.determine),xD(this,e)},e}();function rO(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function iO(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=QD(e).w;if(!i)return!1;U(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var aO=function(e){B(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(nO),oO=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],sO=1,cO=2,lO=sO|cO;function uO(e,t,n){n||=lO,t?e.dirty|=n:e.dirty&=~n}function dO(e,t){return t||=lO,e.dirty==null||!!(e.dirty&t)}function fO(e){if(e)return dO(e)&&pO(e,e.label,e),e}function pO(e,t,n){var r=t.getComputedTransform();e.transform=Bv(e.transform,r);var i=e.localRect=zv(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=dy.textMargin);for(var d=0;d<4;d++)mO[d]=u===dy.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===dy.textMargin&&jv(i,mO,!1,!1);var f=e.rect=zv(e.rect,i);return r&&f.applyTransform(r),u===dy.minMargin&&jv(f,mO,!1,!1),e.axisAligned=Lv(r),(e.label=e.label||{}).ignore=t.ignore,uO(e,!1),uO(e,!0,cO),e}var mO=[0,0,0,0];function hO(e,t,n){return e.transform=Bv(e.transform,n),e.localRect=zv(e.localRect,t),e.rect=zv(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Lv(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function gO(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function _O(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Z(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var jO=ds(),MO=new Z(0,0,0,0),NO=function(e,t,n,r,i,a){if(kE(e.nameLocation)){var o=a.stOccupiedRect;o&&PO(hO({},o,a.transGroup.transform),r,i)}else FO(a.labelInfoList,a.dirVec,r,i)};function PO(e,t,n){var r=new Ls;bO(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&gO(t,r)}function FO(e,t,n,r){for(var i=Ls.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Lp(r-wO)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),LO=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],RO={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Ps(u,u,l),Ps(d,d,l));var p=H({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&aS(r.axis.scale))SO().buildAxisBreakLine(r,i,a,m);else{var h=new C_(H({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));hv(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);q(g)&&(g=[g,g]),(q(_)||po(_))&&(_=[_,_]);var v=Nw(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];U([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=jw(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){qO(t,i,s)&&zO(e,t,n,r,i,a,o,oD.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){qO(t,i,s)&&zO(e,t,n,r,i,a,o,oD.determine);var c=GO(e,i,a,r);HO(e,t.labelLayoutList,c),KO(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(ek(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Ls(0,0),_=new Ls(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=ds();_.transform(gs(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*wO/180);var b,x;kE(u)?b=IO.innerTextLayout(e.rotation,y??e.rotation,d):(b=BO(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=yo(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Yf({x:g.x,y:g.y,rotation:b.rotation,silent:IO.isLabelSilent(r),style:ey(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Pv({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=IO.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,th(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=fO({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:kE(u)?TO[E]:EO[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function zO(e,t,n,r,i,a,o,s){YO(t)||JO(e,t,i,s,r,o);var c=t.labelLayoutList;ZO(e,r,c,a),nk(r,e.rotation,c);var l=e.optionHideOverlap;VO(r,c,l),l&&yO(ao(c,function(e){return e&&!e.label.ignore})),AO(e,n,r,c)}function BO(e,t,n,r){var i=Ip(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Lp(i-wO/2)?(o=c?`bottom`:`top`,a=`center`):Lp(i-wO*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iwO/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function VO(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(DE(r))return;function a(e,a,o){var s=fO(t[a]),c=fO(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=DO(s.label).labelInfo.tick;if(LT(l)&&u.notNice||zT(l)&&u.offInterval){UO(s.label);return}}if(e===!1||s.suggestIgnore){UO(s.label);return}if(c.suggestIgnore){UO(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=_O({marginForce:f},s),c=_O({marginForce:f},c)}bO(s,c,null,{touchThreshold:d})&&UO(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function HO(e,t,n){e.showMinorTicks||U(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=fk(e,t.get(`startValue`,!0)),x=b!=null;!Yp(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Yp(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),dk(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),dk(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function dk(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Gm(t))}function fk(e,t){return t==null?null:vo(t)?NaN:e.parse(t)}function pk(e,t){var n;if(zT(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=G(r)?r:[r,r]}return[mk(n[0]),mk(n[1])]}function mk(e){return bc(typeof e==`boolean`?0:e,1)||0}function hk(e){var t=ck(e.scale);return t.extent||=Lm(),t}function gk(e,t){hk(e).dimIdxInCoord=t.get(e.dim)}function _k(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||vk(n,e,i,r,t)}function vk(e,t,n,r,i){var a=hk(t),o=a.extent,s=!1;zD(t,function(r){if(r.boxCoordinateSystem){var i=sx(r).coord,c=a.dimIdxInCoord;if(c>=0&&G(i)){var l=i[c];l!=null&&!G(l)&&Rm(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;U(OE(u,n),function(e){Vm(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=wk(e,t,r);bk(e,new uk(e,r,o,s,c),i),a.extent=null}function yk(e,t){var n=e.scale;bk(n,new uk(n,e.model,t,!1,!1),lk)}function bk(e,t,n){e.rawExtentInfo=t,t.from=n}function xk(e,t){Sk.set(e,t)}var Sk=X();function Ck(e,t,n,r,i){e.rawExtentInfo||yk({scale:e,model:t},i||Lm());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function wk(e,t,n){var r=FE(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return UD(t,function(e){a=!!Sk.get(e)||a}),a}function Tk(e,t,n,r){if(n.ctnShp){var i;if(UD(e,function(t){var n=Sk.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],zm(i,a[0]),Bm(i,a[1]),SE(e))}}),i){var a=t.getExtent();if(zT(t))e.onBand||t.setExtent2(1,fp(a[0],a[0]+i[0]),pp(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=fp(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=pp(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function Ek(){GD(`liPosMinGap`,Dk)}function Dk(e,t,n){var r=X(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=yb(u);function f(n){VD(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Zw(Ok,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var Ok=Zw({ctor:Yw},50);function kk(e){return function(t,n){var r=QD(t,{fromStat:{key:e}});if(Yp(r.w2))return[-r.w2/2,r.w2/2]}}function Ak(e,t){return e+`|&`+t}function jk(e){return Ek(),{liPosMinGap:!zT(e.scale)}}function Mk(e,t,n,r){YD(e,{key:t,seriesType:n,coordSysType:r,getMetrics:jk})}function Nk(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var Pk={left:0,right:0,top:0,bottom:0},Fk=[`25%`,`25%`],Ik=`cartesian2d`,Lk=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=uC(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&lC(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&lC(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Pk,outerBoundsContain:`all`,outerBoundsClampWidth:Fk[0],outerBoundsClampHeight:Fk[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(pC),Rk=Km(),zk=`__ec_stack_`;function Bk(e){return e.get(`stack`)||zk+e.seriesIndex}function Vk(e,t){var n=Hk(e,t);return n.columnMap=Uk(n),n}function Hk(e,t){var n=Ak(t,Ik),r=[],i=QD(e,{fromStat:{key:n},min:1});return BD(e,n,function(e){r.push({barWidth:wp(e.get(`barWidth`),i.w),barMaxWidth:wp(e.get(`barMaxWidth`),i.w),barMinWidth:wp(e.get(`barMinWidth`)||(Kk(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Bk(e)})}),{bandWidthResult:i,seriesInfo:r}}function Uk(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};U(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Po(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=fp(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=pp(35-o.length*4,15)+`%`;var c=wp(i,t),l=wp(a,1),u=(n-c)/(r+(r-1)*l);u=pp(u,0),U(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=fp(o,i)),a&&(o=pp(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&io&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=pp(u,0);var d=0,f;U(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return U(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function Wk(e){return{seriesType:e,overallReset:function(t){var n=Ak(e,Ik);HD(t,n,function(t){var r=Vk(t,e);BD(t,n,function(e){var t=r.columnMap[Bk(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function Gk(e){return{seriesType:e,plan:sT(),reset:function(e){if(ik(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=gx(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Nk(i))),p=Kk(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Xw(r*3),c=p&&s&&Xw(r*3),l=p&&Xw(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,mp(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(gw);gw.registerClass(Yk);var Xk=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return bx(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Qm(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Ox(Yk.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:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Yk),Zk=`\0__throttleOriginMethod`,Qk=`\0__throttleRate`,$k=`\0__throttleType`;function eA(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function tA(e,t,n,r){var i=e[t];if(i){var a=i[Zk]||i,o=i[$k];if(i[Qk]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=eA(a,n,r===`debounce`),i[Zk]=a,i[$k]=r,i[Qk]=n}return i}}function nA(e,t){var n=e[t];n&&n[Zk]&&(n.clear&&n.clear(),e[t]=n[Zk])}var rA=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),iA=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new rA},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){$_(t,e,th(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(uT),pA={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=uA(t.x,e.x),s=dA(t.x+t.width,i),c=uA(t.y,e.y),l=dA(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=dA(t.r,e.r),a=uA(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},mA={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Wf({shape:H({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?iA:f_,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=aA(CA(i),{isRoundCap:l===iA}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?J_:Y_)(u,{shape:p},a)}return u}};function hA(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function gA(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?J_:Y_)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?J_:Y_)(n,{shape:l},u,i)}function _A(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function SA(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function CA(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function wA(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;H(u,lA(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?NA(i,a.coordinateSystem):PA(i,a.coordinateSystem),p=$v(r);Qv(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Fw(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,oA(e,h===`outside`?f:h,CA(o),r.get([`label`,`rotate`]))}uy(m,p,a.getRawValue(n),function(e){return Iw(t,e)});var g=r.getModel([`emphasis`]);fg(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),gg(e,r),SA(i)&&(e.style.fill=`none`,e.style.stroke=`none`,U(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function TA(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var EA=function(){function e(){}return e}(),DA=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new EA},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function AA(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function jA(e,t,n){if(yT(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function MA(e,t,n){return new(e.type===`polar`?f_:Wf)({shape:jA(t,n,e),silent:!0,z2:0})}function NA(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function PA(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function FA(e){e.registerChartView(fA),e.registerSeriesModel(Xk),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Wk(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Gk(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,nD(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),Jk(e)}function IA(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),zA=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),BA=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new zA(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new zA(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new zA(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new zA(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new zA(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new zA(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),VA=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,HA=[],UA=Ro.browser.firefox&&+Ro.browser.version.split(`.`)[0]<39;function WA(e,t,n,r){return n||={},r?GA(e,t,n):UA&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?GA(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function GA(e,t,n){if(Ro.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(zx(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Ix(HA,e,r,i)){n.zrX=HA[0],n.zrY=HA[1];return}}n.zrX=n.zrY=0}function KA(e){return e||window.event}function qA(e,t,n){if(t=KA(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&WA(e,i,t,n)}else{WA(e,t,t,n);var a=JA(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&VA.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function JA(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function YA(e,t,n,r){e.addEventListener(t,n,r)}function XA(e,t,n,r){e.removeEventListener(t,n,r)}var ZA=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function QA(e){return e.which===2||e.which===3}var $A=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=ej(r)/ej(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=tj(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},rj=`silent`;function ij(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:aj}}function aj(){ZA(this.event)}var oj=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ku),sj=function(){function e(e,t){this.x=e,this.y=t}return e}(),cj=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],lj=new Z(0,0,0,0),uj=function(e){B(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new sj(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new oj,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new BA(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(U(cj,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=pj(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new sj(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new sj(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=ij(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new sj(e,t);if(fj(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Z(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(lj.copy(u.getBoundingRect()),u.transform&&lj.applyTransform(u.transform),lj.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function dj(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||rj}return!1}function fj(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=dj(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==rj)){t.target=o;break}}}function pj(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var mj=32,hj=7;function gj(e){for(var t=0;e>=mj;)t|=e&1,e>>=1;return e+t}function _j(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function vj(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function bj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function xj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Sj(e,t){var n=hj,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=hj||m>=hj);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-bj(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=hj||g>=hj);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),yj(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var wj=!1;function Tj(){wj||(wj=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Ej(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Dj=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Ej}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Oj=Ro.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function kj(){return new Date().getTime()}var Aj=function(e){B(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=kj()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Oj(t),!e._paused&&e.update())}Oj(t)},t.prototype.start=function(){this._running||(this._time=kj(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=kj(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=kj()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Gu(e,t.loop);return this.addAnimator(n),n},t}(Ku),jj=300,Mj=Ro.domSupported,Nj=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:W(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Pj={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Fj=!1;function Ij(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Lj(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Rj(e){e&&(e.zrByTouch=!0)}function zj(e,t){return qA(e.dom,new Vj(e,t),!0)}function Bj(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Vj=function(){function e(e,t){this.stopPropagation=Fo,this.stopImmediatePropagation=Fo,this.preventDefault=Fo,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Hj={mousedown:function(e){e=qA(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=qA(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=qA(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=qA(this.dom,e);var t=e.toElement||e.relatedTarget;Bj(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Fj=!0,e=qA(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Fj||(e=qA(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=qA(this.dom,e),Rj(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Hj.mousemove.call(this,e),Hj.mousedown.call(this,e)},touchmove:function(e){e=qA(this.dom,e),Rj(e),this.handler.processGesture(e,`change`),Hj.mousemove.call(this,e)},touchend:function(e){e=qA(this.dom,e),Rj(e),this.handler.processGesture(e,`end`),Hj.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!xm(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[gM],e},t.prototype.setTheme=function(e){this._theme=new Sy(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function kM(e,t){return e.join(`,`)===t.join(`,`)}var AM=U,jM=J,MM=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function NM(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=MM.length;n0?e[n-1].seriesModel:null)}),nN(e))})}function nN(e){U(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Pp(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var rN=function(){function e(){this.group=new Gg,this.uid=Tx(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Ko(rN),$o(rN);var iN=Em(),aN={itemStyle:es(yy,!0),lineStyle:es(gy,!0)},oN={lineStyle:`stroke`,itemStyle:`fill`};function sN(e,t){return e.visualStyleMapper||aN[t]||(console.warn(`Unknown style type '`+t+`'.`),aN.itemStyle)}function cN(e,t){return e.visualDrawType||oN[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var lN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=sN(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=cN(e,r),c=a[s],l=K(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||K(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||K(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=H({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},uN=new Sy,dN={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=sN(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){uN.option=n[r];var o=i(uN);H(e.ensureUniqueItemVisual(t,`style`),o),uN.option.decal&&(e.setItemVisual(t,`decal`,uN.option.decal),uN.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},fN={performRawSeries:!0,overallReset:function(e){var t=X();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();iN(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=iN(e).scope,a=cN(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},pN=Math.PI;function mN(e,t){t||={},$a(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Gg,r=new Wf({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Yf({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Wf({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new k_({shape:{startAngle:-pN/2,endAngle:-pN/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:pN*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:pN*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var hN=function(){function e(e,t,n,r){this._stageTaskMap=X(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Qm(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=X();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;U(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Co(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;U(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=X(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||TC({plan:bN,reset:xN,count:wN}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||TC({reset:gN});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=X(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Co(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):U(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,TC({reset:_N,onDirty:yN})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return K(e)&&(e={overallReset:e,seriesType:TN(e)}),e.uid=Tx(`stageHandler`),t&&(e.visualType=t),e},e}();function gN(e){e.overallReset(e.ecModel,e.api,e.payload)}function _N(e){return e.dirtyOnOverallProgress&&vN}function vN(){this.agent.dirty(),this.getDownstream().dirty()}function yN(){this.agent&&this.agent.dirty()}function bN(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function xN(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=am(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?W(t,function(e,t){return CN(t)}):SN}var SN=CN(0);function CN(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),FN=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],IN=FN.concat([`symbolKeepAspect`]),LN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&QN(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function tP(e,t,n){for(var r=t.type===`radial`?eP(e,t,n):$N(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:po(e)?[e]:G(e)?e:null}function oP(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&aP(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=W(n,function(e){return e/i}),r/=i)}return[n,r]}var sP=new af(!0);function cP(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function lP(e){return typeof e==`string`&&e!==`none`}function uP(e){var t=e.fill;return t!=null&&t!==`none`}function dP(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function fP(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function pP(e,t,n){var r=cs(t.image,t.__image,n);if(us(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Io),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function mP(e,t,n,r,i){var a,o=cP(n),s=uP(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||sP,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?tP(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?tP(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?pP(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?pP(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=oP(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&fP(e,n),s&&dP(e,n)):(s&&dP(e,n),o&&fP(e,n)),T&&e.setLineDash([])}function hP(e,t,n){var r=t.__image=cs(n.image,t.__image,t,t.onload);if(r&&us(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function gP(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=oP(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(cP(n)&&e.strokeText(i,n.x,n.y),uP(n)&&e.fillText(i,n.x,n.y)):(uP(n)&&e.fillText(i,n.x,n.y),cP(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var _P=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],vP=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function yP(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){AP(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?_d.opacity:o}(r||t.blend!==n.blend)&&(a||=(AP(e,i),!0),e.globalCompositeOperation=t.blend||_d.blend);for(var s=0;s<_P.length;s++){var c=_P[s];(r||t[c]!==n[c])&&(a||=(AP(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(AP(e,i),!0),e.shadowColor=t.shadowColor||_d.shadowColor),a}function bP(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=yP(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(AP(e,i),!0),lP(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(AP(e,i),!0),lP(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(AP(e,i),!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||=(AP(e,i),!0),e.lineWidth=c)}for(var l=0;l0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[uF]){if(this._disposed){this.id;return}var r,i,a;if(J(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[uF]=!0,HF(this),!this._model||t){var o=new TM(this._api),s=this._theme,c=this._model=new vM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},XF);var l={seriesTransition:a,optionChanged:!0};if(n)this[fF]={silent:r,updateParams:l},this[uF]=!1,this.getZr().wakeUp();else{try{wF(this),DF.update.call(this,null,l)}catch(e){throw this[fF]=null,this[uF]=!1,e}this._ssr||this._zr.flush(),this[fF]=null,this[uF]=!1,jF.call(this,r),MF.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[uF]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[fF]&&(r??=this[fF].silent,i=this[fF].updateParams,this[fF]=null),this[uF]=!0,HF(this);try{this._updateTheme(e),n.setTheme(this._theme),wF(this),DF.update.call(this,{type:`setTheme`},i)}catch(e){throw this[uF]=!1,e}this[uF]=!1,jF.call(this,r),MF.call(this,r)}}},t.prototype._updateTheme=function(e){q(e)&&(e=QF[e]),e&&(e=V(e),e&&$M(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ro.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return U(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;U(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return U(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(tI[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();U(eI,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(V(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=Fa.createCanvas(),h=tM(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return U(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Wf({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),U(u,function(e){var t=new If({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return OF(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return OF(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return OF(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return U(Om(n,e),function(e,n){n.indexOf(`Models`)>=0&&U(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Om(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?BN(i,t):zN(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;U(GF,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&HN(i,function(e){var t=th(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=H({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;U(JF,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),LA(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Nm(this.getDom(),rI,``);var e=this,t=e._api,n=e._model;U(e._componentsViews,function(e){e.dispose(n,t)}),U(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete eI[e.id]},t.prototype.resize=function(e){if(!this[uF]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[fF]&&(r??=this[fF].silent,n=!0,this[fF]=null),this[uF]=!0,HF(this);try{n&&wF(this),DF.update.call(this,{type:`resize`,animation:H({duration:0},e&&e.animation)})}catch(e){throw this[uF]=!1,e}this[uF]=!1,jF.call(this,r),MF.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(J(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),$F[e]){var n=$F[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=H({},e);return t.type=qF[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(J(t)||(t={silent:!!t}),KF[e.type]&&this._model){if(this[uF]){this._pendingActions.push(e);return}var n=t.silent;AF.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Ro.browser.weChat&&this._throttledZrFlush(),jF.call(this,n),MF.call(this,n)}},t.prototype.updateLabelLayout=function(){UN.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){wF=function(e){DD(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),TF(e,!0),TF(e,!1),t.plan()},TF=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cY(t.get(`hoverLayerThreshold`),uM.hoverLayerThreshold)&&!Ro.node&&!Ro.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Vv(e);t.eachRendered(function(e){return Uv(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!X_(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(X_(e))return;if(e instanceof Af&&Sg(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}RF=function(e){return new(function(t){B(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){qh(t,n),BF(e)},n.prototype.leaveEmphasis=function(t,n){Jh(t,n),BF(e)},n.prototype.enterBlur=function(t){Yh(t),BF(e)},n.prototype.leaveBlur=function(t){Xh(t),BF(e)},n.prototype.enterSelect=function(t){Zh(t),BF(e)},n.prototype.leaveSelect=function(t){Qh(t),BF(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[dF]},n.prototype.usingTHL=function(){return e._usingTHL},n}(mh))(e)},zF=function(e){function t(e,t){for(var n=0;n=0)){gI.push(n);var o=hN.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function vI(e,t){$F[e]=t}function yI(e,t,n){var r=KN(`registerMap`);r&&r(e,t,n)}var bI=FC;hI(tF,lN),hI(iF,dN),hI(iF,fN),hI(tF,LN),hI(iF,RN),hI(cF,WP),sI($M),cI(JP,eN),vI(`default`,mN),fI({type:Sh,event:Sh,update:Sh},Fo),fI({type:Ch,event:Ch,update:Ch},Fo),fI({type:wh,event:Dh,update:wh,action:Fo,refineEvent:xI,publishNonRefinedEvent:!0}),fI({type:Th,event:Dh,update:Th,action:Fo,refineEvent:xI,publishNonRefinedEvent:!0}),fI({type:Eh,event:Dh,update:Eh,action:Fo,refineEvent:xI,publishNonRefinedEvent:!0});function xI(e,t,n,r){return{eventContent:{selected:lg(n),isFromClick:t.isFromClick||!1}}}oI(`default`,{}),oI(`dark`,NN);var SI=[],CI={registerPreprocessor:sI,registerProcessor:cI,registerPostInit:lI,registerPostUpdate:uI,registerUpdateLifecycle:dI,registerAction:fI,registerCoordinateSystem:pI,registerLayout:mI,registerVisual:hI,registerTransform:bI,registerLoading:vI,registerMap:yI,registerImpl:GN,PRIORITY:lF,ComponentModel:pC,ComponentView:rN,SeriesModel:gw,ChartView:uT,registerComponentModel:function(e){pC.registerClass(e)},registerComponentView:function(e){rN.registerClass(e)},registerSeriesModel:function(e){gw.registerClass(e)},registerChartView:function(e){uT.registerClass(e)},registerCustomSeries:function(e,t){JN(e,t)},registerSubTypeDefaulter:function(e,t){pC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){nM(e,t)}};function wI(e){if(G(e)){U(e,function(e){wI(e)});return}eo(SI,e)>=0||(SI.push(e),K(e)&&(e={install:e}),e.install(CI))}var TI=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),EI=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Am).models[0]},t.type=`cartesian2dAxis`,t}(pC);no(EI,TI);var DI={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:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},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,color:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},OI=Za({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},DI),kI=Za({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},DI),AI={category:OI,value:kI,time:Za({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},kI),log:$a({logBase:10},kI)};function jI(e,t,n,r){U(_E,function(i,a){var o=Za(Za({},AI[a],!0),r,!0),s=function(e){B(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=cC(this),r=n?uC(e):{};Za(e,t.getTheme().get(a+`Axis`)),Za(e,this.getDefaultOption()),e.type=MI(e),n&&lC(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=ST.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=SO();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,MI)}function MI(e){return e.type||(e.data?`category`:`value`)}var NI=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return W(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ao(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),PI=[`x`,`y`];function FI(e){return(e.type===`interval`||e.type===`time`)&&!aS(e)}var II=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Ik,t.dimensions=PI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(FI(e)&&FI(t)){var n=kT(e,null),r=kT(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=vs([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Z(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Ps(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Ps(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Z(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(NI);function LI(e,t){var n=e.scale,r=e.model,i=Ck(n,r,r.ecModel,e,null),a=RT(n),o=RT(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=mp(l[0].value-l[1].value),g=mp(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=kp(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=kp(_p(C[0]/E)*E,D),O=kp(gp(C[1]/E)*E,D);var e=hp((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=gp(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}NE(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function RI(e,t){var n=RT(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=WT(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?BI(r,t):zI(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=VT(d)),i[0]||(s[0]=kp(gp(s[0]/u)*u,l)),i[1]||(s[1]=kp(_p(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),NE(e,i,o,s,a,c)}function zI(e,t){var n=KT(t.splitNumber,5),r=jT(e),i=t.minInterval,a=t.maxInterval,o=Hp(r/n,!0);i!=null&&oa&&(o=a);var s=VT(o),c=e.getExtent(),l=[kp(_p(c[0]/o)*o,s),kp(gp(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function BI(e,t){var n=KT(t.splitNumber,10),r=e.getExtent(),i=jT(e),a=pp(Bp(i),1);n/i*a<=.5&&(a*=10);var o=VT(a),s=[kp(_p(r[0]/a)*a,o),kp(gp(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function VI(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;HI(t,n,r,i,null)}function HI(e,t,n,r,i){var a=Ck(e,t,r,n,i),o=IT(e)||LT(e);UI(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Tk(n,e,a,r)}function UI(e,t){WI[e.type](e,t)}var WI={interval:RI,log:RI,time:lE,ordinal:Fo},GI=[[3,1],[0,2]],KI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=PI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;U(this._axesList,function(e){_k(e,1);var t=e.scale;zT(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=so(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):VI(i)}U(n,function(e){ZI(e,e.__alignTo)?VI(e):LI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};U(n.x,function(e){JI(n,`y`,e,i)}),U(n.y,function(e){JI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=oC(e,t),i=this._rect=rC(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if($I(a,i),!n){var c=rL(i,o,a,s,t),l=void 0;if(s)tL?(tL(this._axesList,i),$I(a,i)):l=nL(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=aL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=nL(d,f,p,i,a,c,r))}iL(i,a,oD.determine,null,l,r),U(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];FT(a.scale)&&jE(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&U(r,function(e){e.__alignTo=n})}function ZI(e,t){return aS(e.scale)||aS(t.scale)||t.scale.getTicks().length<2}function QI(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function $I(e,t){U(e.x,function(e){return eL(e,t.x,t.width)}),U(e.y,function(e){return eL(e,t.y,t.height)})}function eL(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),QI(e,t)}var tL;function nL(e,t,n,r,i,a,o){iL(r,i,oD.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=oo(s,function(e){return e>0})==null;return jv(r,s,!0,!0,n),$I(i,r),c;function l(e){U(i[rv[e]],function(t){if(AE(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!vo(t)&&t>1e-4&&(e/=t),e}}function rL(e,t,n,r,i){var a=new kO(oL);return U(n,function(n){return U(n,function(n){if(AE(n.model)){var o=!r;n.axisBuilder=ok(e,t,n.model,i,a,o)}})}),a}function iL(e,t,n,r,i,a){var o=n===oD.determine;U(t,function(t){return U(t,function(t){AE(t.model)&&(sk(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[rv[1-t]]=e[iv[t]]<=a.refContainer[iv[t]]*.5?0:1-t==1?2:1}U(t,function(e,t){return U(e,function(e){AE(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function aL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=rC(e.get(`outerBounds`,!0)||Pk,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||eo([`all`,`axisLabel`],a)<0?`all`:a,s=[Ep(Y(e.get(`outerBoundsClampWidth`,!0),Fk[0]),t.width),Ep(Y(e.get(`outerBoundsClampHeight`,!0),Fk[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var oL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;NO(e,t,n,r,i,a),kE(e.nameLocation)||U(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&FO(e.labelInfoList,e.dirVec,r,i)})};function sL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return cL(n,e,t),n.seriesInvolved&&uL(n,e),n}function cL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];U(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=_L(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(U(n.getAxes(),uo(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&U(f.baseAxes,uo(p,!d||`cross`,u)),d&&U(f.otherAxes,uo(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||gL(d))){s??=d.get(`triggerTooltip`),d=r?lL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=_L(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:gL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=dL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function lL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};U(s,function(e){c[e]=V(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&$a(l,u.textStyle)}return e.model.getModel(`axisPointer`,new Sy(c,n,r))}function uL(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&U(e.coordSysAxesInfo[_L(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function dL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function pL(e){var t=mL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=gL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(ML(this._zr,`globalPan`)||IL(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(ZA(r.event),r.__ecRoamConsumed=!0,UL(e,t,n,r,i))},t}(Ku);function IL(e){return e.__ecRoamConsumed}var LL=Em();function RL(e){var t=LL(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function zL(e,t,n,r){for(var i=RL(e).roam,a=i[t]=i[t]||[],o=0;o1e-6;FR[0]=o?(i[0]-r.x)/a:i[0],FR[1]=o?(i[1]-r.y)/a:i[1],Ps(FR,FR,e.mtRawInv);var s=jR(e,FR);IR(t,s,a),U(n,function(e){e!==t&&IR(e,s.slice(),a)})}var FR=[];function IR(e,t,n){var r=e.option;r.center=t,r.zoom=n}function LR(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function RR(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=GL(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function zR(e,t,n,r,i,a,o,s){if(!ER(e)){n.disable();return}n.enable(Y(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Gv($a({type:VR(r,e.subType,fh)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}new Z(0,0,0,0);function BR(e,t,n){var r=VR(t,n,fh);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Mm(e,t,n),function(t){TR(e,t),DR(e,t,r,i)})})}function VR(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function HR(e){return e.zoom!=null}function UR(e,t,n,r,i,a,o){var s=new qL(null,NR(e.ecModel,t));return iR(s,n,r,i,a),o?aR(s,o.x,o.y,o.width,o.height):aR(s,n,r,i,a),rR(s,e),s}var WR=Em();function GR(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,QR(t,n,e),U(n,function(n){U(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,uo(KR,e))})}),t.wrapMethod(`cloneShallow`,uo(JR,e)),U(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,uo(qR,e))}),Co(n[t.dataType]===t)}function KR(e,t){if(ZR(this)){var n=H({},WR(this).datas);n[this.dataType]=t,QR(t,n,e)}else $R(t,this.dataType,WR(this).mainData,e);return t}function qR(e,t){return e.struct&&e.struct.update(),t}function JR(e,t){return U(WR(t).datas,function(n,r){n!==t&&$R(n.cloneShallow(),r,t,e)}),t}function YR(e){var t=WR(this).mainData;return e==null||t==null?t:WR(t).datas[e]}function XR(){var e=WR(this).mainData;return e==null?[{data:e}]:W(so(WR(e).datas),function(t){return{type:t,data:WR(e).datas[t]}})}function ZR(e){return WR(e).mainData===e}function QR(e,t,n){WR(e).datas={},U(t,function(t,r){$R(t,r,e,n)})}function $R(e,t,n,r){WR(n).datas[t]=e,WR(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=YR,e.getLinkedDataAll=XR}var ez=U,tz=J,nz=-1,rz=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=V(t);this.type=r,this.mappingMethod=n,this._normalizeData=hz[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(oz(i),iz(i)):n===`category`?i.categories?az(i):oz(i,!0):(Co(n!==`linear`||i.dataExtent),oz(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return lo(this._normalizeData,this)},e.listVisualTypes=function(){return so(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){J(e)?U(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=G(t)?[]:J(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&ez(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(G(e))e=e.slice();else if(tz(e)){var t=[];ez(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function oz(e,t){var n=e.visual,r=[];J(n)?ez(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),mz(e,r)}function sz(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:fz([0,1])}}function cz(e){var t=this.option.visual;return t[Math.round(Cp(e,[0,1],[0,t.length-1],!0))]||{}}function lz(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function uz(e){var t=this.option.visual;return t[this.option.loop&&e!==nz?e%t.length:e]}function dz(){return this.option.visual[0]}function fz(e){return{linear:function(t){return Cp(t,e,this.option.visual,!0)},category:uz,piecewise:function(t,n){var r=pz.call(this,n);return r??=Cp(t,e,this.option.visual,!0),r},fixed:dz}}function pz(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[rz.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function mz(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=W(t,function(e){return Wl(e)||[0,0,0,1]})),t}var hz={linear:function(e){return Cp(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=rz.findPieceIndex(e,t,!0);if(n!=null)return Cp(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??nz},fixed:Fo};function gz(e,t,n){return e?t<=n:t=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof yz||(t=this._nodesMap[_z(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),bz=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=X(),t=X();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function xz(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}no(yz,xz(`hostGraph`,`data`)),no(bz,xz(`hostGraph`,`edgeData`));function Sz(e,t,n,r,i){for(var a=new vz(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=bx(e,n);else{var h=ix.get(p),g=h&&h.dimensions||[];eo(g,`value`)<0&&g.concat([`value`]);var _=$b(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new Qb(_,n),m.initData(e)}var v=new Qb([`value`],n);return v.initData(c,s),i&&i(m,v),GR({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var Cz=`-->`,wz=function(e){return e.get(`autoCurveness`)||null},Tz=function(e,t){var n=wz(e),r=20,i=[];if(po(n))r=n;else if(G(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return fw({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=W(this.option.categories||[],function(e){return e.value==null?H({value:0},e):e}),t=new Qb([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return bR(e)&&e},t.type=`series.`+Pz,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Q.color.primary}}},t}(gw);function Iz(e){return e instanceof Array||(e=[e,e]),e}var Lz=$m(Pz,Rz);function Rz(e){e.eachSeriesByType(Pz,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=Iz(e.get(`edgeSymbol`)),i=Iz(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=Iz(r.getShallow(`symbol`,!0)),o=Iz(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(H(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function zz(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),Bz(n,e)}}function Bz(e,t){e.eachEdge(function(e,n){var r=bo(e.getModel().get([`lineStyle`,`curveness`]),-Nz(e,t,n,!0),0),i=xs(e.node1.getLayout()),a=xs(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var Vz=$m(Pz,Hz);function Hz(e,t){e.eachSeriesByType(Pz,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];U(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Gg),gB=function(){function e(e){this.group=new Gg,this._LineCtor=e||hB}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=vB(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=vB(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!_B(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function vB(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:$v(t)}}function yB(e){return isNaN(e[0])||isNaN(e[1])}function bB(e){return e&&!yB(e[0])&&!yB(e[1])}var xB=[],SB=[],CB=[],wB=xl,TB=Ns,EB=Math.abs;function DB(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){xB[0]=wB(r[0],i[0],a[0],u),xB[1]=wB(r[1],i[1],a[1],u);var d=EB(TB(xB,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function OB(e,t){var n=[],r=Tl,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[xs(c[0]),xs(c[1])],c[2]&&c.__original.push(xs(c[2])));var d=c.__original;if(c[2]!=null){if(bs(i[0],d[0]),bs(i[1],d[2]),bs(i[2],d[1]),l&&l!==`none`){var f=Wz(e.node1),p=DB(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=Wz(e.node2),p=DB(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}bs(c[0],i[0]),bs(c[1],i[2]),bs(c[2],i[1])}else{if(bs(a[0],d[0]),bs(a[1],d[1]),Ts(o,a[1],a[0]),ks(o,o),l&&l!==`none`){var f=Wz(e.node1);ws(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=Wz(e.node2);ws(a[1],a[1],o,-f*t)}bs(c[0],a[0]),bs(c[1],a[1])}})}var kB=Em();function AB(e){if(e)return kB(e).bridge}var jB=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Pz,t}return t.prototype.init=function(e,t){var n=new Uw,r=new gB,i=this.group,a=new Gg;this._controller=new FL(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=ER(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&xR(o,2,i,this._firstRender?null:e),OB(e.getGraph(),Uz(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&zR(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),qz(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),Bz(e.getGraph(),e),r.updateLayout(e)}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(th(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(th(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){Yz(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=ER(t);this._active&&r&&(xR(this._mainGroup,2,r,null),HR(e)&&(this._updateNodeAndLinkScale(),OB(t.getGraph(),Uz(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=Uz(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(OB(e.getGraph(),Uz(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=AB(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(YL(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Gg,o=n.group.children(),s=r.group.children(),c=new Gg,l=new Gg;a.add(l),a.add(c);for(var u=0;ua&&(t[1-r]=Pp(t[r],d.sign*a)),t}function RB(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function zB(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var BB=Em(),VB=V,HB=lo,UB=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Gg,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=uo(WB,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}JB(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&QD(r).w>o)return!0;if(a){var s=mL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=BB(e).pointerEl=new tv[i.type](VB(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=BB(e).labelEl=new Yf(VB(t.label));e.add(i),KB(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=BB(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=BB(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),KB(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=Ev(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){ZA(e.event)},onmousedown:HB(this._onHandleDragMove,this,0,0),drift:HB(this._onHandleDragMove,this),ondragend:HB(this._onHandleDragEnd,this)}),n.add(r)),JB(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);G(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,tA(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){WB(this._axisPointerModel,!t&&this._moveAnimation,this._handle,qB(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(qB(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(qB(r)),BB(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),nA(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function WB(e,t,n,r){GB(BB(n).lastProp,r)||(BB(n).lastProp=r,t?J_(n,r,e):(n.stopAnimation(),n.attr(r)))}function GB(e,t){if(J(e)&&J(t)){var n=!0;return U(t,function(t,r){n&&=GB(e[r],t)}),!!n}return e===t}function KB(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function qB(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function JB(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function YB(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function XB(e,t,n,r,i){var a=QB(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=WS(o.get(`padding`)||0),c=o.getFont(),l=gc(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),ZB(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:ey(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function ZB(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function QB(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:TE(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};U(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),q(o)?a=o.replace(`{value}`,a):K(o)&&(a=o(s))}return a}function $B(e,t,n){var r=ds();return gs(r,r,n.rotation),hs(r,r,n.position),yv([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function eV(e,t,n,r,i,a){var o=IO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),XB(t,r,i,a,{position:$B(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function tV(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function nV(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function rV(e,t,n){return QD(e,{fromStat:{sers:W(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function iV(e,t,n){return[pp(fp(t[0],t[1]),e-n/2),fp(e+n/2,pp(t[0],t[1]))]}var aV=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=oV(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=YB(r),f=sV[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}eV(t,e,rk(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=rk(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=$B(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=oV(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=fp(o[1],l[c]),l[c]=pp(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(UB);function oV(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var sV={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:tV([t,r[0]],[t,r[1]],cV(e))}},shadow:function(e,t,n,r,i,a){var o=rV(e,i,a),s=r[1]-r[0],c=iV(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:nV([l,r[0]],[u-l,s],cV(e))}}};function cV(e){return e.dim===`x`?0:1}var lV=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.color.accent60,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:Q.color.accent40,throttle:40}},t}(pC),uV=Em(),dV=U;function fV(e,t,n){if(!Ro.node){var r=t.getZr();uV(r).records||(uV(r).records={}),pV(r,t);var i=uV(r).records[e]||(uV(r).records[e]={});i.handler=n}}function pV(e,t){if(uV(e).initialized)return;uV(e).initialized=!0,n(`click`,uo(gV,`click`)),n(`mousemove`,uo(gV,`mousemove`)),n(`mousewheel`,uo(gV,`mousewheel`)),n(`globalout`,hV);function n(n,r){e.on(n,function(n){var i=_V(t);dV(uV(e).records,function(e){e&&r(e,n,i.dispatchAction)}),mV(i.pendings,t)})}}function mV(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function hV(e,t,n){e.handler(`leave`,null,n)}function gV(e,t,n,r){t.handler(e,n,r)}function _V(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function vV(e,t){if(!Ro.node){var n=t.getZr();(uV(n).records||{})[e]&&(uV(n).records[e]=null)}}var yV=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;fV(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){vV(`axisPointer`,t)},t.prototype.dispose=function(e,t){vV(`axisPointer`,t)},t.type=`axisPointer`,t}(rN);function bV(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Tm(a,e);if(o==null||o<0||G(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(W(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var xV=Em();function SV(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||lo(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){MV(i)&&(i=bV({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=MV(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||MV(i),f={},p={},m={list:[],map:{}},h={showPointer:uo(TV,p),showTooltip:uo(EV,m)};U(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);U(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=AV(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&CV(e,o,h,!1,f)}})});var g={};return U(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&U(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,jV(t),jV(e)))),g[e.key]=a}})}),U(g,function(e,t){CV(u[t],e,h,!0,f)}),DV(p,u,f),OV(m,i,e,o),kV(u,o,n),f}}function CV(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=wV(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&H(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function wV(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return U(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Yp(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),U(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function TV(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function EV(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=_L(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function DV(e,t,n){var r=n.axesInfo=[];U(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function OV(e,t,n,r){if(MV(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function kV(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=xV(r)[i]||{},o=xV(r)[i]={};U(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&U(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}U(a,function(e,t){!o[t]&&c.push(l(e))}),U(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function AV(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function jV(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function MV(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function NV(e){yL.registerAxisPointerClass(`CartesianAxisPointer`,aV),e.registerComponentModel(lV),e.registerComponentView(yV),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=sL(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},SV)}function PV(e){wI(AL),wI(NV)}function FV(e,t){var n=WS(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Wf({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var IV=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(pC);function LV(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function RV(e){if(Ro.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function JV(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(Ro.transformSupported?``+WV+i:`,left`+i+`,top`+i)),UV+`:`+a}function YV(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Ro.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Ro.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+WV+`:`+o+`;`:[[`top`,0],[`left`,0],[zV,o]]}function XV(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=Y(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),U([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function ZV(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=uw(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(JV(a,n,r)),o&&i.push(`background-color:`+o),U([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=US(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(XV(d)),f!=null&&i.push(`padding:`+WS(f).join(`px `)+`px`),i.join(`;`)+`;`}function QV(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Px(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var $V=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ro.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(q(i)?document.querySelector(i):go(i)?i:K(i)&&i(e.getDom()));QV(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;qA(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=HV(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=GV+ZV(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+YV(i[0],i[1],!0)+(`border-color:`+XS(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(q(i)&&n.get(`trigger`)===`item`&&!LV(n)&&(o=qV(n,r,i)),q(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,G(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Ro.node&&n.getDom()){var i=sH(r,n);this._ticket=``;var a=r.dataByCoordSys,o=fH(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=iH;c.x=r.x,c.y=r.y,c.update(),th(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=bV(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(sH(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&oH([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(th(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;HN(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(th(e).dataIndex==null?th(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=lo(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=oH([t.tooltipOption],r),o=this._renderMode,s=[],c=XC(`section`,{blocks:[],noHeader:!0}),l=[],u=new dw;U(e,function(e){U(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=QB(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=XC(`section`,{header:f,noHeader:!wo(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),U(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=TE(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,XS(m.color),o);var h=wC(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=oH([a],r).get(`valueFormatter`);p.blocks.push(_?H({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=nw(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` -`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=$m(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=iH([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new lw;h.marker=g.makeTooltipMarker(`item`,JS(h.color),d);var _=SC(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ew(y?H({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=$m(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(q(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=V(a),a.content=Bx(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=iH(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new lw;this._showOrMove(d,function(){var n=V(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(q(u)){var p=e.ecModel.get(`useUTC`),m=G(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=SS(m.axisValue,d,p)),d=KS(d,n,!0)}else if(K(u)){var g=so(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||G(t))return{color:r||i};if(!G(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),K(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),G(t))n=Sp(t[0],s),r=Sp(t[1],c);else if(J(t)){var p=t;p.width=l[0],p.height=l[1];var m=tC(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(q(t)&&o){var h=cH(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=oH(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=lH(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=lH(d)?l[1]/2:d===`bottom`?l[1]:0),FV(e)){var h=sH(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&U(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&U(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&U(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&U(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!Io.node&&t.getDom()&&(eA(this,`_updatePosition`),this._tooltipContent.dispose(),gV(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(tN);function iH(e,t,n){var r=t.ecModel,i;n?(i=new by(n,r,r),i=new by(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof by&&(o=o.get(`tooltip`,!0)),q(o)&&(o={formatter:o}),o&&(i=new by(o,i,r)))}return i}function aH(e,t){return e.dispatchAction||so(t.dispatchAction,t)}function oH(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function sH(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function cH(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function lH(e){return e===`center`||e===`middle`}function uH(e,t,n){var r=Dm(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=km(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=$m(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function dH(e){SI(jV),e.registerComponentModel(PV),e.registerComponentView(rH),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},No),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},No)}var fH=U;function pH(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function mH(e,t,n){var r={};return fH(t,function(t){var a=r[t]=i();fH(e[t],function(e,r){if(tz.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new tz(i),r===`opacity`&&(i=V(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new tz(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function hH(e,t,n){var r;U(n,function(e){t.hasOwnProperty(e)&&pH(t[e])&&(r=!0)}),r&&U(n,function(n){t.hasOwnProperty(n)&&pH(t[n])?e[n]=V(t[n]):delete e[n]})}function gH(e,t,n,r){var i={};return U(e,function(e){i[e]=tz.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return LN(a,l,e)}function c(e,t){zN(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var _H=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},vH=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),G(t)&&U(t,function(e,r){q(e)&&(e={type:e}),t[r]=Ya(e,_H(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,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:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(dC),yH=co,bH=U,xH=Ug,SH=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new xH),this.group.add(this._selectorGroup=new xH),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=iC(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=tC(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=tC(Za({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=NV(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=X(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),bH(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` -`)){var p=new xH;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,yH(TH,f,null,r,d)).on(`mouseover`,yH(EH,m.name,null,r,d)).on(`mouseout`,yH(DH,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=$m(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Hl(h.fill);_&&_[3]===0&&(_[3]=.2,h=H(H({},h),{fill:Xl(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,yH(TH,null,f,r,d)).on(`mouseover`,yH(EH,null,f,r,d)).on(`mouseout`,yH(DH,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=$m(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};$m(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();bH(e,function(e){var r=e.type,i=new qf({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Xv(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),cg(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=CH(c,r,o,s,d,m,u),y=new xH,b=r.getModel(`textStyle`);if(K(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(wH({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;q(w)&&w?T=w.replace(`{name}`,t??``):K(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new qf({style:Qv(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Hf({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Mv({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),cg(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();$S(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){$S(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(tN);function CH(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),bH(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:IP(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function wH(e){var t=e.icon||`roundRect`,n=kw(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function TH(e,t,n,r){DH(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),EH(e,t,n,r)}function EH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function DH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function OH(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),kH(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){U(i,function(t,n){e[t?`select`:`unSelect`](n)}),kH(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function kH(e,t){var n=t||{};return U(e.getData(),function(t){var r=t.get(`name`);if(r!==` -`&&r!==``){var i=e.isSelected(r);n[r]=Mo(n,r)?n[r]&&i:i}}),n}function AH(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,co(OH,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,co(OH,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,co(OH,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,co(OH,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,co(OH,`unSelect`))}var jH=Qm(MH);function MH(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=Y(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Hf({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&K_(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;U([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,q(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=LH[i],o=RH[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(SH);function BH(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function VH(e){SI(NH),e.registerComponentModel(PH),e.registerComponentView(zH),BH(e)}function HH(e){SI(NH),SI(VH)}var UH={get:function(e,t,n){var r=V((WH[e]||{})[t]);return n&&G(r)?r[r.length-1]:r}},WH={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},GH=tz.mapVisual,KH=tz.eachVisual,qH=G,JH=U,YH=Op,XH=xp,ZH=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&hH(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=so(e,this),this.controllerVisuals=mH(this.option.controller,t,e),this.targetVisuals=mH(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return JH(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=km(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return W(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){U(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],G(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(q(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(K(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=YH([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=io(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};Ya(r,n),Ya(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){qH(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},JH(r,function(e,t){if(tz.isValidType(t)){var n=UH.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;JH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&V(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&V(n)||(a?s[0]:[s[0],s[0]])),c.symbol=GH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;KH(l,function(e){e>u&&(u=e)}),c.symbolSize=GH(l,function(e){return XH(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(dC),QH=[20,140],$H=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=QH[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=QH[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):G(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),U(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Op((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=eU(this,`outOfRange`,this.getExtent()),n=eU(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Ug(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);oU([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=aU(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=_v(n.handleLabelPoints[l],gv(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=aU(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=_v(c.indicatorLabelPoint,gv(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||mU(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=Sm(u,d);this._dispatchHighDown(`downplay`,iU(f[0],n)),this._dispatchHighDown(`highlight`,iU(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(BN(e.target,function(e){var n=$m(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function yU(e,t,n,r){for(var i=t.targetVisuals[r],a=tz.prepareVisualTypes(i),o={color:RN(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(gU,_U),U(vU,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(xU))}function TU(e){e.registerComponentModel($H),e.registerComponentView(dU),wU(e)}var EU=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],DU[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=V(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=W(this._pieceList,function(e){return e=V(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=tz.listVisualTypes(),i=this.isCategory();U(t.pieces,function(e){U(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),U(n,function(e,n){var r=!1;U(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&U(this.stateList,function(e){(t[e]||(t[e]={}))[n]=UH.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,U(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;U(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=V(e)},t.prototype.getValueState=function(e){var t=tz.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){tz.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return U(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Ex(ZH.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(ZH),DU={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function OU(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var kU=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=_o(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),U(o.viewPieceList,function(o){var s=o.piece,u=new Ug;u.onclick=so(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new qf({style:Qv(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:Y(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),$S(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:iU(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return rU(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Ug,o=this.visualMapModel.textStyleModel;a.add(new qf({style:Qv(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=W(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=kw(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=V(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,U(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(tU);function AU(e){e.registerComponentModel(EU),e.registerComponentView(kU),wU(e)}function jU(e){SI(TU),SI(AU)}var MU={label:{enabled:!0},decal:{show:!1}},NU=wm(),PU=wm(),FU=Qm(IU);function IU(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=PU(e).scope||(PU(e).scope={}),i=V(MU);Ya(i.label,e.getLocaleModel().get(`aria`),!1),Ya(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=X();e.eachSeries(function(e){e.isColorBySeries()||(NU(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(K(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=gC(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=NU(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=gC(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?H(H({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=Za(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=HU:-c>=HU),f=c>0?c%HU:c%HU+HU,p=!1;p=d?!0:!ru(u)&&f>=VU==!!l;var m=e+n*BU(a),h=t+r*zU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*UU);if(d){var _=1/this._p,v=(l?1:-1)*(HU-_);this._add(`A`,n,r,g,1,+l,e+n*BU(a+v),t+r*zU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*BU(o),b=t+r*zU(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function oW(e){return``}function sW(e,t){t||={};var n=t.newline?` -`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return aW(i,a)+(i===`style`?o||``:Bx(o))+(t?``+n+W(t,function(e){return r(e)}).join(n)+n:``)+oW(i)}return r(e)}function cW(e,t,n){n||={};var r=n.newline?` -`:``,i=` {`+r,a=r+`}`,o=W(ao(e),function(t){return t+i+W(ao(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=W(ao(t),function(e){return`@keyframes `+e+i+W(ao(t[e]),function(n){return n+i+W(ao(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function lW(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function uW(e,t,n,r){return iW(`svg`,`root`,{width:e,height:t,xmlns:QU,"xmlns:xlink":$U,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var dW=0;function fW(){return dW++}var pW={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},mW=`transform-origin`;function hW(e,t,n){var r=H({},e.shape);H(r,t),e.buildPath(n,r);var i=new WU;return i.reset(vu(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function gW(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[mW]=n+`px `+r+`px`)}var _W={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function vW(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function yW(e,t,n){var r=e.shape.paths,i={},a,o;if(U(r,function(e){var t=lW(n.zrId);t.animation=!0,xW(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=ao(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=vW(i,n);return a.replace(o,s)}}function bW(e){return q(e)?pW[e]?`cubic-bezier(`+pW[e]+`)`:Dl(e)?e:``:``}function xW(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof O_){var s=yW(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return vW(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+fW();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function SW(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};CW(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=$l(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),CW(r,t,n,!0)}}}function CW(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+fW(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var wW=Math.round;function TW(e){return e&&q(e.src)}function EW(e){return e&&K(e.toDataURL)}function DW(e,t,n,r){ZU(function(i,a){var o=i===`fill`||i===`stroke`;o&&gu(a)?HW(t,e,i,r):o&&pu(a)?UW(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),VW(n,e,r)}function OW(e,t){var n=nM(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[nW+`silent`]=`true`))}function kW(e){return ru(e[0]-1)&&ru(e[1])&&ru(e[2])&&ru(e[3]-1)}function AW(e){return ru(e[4])&&ru(e[5])}function jW(e,t,n){if(t&&!(AW(t)&&kW(t))){var r=n?10:1e4;e.transform=kW(t)?`translate(`+wW(t[4]*r)/r+` `+wW(t[5]*r)/r+`)`:ou(t)}}function MW(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;xo(f,g),xo(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=os(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=iW(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=V(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=yu(i);x&&(o.patternTransform=x);var S=iW(`pattern`,``,o,[d]),C=sW(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=iW(`pattern`,T,o,[d])),t[n]=_u(T)}}function WW(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=iW(`clipPath`,a,o,[LW(e,n)])}t[`clip-path`]=_u(a)}function GW(e){return document.createTextNode(e)}function KW(e,t,n){e.insertBefore(t,n)}function qW(e,t){e.removeChild(t)}function JW(e,t){e.appendChild(t)}function YW(e){return e.parentNode}function XW(e){return e.nextSibling}function ZW(e,t){e.textContent=t}var QW=58,$W=120,eG=iW(``,``);function tG(e){return e===void 0}function nG(e){return e!==void 0}function rG(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function iG(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function aG(e){var t,n=e.children,r=e.tag;if(nG(r)){var i=e.elm=rW(r);if(cG(eG,e),G(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,oG(e,m,n,i,c)):sG(e,t,r,a))}function uG(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(cG(e,t),tG(t.text)?nG(r)&&nG(i)?r!==i&&lG(n,r,i):nG(i)?(nG(e.text)&&ZW(n,``),oG(n,null,i,0,i.length-1)):nG(r)?sG(n,r,0,r.length-1):nG(e.text)&&ZW(n,``):e.text!==t.text&&(nG(r)&&sG(n,r,0,r.length-1),ZW(n,t.text)))}function dG(e,t){if(iG(e,t))uG(e,t);else{var n=e.elm,r=YW(n);aG(t),r!==null&&(KW(r,t.elm,XW(n)),sG(r,[e],0,0))}return t}var fG=0,pG=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=mG(`configLayer`),this.storage=t,this._opts=n=H({},n),this.root=e,this._id=`zr`+fG++,this._oldVNode=uW(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=rW(`svg`);cG(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,dG(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return BW(e,lW(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=lW(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=hG(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=iW(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=W(ao(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(iW(`defs`,`defs`,{},c)),e.animation){var l=cW(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=iW(`style`,`stl`,{},[],l);a.push(u)}}return uW(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},sW(this.renderToVNode({animation:Y(e.cssAnimation,!0),emphasis:Y(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Y(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!a.current)return;let e=nI(a.current,void 0,{renderer:`svg`});o.current=e,e.on(`click`,e=>s.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(a.current),()=>{t.disconnect(),e.dispose(),o.current=null}},[]),(0,R.useEffect)(()=>{o.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,z.jsx)(`div`,{ref:a,className:i?`echart ${i}`:`echart`,style:{height:t,width:`100%`,minWidth:0},role:`img`,"aria-label":n})}function vG(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function yG(e){return Me[e?`dark`:`light`]}function bG(e){let t=e?5:7;return{ok:Be[t],warn:Ne[t],bad:Le[t],info:Re[t]}}function xG(e,t){let n=Ee[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function SG(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}function CG(e,t){let n=bG(t),r=String(e).toUpperCase();return r===`ERROR`||r===`FATAL`?n.bad:r===`WARN`||r===`WARNING`?n.warn:r===`INFO`?n.info:yG(t).muted}function wG({label:e,value:t,color:n,hint:r,children:i}){return(0,z.jsxs)(ce,{withBorder:!0,radius:`md`,p:`sm`,bg:`var(--mantine-color-default)`,miw:0,h:`100%`,children:[(0,z.jsx)(_,{c:`dimmed`,size:`xs`,truncate:!0,children:e}),(0,z.jsx)(_,{fw:600,fz:`xl`,c:n,mt:2,lh:1.2,truncate:!0,children:t}),r&&(0,z.jsx)(_,{c:`dimmed`,size:`xs`,mt:2,truncate:!0,children:r}),i&&(0,z.jsx)(oe,{mt:4,children:i})]})}function TG({health:e,label:t}){return(0,z.jsx)(ve,{color:vG(e),variant:`light`,tt:`none`,style:{minWidth:`max-content`},children:t})}function EG({text:e}){return(0,z.jsxs)(D,{py:`xl`,children:[(0,z.jsx)(Nn,{size:20}),(0,z.jsx)(_,{c:`dimmed`,size:`sm`,ml:`xs`,children:e})]})}function DG({retry:e}){return(0,z.jsxs)(D,{py:`xl`,style:{flexDirection:`column`,gap:8},children:[(0,z.jsxs)(oe,{display:`flex`,style:{alignItems:`center`,gap:8},children:[(0,z.jsx)(Ln,{size:20,weight:`fill`,color:`var(--mantine-color-bad-filled)`}),(0,z.jsx)(_,{c:`bad`,fw:500,size:`sm`,children:`Couldn't load this view`})]}),(0,z.jsx)(ne,{size:`compact-xs`,variant:`light`,color:`bad`,onClick:e,children:`Retry now`}),(0,z.jsx)(_,{c:`dimmed`,size:`xs`,children:`Retrying automatically`})]})}SI([tD]);function OG({values:e,color:t,label:n}){let r=(0,R.useMemo)(()=>({animation:!1,grid:{left:0,right:0,top:2,bottom:2},xAxis:{type:`category`,show:!1,data:e.map((e,t)=>t)},yAxis:{type:`value`,show:!1,min:0},tooltip:{show:!1},series:[{type:`line`,data:e,showSymbol:!1,smooth:.3,lineStyle:{width:1.5,color:t},areaStyle:{opacity:.12,color:t}}]}),[e,t]);return(0,z.jsx)(_G,{option:r,height:28,label:n})}var kG={unhealthy:0,degraded:1,healthy:2};function AG({widget:e,filters:t,agentAvailable:n,onOpenChat:r}){let i=Fe(`overview`,je(t,e.config,[`service`]));if(i.isError)return(0,z.jsx)(DG,{retry:()=>void i.refetch()});let a=[...i.data?.data.services??[]].sort((e,t)=>(kG[e.health]??3)-(kG[t.health]??3)||t.error_rate-e.error_rate);if(i.data&&a.length===0)return(0,z.jsx)(EG,{text:`No recent activity`});let o=e=>r(`Investigate the ${e} service. Explain its errors and latency.`);return(0,z.jsx)(Ye,{type:`auto`,offsetScrollbars:!0,h:`100%`,children:(0,z.jsxs)(et,{verticalSpacing:`xs`,fz:`sm`,highlightOnHover:n,children:[(0,z.jsx)(et.Thead,{children:(0,z.jsxs)(et.Tr,{children:[(0,z.jsx)(et.Th,{children:`Service`}),(0,z.jsx)(et.Th,{ta:`right`,children:`P95`}),(0,z.jsx)(et.Th,{ta:`right`,children:`Errors`})]})}),(0,z.jsx)(et.Tbody,{children:a.map(e=>(0,z.jsxs)(et.Tr,{...n&&{onClick:()=>o(e.service),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),o(e.service))},tabIndex:0,role:`button`,"aria-label":`Investigate ${e.service}`,style:{cursor:`pointer`}},children:[(0,z.jsx)(et.Td,{children:(0,z.jsx)(TG,{health:e.health,label:e.service})}),(0,z.jsx)(et.Td,{ta:`right`,children:(0,z.jsx)(_,{component:`span`,size:`sm`,ff:`monospace`,children:wa(e.p95_ms)})}),(0,z.jsx)(et.Td,{ta:`right`,children:(0,z.jsx)(_,{component:`span`,size:`sm`,c:e.error_rate>=.01?`bad`:`dimmed`,children:Ca(e.error_rate)})})]},e.service))})]})})}function jG({filters:e,agentAvailable:t,onOpenChat:n}){if(!t)return(0,z.jsx)(_,{c:`dimmed`,size:`sm`,children:`Configure an AI provider to enable this view. The rest of this dashboard remains available.`});let r=ke(e.window),i=[`Summarize the last ${r}`,`What changed in the last ${r}?`,`Which service needs attention right now?`];return(0,z.jsx)(P,{gap:`xs`,align:`flex-start`,children:i.map(e=>(0,z.jsx)(ne,{variant:`default`,size:`xs`,radius:`xl`,leftSection:(0,z.jsx)(be,{size:13,weight:`fill`}),onClick:()=>n(e),children:e},e))})}var MG={overview:[`service`],topology:[`service`],performance:[`service`],logs:[`service`,`severity`,`search`],trace:[`trace_id`,`service`]};function NG(e){return Object.hasOwn(MG,e)?MG[e]:void 0}function PG(e){return(NG(e)?.length??0)>0}function FG({opened:e,widget:t,services:n,onClose:r,onSave:i}){let[a,o]=(0,R.useState)({service:``,severity:``,search:``,trace_id:``});(0,R.useEffect)(()=>{e&&o({service:De(t.config,`service`),severity:De(t.config,`severity`),search:De(t.config,`search`),trace_id:De(t.config,`trace_id`)})},[e,t.config]);let s=NG(t.type)??[],c=[...new Set([...n,a.service].filter(Boolean))];function l(){let e={...t.config??{}};for(let t of s){let n=a[t].trim();n?e[t]=n:delete e[t]}i(e),r()}return(0,z.jsx)(Se,{opened:e,onClose:r,title:`Configure ${t.title}`,centered:!0,children:(0,z.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),l()},children:(0,z.jsxs)(P,{children:[s.includes(`service`)&&(0,z.jsx)(dn,{label:`Service`,placeholder:`All services`,data:c,value:a.service||null,onChange:e=>o({...a,service:e??``}),clearable:!0,searchable:!0,"aria-label":`Service`}),s.includes(`severity`)&&(0,z.jsx)(dn,{label:`Severity`,placeholder:`All severities`,data:[`ERROR`,`WARN`,`INFO`,`DEBUG`],value:a.severity||null,onChange:e=>o({...a,severity:e??``}),clearable:!0,"aria-label":`Severity`}),s.includes(`search`)&&(0,z.jsx)(I,{label:`Search`,placeholder:`Text the log body must contain`,value:a.search,onChange:e=>o({...a,search:e.currentTarget.value}),"aria-label":`Search`}),s.includes(`trace_id`)&&(0,z.jsx)(I,{label:`Trace id`,placeholder:`Leave empty for the most relevant recent trace`,value:a.trace_id,onChange:e=>o({...a,trace_id:e.currentTarget.value}),ff:`monospace`,"aria-label":`Trace id`}),(0,z.jsxs)(x,{justify:`flex-end`,children:[(0,z.jsx)(ne,{variant:`default`,onClick:r,children:`Cancel`}),(0,z.jsx)(ne,{type:`submit`,children:`Save`})]})]})})})}SI([NA]);function IG({widget:e,filters:t,dark:n}){let r=Fe(`logs`,je(t,e.config,[`service`,`severity`,`search`])),i=r.data,a=(0,R.useMemo)(()=>{if(!i||i.data.buckets.length===0)return null;let e=yG(n),t=i.provenance.window,r=[...new Set(i.data.buckets.map(e=>e.time))],a=[...new Set(i.data.buckets.map(e=>e.severity))],o=new Map(i.data.buckets.map(e=>[`${e.time} ${e.severity}`,e.count]));return{color:a.map(e=>CG(e,n)),grid:{left:28,right:8,top:8,bottom:20},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:10}},xAxis:{type:`category`,data:r.map(e=>Ta(e,t)),axisLabel:{color:e.muted,fontSize:8,hideOverlap:!0},axisLine:{lineStyle:{color:e.border}}},yAxis:{type:`value`,minInterval:1,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:8}},series:a.map(e=>({name:e,type:`bar`,stack:`logs`,barMaxWidth:14,data:r.map(t=>o.get(`${t} ${e}`)??0),itemStyle:{borderRadius:[2,2,0,0]}}))}},[n,i]);if(r.isError)return(0,z.jsx)(DG,{retry:()=>void r.refetch()});let o=(i?.data.entries??[]).slice(0,5);return i&&o.length===0?(0,z.jsx)(EG,{text:`No matching logs in this window`}):(0,z.jsxs)(P,{gap:`xs`,h:`100%`,children:[a&&(0,z.jsx)(oe,{h:72,children:(0,z.jsx)(_G,{option:a,height:72,label:`Log volume by severity`})}),(0,z.jsx)(Ye,{type:`auto`,offsetScrollbars:!0,style:{flex:1},children:(0,z.jsx)(et,{verticalSpacing:4,fz:`sm`,children:(0,z.jsx)(et.Tbody,{children:o.map((e,t)=>(0,z.jsxs)(et.Tr,{children:[(0,z.jsx)(et.Td,{style:{whiteSpace:`nowrap`},children:(0,z.jsx)(_,{component:`span`,size:`xs`,ff:`monospace`,c:`dimmed`,children:i?Ta(e.time,i.provenance.window,!0):e.time})}),(0,z.jsx)(et.Td,{style:{whiteSpace:`nowrap`},children:(0,z.jsx)(ve,{size:`xs`,color:SG(e.severity),variant:`light`,style:{minWidth:`max-content`},children:e.severity||`LOG`})}),(0,z.jsx)(et.Td,{style:{whiteSpace:`nowrap`},children:(0,z.jsx)(_,{component:`span`,size:`sm`,fw:600,children:e.service})}),(0,z.jsx)(et.Td,{style:{width:`100%`},children:(0,z.jsx)(_,{size:`sm`,lineClamp:1,title:e.body,children:e.body})})]},`${e.time}-${t}`))})})})]})}function LG({widget:e,filters:t,dark:n}){let r=je(t,e.config,[`service`]),i=Fe(`overview`,r),a=Fe(`performance`,r);if(i.isError)return(0,z.jsx)(DG,{retry:()=>void i.refetch()});let o=i.data?.data,s=(a.data?.data.points??[]).map(e=>e.error_rate*100),c=Math.max(o?.service_count??0,1),l=bG(n),u=o?.health===`unknown`,d=o?u?`No data`:o.health.charAt(0).toUpperCase()+o.health.slice(1):`—`;return(0,z.jsxs)(P,{gap:`sm`,children:[(0,z.jsxs)(bn,{cols:2,spacing:`sm`,children:[(0,z.jsx)(wG,{label:`Health`,value:d,color:o?vG(o.health):void 0,hint:o?u?`No telemetry in this window`:`${Sa.format(o.service_count)} services`:void 0}),(0,z.jsx)(wG,{label:`Error rate`,value:o&&!u?Ca(o.error_rate):`—`,color:o&&o.error_rate>=.01?`bad`:void 0,hint:o&&!u?`${Sa.format(o.total_spans)} operations`:void 0,children:s.length>1&&(0,z.jsx)(OG,{values:s,color:l.bad,label:`Error rate trend`})})]}),o&&!u&&(0,z.jsxs)(oe,{children:[(0,z.jsxs)(ln.Root,{size:`md`,"aria-label":`Service health distribution`,children:[(0,z.jsx)(ln.Section,{value:o.counts.healthy/c*100,color:`ok`}),(0,z.jsx)(ln.Section,{value:o.counts.degraded/c*100,color:`warn`}),(0,z.jsx)(ln.Section,{value:o.counts.unhealthy/c*100,color:`bad`})]}),(0,z.jsxs)(x,{mt:6,gap:`md`,children:[(0,z.jsx)(RG,{color:`ok`,text:`${o.counts.healthy} healthy`}),(0,z.jsx)(RG,{color:`warn`,text:`${o.counts.degraded} degraded`}),(0,z.jsx)(RG,{color:`bad`,text:`${o.counts.unhealthy} unhealthy`})]})]})]})}function RG({color:e,text:t}){return(0,z.jsxs)(x,{gap:6,children:[(0,z.jsx)(oe,{w:8,h:8,bg:e,style:{borderRadius:`50%`}}),(0,z.jsx)(_,{c:`dimmed`,size:`xs`,children:t})]})}SI([tD]);function zG({widget:e,filters:t,dark:n}){let r=Fe(`performance`,je(t,e.config,[`service`])),i=r.data,a=(0,R.useMemo)(()=>{if(!i||i.data.points.length===0)return null;let e=yG(n),t=i.provenance.window;return{color:[xG(`operations`,n),bG(n).warn],grid:{left:36,right:40,top:24,bottom:22},legend:{top:0,left:0,textStyle:{color:e.muted,fontSize:10},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:10}},xAxis:{type:`category`,data:i.data.points.map(e=>Ta(e.time,t)),boundaryGap:!1,axisLine:{lineStyle:{color:e.border}},axisTick:{show:!1},axisLabel:{color:e.muted,fontSize:9,hideOverlap:!0}},yAxis:[{type:`value`,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:9}},{type:`value`,splitLine:{show:!1},axisLabel:{color:e.muted,fontSize:9,formatter:e=>wa(e)}}],series:[{name:`Operations`,type:`line`,data:i.data.points.map(e=>e.spans),smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.05}},{name:`P95`,type:`line`,yAxisIndex:1,data:i.data.points.map(e=>e.p95_ms),smooth:.22,showSymbol:!1,lineStyle:{width:2}}]}},[n,i]);if(r.isError)return(0,z.jsx)(DG,{retry:()=>void r.refetch()});if(i&&i.data.points.length===0)return(0,z.jsx)(EG,{text:`No endpoint activity in this window`});let o=(i?.data.endpoints??[]).slice(0,3);return(0,z.jsxs)(P,{gap:`xs`,h:`100%`,children:[a&&(0,z.jsx)(oe,{style:{flex:1,minHeight:120},children:(0,z.jsx)(_G,{option:a,height:`100%`,label:`Operations and P95 latency`})}),o.length>0&&(0,z.jsx)(et,{verticalSpacing:4,fz:`sm`,children:(0,z.jsx)(et.Tbody,{children:o.map(e=>(0,z.jsxs)(et.Tr,{children:[(0,z.jsxs)(et.Td,{children:[(0,z.jsx)(ve,{variant:`light`,size:`xs`,mr:6,style:{minWidth:`max-content`},children:e.method}),(0,z.jsx)(_,{component:`span`,size:`sm`,ff:`monospace`,children:e.path})]}),(0,z.jsx)(et.Td,{ta:`right`,children:(0,z.jsxs)(_,{component:`span`,size:`sm`,c:`dimmed`,children:[Sa.format(e.calls),` calls`]})}),(0,z.jsx)(et.Td,{ta:`right`,children:(0,z.jsx)(_,{component:`span`,size:`sm`,ff:`monospace`,children:wa(e.p95_ms)})})]},`${e.method}-${e.path}`))})})]})}SI([PB]);function BG({widget:e,filters:t,dark:n,onOpenChat:r}){let i=je(t,e.config,[`service`]),a=Fe(`topology`,i),o=a.data?.data,s=(0,R.useMemo)(()=>{if(!o)return null;let e=yG(n),t=bG(n),r=e=>e===`unhealthy`?t.bad:e===`degraded`?t.warn:t.ok,i=[...o.nodes].sort((e,t)=>e.service.localeCompare(t.service));return{tooltip:{backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:10}},series:[{type:`graph`,layout:`circular`,circular:{rotateLabel:!1},roam:!1,draggable:!1,label:{show:!0,position:`bottom`,color:e.text,fontSize:10},edgeSymbol:[`none`,`arrow`],edgeSymbolSize:6,data:i.map(t=>({id:t.service,name:t.service,value:t.spans,symbolSize:Math.min(34,18+Math.log10(Math.max(t.spans,1))*4),itemStyle:{color:e.surface,borderColor:r(t.health),borderWidth:3}})),links:o.edges.map(n=>({source:n.caller,target:n.callee,value:n.calls,lineStyle:{width:Math.min(4,1+Math.log10(Math.max(n.calls,1))),color:n.error_rate>=.05?t.bad:e.muted,opacity:.5,curveness:.08}})),emphasis:{focus:`adjacency`}}]}},[n,o]);return a.isError?(0,z.jsx)(DG,{retry:()=>void a.refetch()}):o&&o.nodes.length===0?(0,z.jsx)(EG,{text:`No service relationships in this window`}):(0,z.jsxs)(P,{gap:4,h:`100%`,children:[s&&(0,z.jsx)(_G,{option:s,height:`100%`,className:`widget-chart`,label:`Service dependency graph`,onClick:e=>{let t=e;t.dataType===`node`&&t.data?.id&&r(`Investigate the ${t.data.id} service. Explain its errors and latency.`)}}),o&&(0,z.jsxs)(_,{c:`dimmed`,size:`xs`,children:[o.nodes.length,` services · `,o.edges.length,` `,o.edges.length===1?`route`:`routes`]})]})}function VG(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function HG({widget:e,filters:t,dark:n}){let r=Fe(`trace`,je(t,e.config,[`trace_id`,`service`]));if(r.isError)return(0,z.jsx)(DG,{retry:()=>void r.refetch()});let i=r.data?.data;if(i&&i.spans.length===0)return(0,z.jsx)(EG,{text:`No traces in this window`});let a=[...i?.spans??[]].sort((e,t)=>t.duration_ms-e.duration_ms).slice(0,6);return(0,z.jsxs)(P,{gap:`sm`,children:[(0,z.jsxs)(bn,{cols:{base:2,sm:4},spacing:`sm`,children:[(0,z.jsx)(wG,{label:`Duration`,value:i?wa(i.duration_ms):`—`}),(0,z.jsx)(wG,{label:`Spans`,value:i?Sa.format(i.spans.length):`—`}),(0,z.jsx)(wG,{label:`Services`,value:i?Sa.format(i.services.length):`—`}),(0,z.jsx)(wG,{label:`Status`,value:i?i.has_error?`Error`:`OK`:`—`,color:i?i.has_error?`bad`:`ok`:void 0})]}),a.length>0&&(0,z.jsx)(UG,{spans:a,dark:n}),i&&(0,z.jsxs)(x,{gap:4,children:[(0,z.jsxs)(_,{c:`dimmed`,size:`xs`,ff:`monospace`,children:[`Trace `,VG(i.trace_id)]}),(0,z.jsx)(WG,{value:i.trace_id})]})]})}function UG({spans:e,dark:t}){let n=Math.min(...e.map(e=>new Date(e.start).valueOf())),r=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),i=Math.max(r-n,1);return(0,z.jsx)(P,{gap:4,children:e.map(e=>{let r=(new Date(e.start).valueOf()-n)/i*100,a=Math.max(e.duration_ms/i*100,.6),o=e.status.toUpperCase().includes(`ERROR`);return(0,z.jsxs)(x,{gap:`sm`,wrap:`nowrap`,children:[(0,z.jsxs)(oe,{w:170,miw:0,children:[(0,z.jsx)(_,{size:`xs`,fw:600,truncate:!0,children:e.operation}),(0,z.jsx)(_,{c:`dimmed`,size:`xs`,truncate:!0,children:e.service})]}),(0,z.jsx)(Ze,{label:`${e.service} · ${e.operation} · ${wa(e.duration_ms)}`,withArrow:!0,children:(0,z.jsx)(oe,{pos:`relative`,h:10,flex:1,bg:`var(--mantine-color-default-hover)`,style:{borderRadius:`var(--mantine-radius-sm)`},children:(0,z.jsx)(oe,{pos:`absolute`,left:`${r}%`,w:`${Math.min(a,100-r)}%`,h:`100%`,bg:o?`bad`:xG(e.service,t),style:{borderRadius:`var(--mantine-radius-sm)`,minWidth:3}})})}),(0,z.jsx)(_,{size:`xs`,ff:`monospace`,w:56,ta:`right`,children:wa(e.duration_ms)})]},e.span_id)})})}function WG({value:e}){let{state:t,copy:n}=tt();return(0,z.jsx)(Ze,{label:t===`failed`?`Could not copy`:t===`copied`?`Copied`:`Copy trace id`,children:(0,z.jsx)(Qe,{variant:`subtle`,color:`gray`,size:`xs`,"aria-label":`Copy trace id`,"data-state":t===`idle`?void 0:t,onClick:()=>n(e),children:t===`copied`?(0,z.jsx)(C,{size:12,weight:`bold`}):(0,z.jsx)(N,{size:12})})})}var GG={overview:`System health`,topology:`Service map`,activity:`Recent activity`,assistant:`Ask Fanout`,performance:`Performance`,trace:`Trace focus`,logs:`Logs`},KG={overview:LG,topology:BG,activity:AG,assistant:jG,performance:zG,trace:HG,logs:IG};function qG(){return(0,z.jsx)(EG,{text:`This view type is not supported by this version`})}function JG(e){return Object.hasOwn(KG,e)?KG[e]:qG}function YG(e){let{widget:t,services:n,onRemove:r,onConfigure:i}=e,[a,o]=(0,R.useState)(!1),[s,c]=(0,R.useState)(!1),[l,u]=(0,R.useState)(!1),d=JG(t.type);return(0,z.jsxs)(ce,{withBorder:!0,radius:`lg`,p:`md`,h:`100%`,className:`widget-card`,style:{overflow:`hidden`},children:[(0,z.jsxs)(P,{h:`100%`,gap:`sm`,children:[(0,z.jsxs)(x,{justify:`space-between`,align:`center`,wrap:`nowrap`,className:`widget-drag`,style:{cursor:`grab`},children:[(0,z.jsx)(A,{order:2,fz:`md`,fw:500,lineClamp:1,miw:0,children:t.title}),(0,z.jsxs)(we,{position:`bottom-end`,withinPortal:!0,opened:a,onChange:o,children:[(0,z.jsx)(we.Target,{children:(0,z.jsx)(Qe,{className:`widget-actions`,"data-open":a||void 0,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Actions for ${t.title}`,children:(0,z.jsx)(Ue,{size:18,weight:`bold`})})}),(0,z.jsxs)(we.Dropdown,{children:[PG(t.type)&&(0,z.jsx)(we.Item,{leftSection:(0,z.jsx)(Fn,{size:15}),onClick:()=>c(!0),children:`Configure`}),(0,z.jsx)(we.Item,{color:`bad`,leftSection:(0,z.jsx)(We,{size:15}),onClick:()=>u(!0),children:`Remove`})]})]})]}),(0,z.jsx)(`div`,{className:`widget-body`,children:(0,z.jsx)(d,{...e})})]}),(0,z.jsx)(FG,{opened:s,widget:t,services:n,onClose:()=>c(!1),onSave:i}),(0,z.jsx)(Se,{opened:l,onClose:()=>u(!1),title:`Remove ${t.title}?`,centered:!0,radius:`md`,children:(0,z.jsxs)(P,{gap:`md`,children:[(0,z.jsx)(_,{size:`sm`,c:`dimmed`,children:`This takes the card off the dashboard for everyone who opens it. You can add it again from Add view, but its size and settings are not kept.`}),(0,z.jsxs)(x,{justify:`flex-end`,gap:`sm`,children:[(0,z.jsx)(ne,{variant:`default`,size:`sm`,onClick:()=>u(!1),children:`Cancel`}),(0,z.jsx)(ne,{color:`bad`,size:`sm`,onClick:()=>{u(!1),r()},children:`Remove`})]})]})})]})}var XG=ha(pa),ZG=`fanout.dashboard-id`,QG={layout:[],widgets:[],filters:{window:`1h`,namespace:``}};function $G(e){return Object.hasOwn(ya,e)?ya[e]:void 0}function eK({dashboardID:e=``,agentAvailable:t,onOpenChat:n,onDashboardChange:r,urlFilters:i,onFiltersChange:a}){let o=Ce(),s=$e(`light`)===`dark`,c=xe({queryKey:He,queryFn:()=>Ge(`/api/dashboards`),refetchInterval:3e4}),[l,u]=(0,R.useState)(()=>e||localStorage.getItem(ZG)||``),d=Sn({mutationFn:async e=>{if(!f.data)throw Error(`No dashboard selected`);let t=await le(`/api/dashboards/${encodeURIComponent(f.data.id)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({name:f.data.name,description:f.data.description,state:e})});if(!t.ok)throw Error(`Unable to save dashboard`);return t.json()},scope:{id:`dashboard-${l}`},onSuccess:e=>{o.setQueryData([`dashboard`,e.id],e),o.invalidateQueries({queryKey:He})},onError:e=>console.error(`Dashboard save failed`,e)}),f=xe({queryKey:[`dashboard`,l],queryFn:()=>Ge(`/api/dashboards/${encodeURIComponent(l)}`),enabled:!!l,refetchInterval:d.isPending||d.isError?!1:3e4}),[p,m]=(0,R.useState)(QG),[h,g]=(0,R.useState)(`lg`),[y,b]=(0,R.useState)(null),S=(0,R.useMemo)(()=>({window:Oe.some(e=>e.value===i?.window)?i.window:p.filters.window,namespace:i?.namespace??p.filters.namespace}),[i?.window,i?.namespace,p.filters.window,p.filters.namespace]),C=Fe(`overview`,je(S),!!f.data),w=(0,R.useMemo)(()=>(C.data?.data.services??[]).map(e=>e.service),[C.data]),T=ze();(0,R.useEffect)(()=>{e&&e!==l&&(u(e),localStorage.setItem(ZG,e))},[e,l]),(0,R.useEffect)(()=>{let t=c.data?.dashboards;if(t?.length&&!(e&&t.some(t=>t.id===e))&&!e){if(l&&t.some(e=>e.id===l)){r?.(l,!0);return}D((t.find(e=>e.is_default)??t[0]).id,!0)}},[e,c.data,l]),(0,R.useEffect)(()=>{d.isPending||d.isError||f.data?.state&&m(f.data.state)},[f.data?.updated_at,d.isPending,d.isError]),(0,R.useEffect)(()=>{d.reset()},[l]);let E=(0,R.useMemo)(()=>{let e=new Map(p.widgets.map(e=>[e.id,e.type])),t=p.layout.map(t=>{let n=$G(e.get(t.i)??`overview`)??ya.overview;return{...t,h:Math.max(t.h,n.minH),minW:Math.max(t.minW??0,n.minW),minH:Math.max(t.minH??0,n.minH)}});return{lg:t,md:t,sm:_a(t,6),xs:_a(t,2),xxs:_a(t,1)}},[p.layout,p.widgets]);function D(e,t=!1){u(e),localStorage.setItem(ZG,e),r?.(e,t)}function O(e){m(e),d.mutate(e)}function k(e){let t=Te(),n=ya[e],r=xa(p.layout,n.w,n.h,12,n.minW);O({...p,widgets:[...p.widgets,{id:t,type:e,title:GG[e],enabled:!0}],layout:[...p.layout,{i:t,x:r.x,y:r.y,w:r.w,h:n.h,minW:n.minW,minH:n.minH}]})}function j(e){O({...p,filters:e}),a?.(e)}function ee(e){O({...p,widgets:p.widgets.filter(t=>t.id!==e),layout:p.layout.filter(t=>t.i!==e)})}function M(e,t){O({...p,widgets:p.widgets.map(n=>n.id===e?{...n,config:t}:n)})}if(c.isLoading||l&&f.isLoading)return(0,z.jsx)(tK,{label:`Loading your dashboard…`});let N=c.data?.dashboards??[];if(e&&N.length>0&&!N.some(t=>t.id===e))return(0,z.jsx)(nK,{onOpenDefault:()=>D((N.find(e=>e.is_default)??N[0]).id,!0)});if(c.isError||f.isError)return(0,z.jsx)(tK,{label:`Your dashboard is unavailable. Try refreshing.`});let te=f.data;return te?(0,z.jsxs)(oe,{component:`main`,maw:1440,mx:`auto`,px:{base:`md`,sm:`xl`},pt:{base:`lg`,sm:`xl`},pb:`xl`,children:[(0,z.jsxs)(P,{gap:`md`,mb:`lg`,children:[(0,z.jsxs)(oe,{children:[(0,z.jsx)(A,{order:1,fz:32,lts:`-0.03em`,children:te.name}),(0,z.jsx)(_,{c:`dimmed`,mt:2,children:te.description||`A focused view of the signals that matter now.`})]}),(0,z.jsxs)(ut,{align:{base:`stretch`,md:`center`},justify:`space-between`,direction:{base:`column`,md:`row`},gap:`sm`,role:`group`,"aria-label":`Dashboard controls`,children:[(0,z.jsxs)(x,{gap:`sm`,wrap:`wrap`,children:[(0,z.jsx)(dn,{"aria-label":`Window`,value:S.window,onChange:e=>e&&j({...S,window:e}),data:Oe,w:{base:`100%`,xs:150},size:`sm`}),(0,z.jsx)(I,{"aria-label":`Namespace`,value:y??S.namespace,onChange:e=>b(e.currentTarget.value),onBlur:e=>{b(null),j({...S,namespace:e.currentTarget.value.trim()})},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},placeholder:`All namespaces`,w:{base:`100%`,xs:200},size:`sm`})]}),(0,z.jsxs)(x,{gap:`sm`,wrap:`wrap`,justify:`flex-end`,children:[T&&(0,z.jsxs)(_,{c:`dimmed`,size:`xs`,children:[`Updated `,new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(T))]}),(0,z.jsxs)(we,{shadow:`md`,position:`bottom-end`,withinPortal:!0,children:[(0,z.jsx)(we.Target,{children:(0,z.jsx)(ne,{variant:`default`,size:`sm`,leftSection:(0,z.jsx)(de,{size:15,weight:`bold`}),rightSection:(0,z.jsx)(jn,{size:13,weight:`bold`}),children:`Add view`})}),(0,z.jsx)(we.Dropdown,{children:va.filter(e=>t||e!==`assistant`).map(e=>(0,z.jsx)(we.Item,{onClick:()=>k(e),children:GG[e]},e))})]}),t&&(0,z.jsx)(ne,{variant:`subtle`,color:`gray`,size:`sm`,rightSection:(0,z.jsx)(kn,{size:15,weight:`bold`}),onClick:()=>n(),children:`Ask Fanout`})]})]})]}),d.isError&&(0,z.jsx)(v,{color:`bad`,radius:`lg`,mb:`lg`,icon:(0,z.jsx)(Ln,{size:18,weight:`fill`}),title:`Dashboard changes not saved`,children:(0,z.jsxs)(x,{justify:`space-between`,gap:`sm`,children:[(0,z.jsx)(_,{size:`sm`,children:`Your latest edits are kept on this screen but Fanout could not store them.`}),(0,z.jsx)(ne,{size:`compact-sm`,color:`bad`,variant:`light`,onClick:()=>d.mutate(p),children:`Retry save`})]})}),(0,z.jsx)(XG,{className:`dashboard-grid`,layouts:E,breakpoints:{lg:1100,md:800,sm:600,xs:420,xxs:0},cols:{lg:12,md:10,sm:6,xs:2,xxs:1},rowHeight:76,margin:[16,16],containerPadding:[0,0],compactType:`vertical`,draggableHandle:`.widget-drag`,draggableCancel:`button,input,select,textarea,a,label,[role=menu],[role=dialog],.widget-actions`,onBreakpointChange:g,onDragStop:e=>{h===`lg`&&O({...p,layout:[...e]})},onResizeStop:e=>{h===`lg`&&O({...p,layout:[...e]})},children:p.widgets.map(e=>(0,z.jsx)(`div`,{children:(0,z.jsx)(YG,{widget:e,filters:S,dark:s,services:w,agentAvailable:t,onOpenChat:n,onRemove:()=>ee(e.id),onConfigure:t=>M(e.id,t)})},e.id))})]}):(0,z.jsx)(tK,{label:`Preparing your dashboard…`})}function tK({label:e}){return(0,z.jsxs)(D,{mih:`50vh`,children:[(0,z.jsx)(m,{size:`sm`}),(0,z.jsx)(_,{c:`dimmed`,size:`sm`,ml:`sm`,children:e})]})}function nK({onOpenDefault:e}){return(0,z.jsx)(D,{mih:`50vh`,children:(0,z.jsxs)(P,{align:`center`,gap:`xs`,children:[(0,z.jsx)(A,{order:1,fz:24,lts:`-0.02em`,children:`This dashboard isn't here`}),(0,z.jsx)(_,{c:`dimmed`,size:`sm`,ta:`center`,children:`The link may be out of date, or the dashboard may have been renamed or deleted.`}),(0,z.jsx)(ne,{mt:`sm`,variant:`default`,size:`sm`,onClick:e,children:`Open your default dashboard`})]})})}export{eK as t}; \ No newline at end of file +`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=th(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=oH([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new dw;h.marker=g.makeTooltipMarker(`item`,XS(h.color),d);var _=wC(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?nw(y?H({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=th(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(q(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=V(a),a.content=Hx(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=oH(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new dw;this._showOrMove(d,function(){var n=V(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(q(u)){var p=e.ecModel.get(`useUTC`),m=G(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=wS(m.axisValue,d,p)),d=JS(d,n,!0)}else if(K(u)){var g=lo(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||G(t))return{color:r||i};if(!G(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),K(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),G(t))n=wp(t[0],s),r=wp(t[1],c);else if(J(t)){var p=t;p.width=l[0],p.height=l[1];var m=rC(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(q(t)&&o){var h=uH(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=cH(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=dH(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=dH(d)?l[1]/2:d===`bottom`?l[1]:0),LV(e)){var h=lH(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&U(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&U(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&U(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&U(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!Ro.node&&t.getDom()&&(nA(this,`_updatePosition`),this._tooltipContent.dispose(),vV(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(rN);function oH(e,t,n){var r=t.ecModel,i;n?(i=new Sy(n,r,r),i=new Sy(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Sy&&(o=o.get(`tooltip`,!0)),q(o)&&(o={formatter:o}),o&&(i=new Sy(o,i,r)))}return i}function sH(e,t){return e.dispatchAction||lo(t.dispatchAction,t)}function cH(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function lH(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function uH(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function dH(e){return e===`center`||e===`middle`}function fH(e,t,n){var r=km(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=jm(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=th(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function pH(e){wI(NV),e.registerComponentModel(IV),e.registerComponentView(aH),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Fo),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Fo)}var mH=U;function hH(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function gH(e,t,n){var r={};return mH(t,function(t){var a=r[t]=i();mH(e[t],function(e,r){if(rz.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new rz(i),r===`opacity`&&(i=V(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new rz(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function _H(e,t,n){var r;U(n,function(e){t.hasOwnProperty(e)&&hH(t[e])&&(r=!0)}),r&&U(n,function(n){t.hasOwnProperty(n)&&hH(t[n])?e[n]=V(t[n]):delete e[n]})}function vH(e,t,n,r){var i={};return U(e,function(e){i[e]=rz.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return zN(a,l,e)}function c(e,t){VN(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var yH=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},bH=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),G(t)&&U(t,function(e,r){q(e)&&(e={type:e}),t[r]=Za(e,yH(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,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:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(pC),xH=uo,SH=U,CH=Gg,wH=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new CH),this.group.add(this._selectorGroup=new CH),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=oC(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=rC(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=rC($a({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=FV(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=X(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),SH(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` +`)){var p=new CH;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,xH(DH,f,null,r,d)).on(`mouseover`,xH(OH,m.name,null,r,d)).on(`mouseout`,xH(kH,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=th(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Wl(h.fill);_&&_[3]===0&&(_[3]=.2,h=H(H({},h),{fill:Ql(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,xH(DH,null,f,r,d)).on(`mouseover`,xH(OH,null,f,r,d)).on(`mouseout`,xH(kH,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=th(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};th(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();SH(e,function(e){var r=e.type,i=new Yf({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Qv(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),ug(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=TH(c,r,o,s,d,m,u),y=new CH,b=r.getModel(`textStyle`);if(K(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(EH({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;q(w)&&w?T=w.replace(`{name}`,t??``):K(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Yf({style:ey(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Wf({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Pv({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),ug(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();tC(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){tC(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(rN);function TH(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),SH(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:RP(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function EH(e){var t=e.icon||`roundRect`,n=jw(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function DH(e,t,n,r){kH(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),OH(e,t,n,r)}function OH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function kH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function AH(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),jH(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){U(i,function(t,n){e[t?`select`:`unSelect`](n)}),jH(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function jH(e,t){var n=t||{};return U(e.getData(),function(t){var r=t.get(`name`);if(r!==` +`&&r!==``){var i=e.isSelected(r);n[r]=Po(n,r)?n[r]&&i:i}}),n}function MH(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,uo(AH,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,uo(AH,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,uo(AH,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,uo(AH,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,uo(AH,`unSelect`))}var NH=eh(PH);function PH(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=Y(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Wf({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&J_(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;U([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,q(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=zH[i],o=BH[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(wH);function HH(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function UH(e){wI(FH),e.registerComponentModel(IH),e.registerComponentView(VH),HH(e)}function WH(e){wI(FH),wI(UH)}var GH={get:function(e,t,n){var r=V((KH[e]||{})[t]);return n&&G(r)?r[r.length-1]:r}},KH={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},qH=rz.mapVisual,JH=rz.eachVisual,YH=G,XH=U,ZH=Ap,QH=Cp,$H=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&_H(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=lo(e,this),this.controllerVisuals=gH(this.option.controller,t,e),this.targetVisuals=gH(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return XH(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=jm(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return W(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){U(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],G(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(q(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(K(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=ZH([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=oo(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};Za(r,n),Za(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){YH(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},XH(r,function(e,t){if(rz.isValidType(t)){var n=GH.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;XH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&V(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&V(n)||(a?s[0]:[s[0],s[0]])),c.symbol=qH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;JH(l,function(e){e>u&&(u=e)}),c.symbolSize=qH(l,function(e){return QH(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(pC),eU=[20,140],tU=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=eU[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=eU[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):G(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),U(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Ap((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=nU(this,`outOfRange`,this.getExtent()),n=nU(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Gg(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);cU([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=sU(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=yv(n.handleLabelPoints[l],vv(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=sU(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=yv(c.indicatorLabelPoint,vv(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||gU(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=wm(u,d);this._dispatchHighDown(`downplay`,oU(f[0],n)),this._dispatchHighDown(`highlight`,oU(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(HN(e.target,function(e){var n=th(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function xU(e,t,n,r){for(var i=t.targetVisuals[r],a=rz.prepareVisualTypes(i),o={color:BN(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(vU,yU),U(bU,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(CU))}function DU(e){e.registerComponentModel(tU),e.registerComponentView(pU),EU(e)}var OU=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],kU[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=V(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=W(this._pieceList,function(e){return e=V(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=rz.listVisualTypes(),i=this.isCategory();U(t.pieces,function(e){U(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),U(n,function(e,n){var r=!1;U(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&U(this.stateList,function(e){(t[e]||(t[e]={}))[n]=GH.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,U(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;U(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=V(e)},t.prototype.getValueState=function(e){var t=rz.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){rz.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return U(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Ox($H.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}($H),kU={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function AU(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var jU=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=yo(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),U(o.viewPieceList,function(o){var s=o.piece,u=new Gg;u.onclick=lo(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Yf({style:ey(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:Y(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),tC(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:oU(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return aU(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Gg,o=this.visualMapModel.textStyleModel;a.add(new Yf({style:ey(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=W(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=jw(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=V(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,U(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(rU);function MU(e){e.registerComponentModel(OU),e.registerComponentView(jU),EU(e)}function NU(e){wI(DU),wI(MU)}var PU={label:{enabled:!0},decal:{show:!1}},FU=Em(),IU=Em(),LU=eh(RU);function RU(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=IU(e).scope||(IU(e).scope={}),i=V(PU);Za(i.label,e.getLocaleModel().get(`aria`),!1),Za(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=X();e.eachSeries(function(e){e.isColorBySeries()||(FU(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(K(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=vC(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=FU(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=vC(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?H(H({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=$a(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=WU:-c>=WU),f=c>0?c%WU:c%WU+WU,p=!1;p=d?!0:!au(u)&&f>=UU==!!l;var m=e+n*HU(a),h=t+r*VU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*GU);if(d){var _=1/this._p,v=(l?1:-1)*(WU-_);this._add(`A`,n,r,g,1,+l,e+n*HU(a+v),t+r*VU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*HU(o),b=t+r*VU(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function cW(e){return``}function lW(e,t){t||={};var n=t.newline?` +`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return sW(i,a)+(i===`style`?o||``:Hx(o))+(t?``+n+W(t,function(e){return r(e)}).join(n)+n:``)+cW(i)}return r(e)}function uW(e,t,n){n||={};var r=n.newline?` +`:``,i=` {`+r,a=r+`}`,o=W(so(e),function(t){return t+i+W(so(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=W(so(t),function(e){return`@keyframes `+e+i+W(so(t[e]),function(n){return n+i+W(so(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function dW(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function fW(e,t,n,r){return oW(`svg`,`root`,{width:e,height:t,xmlns:eW,"xmlns:xlink":tW,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var pW=0;function mW(){return pW++}var hW={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},gW=`transform-origin`;function _W(e,t,n){var r=H({},e.shape);H(r,t),e.buildPath(n,r);var i=new KU;return i.reset(bu(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function vW(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[gW]=n+`px `+r+`px`)}var yW={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function bW(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function xW(e,t,n){var r=e.shape.paths,i={},a,o;if(U(r,function(e){var t=dW(n.zrId);t.animation=!0,CW(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=so(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=bW(i,n);return a.replace(o,s)}}function SW(e){return q(e)?hW[e]?`cubic-bezier(`+hW[e]+`)`:kl(e)?e:``:``}function CW(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof A_){var s=xW(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return bW(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+mW();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function wW(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};TW(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=tu(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),TW(r,t,n,!0)}}}function TW(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+mW(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var EW=Math.round;function DW(e){return e&&q(e.src)}function OW(e){return e&&K(e.toDataURL)}function kW(e,t,n,r){$U(function(i,a){var o=i===`fill`||i===`stroke`;o&&vu(a)?WW(t,e,i,r):o&&hu(a)?GW(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),UW(n,e,r)}function AW(e,t){var n=iM(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[iW+`silent`]=`true`))}function jW(e){return au(e[0]-1)&&au(e[1])&&au(e[2])&&au(e[3]-1)}function MW(e){return au(e[4])&&au(e[5])}function NW(e,t,n){if(t&&!(MW(t)&&jW(t))){var r=n?10:1e4;e.transform=jW(t)?`translate(`+EW(t[4]*r)/r+` `+EW(t[5]*r)/r+`)`:cu(t)}}function PW(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Co(f,g),Co(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=cs(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=oW(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=V(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=xu(i);x&&(o.patternTransform=x);var S=oW(`pattern`,``,o,[d]),C=lW(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=oW(`pattern`,T,o,[d])),t[n]=yu(T)}}function KW(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=oW(`clipPath`,a,o,[zW(e,n)])}t[`clip-path`]=yu(a)}function qW(e){return document.createTextNode(e)}function JW(e,t,n){e.insertBefore(t,n)}function YW(e,t){e.removeChild(t)}function XW(e,t){e.appendChild(t)}function ZW(e){return e.parentNode}function QW(e){return e.nextSibling}function $W(e,t){e.textContent=t}var eG=58,tG=120,nG=oW(``,``);function rG(e){return e===void 0}function iG(e){return e!==void 0}function aG(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function oG(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function sG(e){var t,n=e.children,r=e.tag;if(iG(r)){var i=e.elm=aW(r);if(uG(nG,e),G(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,cG(e,m,n,i,c)):lG(e,t,r,a))}function fG(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(uG(e,t),rG(t.text)?iG(r)&&iG(i)?r!==i&&dG(n,r,i):iG(i)?(iG(e.text)&&$W(n,``),cG(n,null,i,0,i.length-1)):iG(r)?lG(n,r,0,r.length-1):iG(e.text)&&$W(n,``):e.text!==t.text&&(iG(r)&&lG(n,r,0,r.length-1),$W(n,t.text)))}function pG(e,t){if(oG(e,t))fG(e,t);else{var n=e.elm,r=ZW(n);sG(t),r!==null&&(JW(r,t.elm,QW(n)),lG(r,[e],0,0))}return t}var mG=0,hG=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=gG(`configLayer`),this.storage=t,this._opts=n=H({},n),this.root=e,this._id=`zr`+mG++,this._oldVNode=fW(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=aW(`svg`);uG(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,pG(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return HW(e,dW(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=dW(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=_G(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=oW(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=W(so(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(oW(`defs`,`defs`,{},c)),e.animation){var l=uW(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=oW(`style`,`stl`,{},[],l);a.push(u)}}return fW(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},lW(this.renderToVNode({animation:Y(e.cssAnimation,!0),emphasis:Y(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Y(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!a.current)return;let e=iI(a.current,void 0,{renderer:`svg`});o.current=e,e.on(`click`,e=>s.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(a.current),()=>{t.disconnect(),e.dispose(),o.current=null}},[]),(0,R.useEffect)(()=>{o.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,z.jsx)(`div`,{ref:a,className:i?`echart ${i}`:`echart`,style:{height:t,width:`100%`,minWidth:0},role:`img`,"aria-label":n})}function bG(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function xG(e){return Me[e?`dark`:`light`]}function SG(e){let t=e?5:7;return{ok:Be[t],warn:Ne[t],bad:Le[t],info:Re[t]}}function CG(e,t){let n=Ee[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function wG(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}function TG(e,t){let n=SG(t),r=String(e).toUpperCase();return r===`ERROR`||r===`FATAL`?n.bad:r===`WARN`||r===`WARNING`?n.warn:r===`INFO`?n.info:xG(t).muted}function EG({label:e,value:t,color:n,hint:r,children:i}){return(0,z.jsxs)(ce,{withBorder:!0,radius:`md`,p:`sm`,bg:`var(--mantine-color-default)`,miw:0,h:`100%`,children:[(0,z.jsx)(_,{c:`dimmed`,size:`xs`,truncate:!0,children:e}),(0,z.jsx)(_,{fw:600,fz:`xl`,c:n,mt:2,lh:1.2,truncate:!0,children:t}),r&&(0,z.jsx)(_,{c:`dimmed`,size:`xs`,mt:2,truncate:!0,children:r}),i&&(0,z.jsx)(oe,{mt:4,children:i})]})}function DG({health:e,label:t}){return(0,z.jsx)(ve,{color:bG(e),variant:`light`,tt:`none`,style:{minWidth:`max-content`},children:t})}function OG({text:e}){return(0,z.jsxs)(D,{py:`xl`,children:[(0,z.jsx)(Nn,{size:20}),(0,z.jsx)(_,{c:`dimmed`,size:`sm`,ml:`xs`,children:e})]})}function kG({retry:e}){return(0,z.jsxs)(D,{py:`xl`,style:{flexDirection:`column`,gap:8},children:[(0,z.jsxs)(oe,{display:`flex`,style:{alignItems:`center`,gap:8},children:[(0,z.jsx)(Ln,{size:20,weight:`fill`,color:`var(--mantine-color-bad-filled)`}),(0,z.jsx)(_,{c:`bad`,fw:500,size:`sm`,children:`Couldn't load this view`})]}),(0,z.jsx)(ne,{size:`compact-xs`,variant:`light`,color:`bad`,onClick:e,children:`Retry now`}),(0,z.jsx)(_,{c:`dimmed`,size:`xs`,children:`Retrying automatically`})]})}wI([rD]);function AG({values:e,color:t,label:n}){let r=(0,R.useMemo)(()=>({animation:!1,grid:{left:0,right:0,top:2,bottom:2},xAxis:{type:`category`,show:!1,data:e.map((e,t)=>t)},yAxis:{type:`value`,show:!1,min:0},tooltip:{show:!1},series:[{type:`line`,data:e,showSymbol:!1,smooth:.3,lineStyle:{width:1.5,color:t},areaStyle:{opacity:.12,color:t}}]}),[e,t]);return(0,z.jsx)(yG,{option:r,height:28,label:n})}var jG={unhealthy:0,degraded:1,healthy:2};function MG({widget:e,filters:t,agentAvailable:n,onOpenChat:r}){let i=Fe(`overview`,je(t,e.config,[`service`]));if(i.isError)return(0,z.jsx)(kG,{retry:()=>void i.refetch()});let a=[...i.data?.data.services??[]].sort((e,t)=>(jG[e.health]??3)-(jG[t.health]??3)||t.error_rate-e.error_rate);if(i.data&&a.length===0)return(0,z.jsx)(OG,{text:`No recent activity`});let o=e=>r(`Investigate the ${e} service. Explain its errors and latency.`);return(0,z.jsx)(Ye,{type:`auto`,offsetScrollbars:!0,h:`100%`,children:(0,z.jsxs)(et,{verticalSpacing:`xs`,fz:`sm`,highlightOnHover:n,children:[(0,z.jsx)(et.Thead,{children:(0,z.jsxs)(et.Tr,{children:[(0,z.jsx)(et.Th,{children:`Service`}),(0,z.jsx)(et.Th,{ta:`right`,children:`P95`}),(0,z.jsx)(et.Th,{ta:`right`,children:`Errors`})]})}),(0,z.jsx)(et.Tbody,{children:a.map(e=>(0,z.jsxs)(et.Tr,{...n&&{onClick:()=>o(e.service),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),o(e.service))},tabIndex:0,role:`button`,"aria-label":`Investigate ${e.service}`,style:{cursor:`pointer`}},children:[(0,z.jsx)(et.Td,{children:(0,z.jsx)(DG,{health:e.health,label:e.service})}),(0,z.jsx)(et.Td,{ta:`right`,children:(0,z.jsx)(_,{component:`span`,size:`sm`,ff:`monospace`,c:Ea(e.p95_ms),children:wa(e.p95_ms)})}),(0,z.jsx)(et.Td,{ta:`right`,children:(0,z.jsx)(_,{component:`span`,size:`sm`,c:Da(e.error_rate),children:Ca(e.error_rate)})})]},e.service))})]})})}function NG({filters:e,agentAvailable:t,onOpenChat:n}){if(!t)return(0,z.jsx)(_,{c:`dimmed`,size:`sm`,children:`Configure an AI provider to enable this view. The rest of this dashboard remains available.`});let r=ke(e.window),i=[`Summarize the last ${r}`,`What changed in the last ${r}?`,`Which service needs attention right now?`];return(0,z.jsx)(P,{gap:`xs`,align:`flex-start`,children:i.map(e=>(0,z.jsx)(ne,{variant:`default`,size:`xs`,radius:`xl`,leftSection:(0,z.jsx)(be,{size:13,weight:`fill`}),onClick:()=>n(e),children:e},e))})}var PG={overview:[`service`],topology:[`service`],performance:[`service`],logs:[`service`,`severity`,`search`],trace:[`trace_id`,`service`]};function FG(e){return Object.hasOwn(PG,e)?PG[e]:void 0}function IG(e){return(FG(e)?.length??0)>0}function LG({opened:e,widget:t,services:n,onClose:r,onSave:i}){let[a,o]=(0,R.useState)({service:``,severity:``,search:``,trace_id:``});(0,R.useEffect)(()=>{e&&o({service:De(t.config,`service`),severity:De(t.config,`severity`),search:De(t.config,`search`),trace_id:De(t.config,`trace_id`)})},[e,t.config]);let s=FG(t.type)??[],c=[...new Set([...n,a.service].filter(Boolean))];function l(){let e={...t.config??{}};for(let t of s){let n=a[t].trim();n?e[t]=n:delete e[t]}i(e),r()}return(0,z.jsx)(Se,{opened:e,onClose:r,title:`Configure ${t.title}`,centered:!0,children:(0,z.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),l()},children:(0,z.jsxs)(P,{children:[s.includes(`service`)&&(0,z.jsx)(dn,{label:`Service`,placeholder:`All services`,data:c,value:a.service||null,onChange:e=>o({...a,service:e??``}),clearable:!0,searchable:!0,"aria-label":`Service`}),s.includes(`severity`)&&(0,z.jsx)(dn,{label:`Severity`,placeholder:`All severities`,data:[`ERROR`,`WARN`,`INFO`,`DEBUG`],value:a.severity||null,onChange:e=>o({...a,severity:e??``}),clearable:!0,"aria-label":`Severity`}),s.includes(`search`)&&(0,z.jsx)(I,{label:`Search`,placeholder:`Text the log body must contain`,value:a.search,onChange:e=>o({...a,search:e.currentTarget.value}),"aria-label":`Search`}),s.includes(`trace_id`)&&(0,z.jsx)(I,{label:`Trace id`,placeholder:`Leave empty for the most relevant recent trace`,value:a.trace_id,onChange:e=>o({...a,trace_id:e.currentTarget.value}),ff:`monospace`,"aria-label":`Trace id`}),(0,z.jsxs)(x,{justify:`flex-end`,children:[(0,z.jsx)(ne,{variant:`default`,onClick:r,children:`Cancel`}),(0,z.jsx)(ne,{type:`submit`,children:`Save`})]})]})})})}wI([FA]);function RG({widget:e,filters:t,dark:n}){let r=Fe(`logs`,je(t,e.config,[`service`,`severity`,`search`])),i=r.data,a=(0,R.useMemo)(()=>{if(!i||i.data.buckets.length===0)return null;let e=xG(n),t=i.provenance.window,r=[...new Set(i.data.buckets.map(e=>e.time))],a=[...new Set(i.data.buckets.map(e=>e.severity))],o=new Map(i.data.buckets.map(e=>[`${e.time} ${e.severity}`,e.count]));return{color:a.map(e=>TG(e,n)),grid:{left:28,right:8,top:8,bottom:20},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:10}},xAxis:{type:`category`,data:r.map(e=>Ta(e,t)),axisLabel:{color:e.muted,fontSize:8,hideOverlap:!0},axisLine:{lineStyle:{color:e.border}}},yAxis:{type:`value`,minInterval:1,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:8}},series:a.map(e=>({name:e,type:`bar`,stack:`logs`,barMaxWidth:14,data:r.map(t=>o.get(`${t} ${e}`)??0),itemStyle:{borderRadius:[2,2,0,0]}}))}},[n,i]);if(r.isError)return(0,z.jsx)(kG,{retry:()=>void r.refetch()});let o=(i?.data.entries??[]).slice(0,5);return i&&o.length===0?(0,z.jsx)(OG,{text:`No matching logs in this window`}):(0,z.jsxs)(P,{gap:`xs`,h:`100%`,children:[a&&(0,z.jsx)(oe,{h:72,children:(0,z.jsx)(yG,{option:a,height:72,label:`Log volume by severity`})}),(0,z.jsx)(Ye,{type:`auto`,offsetScrollbars:!0,style:{flex:1},children:(0,z.jsx)(et,{verticalSpacing:4,fz:`sm`,children:(0,z.jsx)(et.Tbody,{children:o.map((e,t)=>(0,z.jsxs)(et.Tr,{children:[(0,z.jsx)(et.Td,{style:{whiteSpace:`nowrap`},children:(0,z.jsx)(_,{component:`span`,size:`xs`,ff:`monospace`,c:`dimmed`,children:i?Ta(e.time,i.provenance.window,!0):e.time})}),(0,z.jsx)(et.Td,{style:{whiteSpace:`nowrap`},children:(0,z.jsx)(ve,{size:`xs`,color:wG(e.severity),variant:`light`,style:{minWidth:`max-content`},children:e.severity||`LOG`})}),(0,z.jsx)(et.Td,{style:{whiteSpace:`nowrap`},children:(0,z.jsx)(_,{component:`span`,size:`sm`,fw:600,children:e.service})}),(0,z.jsx)(et.Td,{style:{width:`100%`},children:(0,z.jsx)(_,{size:`sm`,lineClamp:1,title:e.body,children:e.body})})]},`${e.time}-${t}`))})})})]})}function zG({widget:e,filters:t,dark:n}){let r=je(t,e.config,[`service`]),i=Fe(`overview`,r),a=Fe(`performance`,r);if(i.isError)return(0,z.jsx)(kG,{retry:()=>void i.refetch()});let o=i.data?.data,s=(a.data?.data.points??[]).map(e=>e.error_rate*100),c=Math.max(o?.service_count??0,1),l=SG(n),u=o?.health===`unknown`,d=o?u?`No data`:o.health.charAt(0).toUpperCase()+o.health.slice(1):`—`;return(0,z.jsxs)(P,{gap:`sm`,children:[(0,z.jsxs)(bn,{cols:2,spacing:`sm`,children:[(0,z.jsx)(EG,{label:`Health`,value:d,color:o?bG(o.health):void 0,hint:o?u?`No telemetry in this window`:`${Sa.format(o.service_count)} services`:void 0}),(0,z.jsx)(EG,{label:`Error rate`,value:o&&!u?Ca(o.error_rate):`—`,color:o&&o.error_rate>=.01?`bad`:void 0,hint:o&&!u?`${Sa.format(o.total_spans)} operations`:void 0,children:s.length>1&&(0,z.jsx)(AG,{values:s,color:l.bad,label:`Error rate trend`})})]}),o&&!u&&(0,z.jsxs)(oe,{children:[(0,z.jsxs)(ln.Root,{size:`md`,"aria-label":`Service health distribution`,children:[(0,z.jsx)(ln.Section,{value:o.counts.healthy/c*100,color:`ok`}),(0,z.jsx)(ln.Section,{value:o.counts.degraded/c*100,color:`warn`}),(0,z.jsx)(ln.Section,{value:o.counts.unhealthy/c*100,color:`bad`})]}),(0,z.jsxs)(x,{mt:6,gap:`md`,children:[(0,z.jsx)(BG,{color:`ok`,text:`${o.counts.healthy} healthy`}),(0,z.jsx)(BG,{color:`warn`,text:`${o.counts.degraded} degraded`}),(0,z.jsx)(BG,{color:`bad`,text:`${o.counts.unhealthy} unhealthy`})]})]})]})}function BG({color:e,text:t}){return(0,z.jsxs)(x,{gap:6,children:[(0,z.jsx)(oe,{w:8,h:8,bg:e,style:{borderRadius:`50%`}}),(0,z.jsx)(_,{c:`dimmed`,size:`xs`,children:t})]})}wI([rD]);function VG({widget:e,filters:t,dark:n}){let r=Fe(`performance`,je(t,e.config,[`service`])),i=r.data,a=(0,R.useMemo)(()=>{if(!i||i.data.points.length===0)return null;let e=xG(n),t=i.provenance.window;return{color:[CG(`operations`,n),SG(n).warn],grid:{left:36,right:40,top:24,bottom:22},legend:{top:0,left:0,textStyle:{color:e.muted,fontSize:10},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:10}},xAxis:{type:`category`,data:i.data.points.map(e=>Ta(e.time,t)),boundaryGap:!1,axisLine:{lineStyle:{color:e.border}},axisTick:{show:!1},axisLabel:{color:e.muted,fontSize:9,hideOverlap:!0}},yAxis:[{type:`value`,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:9}},{type:`value`,splitLine:{show:!1},axisLabel:{color:e.muted,fontSize:9,formatter:e=>wa(e)}}],series:[{name:`Operations`,type:`line`,data:i.data.points.map(e=>e.spans),smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.05}},{name:`P95`,type:`line`,yAxisIndex:1,data:i.data.points.map(e=>e.p95_ms),smooth:.22,showSymbol:!1,lineStyle:{width:2}}]}},[n,i]);if(r.isError)return(0,z.jsx)(kG,{retry:()=>void r.refetch()});if(i&&i.data.points.length===0)return(0,z.jsx)(OG,{text:`No endpoint activity in this window`});let o=(i?.data.endpoints??[]).slice(0,3);return(0,z.jsxs)(P,{gap:`xs`,h:`100%`,children:[a&&(0,z.jsx)(oe,{style:{flex:1,minHeight:120},children:(0,z.jsx)(yG,{option:a,height:`100%`,label:`Operations and P95 latency`})}),o.length>0&&(0,z.jsx)(et,{verticalSpacing:4,fz:`sm`,children:(0,z.jsx)(et.Tbody,{children:o.map(e=>(0,z.jsxs)(et.Tr,{children:[(0,z.jsxs)(et.Td,{children:[(0,z.jsx)(ve,{variant:`light`,size:`xs`,mr:6,style:{minWidth:`max-content`},children:e.method}),(0,z.jsx)(_,{component:`span`,size:`sm`,ff:`monospace`,children:e.path})]}),(0,z.jsx)(et.Td,{ta:`right`,children:(0,z.jsxs)(_,{component:`span`,size:`sm`,c:`dimmed`,children:[Sa.format(e.calls),` calls`]})}),(0,z.jsx)(et.Td,{ta:`right`,children:(0,z.jsx)(_,{component:`span`,size:`sm`,ff:`monospace`,children:wa(e.p95_ms)})})]},`${e.method}-${e.path}`))})})]})}wI([IB]);function HG({widget:e,filters:t,dark:n,onOpenChat:r}){let i=je(t,e.config,[`service`]),a=Fe(`topology`,i),o=a.data?.data,s=(0,R.useMemo)(()=>{if(!o)return null;let e=xG(n),t=SG(n),r=e=>e===`unhealthy`?t.bad:e===`degraded`?t.warn:t.ok,i=[...o.nodes].sort((e,t)=>e.service.localeCompare(t.service));return{tooltip:{backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:10}},series:[{type:`graph`,layout:`circular`,circular:{rotateLabel:!1},roam:!1,draggable:!1,label:{show:!0,position:`bottom`,color:e.text,fontSize:10},edgeSymbol:[`none`,`arrow`],edgeSymbolSize:6,data:i.map(t=>({id:t.service,name:t.service,value:t.spans,symbolSize:Math.min(34,18+Math.log10(Math.max(t.spans,1))*4),itemStyle:{color:e.surface,borderColor:r(t.health),borderWidth:3}})),links:o.edges.map(n=>({source:n.caller,target:n.callee,value:n.calls,lineStyle:{width:Math.min(4,1+Math.log10(Math.max(n.calls,1))),color:n.error_rate>=.05?t.bad:e.muted,opacity:.5,curveness:.08}})),emphasis:{focus:`adjacency`}}]}},[n,o]);return a.isError?(0,z.jsx)(kG,{retry:()=>void a.refetch()}):o&&o.nodes.length===0?(0,z.jsx)(OG,{text:`No service relationships in this window`}):(0,z.jsxs)(P,{gap:4,h:`100%`,children:[s&&(0,z.jsx)(yG,{option:s,height:`100%`,className:`widget-chart`,label:`Service dependency graph`,onClick:e=>{let t=e;t.dataType===`node`&&t.data?.id&&r(`Investigate the ${t.data.id} service. Explain its errors and latency.`)}}),o&&(0,z.jsxs)(_,{c:`dimmed`,size:`xs`,children:[o.nodes.length,` services · `,o.edges.length,` `,o.edges.length===1?`route`:`routes`]})]})}function UG(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function WG({widget:e,filters:t,dark:n}){let r=Fe(`trace`,je(t,e.config,[`trace_id`,`service`]));if(r.isError)return(0,z.jsx)(kG,{retry:()=>void r.refetch()});let i=r.data?.data;if(i&&i.spans.length===0)return(0,z.jsx)(OG,{text:`No traces in this window`});let a=[...i?.spans??[]].sort((e,t)=>t.duration_ms-e.duration_ms).slice(0,6);return(0,z.jsxs)(P,{gap:`sm`,children:[(0,z.jsxs)(bn,{cols:{base:2,sm:4},spacing:`sm`,children:[(0,z.jsx)(EG,{label:`Duration`,value:i?wa(i.duration_ms):`—`}),(0,z.jsx)(EG,{label:`Spans`,value:i?Sa.format(i.spans.length):`—`}),(0,z.jsx)(EG,{label:`Services`,value:i?Sa.format(i.services.length):`—`}),(0,z.jsx)(EG,{label:`Status`,value:i?i.has_error?`Error`:`OK`:`—`,color:i?i.has_error?`bad`:`ok`:void 0})]}),a.length>0&&(0,z.jsx)(GG,{spans:a,dark:n}),i&&(0,z.jsxs)(x,{gap:4,children:[(0,z.jsxs)(_,{c:`dimmed`,size:`xs`,ff:`monospace`,children:[`Trace `,UG(i.trace_id)]}),(0,z.jsx)(KG,{value:i.trace_id})]})]})}function GG({spans:e,dark:t}){let n=Math.min(...e.map(e=>new Date(e.start).valueOf())),r=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),i=Math.max(r-n,1);return(0,z.jsx)(P,{gap:4,children:e.map(e=>{let r=(new Date(e.start).valueOf()-n)/i*100,a=Math.max(e.duration_ms/i*100,.6),o=e.status.toUpperCase().includes(`ERROR`);return(0,z.jsxs)(x,{gap:`sm`,wrap:`nowrap`,children:[(0,z.jsxs)(oe,{w:170,miw:0,children:[(0,z.jsx)(_,{size:`xs`,fw:600,truncate:!0,children:e.operation}),(0,z.jsx)(_,{c:`dimmed`,size:`xs`,truncate:!0,children:e.service})]}),(0,z.jsx)(Ze,{label:`${e.service} · ${e.operation} · ${wa(e.duration_ms)}`,withArrow:!0,children:(0,z.jsx)(oe,{pos:`relative`,h:10,flex:1,bg:`var(--mantine-color-default-hover)`,style:{borderRadius:`var(--mantine-radius-sm)`},children:(0,z.jsx)(oe,{pos:`absolute`,left:`${r}%`,w:`${Math.min(a,100-r)}%`,h:`100%`,bg:o?`bad`:CG(e.service,t),style:{borderRadius:`var(--mantine-radius-sm)`,minWidth:3}})})}),(0,z.jsx)(_,{size:`xs`,ff:`monospace`,w:56,ta:`right`,children:wa(e.duration_ms)})]},e.span_id)})})}function KG({value:e}){let{state:t,copy:n}=tt();return(0,z.jsx)(Ze,{label:t===`failed`?`Could not copy`:t===`copied`?`Copied`:`Copy trace id`,children:(0,z.jsx)(Qe,{variant:`subtle`,color:`gray`,size:`xs`,"aria-label":`Copy trace id`,"data-state":t===`idle`?void 0:t,onClick:()=>n(e),children:t===`copied`?(0,z.jsx)(C,{size:12,weight:`bold`}):(0,z.jsx)(N,{size:12})})})}var qG={overview:`System health`,topology:`Service map`,activity:`Recent activity`,assistant:`Ask Fanout`,performance:`Performance`,trace:`Trace focus`,logs:`Logs`},JG={overview:zG,topology:HG,activity:MG,assistant:NG,performance:VG,trace:WG,logs:RG};function YG(){return(0,z.jsx)(OG,{text:`This view type is not supported by this version`})}function XG(e){return Object.hasOwn(JG,e)?JG[e]:YG}function ZG(e){let{widget:t,services:n,onRemove:r,onConfigure:i}=e,[a,o]=(0,R.useState)(!1),[s,c]=(0,R.useState)(!1),[l,u]=(0,R.useState)(!1),d=XG(t.type);return(0,z.jsxs)(ce,{withBorder:!0,radius:`lg`,p:`md`,h:`100%`,className:`widget-card`,style:{overflow:`hidden`},children:[(0,z.jsxs)(P,{h:`100%`,gap:`sm`,children:[(0,z.jsxs)(x,{justify:`space-between`,align:`center`,wrap:`nowrap`,className:`widget-drag`,style:{cursor:`grab`},children:[(0,z.jsx)(A,{order:2,fz:`md`,fw:500,lineClamp:1,miw:0,children:t.title}),(0,z.jsxs)(we,{position:`bottom-end`,withinPortal:!0,opened:a,onChange:o,children:[(0,z.jsx)(we.Target,{children:(0,z.jsx)(Qe,{className:`widget-actions`,"data-open":a||void 0,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Actions for ${t.title}`,children:(0,z.jsx)(Ue,{size:18,weight:`bold`})})}),(0,z.jsxs)(we.Dropdown,{children:[IG(t.type)&&(0,z.jsx)(we.Item,{leftSection:(0,z.jsx)(Fn,{size:15}),onClick:()=>c(!0),children:`Configure`}),(0,z.jsx)(we.Item,{color:`bad`,leftSection:(0,z.jsx)(We,{size:15}),onClick:()=>u(!0),children:`Remove`})]})]})]}),(0,z.jsx)(`div`,{className:`widget-body`,children:(0,z.jsx)(d,{...e})})]}),(0,z.jsx)(LG,{opened:s,widget:t,services:n,onClose:()=>c(!1),onSave:i}),(0,z.jsx)(Se,{opened:l,onClose:()=>u(!1),title:`Remove ${t.title}?`,centered:!0,radius:`md`,children:(0,z.jsxs)(P,{gap:`md`,children:[(0,z.jsx)(_,{size:`sm`,c:`dimmed`,children:`This takes the card off the dashboard for everyone who opens it. You can add it again from Add view, but its size and settings are not kept.`}),(0,z.jsxs)(x,{justify:`flex-end`,gap:`sm`,children:[(0,z.jsx)(ne,{variant:`default`,size:`sm`,onClick:()=>u(!1),children:`Cancel`}),(0,z.jsx)(ne,{color:`bad`,size:`sm`,onClick:()=>{u(!1),r()},children:`Remove`})]})]})})]})}var QG=ha(pa),$G=`fanout.dashboard-id`,eK={layout:[],widgets:[],filters:{window:`1h`,namespace:``}};function tK(e){return Object.hasOwn(ya,e)?ya[e]:void 0}function nK({dashboardID:e=``,agentAvailable:t,onOpenChat:n,onDashboardChange:r,urlFilters:i,onFiltersChange:a}){let o=Ce(),s=$e(`light`)===`dark`,c=xe({queryKey:He,queryFn:()=>Ge(`/api/dashboards`),refetchInterval:3e4}),[l,u]=(0,R.useState)(()=>e||localStorage.getItem($G)||``),d=Sn({mutationFn:async e=>{if(!f.data)throw Error(`No dashboard selected`);let t=await le(`/api/dashboards/${encodeURIComponent(f.data.id)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({name:f.data.name,description:f.data.description,state:e})});if(!t.ok)throw Error(`Unable to save dashboard`);return t.json()},scope:{id:`dashboard-${l}`},onSuccess:e=>{o.setQueryData([`dashboard`,e.id],e),o.invalidateQueries({queryKey:He})},onError:e=>console.error(`Dashboard save failed`,e)}),f=xe({queryKey:[`dashboard`,l],queryFn:()=>Ge(`/api/dashboards/${encodeURIComponent(l)}`),enabled:!!l,refetchInterval:d.isPending||d.isError?!1:3e4}),[p,m]=(0,R.useState)(eK),[h,g]=(0,R.useState)(`lg`),[y,b]=(0,R.useState)(null),S=(0,R.useMemo)(()=>({window:Oe.some(e=>e.value===i?.window)?i.window:p.filters.window,namespace:i?.namespace??p.filters.namespace}),[i?.window,i?.namespace,p.filters.window,p.filters.namespace]),C=Fe(`overview`,je(S),!!f.data),w=(0,R.useMemo)(()=>(C.data?.data.services??[]).map(e=>e.service),[C.data]),T=ze();(0,R.useEffect)(()=>{e&&e!==l&&(u(e),localStorage.setItem($G,e))},[e,l]),(0,R.useEffect)(()=>{let t=c.data?.dashboards;if(t?.length&&!(e&&t.some(t=>t.id===e))&&!e){if(l&&t.some(e=>e.id===l)){r?.(l,!0);return}D((t.find(e=>e.is_default)??t[0]).id,!0)}},[e,c.data,l]),(0,R.useEffect)(()=>{d.isPending||d.isError||f.data?.state&&m(f.data.state)},[f.data?.updated_at,d.isPending,d.isError]),(0,R.useEffect)(()=>{d.reset()},[l]);let E=(0,R.useMemo)(()=>{let e=new Map(p.widgets.map(e=>[e.id,e.type])),t=p.layout.map(t=>{let n=tK(e.get(t.i)??`overview`)??ya.overview;return{...t,h:Math.max(t.h,n.minH),minW:Math.max(t.minW??0,n.minW),minH:Math.max(t.minH??0,n.minH)}});return{lg:t,md:t,sm:_a(t,6),xs:_a(t,2),xxs:_a(t,1)}},[p.layout,p.widgets]);function D(e,t=!1){u(e),localStorage.setItem($G,e),r?.(e,t)}function O(e){m(e),d.mutate(e)}function k(e){let t=Te(),n=ya[e],r=xa(p.layout,n.w,n.h,12,n.minW);O({...p,widgets:[...p.widgets,{id:t,type:e,title:qG[e],enabled:!0}],layout:[...p.layout,{i:t,x:r.x,y:r.y,w:r.w,h:n.h,minW:n.minW,minH:n.minH}]})}function j(e){O({...p,filters:e}),a?.(e)}function ee(e){O({...p,widgets:p.widgets.filter(t=>t.id!==e),layout:p.layout.filter(t=>t.i!==e)})}function M(e,t){O({...p,widgets:p.widgets.map(n=>n.id===e?{...n,config:t}:n)})}if(c.isLoading||l&&f.isLoading)return(0,z.jsx)(rK,{label:`Loading your dashboard…`});let N=c.data?.dashboards??[];if(e&&N.length>0&&!N.some(t=>t.id===e))return(0,z.jsx)(iK,{onOpenDefault:()=>D((N.find(e=>e.is_default)??N[0]).id,!0)});if(c.isError||f.isError)return(0,z.jsx)(rK,{label:`Your dashboard is unavailable. Try refreshing.`});let te=f.data;return te?(0,z.jsxs)(oe,{component:`main`,maw:1440,mx:`auto`,px:{base:`md`,sm:`xl`},pt:{base:`lg`,sm:`xl`},pb:`xl`,children:[(0,z.jsxs)(P,{gap:`md`,mb:`lg`,children:[(0,z.jsxs)(oe,{children:[(0,z.jsx)(A,{order:1,fz:32,lts:`-0.03em`,children:te.name}),(0,z.jsx)(_,{c:`dimmed`,mt:2,children:te.description||`A focused view of the signals that matter now.`})]}),(0,z.jsxs)(ut,{align:{base:`stretch`,md:`center`},justify:`space-between`,direction:{base:`column`,md:`row`},gap:`sm`,role:`group`,"aria-label":`Dashboard controls`,children:[(0,z.jsxs)(x,{gap:`sm`,wrap:`wrap`,children:[(0,z.jsx)(dn,{"aria-label":`Window`,value:S.window,onChange:e=>e&&j({...S,window:e}),data:Oe,w:{base:`100%`,xs:150},size:`sm`}),(0,z.jsx)(I,{"aria-label":`Namespace`,value:y??S.namespace,onChange:e=>b(e.currentTarget.value),onBlur:e=>{b(null),j({...S,namespace:e.currentTarget.value.trim()})},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},placeholder:`All namespaces`,w:{base:`100%`,xs:200},size:`sm`})]}),(0,z.jsxs)(x,{gap:`sm`,wrap:`wrap`,justify:`flex-end`,children:[T&&(0,z.jsxs)(_,{c:`dimmed`,size:`xs`,children:[`Updated `,new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(T))]}),(0,z.jsxs)(we,{shadow:`md`,position:`bottom-end`,withinPortal:!0,children:[(0,z.jsx)(we.Target,{children:(0,z.jsx)(ne,{variant:`default`,size:`sm`,leftSection:(0,z.jsx)(de,{size:15,weight:`bold`}),rightSection:(0,z.jsx)(jn,{size:13,weight:`bold`}),children:`Add view`})}),(0,z.jsx)(we.Dropdown,{children:va.filter(e=>t||e!==`assistant`).map(e=>(0,z.jsx)(we.Item,{onClick:()=>k(e),children:qG[e]},e))})]}),t&&(0,z.jsx)(ne,{variant:`subtle`,color:`gray`,size:`sm`,rightSection:(0,z.jsx)(kn,{size:15,weight:`bold`}),onClick:()=>n(),children:`Ask Fanout`})]})]})]}),d.isError&&(0,z.jsx)(v,{color:`bad`,radius:`lg`,mb:`lg`,icon:(0,z.jsx)(Ln,{size:18,weight:`fill`}),title:`Dashboard changes not saved`,children:(0,z.jsxs)(x,{justify:`space-between`,gap:`sm`,children:[(0,z.jsx)(_,{size:`sm`,children:`Your latest edits are kept on this screen but Fanout could not store them.`}),(0,z.jsx)(ne,{size:`compact-sm`,color:`bad`,variant:`light`,onClick:()=>d.mutate(p),children:`Retry save`})]})}),(0,z.jsx)(QG,{className:`dashboard-grid`,layouts:E,breakpoints:{lg:1100,md:800,sm:600,xs:420,xxs:0},cols:{lg:12,md:10,sm:6,xs:2,xxs:1},rowHeight:76,margin:[16,16],containerPadding:[0,0],compactType:`vertical`,draggableHandle:`.widget-drag`,draggableCancel:`button,input,select,textarea,a,label,[role=menu],[role=dialog],.widget-actions`,onBreakpointChange:g,onDragStop:e=>{h===`lg`&&O({...p,layout:[...e]})},onResizeStop:e=>{h===`lg`&&O({...p,layout:[...e]})},children:p.widgets.map(e=>(0,z.jsx)(`div`,{children:(0,z.jsx)(ZG,{widget:e,filters:S,dark:s,services:w,agentAvailable:t,onOpenChat:n,onRemove:()=>ee(e.id),onConfigure:t=>M(e.id,t)})},e.id))})]}):(0,z.jsx)(rK,{label:`Preparing your dashboard…`})}function rK({label:e}){return(0,z.jsxs)(D,{mih:`50vh`,children:[(0,z.jsx)(m,{size:`sm`}),(0,z.jsx)(_,{c:`dimmed`,size:`sm`,ml:`sm`,children:e})]})}function iK({onOpenDefault:e}){return(0,z.jsx)(D,{mih:`50vh`,children:(0,z.jsxs)(P,{align:`center`,gap:`xs`,children:[(0,z.jsx)(A,{order:1,fz:24,lts:`-0.02em`,children:`This dashboard isn't here`}),(0,z.jsx)(_,{c:`dimmed`,size:`sm`,ta:`center`,children:`The link may be out of date, or the dashboard may have been renamed or deleted.`}),(0,z.jsx)(ne,{mt:`sm`,variant:`default`,size:`sm`,onClick:e,children:`Open your default dashboard`})]})})}export{nK as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards._dashboardId-BPYRZzG3.js b/internal/ui/dist/assets/dashboards._dashboardId-CNMYsiMO.js similarity index 81% rename from internal/ui/dist/assets/dashboards._dashboardId-BPYRZzG3.js rename to internal/ui/dist/assets/dashboards._dashboardId-CNMYsiMO.js index 795025eb6..88c7b1946 100644 --- a/internal/ui/dist/assets/dashboards._dashboardId-BPYRZzG3.js +++ b/internal/ui/dist/assets/dashboards._dashboardId-CNMYsiMO.js @@ -1 +1 @@ -import{pt as e}from"./brand-CCB4_HD8.js";import{l as t}from"./auth-d1anOsyP.js";import{a as n}from"./preload-helper-qpfFvVn3.js";import{t as r}from"./dashboard-BxZStHQX.js";import{t as i}from"./index-Ba6HLUAb.js";var a=e();function o(){let{dashboardId:e}=i.useParams(),o=i.useSearch(),s=t(),{agentAvailable:c,openChat:l}=n();return(0,a.jsx)(r,{dashboardID:e,agentAvailable:c,onOpenChat:l,onDashboardChange:(e,t)=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:o,replace:t}),urlFilters:o,onFiltersChange:t=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:{window:t.window,namespace:t.namespace||void 0},replace:!0})})}export{o as component}; \ No newline at end of file +import{pt as e}from"./brand-CCB4_HD8.js";import{l as t}from"./auth-d1anOsyP.js";import{a as n}from"./preload-helper-qpfFvVn3.js";import{t as r}from"./dashboard-MXM_0_fM.js";import{t as i}from"./index-yv3DiJuB.js";var a=e();function o(){let{dashboardId:e}=i.useParams(),o=i.useSearch(),s=t(),{agentAvailable:c,openChat:l}=n();return(0,a.jsx)(r,{dashboardID:e,agentAvailable:c,onOpenChat:l,onDashboardChange:(e,t)=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:o,replace:t}),urlFilters:o,onFiltersChange:t=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:{window:t.window,namespace:t.namespace||void 0},replace:!0})})}export{o as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards.index-CtpFH5E-.js b/internal/ui/dist/assets/dashboards.index-CvFJDsq9.js similarity index 73% rename from internal/ui/dist/assets/dashboards.index-CtpFH5E-.js rename to internal/ui/dist/assets/dashboards.index-CvFJDsq9.js index 2737bda34..0e3d54396 100644 --- a/internal/ui/dist/assets/dashboards.index-CtpFH5E-.js +++ b/internal/ui/dist/assets/dashboards.index-CvFJDsq9.js @@ -1 +1 @@ -import{pt as e}from"./brand-CCB4_HD8.js";import{l as t}from"./auth-d1anOsyP.js";import{a as n}from"./preload-helper-qpfFvVn3.js";import{t as r}from"./dashboard-BxZStHQX.js";import{n as i}from"./index-Ba6HLUAb.js";var a=e();function o(){let e=i.useSearch(),o=t(),{agentAvailable:s,openChat:c}=n();return(0,a.jsx)(r,{agentAvailable:s,onOpenChat:c,onDashboardChange:t=>void o({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:e,replace:!0}),urlFilters:e})}export{o as component}; \ No newline at end of file +import{pt as e}from"./brand-CCB4_HD8.js";import{l as t}from"./auth-d1anOsyP.js";import{a as n}from"./preload-helper-qpfFvVn3.js";import{t as r}from"./dashboard-MXM_0_fM.js";import{n as i}from"./index-yv3DiJuB.js";var a=e();function o(){let e=i.useSearch(),o=t(),{agentAvailable:s,openChat:c}=n();return(0,a.jsx)(r,{agentAvailable:s,onOpenChat:c,onDashboardChange:t=>void o({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:e,replace:!0}),urlFilters:e})}export{o as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/index-Ba6HLUAb.js b/internal/ui/dist/assets/index-yv3DiJuB.js similarity index 99% rename from internal/ui/dist/assets/index-Ba6HLUAb.js rename to internal/ui/dist/assets/index-yv3DiJuB.js index 77c0a28b5..db6a6842d 100644 --- a/internal/ui/dist/assets/index-Ba6HLUAb.js +++ b/internal/ui/dist/assets/index-yv3DiJuB.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-4U_e7tED.js","assets/brand-CCB4_HD8.js","assets/auth-d1anOsyP.js","assets/chat.index-CtOVI6Uj.js","assets/chat-Cxa6DFwb.js","assets/preload-helper-qpfFvVn3.js","assets/copy-Bx9ZWqiL.js","assets/chat._threadId-CtOVI6Uj.js","assets/dashboards.index-CtpFH5E-.js","assets/dashboard-BxZStHQX.js","assets/tokens-DbmTV7qX.js","assets/use-computed-color-scheme-CeR2KQyq.js","assets/dashboards._dashboardId-BPYRZzG3.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-4U_e7tED.js","assets/brand-CCB4_HD8.js","assets/auth-d1anOsyP.js","assets/chat.index-CtOVI6Uj.js","assets/chat-Cxa6DFwb.js","assets/preload-helper-qpfFvVn3.js","assets/copy-Bx9ZWqiL.js","assets/chat._threadId-CtOVI6Uj.js","assets/dashboards.index-CvFJDsq9.js","assets/dashboard-MXM_0_fM.js","assets/tokens-DbmTV7qX.js","assets/use-computed-color-scheme-CeR2KQyq.js","assets/dashboards._dashboardId-CNMYsiMO.js"])))=>i.map(i=>d[i]); import{$ as e,B as t,C as n,F as r,G as i,I as a,J as o,L as s,M as c,N as l,O as u,P as d,S as f,U as p,V as m,W as h,Y as g,_,a as v,b as y,d as b,dt as x,f as ee,ft as S,gt as te,h as ne,ht as re,it as ie,j as ae,k as oe,l as se,lt as ce,mt as le,nt as ue,ot as de,pt as C,q as fe,s as pe,st as me,t as he,tt as ge,u as _e,ut as w,vt as ve,x as ye,xt as be}from"./brand-CCB4_HD8.js";import{a as xe,c as Se,d as Ce,h as we,i as Te,l as Ee,n as De,o as Oe,r as ke,t as Ae,u as je}from"./auth-d1anOsyP.js";import{A as Me,At as Ne,B as Pe,Bt as Fe,C as Ie,Ct as Le,D as Re,Dt as ze,E as Be,Et as Ve,F as He,Ft as Ue,Gt as We,H as Ge,Ht as Ke,I as qe,It as Je,J as Ye,Jt as Xe,Kt as Ze,L as Qe,Lt as $e,M as et,Mt as tt,N as nt,Nt as rt,Ot as it,P as at,Pt as ot,Q as st,R as ct,Rt as lt,S as ut,St as dt,T as ft,Tt as pt,U as mt,Ut as ht,V as gt,Vt as _t,W as vt,Wt as yt,X as bt,Xt as xt,Y as St,Yt as Ct,Z as wt,_ as Tt,_t as Et,a as Dt,at as Ot,b as kt,bt as At,ct as jt,dt as Mt,et as Nt,ft as Pt,gt as Ft,h as It,ht as Lt,i as Rt,it as zt,j as Bt,jt as Vt,k as Ht,kt as Ut,l as Wt,m as Gt,mt as Kt,n as qt,nt as Jt,o as Yt,ot as Xt,pt as Zt,q as Qt,qt as $t,r as en,rt as tn,s as nn,st as rn,t as an,tt as on,u as sn,v as cn,vt as ln,w as un,wt as dn,x as fn,xt as pn,y as mn,yt as hn,z as gn,zt as _n}from"./tokens-DbmTV7qX.js";import{A as vn,E as yn,a as bn,f as xn,i as Sn,k as Cn,n as wn,o as Tn,r as En,s as Dn,t as On}from"./preload-helper-qpfFvVn3.js";import{n as kn,t as An}from"./use-computed-color-scheme-CeR2KQyq.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var jn=te((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,ee||(ee=!0,ae());else{var t=n(l);t!==null&&ce(x,t.startTime-e)}}}var ee=!1,S=-1,te=5,ne=-1;function re(){return g?!0:!(e.unstable_now()-net&&re());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ce(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ae():ee=!1}}}var ae;if(typeof y==`function`)ae=function(){y(ie)};else if(typeof MessageChannel<`u`){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=ie,ae=function(){se.postMessage(null)}}else ae=function(){_(ie,0)};function ce(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,ce(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ae()))),r},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Mn=te(((e,t)=>{t.exports=jn()})),Nn=te((e=>{var t=Mn(),n=re(),r=le();function i(e){var t=`https://react.dev/errors/`+e;if(1he||(e.current=me[he],me[he]=null,he--)}function w(e,t){he++,me[he]=e.current,e.current=t}var ve=ge(null),ye=ge(null),be=ge(null),xe=ge(null);function Se(e,t){switch(w(be,t),w(ye,e),w(ve,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$d(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$d(t),e=ef(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ve),w(ve,e)}function Ce(){_e(ve),_e(ye),_e(be)}function we(e){e.memoizedState!==null&&w(xe,e);var t=ve.current,n=ef(t,e.type);t!==n&&(w(ye,e),w(ve,n))}function Te(e){ye.current===e&&(_e(ve),_e(ye)),xe.current===e&&(_e(xe),sp._currentValue=pe)}var Ee,De;function Oe(e){if(Ee===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||``,De=-1)`:-1=0}function kf(e){for(var t=[`topLevel`],n=0,r,i,a,o=function(e){return t.push(e)},s=function(e){return t[t.length-1]=e},c=function(e){r??(r=n,i=t.length,a=e)},l=function(e){e===a&&(r=void 0,i=void 0,a=void 0)},u=function(){return t.pop()},d=function(){return n--},f=function(e){if(`0`<=e&&e<=`9`){o(`number`);return}switch(e){case`"`:o(`string`);return;case`-`:o(`numberNeedsDigit`);return;case`t`:o(`true`);return;case`f`:o(`false`);return;case`n`:o(`null`);return;case`[`:o(`arrayNeedsValue`);return;case`{`:o(`objectNeedsKey`);return}},p=e.length;n`9`)&&(d(),u());break;case`numberNeedsDigit`:s(`number`);break;case`numberNeedsExponent`:s(m===`+`||m===`-`?`numberNeedsDigit`:`number`);break;case`true`:case`false`:case`null`:(m<`a`||m>`z`)&&(d(),u());break;case`arrayNeedsValue`:m===`]`?u():Of(m)||(l(`collectionItem`),s(`arrayNeedsComma`),f(m));break;case`arrayNeedsComma`:m===`]`?u():m===`,`&&(c(`collectionItem`),s(`arrayNeedsValue`));break;case`objectNeedsKey`:m===`}`?u():m===`"`&&(c(`collectionItem`),s(`objectNeedsColon`),o(`string`));break;case`objectNeedsColon`:m===`:`&&s(`objectNeedsValue`);break;case`objectNeedsValue`:Of(m)||(l(`collectionItem`),s(`objectNeedsComma`),f(m));break;case`objectNeedsComma`:m===`}`?u():m===`,`&&(c(`collectionItem`),s(`objectNeedsKey`))}}i!=null&&(t.length=i);for(var h=[r==null?e:e.slice(0,r)],g=function(t){return h.push(t.slice(e.length-e.lastIndexOf(t[0])))},_=t.length-1;_>=0;_--)switch(t[_]){case`string`:h.push(`"`);break;case`numberNeedsDigit`:case`numberNeedsExponent`:h.push(`0`);break;case`true`:g(`true`);break;case`false`:g(`false`);break;case`null`:g(`null`);break;case`arrayNeedsValue`:case`arrayNeedsComma`:h.push(`]`);break;case`objectNeedsKey`:case`objectNeedsColon`:case`objectNeedsValue`:case`objectNeedsComma`:h.push(`}`)}return h.join(``)}function Af(){let e=this.buf,t=this.pos,n=0,r=0;for(let i=0;i<28;i+=7){let a=e[t++];if(n|=(a&127)<>4,!(i&128)){this.pos=t,this.assertBounds(),this.varint64Lo=n,this.varint64Hi=r;return}for(let i=3;i<=31;i+=7){let a=e[t++];if(r|=(a&127)<=jf&&(i+=r/jf|0,r%=jf)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?Lf(r,i):If(r,i)}function Nf(e,t){let n=If(e,t),r=n.hi&2147483648;r&&(n=Lf(n.lo,n.hi));let i=Pf(n.lo,n.hi);return r?`-`+i:i}function Pf(e,t){if({lo:e,hi:t}=Ff(e,t),t<=2097151)return String(jf*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+Rf(o)+Rf(a)}function Ff(e,t){return{lo:e>>>0,hi:t>>>0}}function If(e,t){return{lo:e|0,hi:t|0}}function Lf(e,t){return t=~t,e?e=~e+1:t+=1,If(e,t)}var Rf=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function zf(){let e=this.buf[this.pos++];if(!(e&128))return this.assertBounds(),e;let t=e&127;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}var Bf=Vf();function Vf(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`&&(globalThis.Deno||globalThis.Bun||typeof process!=`object`||{}.BUF_BIGINT_DISABLE!==`1`)){let t=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(e){let r=typeof e==`bigint`?e:BigInt(e);if(r>n||ri||ta.call(e)),Gf(i)}return Wf}function qf(e){return(t,n)=>{let r=e(t);return n.set(r),{written:r.byteLength}}}var Jf;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(Jf||={});var U=class{constructor(e){this.stackPos=[],this.encodeUtf8Into=e?qf(e):Kf().encodeUtf8Into,this.buffer=Zf,this.viewCache=Qf,this.pos=0}ensureCapacity(e){let t=this.pos+e;if(t>this.buffer.length){let e=this.buffer.length||Yf;for(;e0&&n.set(this.buffer),this.buffer=n}}view(){let e=this.buffer,t=this.viewCache;if(t.byteLength===e.byteLength)return t;let n=new DataView(e.buffer);return this.viewCache=n,n}finish(){let e=this.buffer.slice(0,this.pos);return this.pos=0,this.stackPos=[],e}fork(){return this.stackPos.push(this.pos),this.ensureCapacity(Xf),this.buffer[this.pos++]=0,this}join(){let e=this.stackPos.pop();if(e===void 0)throw Error(`invalid state, fork stack empty`);let t=this.pos-e-Xf,n=ep(t);return n>Xf&&(this.ensureCapacity(n-Xf),this.buffer.copyWithin(e+n,e+Xf,this.pos)),this.pos=e,this.uint32(t),this.pos+=t,this}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.ensureCapacity(e.length),this.buffer.set(e,this.pos),this.pos+=e.length,this}uint32(e){if(np(e),this.ensureCapacity(5),e<128)return this.buffer[this.pos++]=e,this;for(;e>127;)this.buffer[this.pos++]=e&127|128,e>>>=7;return this.buffer[this.pos++]=e,this}int32(e){if(tp(e),e>=0)return this.uint32(e);this.ensureCapacity(10);for(let t=0;t<9;t++)this.buffer[this.pos++]=e&127|128,e>>=7;return this.buffer[this.pos++]=1,this}bool(e){return this.ensureCapacity(1),this.buffer[this.pos++]=+!!e,this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){typeof e!=`string`&&(e=String(e));let t=e.length;if(t<=$f){this.ensureCapacity(t+1);let n=this.buffer,r=this.pos;n[r++]=t;let i=0;for(;i127)break;n[r++]=t}if(i==t)return this.pos=r,this}this.ensureCapacity(t*3+5);let n=ep(t),r=this.buffer,i=this.pos,{written:a}=this.encodeUtf8Into(e,r.subarray(i+n)),o=ep(a);return o!=n&&r.copyWithin(i+o,i+n,i+n+a),this.uint32(a),this.pos+=a,this}float(e){return rp(e),this.ensureCapacity(4),this.view().setFloat32(this.pos,e,!0),this.pos+=4,this}double(e){return this.ensureCapacity(8),this.view().setFloat64(this.pos,e,!0),this.pos+=8,this}fixed32(e){return np(e),this.ensureCapacity(4),this.view().setUint32(this.pos,e,!0),this.pos+=4,this}sfixed32(e){return tp(e),this.ensureCapacity(4),this.view().setInt32(this.pos,e,!0),this.pos+=4,this}sint32(e){return tp(e),this.uint32((e<<1^e>>31)>>>0)}sfixed64(e){let t=Bf.enc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}fixed64(e){let t=Bf.uEnc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}int64(e){let t=Bf.enc(e);return this.writeVarint64(t.lo,t.hi)}sint64(e){let t=Bf.enc(e),n=t.hi>>31,r=t.lo<<1^n,i=(t.hi<<1|t.lo>>>31)^n;return this.writeVarint64(r,i)}uint64(e){let t=Bf.uEnc(e);return this.writeVarint64(t.lo,t.hi)}writeVarint64(e,t){this.ensureCapacity(10);let n=this.buffer,r=this.pos;for(let i=0;i<28;i+=7){let a=e>>>i,o=!(!(a>>>7)&&t==0);if(n[r++]=(o?a|128:a)&255,!o)return this.pos=r,this}let i=e>>>28&15|(t&7)<<4,a=!!(t>>3);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this;for(let e=3;e<31;e+=7){let i=t>>>e,a=!!(i>>>7);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this}return n[r++]=t>>>31&1,this.pos=r,this}},Yf=128,Xf=1,Zf=new Uint8Array,Qf=new DataView(Zf.buffer),$f=32;function ep(e){return e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5}var W=class{constructor(e,t=Kf().decodeUtf8){this.decodeUtf8=t,this.varint64Lo=0,this.varint64Hi=0,this.varint64=Af,this.uint32=zf,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),n=this.pos-e;if(n>5||n==5&&this.buf[this.pos-1]>15)throw Error(`illegal tag: varint overflows uint32`);let r=t>>>3,i=t&7;if(r<=0||i>5)throw Error(`illegal tag: field no `+r+` wire type `+i);return[r,i]}skip(e,t,n=100){let r=this.pos;switch(e){case Jf.Varint:for(;this.buf[this.pos++]&128;);break;case Jf.Bit64:this.pos+=4;case Jf.Bit32:this.pos+=4;break;case Jf.LengthDelimited:let r=this.uint32();this.pos+=r;break;case Jf.StartGroup:if(n<=0)throw Error(`maximum recursion depth reached`);for(;;){let[e,r]=this.tag();if(r===Jf.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(r,e,n-1)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return this.varint64(),Bf.dec(this.varint64Lo,this.varint64Hi)}uint64(){return this.varint64(),Bf.uDec(this.varint64Lo,this.varint64Hi)}sint64(){this.varint64();let e=this.varint64Lo,t=this.varint64Hi,n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,Bf.dec(e,t)}bool(){let e=this.buf[this.pos];return e<128?(this.pos++,e!==0):(this.varint64(),this.varint64Lo!==0||this.varint64Hi!==0)}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Bf.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Bf.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){let t=this.bytes(),n=t.length;if(n<=$f){let r=Array(n);for(let i=0;i127)return this.decodeUtf8(t,e);r[i]=n}return String.fromCharCode.apply(String,r)}return this.decodeUtf8(t,e)}};function tp(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid int32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int32: `+e)}function np(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid uint32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint32: `+e)}function rp(e){if(typeof e==`string`){let t=e;if(e=Number(e),Number.isNaN(e)&&t!==`NaN`)throw Error(`invalid float32: `+t)}else if(typeof e!=`number`)throw Error(`invalid float32: `+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error(`invalid float32: `+e)}var ip=function(e){return e[e.NULL_VALUE=0]=`NULL_VALUE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function ap(){return{fields:{}}}var op={encode(e,t=new U){return Object.entries(e.fields).forEach(([e,n])=>{n!==void 0&&cp.encode({key:e,value:n},t.uint32(10).fork()).join()}),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=ap();for(;n.pos>>3){case 1:{if(e!==10)break;let t=cp.decode(n,n.uint32());t.value!==void 0&&(i.fields[t.key]=t.value);continue}}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return op.fromPartial(e??{})},fromPartial(e){let t=ap();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{}),t},wrap(e){let t=ap();if(e!==void 0)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function sp(){return{key:``,value:void 0}}var cp={encode(e,t=new U){return e.key!==``&&t.uint32(10).string(e.key),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=sp();for(;n.pos>>3){case 1:if(e!==10)break;i.key=n.string();continue;case 2:if(e!==18)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return cp.fromPartial(e??{})},fromPartial(e){let t=sp();return t.key=e.key??``,t.value=e.value??void 0,t}};function lp(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var G={encode(e,t=new U){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&op.encode(op.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&dp.encode(dp.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=lp();for(;n.pos>>3){case 1:if(e!==8)break;i.nullValue=n.int32();continue;case 2:if(e!==17)break;i.numberValue=n.double();continue;case 3:if(e!==26)break;i.stringValue=n.string();continue;case 4:if(e!==32)break;i.boolValue=n.bool();continue;case 5:if(e!==42)break;i.structValue=op.unwrap(op.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.listValue=dp.unwrap(dp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return G.fromPartial(e??{})},fromPartial(e){let t=lp();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=lp();if(e===null)t.nullValue=ip.NULL_VALUE;else if(typeof e==`boolean`)t.boolValue=e;else if(typeof e==`number`)t.numberValue=e;else if(typeof e==`string`)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e==`object`)t.structValue=e;else if(e!==void 0)throw new globalThis.Error(`Unsupported any value type: `+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function up(){return{values:[]}}var dp={encode(e,t=new U){for(let n of e.values)G.encode(G.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=up();for(;n.pos>>3){case 1:if(e!==10)break;i.values.push(G.unwrap(G.decode(n,n.uint32())));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return dp.fromPartial(e??{})},fromPartial(e){let t=up();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=up();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty(`values`)&&globalThis.Array.isArray(e.values)?e.values:e}},fp=function(e){return e[e.ADD=0]=`ADD`,e[e.REMOVE=1]=`REMOVE`,e[e.REPLACE=2]=`REPLACE`,e[e.MOVE=3]=`MOVE`,e[e.COPY=4]=`COPY`,e[e.TEST=5]=`TEST`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function pp(){return{op:0,path:``,from:void 0,value:void 0}}var mp={encode(e,t=new U){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==``&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=pp();for(;n.pos>>3){case 1:if(e!==8)break;i.op=n.int32();continue;case 2:if(e!==18)break;i.path=n.string();continue;case 3:if(e!==26)break;i.from=n.string();continue;case 4:if(e!==34)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mp.fromPartial(e??{})},fromPartial(e){let t=pp();return t.op=e.op??0,t.path=e.path??``,t.from=e.from??void 0,t.value=e.value??void 0,t}};function hp(){return{id:``,type:``,function:void 0,metadata:void 0}}var gp={encode(e,t=new U){return e.id!==``&&t.uint32(10).string(e.id),e.type!==``&&t.uint32(18).string(e.type),e.function!==void 0&&vp.encode(e.function,t.uint32(26).fork()).join(),e.metadata!==void 0&&op.encode(op.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=hp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.type=n.string();continue;case 3:if(e!==26)break;i.function=vp.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.metadata=op.unwrap(op.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return gp.fromPartial(e??{})},fromPartial(e){let t=hp();return t.id=e.id??``,t.type=e.type??``,t.function=e.function!==void 0&&e.function!==null?vp.fromPartial(e.function):void 0,t.metadata=e.metadata??void 0,t}};function _p(){return{name:``,arguments:``}}var vp={encode(e,t=new U){return e.name!==``&&t.uint32(10).string(e.name),e.arguments!==``&&t.uint32(18).string(e.arguments),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=_p();for(;n.pos>>3){case 1:if(e!==10)break;i.name=n.string();continue;case 2:if(e!==18)break;i.arguments=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return vp.fromPartial(e??{})},fromPartial(e){let t=_p();return t.name=e.name??``,t.arguments=e.arguments??``,t}};function yp(){return{value:``,mimeType:``}}var bp={encode(e,t=new U){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==``&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=yp();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return bp.fromPartial(e??{})},fromPartial(e){let t=yp();return t.value=e.value??``,t.mimeType=e.mimeType??``,t}};function xp(){return{value:``,mimeType:void 0}}var Sp={encode(e,t=new U){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==void 0&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=xp();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Sp.fromPartial(e??{})},fromPartial(e){let t=xp();return t.value=e.value??``,t.mimeType=e.mimeType??void 0,t}};function Cp(){return{data:void 0,url:void 0}}var wp={encode(e,t=new U){return e.data!==void 0&&bp.encode(e.data,t.uint32(10).fork()).join(),e.url!==void 0&&Sp.encode(e.url,t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Cp();for(;n.pos>>3){case 1:if(e!==10)break;i.data=bp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.url=Sp.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return wp.fromPartial(e??{})},fromPartial(e){let t=Cp();return t.data=e.data!==void 0&&e.data!==null?bp.fromPartial(e.data):void 0,t.url=e.url!==void 0&&e.url!==null?Sp.fromPartial(e.url):void 0,t}};function Tp(){return{text:``}}var Ep={encode(e,t=new U){return e.text!==``&&t.uint32(10).string(e.text),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Tp();for(;n.pos>>3){case 1:if(e!==10)break;i.text=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ep.fromPartial(e??{})},fromPartial(e){let t=Tp();return t.text=e.text??``,t}};function Dp(){return{source:void 0,metadata:void 0}}var Op={encode(e,t=new U){return e.source!==void 0&&wp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Dp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=wp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Op.fromPartial(e??{})},fromPartial(e){let t=Dp();return t.source=e.source!==void 0&&e.source!==null?wp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function kp(){return{source:void 0,metadata:void 0}}var Ap={encode(e,t=new U){return e.source!==void 0&&wp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=kp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=wp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ap.fromPartial(e??{})},fromPartial(e){let t=kp();return t.source=e.source!==void 0&&e.source!==null?wp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function jp(){return{source:void 0,metadata:void 0}}var Mp={encode(e,t=new U){return e.source!==void 0&&wp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=jp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=wp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Mp.fromPartial(e??{})},fromPartial(e){let t=jp();return t.source=e.source!==void 0&&e.source!==null?wp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Np(){return{source:void 0,metadata:void 0}}var Pp={encode(e,t=new U){return e.source!==void 0&&wp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Np();for(;n.pos>>3){case 1:if(e!==10)break;i.source=wp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Pp.fromPartial(e??{})},fromPartial(e){let t=Np();return t.source=e.source!==void 0&&e.source!==null?wp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Fp(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}var Ip={encode(e,t=new U){return e.text!==void 0&&Ep.encode(e.text,t.uint32(10).fork()).join(),e.image!==void 0&&Op.encode(e.image,t.uint32(18).fork()).join(),e.audio!==void 0&&Ap.encode(e.audio,t.uint32(26).fork()).join(),e.video!==void 0&&Mp.encode(e.video,t.uint32(34).fork()).join(),e.document!==void 0&&Pp.encode(e.document,t.uint32(42).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Fp();for(;n.pos>>3){case 1:if(e!==10)break;i.text=Ep.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.image=Op.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.audio=Ap.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.video=Mp.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.document=Pp.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ip.fromPartial(e??{})},fromPartial(e){let t=Fp();return t.text=e.text!==void 0&&e.text!==null?Ep.fromPartial(e.text):void 0,t.image=e.image!==void 0&&e.image!==null?Op.fromPartial(e.image):void 0,t.audio=e.audio!==void 0&&e.audio!==null?Ap.fromPartial(e.audio):void 0,t.video=e.video!==void 0&&e.video!==null?Mp.fromPartial(e.video):void 0,t.document=e.document!==void 0&&e.document!==null?Pp.fromPartial(e.document):void 0,t}};function Lp(){return{id:``,role:``,content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[],metadata:void 0,subagentRunId:void 0}}var Rp={encode(e,t=new U){e.id!==``&&t.uint32(10).string(e.id),e.role!==``&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(let n of e.toolCalls)gp.encode(n,t.uint32(42).fork()).join();e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error);for(let n of e.contentParts)Ip.encode(n,t.uint32(66).fork()).join();return e.metadata!==void 0&&op.encode(op.wrap(e.metadata),t.uint32(74).fork()).join(),e.subagentRunId!==void 0&&t.uint32(82).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Lp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.role=n.string();continue;case 3:if(e!==26)break;i.content=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.toolCalls.push(gp.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.toolCallId=n.string();continue;case 7:if(e!==58)break;i.error=n.string();continue;case 8:if(e!==66)break;i.contentParts.push(Ip.decode(n,n.uint32()));continue;case 9:if(e!==74)break;i.metadata=op.unwrap(op.decode(n,n.uint32()));continue;case 10:if(e!==82)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Rp.fromPartial(e??{})},fromPartial(e){let t=Lp();return t.id=e.id??``,t.role=e.role??``,t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>gp.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>Ip.fromPartial(e))||[],t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function zp(){return{id:``,reason:``,message:void 0,toolCallId:void 0,responseSchema:void 0,expiresAt:void 0,metadata:void 0,subagentRunId:void 0}}var Bp={encode(e,t=new U){return e.id!==``&&t.uint32(10).string(e.id),e.reason!==``&&t.uint32(18).string(e.reason),e.message!==void 0&&t.uint32(26).string(e.message),e.toolCallId!==void 0&&t.uint32(34).string(e.toolCallId),e.responseSchema!==void 0&&G.encode(G.wrap(e.responseSchema),t.uint32(42).fork()).join(),e.expiresAt!==void 0&&t.uint32(50).string(e.expiresAt),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(58).fork()).join(),e.subagentRunId!==void 0&&t.uint32(66).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=zp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.reason=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.toolCallId=n.string();continue;case 5:if(e!==42)break;i.responseSchema=G.unwrap(G.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.expiresAt=n.string();continue;case 7:if(e!==58)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue;case 8:if(e!==66)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Bp.fromPartial(e??{})},fromPartial(e){let t=zp();return t.id=e.id??``,t.reason=e.reason??``,t.message=e.message??void 0,t.toolCallId=e.toolCallId??void 0,t.responseSchema=e.responseSchema??void 0,t.expiresAt=e.expiresAt??void 0,t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}},Vp=function(e){return e[e.TEXT_MESSAGE_START=0]=`TEXT_MESSAGE_START`,e[e.TEXT_MESSAGE_CONTENT=1]=`TEXT_MESSAGE_CONTENT`,e[e.TEXT_MESSAGE_END=2]=`TEXT_MESSAGE_END`,e[e.TOOL_CALL_START=3]=`TOOL_CALL_START`,e[e.TOOL_CALL_ARGS=4]=`TOOL_CALL_ARGS`,e[e.TOOL_CALL_END=5]=`TOOL_CALL_END`,e[e.STATE_SNAPSHOT=6]=`STATE_SNAPSHOT`,e[e.STATE_DELTA=7]=`STATE_DELTA`,e[e.MESSAGES_SNAPSHOT=8]=`MESSAGES_SNAPSHOT`,e[e.RAW=9]=`RAW`,e[e.CUSTOM=10]=`CUSTOM`,e[e.RUN_STARTED=11]=`RUN_STARTED`,e[e.RUN_FINISHED=12]=`RUN_FINISHED`,e[e.RUN_ERROR=13]=`RUN_ERROR`,e[e.STEP_STARTED=14]=`STEP_STARTED`,e[e.STEP_FINISHED=15]=`STEP_FINISHED`,e[e.SUBAGENT_STARTED=16]=`SUBAGENT_STARTED`,e[e.SUBAGENT_FINISHED=17]=`SUBAGENT_FINISHED`,e[e.SUBAGENT_ERROR=18]=`SUBAGENT_ERROR`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function Hp(){return{type:0,timestamp:void 0,rawEvent:void 0,metadata:void 0}}var K={encode(e,t=new U){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&G.encode(G.wrap(e.rawEvent),t.uint32(26).fork()).join(),e.metadata!==void 0&&op.encode(op.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Hp();for(;n.pos>>3){case 1:if(e!==8)break;i.type=n.int32();continue;case 2:if(e!==16)break;i.timestamp=Fm(n.int64());continue;case 3:if(e!==26)break;i.rawEvent=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.metadata=op.unwrap(op.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return K.fromPartial(e??{})},fromPartial(e){let t=Hp();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t.metadata=e.metadata??void 0,t}};function Up(){return{baseEvent:void 0,messageId:``,role:void 0,name:void 0,subagentRunId:void 0}}var Wp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.name!==void 0&&t.uint32(34).string(e.name),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Up();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Wp.fromPartial(e??{})},fromPartial(e){let t=Up();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.role=e.role??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Gp(){return{baseEvent:void 0,messageId:``,delta:``,subagentRunId:void 0}}var Kp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Gp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Kp.fromPartial(e??{})},fromPartial(e){let t=Gp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function qp(){return{baseEvent:void 0,messageId:``,subagentRunId:void 0}}var Jp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=qp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Jp.fromPartial(e??{})},fromPartial(e){let t=qp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Yp(){return{baseEvent:void 0,toolCallId:``,toolCallName:``,parentMessageId:void 0,subagentRunId:void 0}}var Xp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.toolCallName!==``&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Yp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Xp.fromPartial(e??{})},fromPartial(e){let t=Yp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.toolCallName=e.toolCallName??``,t.parentMessageId=e.parentMessageId??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Zp(){return{baseEvent:void 0,toolCallId:``,delta:``,subagentRunId:void 0}}var Qp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Zp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Qp.fromPartial(e??{})},fromPartial(e){let t=Zp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function $p(){return{baseEvent:void 0,toolCallId:``,subagentRunId:void 0}}var em={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=$p();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return em.fromPartial(e??{})},fromPartial(e){let t=$p();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function tm(){return{baseEvent:void 0,snapshot:void 0,subagentRunId:void 0}}var nm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&G.encode(G.wrap(e.snapshot),t.uint32(18).fork()).join(),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=tm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.snapshot=G.unwrap(G.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return nm.fromPartial(e??{})},fromPartial(e){let t=tm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function rm(){return{baseEvent:void 0,delta:[],subagentRunId:void 0}}var im={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.delta)mp.encode(n,t.uint32(18).fork()).join();return e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=rm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.delta.push(mp.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return im.fromPartial(e??{})},fromPartial(e){let t=rm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>mp.fromPartial(e))||[],t.subagentRunId=e.subagentRunId??void 0,t}};function am(){return{baseEvent:void 0,messages:[]}}var om={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.messages)Rp.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=am();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messages.push(Rp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return om.fromPartial(e??{})},fromPartial(e){let t=am();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>Rp.fromPartial(e))||[],t}};function sm(){return{baseEvent:void 0,event:void 0,source:void 0,subagentRunId:void 0}}var cm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&G.encode(G.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=sm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.event=G.unwrap(G.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.source=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return cm.fromPartial(e??{})},fromPartial(e){let t=sm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function lm(){return{baseEvent:void 0,name:``,value:void 0,subagentRunId:void 0}}var um={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==``&&t.uint32(18).string(e.name),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(26).fork()).join(),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=lm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.name=n.string();continue;case 3:if(e!==26)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return um.fromPartial(e??{})},fromPartial(e){let t=lm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.name=e.name??``,t.value=e.value??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function dm(){return{baseEvent:void 0,threadId:``,runId:``}}var fm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=dm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return fm.fromPartial(e??{})},fromPartial(e){let t=dm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t}};function pm(){return{provider:void 0,model:void 0,inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0}}var mm={encode(e,t=new U){return e.provider!==void 0&&t.uint32(10).string(e.provider),e.model!==void 0&&t.uint32(18).string(e.model),e.inputTokens!==void 0&&t.uint32(24).int64(e.inputTokens),e.outputTokens!==void 0&&t.uint32(32).int64(e.outputTokens),e.totalTokens!==void 0&&t.uint32(40).int64(e.totalTokens),e.reasoningTokens!==void 0&&t.uint32(48).int64(e.reasoningTokens),e.cachedInputTokens!==void 0&&t.uint32(56).int64(e.cachedInputTokens),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=pm();for(;n.pos>>3){case 1:if(e!==10)break;i.provider=n.string();continue;case 2:if(e!==18)break;i.model=n.string();continue;case 3:if(e!==24)break;i.inputTokens=Fm(n.int64());continue;case 4:if(e!==32)break;i.outputTokens=Fm(n.int64());continue;case 5:if(e!==40)break;i.totalTokens=Fm(n.int64());continue;case 6:if(e!==48)break;i.reasoningTokens=Fm(n.int64());continue;case 7:if(e!==56)break;i.cachedInputTokens=Fm(n.int64());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mm.fromPartial(e??{})},fromPartial(e){let t=pm();return t.provider=e.provider??void 0,t.model=e.model??void 0,t.inputTokens=e.inputTokens??void 0,t.outputTokens=e.outputTokens??void 0,t.totalTokens=e.totalTokens??void 0,t.reasoningTokens=e.reasoningTokens??void 0,t.cachedInputTokens=e.cachedInputTokens??void 0,t}};function hm(){return{baseEvent:void 0,threadId:``,runId:``,result:void 0,outcome:``,interrupts:[],usage:[]}}var gm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),e.result!==void 0&&G.encode(G.wrap(e.result),t.uint32(34).fork()).join(),e.outcome!==``&&t.uint32(42).string(e.outcome);for(let n of e.interrupts)Bp.encode(n,t.uint32(50).fork()).join();for(let n of e.usage)mm.encode(n,t.uint32(58).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=hm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue;case 4:if(e!==34)break;i.result=G.unwrap(G.decode(n,n.uint32()));continue;case 5:if(e!==42)break;i.outcome=n.string();continue;case 6:if(e!==50)break;i.interrupts.push(Bp.decode(n,n.uint32()));continue;case 7:if(e!==58)break;i.usage.push(mm.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return gm.fromPartial(e??{})},fromPartial(e){let t=hm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interrupts=e.interrupts?.map(e=>Bp.fromPartial(e))||[],t.usage=e.usage?.map(e=>mm.fromPartial(e))||[],t}};function _m(){return{baseEvent:void 0,code:void 0,message:``,usage:[]}}var vm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==``&&t.uint32(26).string(e.message);for(let n of e.usage)mm.encode(n,t.uint32(34).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=_m();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.code=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.usage.push(mm.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return vm.fromPartial(e??{})},fromPartial(e){let t=_m();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??``,t.usage=e.usage?.map(e=>mm.fromPartial(e))||[],t}};function ym(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var bm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=ym();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return bm.fromPartial(e??{})},fromPartial(e){let t=ym();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function xm(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var Sm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=xm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Sm.fromPartial(e??{})},fromPartial(e){let t=xm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Cm(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0,subagentRunId:void 0}}var wm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),e.name!==void 0&&t.uint32(42).string(e.name),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Cm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.delta=n.string();continue;case 5:if(e!==42)break;i.name=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return wm.fromPartial(e??{})},fromPartial(e){let t=Cm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Tm(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0,subagentRunId:void 0}}var Em={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Tm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.delta=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Em.fromPartial(e??{})},fromPartial(e){let t=Tm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Dm(){return{baseEvent:void 0,subagentRunId:``,name:``,description:void 0,parentSubagentRunId:void 0,parentToolCallId:void 0,parentMessageId:void 0}}var Om={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.name!==``&&t.uint32(26).string(e.name),e.description!==void 0&&t.uint32(34).string(e.description),e.parentSubagentRunId!==void 0&&t.uint32(42).string(e.parentSubagentRunId),e.parentToolCallId!==void 0&&t.uint32(50).string(e.parentToolCallId),e.parentMessageId!==void 0&&t.uint32(58).string(e.parentMessageId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Dm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.name=n.string();continue;case 4:if(e!==34)break;i.description=n.string();continue;case 5:if(e!==42)break;i.parentSubagentRunId=n.string();continue;case 6:if(e!==50)break;i.parentToolCallId=n.string();continue;case 7:if(e!==58)break;i.parentMessageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Om.fromPartial(e??{})},fromPartial(e){let t=Dm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.name=e.name??``,t.description=e.description??void 0,t.parentSubagentRunId=e.parentSubagentRunId??void 0,t.parentToolCallId=e.parentToolCallId??void 0,t.parentMessageId=e.parentMessageId??void 0,t}};function km(){return{baseEvent:void 0,subagentRunId:``,result:void 0,outcome:``,interruptIds:[]}}var Am={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.result!==void 0&&G.encode(G.wrap(e.result),t.uint32(26).fork()).join(),e.outcome!==``&&t.uint32(34).string(e.outcome);for(let n of e.interruptIds)t.uint32(42).string(n);return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=km();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.result=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.outcome=n.string();continue;case 5:if(e!==42)break;i.interruptIds.push(n.string());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Am.fromPartial(e??{})},fromPartial(e){let t=km();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interruptIds=e.interruptIds?.map(e=>e)||[],t}};function jm(){return{baseEvent:void 0,subagentRunId:``,message:``,code:void 0}}var Mm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.message!==``&&t.uint32(26).string(e.message),e.code!==void 0&&t.uint32(34).string(e.code),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=jm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.code=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Mm.fromPartial(e??{})},fromPartial(e){let t=jm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.message=e.message??``,t.code=e.code??void 0,t}};function Nm(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0,subagentStarted:void 0,subagentFinished:void 0,subagentError:void 0}}var Pm={encode(e,t=new U){return e.textMessageStart!==void 0&&Wp.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&Kp.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&Jp.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&Xp.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&Qp.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&em.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&nm.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&im.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&om.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&cm.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&um.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&fm.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&gm.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&vm.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&bm.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&Sm.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&wm.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&Em.encode(e.toolCallChunk,t.uint32(146).fork()).join(),e.subagentStarted!==void 0&&Om.encode(e.subagentStarted,t.uint32(154).fork()).join(),e.subagentFinished!==void 0&&Am.encode(e.subagentFinished,t.uint32(162).fork()).join(),e.subagentError!==void 0&&Mm.encode(e.subagentError,t.uint32(170).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Nm();for(;n.pos>>3){case 1:if(e!==10)break;i.textMessageStart=Wp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.textMessageContent=Kp.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.textMessageEnd=Jp.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.toolCallStart=Xp.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.toolCallArgs=Qp.decode(n,n.uint32());continue;case 6:if(e!==50)break;i.toolCallEnd=em.decode(n,n.uint32());continue;case 7:if(e!==58)break;i.stateSnapshot=nm.decode(n,n.uint32());continue;case 8:if(e!==66)break;i.stateDelta=im.decode(n,n.uint32());continue;case 9:if(e!==74)break;i.messagesSnapshot=om.decode(n,n.uint32());continue;case 10:if(e!==82)break;i.raw=cm.decode(n,n.uint32());continue;case 11:if(e!==90)break;i.custom=um.decode(n,n.uint32());continue;case 12:if(e!==98)break;i.runStarted=fm.decode(n,n.uint32());continue;case 13:if(e!==106)break;i.runFinished=gm.decode(n,n.uint32());continue;case 14:if(e!==114)break;i.runError=vm.decode(n,n.uint32());continue;case 15:if(e!==122)break;i.stepStarted=bm.decode(n,n.uint32());continue;case 16:if(e!==130)break;i.stepFinished=Sm.decode(n,n.uint32());continue;case 17:if(e!==138)break;i.textMessageChunk=wm.decode(n,n.uint32());continue;case 18:if(e!==146)break;i.toolCallChunk=Em.decode(n,n.uint32());continue;case 19:if(e!==154)break;i.subagentStarted=Om.decode(n,n.uint32());continue;case 20:if(e!==162)break;i.subagentFinished=Am.decode(n,n.uint32());continue;case 21:if(e!==170)break;i.subagentError=Mm.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Pm.fromPartial(e??{})},fromPartial(e){let t=Nm();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?Wp.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?Kp.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?Jp.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?Xp.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?Qp.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?em.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?nm.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?im.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?om.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?cm.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?um.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?fm.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?gm.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?vm.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?bm.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?Sm.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?wm.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?Em.fromPartial(e.toolCallChunk):void 0,t.subagentStarted=e.subagentStarted!==void 0&&e.subagentStarted!==null?Om.fromPartial(e.subagentStarted):void 0,t.subagentFinished=e.subagentFinished!==void 0&&e.subagentFinished!==null?Am.fromPartial(e.subagentFinished):void 0,t.subagentError=e.subagentError!==void 0&&e.subagentError!==null?Mm.fromPartial(e.subagentError):void 0,t}};function Fm(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error(`Value is larger than Number.MAX_SAFE_INTEGER`);if(te&&typeof e==`object`?e:void 0,Lm=e=>{let t=Im(e);if(t){if(t.data){let e=t.data;return{type:`data`,value:e.value,mimeType:e.mimeType}}if(t.url){let e=t.url;return{type:`url`,value:e.value,mimeType:e.mimeType}}}},Rm=e=>{let t=Im(e);if(t){if(t.text)return{type:`text`,text:t.text.text};if(t.image){let e=t.image;return{type:`image`,source:Lm(e.source),metadata:e.metadata}}if(t.audio){let e=t.audio;return{type:`audio`,source:Lm(e.source),metadata:e.metadata}}if(t.video){let e=t.video;return{type:`video`,source:Lm(e.source),metadata:e.metadata}}if(t.document){let e=t.document;return{type:`document`,source:Lm(e.source),metadata:e.metadata}}}};function zm(e){let t=Pm.decode(e),n=Object.values(t).find(e=>e!==void 0);if(!n)throw Error(`Invalid event`);if(n.type=Vp[n.baseEvent.type],n.timestamp=n.baseEvent.timestamp,n.rawEvent=n.baseEvent.rawEvent,n.baseEvent.metadata!==void 0&&(n.metadata=n.baseEvent.metadata),delete n.baseEvent,n.type===V.MESSAGES_SNAPSHOT)for(let e of n.messages){let t=e;if(t.role===`user`&&Array.isArray(t.contentParts)){let e=t.contentParts.map(e=>Rm(e)).filter(e=>e!==void 0);e.length>0&&(t.content=e)}Array.isArray(t.contentParts)&&t.contentParts.length===0&&(t.contentParts=void 0),t.toolCalls?.length===0&&(t.toolCalls=void 0)}if(n.type===V.RUN_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interrupts)?e.interrupts:[];delete e.interrupts,t===`interrupt`?e.outcome={type:`interrupt`,interrupts:r}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if(n.type===V.SUBAGENT_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interruptIds)?e.interruptIds:[];delete e.interruptIds,t===`suspended`?e.outcome={type:`suspended`,...r.length>0&&{interruptIds:r}}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if((n.type===V.RUN_FINISHED||n.type===V.RUN_ERROR)&&Array.isArray(n.usage)&&n.usage.length===0&&delete n.usage,n.type===V.STATE_DELTA)for(let e of n.delta)e.op=fp[e.op].toLowerCase(),Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]});return Object.keys(n).forEach(e=>{n[e]===void 0&&delete n[e]}),Jl.parse(n)}var Bm;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(Bm||={});var Vm;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Vm||={});var q=Bm.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),Hm=e=>{switch(typeof e){case`undefined`:return q.undefined;case`string`:return q.string;case`number`:return Number.isNaN(e)?q.nan:q.number;case`boolean`:return q.boolean;case`function`:return q.function;case`bigint`:return q.bigint;case`symbol`:return q.symbol;case`object`:return Array.isArray(e)?q.array:e===null?q.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?q.promise:typeof Map<`u`&&e instanceof Map?q.map:typeof Set<`u`&&e instanceof Set?q.set:typeof Date<`u`&&e instanceof Date?q.date:q.object;default:return q.unknown}},J=Bm.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Um=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Um.create=e=>new Um(e);var Wm=(e,t)=>{let n;switch(e.code){case J.invalid_type:n=e.received===q.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Bm.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${Bm.joinValues(e.keys,`, `)}`;break;case J.invalid_union:n=`Invalid input`;break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Bm.joinValues(e.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${Bm.joinValues(e.options)}, received '${e.received}'`;break;case J.invalid_arguments:n=`Invalid function arguments`;break;case J.invalid_return_type:n=`Invalid function return type`;break;case J.invalid_date:n=`Invalid date`;break;case J.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Bm.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case J.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case J.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case J.custom:n=`Invalid input`;break;case J.invalid_intersection_types:n=`Intersection results could not be merged`;break;case J.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case J.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,Bm.assertNever(e)}return{message:n}},Gm=Wm;function Km(){return Gm}var qm=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function Y(e,t){let n=Km(),r=qm({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Wm?void 0:Wm].filter(e=>!!e)});e.common.issues.push(r)}var Jm=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return X;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return X;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},X=Object.freeze({status:`aborted`}),Ym=e=>({status:`dirty`,value:e}),Xm=e=>({status:`valid`,value:e}),Zm=e=>e.status===`aborted`,Qm=e=>e.status===`dirty`,$m=e=>e.status===`valid`,eh=e=>typeof Promise<`u`&&e instanceof Promise,Z;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(Z||={});var th=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},nh=(e,t)=>{if($m(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Um(e.common.issues);return this._error=t,this._error}}};function Q(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var rh=class{get description(){return this._def.description}_getType(e){return Hm(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Hm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Jm,ctx:{common:e.parent.common,data:e.data,parsedType:Hm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(eh(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Hm(e)};return nh(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Hm(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return $m(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>$m(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Hm(e)},r=this._parse({data:e,path:n.path,parent:n});return nh(n,await(eh(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:J.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new og({schema:this,typeName:$.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return sg.create(this,this._def)}nullable(){return cg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vh.create(this)}promise(){return ag.create(this,this._def)}or(e){return Wh.create([this,e],this._def)}and(e){return Jh.create(this,e,this._def)}transform(e){return new og({...Q(this._def),schema:this,typeName:$.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new lg({...Q(this._def),innerType:this,defaultValue:t,typeName:$.ZodDefault})}brand(){return new fg({typeName:$.ZodBranded,type:this,...Q(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new ug({...Q(this._def),innerType:this,catchValue:t,typeName:$.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return pg.create(this,e)}readonly(){return mg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ih=/^c[^\s-]{8,}$/i,ah=/^[0-9a-z]+$/,oh=/^[0-9A-HJKMNP-TV-Z]{26}$/i,sh=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ch=/^[a-z0-9_-]{21}$/i,lh=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,uh=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,dh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fh=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,ph,mh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,hh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,gh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,_h=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vh=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,yh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bh=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,xh=RegExp(`^${bh}$`);function Sh(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Ch(e){return RegExp(`^${Sh(e)}$`)}function wh(e){let t=`${bh}T${Sh(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function Th(e,t){return!((t!==`v4`&&t||!mh.test(e))&&(t!==`v6`&&t||!gh.test(e)))}function Eh(e,t){if(!lh.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function Dh(e,t){return!((t!==`v4`&&t||!hh.test(e))&&(t!==`v6`&&t||!_h.test(e)))}var Oh=class e extends rh{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q.string){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.string,received:t.parsedType}),X}let t=new Jm,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),Y(n,{code:J.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:J.invalid_string,...Z.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...Z.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...Z.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...Z.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...Z.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...Z.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...Z.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...Z.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...Z.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...Z.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...Z.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...Z.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...Z.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...Z.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Z.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...Z.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...Z.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...Z.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...Z.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...Z.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...Z.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...Z.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...Z.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...Z.errToObj(t)})}nonempty(e){return this.min(1,Z.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Oh({checks:[],typeName:$.ZodString,coerce:e?.coerce??!1,...Q(e)});function kh(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var Ah=class e extends rh{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==q.number){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.number,received:t.parsedType}),X}let t,n=new Jm;for(let r of this._def.checks)r.kind===`int`?Bm.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Y(t,{code:J.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?kh(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_finite,message:r.message}),n.dirty()):Bm.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,Z.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Z.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Z.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Z.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Z.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:Z.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Z.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Z.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:Z.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Z.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Z.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&Bm.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew Ah({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...Q(e)});var jh=class e extends rh{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==q.bigint)return this._getInvalidInput(e);let t,n=new Jm;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):Bm.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.bigint,received:t.parsedType}),X}gte(e,t){return this.setLimit(`min`,e,!0,Z.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Z.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Z.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Z.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Z.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Z.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Z.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew jh({checks:[],typeName:$.ZodBigInt,coerce:e?.coerce??!1,...Q(e)});var Mh=class extends rh{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q.boolean){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.boolean,received:t.parsedType}),X}return Xm(e.data)}};Mh.create=e=>new Mh({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...Q(e)});var Nh=class e extends rh{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q.date){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.date,received:t.parsedType}),X}if(Number.isNaN(e.data.getTime()))return Y(this._getOrReturnCtx(e),{code:J.invalid_date}),X;let t=new Jm,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),Y(n,{code:J.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):Bm.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Z.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Z.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Nh({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...Q(e)});var Ph=class extends rh{_parse(e){if(this._getType(e)!==q.symbol){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.symbol,received:t.parsedType}),X}return Xm(e.data)}};Ph.create=e=>new Ph({typeName:$.ZodSymbol,...Q(e)});var Fh=class extends rh{_parse(e){if(this._getType(e)!==q.undefined){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.undefined,received:t.parsedType}),X}return Xm(e.data)}};Fh.create=e=>new Fh({typeName:$.ZodUndefined,...Q(e)});var Ih=class extends rh{_parse(e){if(this._getType(e)!==q.null){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.null,received:t.parsedType}),X}return Xm(e.data)}};Ih.create=e=>new Ih({typeName:$.ZodNull,...Q(e)});var Lh=class extends rh{constructor(){super(...arguments),this._any=!0}_parse(e){return Xm(e.data)}};Lh.create=e=>new Lh({typeName:$.ZodAny,...Q(e)});var Rh=class extends rh{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Xm(e.data)}};Rh.create=e=>new Rh({typeName:$.ZodUnknown,...Q(e)});var zh=class extends rh{_parse(e){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.never,received:t.parsedType}),X}};zh.create=e=>new zh({typeName:$.ZodNever,...Q(e)});var Bh=class extends rh{_parse(e){if(this._getType(e)!==q.undefined){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.void,received:t.parsedType}),X}return Xm(e.data)}};Bh.create=e=>new Bh({typeName:$.ZodVoid,...Q(e)});var Vh=class e extends rh{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==q.array)return Y(t,{code:J.invalid_type,expected:q.array,received:t.parsedType}),X;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(Y(t,{code:J.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new th(t,e,t.path,n)))).then(e=>Jm.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new th(t,e,t.path,n)));return Jm.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Z.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Z.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Z.toString(n)}})}nonempty(e){return this.min(1,e)}};Vh.create=(e,t)=>new Vh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...Q(t)});function Hh(e){if(e instanceof Uh){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=sg.create(Hh(r))}return new Uh({...e._def,shape:()=>t})}return e instanceof Vh?new Vh({...e._def,type:Hh(e.element)}):e instanceof sg?sg.create(Hh(e.unwrap())):e instanceof cg?cg.create(Hh(e.unwrap())):e instanceof Yh?Yh.create(e.items.map(e=>Hh(e))):e}var Uh=class e extends rh{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Bm.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==q.object){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.object,received:t.parsedType}),X}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof zh&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new th(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof zh){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(Y(n,{code:J.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new th(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Jm.mergeObjectSync(t,e)):Jm.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return Z.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:Z.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of Bm.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of Bm.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return Hh(this)}partial(t){let n={};for(let e of Bm.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of Bm.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof sg;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return ng(Bm.objectKeys(this.shape))}};Uh.create=(e,t)=>new Uh({shape:()=>e,unknownKeys:`strip`,catchall:zh.create(),typeName:$.ZodObject,...Q(t)}),Uh.strictCreate=(e,t)=>new Uh({shape:()=>e,unknownKeys:`strict`,catchall:zh.create(),typeName:$.ZodObject,...Q(t)}),Uh.lazycreate=(e,t)=>new Uh({shape:e,unknownKeys:`strip`,catchall:zh.create(),typeName:$.ZodObject,...Q(t)});var Wh=class extends rh{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Um(e.ctx.common.issues));return Y(t,{code:J.invalid_union,unionErrors:n}),X}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Um(e));return Y(t,{code:J.invalid_union,unionErrors:i}),X}}get options(){return this._def.options}};Wh.create=(e,t)=>new Wh({options:e,typeName:$.ZodUnion,...Q(t)});var Gh=e=>e instanceof eg?Gh(e.schema):e instanceof og?Gh(e.innerType()):e instanceof tg?[e.value]:e instanceof rg?e.options:e instanceof ig?Bm.objectValues(e.enum):e instanceof lg?Gh(e._def.innerType):e instanceof Fh?[void 0]:e instanceof Ih?[null]:e instanceof sg?[void 0,...Gh(e.unwrap())]:e instanceof cg?[null,...Gh(e.unwrap())]:e instanceof fg||e instanceof mg?Gh(e.unwrap()):e instanceof ug?Gh(e._def.innerType):[],Kh=class e extends rh{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q.object)return Y(t,{code:J.invalid_type,expected:q.object,received:t.parsedType}),X;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Y(t,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),X)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=Gh(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Q(r)})}};function qh(e,t){let n=Hm(e),r=Hm(t);if(e===t)return{valid:!0,data:e};if(n===q.object&&r===q.object){let n=Bm.objectKeys(t),r=Bm.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=qh(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===q.array&&r===q.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(Zm(e)||Zm(r))return X;let i=qh(e.value,r.value);return i.valid?((Qm(e)||Qm(r))&&t.dirty(),{status:t.value,value:i.data}):(Y(n,{code:J.invalid_intersection_types}),X)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Jh.create=(e,t,n)=>new Jh({left:e,right:t,typeName:$.ZodIntersection,...Q(n)});var Yh=class e extends rh{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.array)return Y(n,{code:J.invalid_type,expected:q.array,received:n.parsedType}),X;if(n.data.lengththis._def.items.length&&(Y(n,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new th(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Jm.mergeArray(t,e)):Jm.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Yh.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new Yh({items:e,typeName:$.ZodTuple,rest:null,...Q(t)})};var Xh=class e extends rh{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.object)return Y(n,{code:J.invalid_type,expected:q.object,received:n.parsedType}),X;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new th(n,e,n.path,e)),value:a._parse(new th(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Jm.mergeObjectAsync(t,r):Jm.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof rh?new e({keyType:t,valueType:n,typeName:$.ZodRecord,...Q(r)}):new e({keyType:Oh.create(),valueType:t,typeName:$.ZodRecord,...Q(n)})}},Zh=class extends rh{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.map)return Y(n,{code:J.invalid_type,expected:q.map,received:n.parsedType}),X;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new th(n,e,n.path,[a,`key`])),value:i._parse(new th(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return X;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return X;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};Zh.create=(e,t,n)=>new Zh({valueType:t,keyType:e,typeName:$.ZodMap,...Q(n)});var Qh=class e extends rh{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.set)return Y(n,{code:J.invalid_type,expected:q.set,received:n.parsedType}),X;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(Y(n,{code:J.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return X;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new th(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:Z.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Z.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Qh.create=(e,t)=>new Qh({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...Q(t)});var $h=class e extends rh{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q.function)return Y(t,{code:J.invalid_type,expected:q.function,received:t.parsedType}),X;function n(e,n){return qm({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Km(),Wm].filter(e=>!!e),issueData:{code:J.invalid_arguments,argumentsError:n}})}function r(e,n){return qm({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Km(),Wm].filter(e=>!!e),issueData:{code:J.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ag){let e=this;return Xm(async function(...t){let o=new Um([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return Xm(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Um([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Um([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Yh.create(t).rest(Rh.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||Yh.create([]).rest(Rh.create()),returns:n||Rh.create(),typeName:$.ZodFunction,...Q(r)})}},eg=class extends rh{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};eg.create=(e,t)=>new eg({getter:e,typeName:$.ZodLazy,...Q(t)});var tg=class extends rh{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Y(t,{received:t.data,code:J.invalid_literal,expected:this._def.value}),X}return{status:`valid`,value:e.data}}get value(){return this._def.value}};tg.create=(e,t)=>new tg({value:e,typeName:$.ZodLiteral,...Q(t)});function ng(e,t){return new rg({values:e,typeName:$.ZodEnum,...Q(t)})}var rg=class e extends rh{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return Y(t,{expected:Bm.joinValues(n),received:t.parsedType,code:J.invalid_type}),X}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return Y(t,{received:t.data,code:J.invalid_enum_value,options:n}),X}return Xm(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};rg.create=ng;var ig=class extends rh{_parse(e){let t=Bm.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==q.string&&n.parsedType!==q.number){let e=Bm.objectValues(t);return Y(n,{expected:Bm.joinValues(e),received:n.parsedType,code:J.invalid_type}),X}if(this._cache||=new Set(Bm.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=Bm.objectValues(t);return Y(n,{received:n.data,code:J.invalid_enum_value,options:e}),X}return Xm(e.data)}get enum(){return this._def.values}};ig.create=(e,t)=>new ig({values:e,typeName:$.ZodNativeEnum,...Q(t)});var ag=class extends rh{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==q.promise&&t.common.async===!1?(Y(t,{code:J.invalid_type,expected:q.promise,received:t.parsedType}),X):Xm((t.parsedType===q.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};ag.create=(e,t)=>new ag({type:e,typeName:$.ZodPromise,...Q(t)});var og=class extends rh{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{Y(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return X;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?X:r.status===`dirty`||t.value===`dirty`?Ym(r.value):r});{if(t.value===`aborted`)return X;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?X:r.status===`dirty`||t.value===`dirty`?Ym(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?X:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?X:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!$m(e))return X;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>$m(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):X)}Bm.assertNever(r)}};og.create=(e,t,n)=>new og({schema:e,typeName:$.ZodEffects,effect:t,...Q(n)}),og.createWithPreprocess=(e,t,n)=>new og({schema:t,effect:{type:`preprocess`,transform:e},typeName:$.ZodEffects,...Q(n)});var sg=class extends rh{_parse(e){return this._getType(e)===q.undefined?Xm(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};sg.create=(e,t)=>new sg({innerType:e,typeName:$.ZodOptional,...Q(t)});var cg=class extends rh{_parse(e){return this._getType(e)===q.null?Xm(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};cg.create=(e,t)=>new cg({innerType:e,typeName:$.ZodNullable,...Q(t)});var lg=class extends rh{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===q.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};lg.create=(e,t)=>new lg({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Q(t)});var ug=class extends rh{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return eh(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Um(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Um(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};ug.create=(e,t)=>new ug({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Q(t)});var dg=class extends rh{_parse(e){if(this._getType(e)!==q.nan){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.nan,received:t.parsedType}),X}return{status:`valid`,value:e.data}}};dg.create=e=>new dg({typeName:$.ZodNaN,...Q(e)});var fg=class extends rh{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},pg=class e extends rh{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?X:e.status===`dirty`?(t.dirty(),Ym(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?X:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:$.ZodPipeline})}},mg=class extends rh{_parse(e){let t=this._def.innerType._parse(e),n=e=>($m(e)&&(e.value=Object.freeze(e.value)),e);return eh(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};mg.create=(e,t)=>new mg({innerType:e,typeName:$.ZodReadonly,...Q(t)}),Uh.lazycreate;var $;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})($||={});var hg=Oh.create;Ah.create,dg.create,jh.create;var gg=Mh.create;Nh.create,Ph.create,Fh.create,Ih.create;var _g=Lh.create;Rh.create,zh.create,Bh.create,Vh.create;var vg=Uh.create;Uh.strictCreate,Wh.create;var yg=Kh.create;Jh.create,Yh.create,Xh.create,Zh.create,Qh.create,$h.create,eg.create;var bg=tg.create,xg=rg.create;ig.create,ag.create,og.create,sg.create,cg.create,og.createWithPreprocess,pg.create;var Sg=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Cg=e=>{if(typeof e!=`string`)throw TypeError(`Invalid argument expected string`);let t=e.match(Sg);if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},wg=e=>e===`*`||e===`x`||e===`X`,Tg=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},Eg=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],Dg=(e,t)=>{if(wg(e)||wg(t))return 0;let[n,r]=Eg(Tg(e),Tg(t));return n>r?1:n{for(let n=0;n{let n=Cg(e),r=Cg(t),i=n.pop(),a=r.pop(),o=Og(n,r);return o===0?i&&a?Og(i.split(`.`),a.split(`.`)):i||a?i?-1:1:0:o},Ag=e=>{if(typeof structuredClone==`function`)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function jg(){return Vo()}function Mg(e){if(Object.freeze(e),typeof e==`object`&&e)for(let t of Object.values(e))typeof t==`object`&&t&&!Object.isFrozen(t)&&Mg(t);return e}var Ng=524288;function Pg(e,t,n){let r=0,i=[e,t],a=new WeakSet;for(;i.length>0;){let e=i.pop();if(typeof e==`string`){if(r+=e.length,r>n)return!0}else if(typeof e==`object`&&e){if(a.has(e))continue;if(a.add(e),Array.isArray(e))for(let t=0;tn)return!0;i.push(e[o])}}}}return!1}async function Fg(e,t,n,r){let i=typeof process<`u`&&!0,a=i&&!!{}.VITEST_WORKER_ID,o=i&&!!{}.VITEST_WORKER_ID,s=o&&!Pg(t,n,Ng),c=s?Ag(t):t,l=s?Ag(n):n,u=!1,d=!1,f;for(let t of e)try{s&&(Mg(c),Mg(l));let e=await r(t,c,l);if(e===void 0)continue;let n=!1;if(e.messages!==void 0&&e.messages!==c&&(c=Ag(e.messages),u=!0,n=!0),e.state!==void 0&&e.state!==l&&(l=Ag(e.state),d=!0,n=!0),s&&n&&Pg(c,l,Ng)&&(s=!1),f=e.stopPropagation,f===!0)break}catch(e){if(o&&e instanceof TypeError){if(a)throw e;console.error(`AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.`,e)}else a||console.error(`Subscriber error:`,e);continue}return{...u?{messages:Object.isFrozen(c)?Ag(c):c}:{},...d?{state:Object.isFrozen(l)?Ag(l):l}:{},...f===void 0?{}:{stopPropagation:f}}}function Ig(e){if(!e)return{enabled:!1,events:!1,lifecycle:!1,verbose:!1};if(e===!0)return{enabled:!0,events:!0,lifecycle:!0,verbose:!0};let t=e.events??!0,n=e.lifecycle??!0,r=e.verbose??!1;return{enabled:t||n,events:t,lifecycle:n,verbose:r}}function Lg(e){if(e instanceof Rg)return e;if(e===!0)return new Rg(Ig(!0))}var Rg=class{constructor(e){this.config=e}event(e,t,n,r){this.config.events&&(this.config.verbose?console.debug(`[${e}] ${t}`,typeof n==`string`?n:JSON.stringify(n)):console.debug(`[${e}] ${t}`,r??n))}lifecycle(e,t,n){this.config.lifecycle&&(n?console.debug(`[${e}] ${t}`,n):console.debug(`[${e}] ${t}`))}get eventsEnabled(){return this.config.events}get lifecycleEnabled(){return this.config.lifecycle}get enabled(){return this.config.enabled}};function zg(e){return e.enabled?new Rg(e):void 0}function Bg(e,t,n){if(t){let r=e.find(e=>e.id===t);if(r?.role===`assistant`)return r;r&&console.warn(`TOOL_CALL_START: parentMessageId '${t}' matches a '${r.role}' message, not assistant — falling back to toolCallId`);let i={id:r?n:t,role:`assistant`,toolCalls:[]};return e.push(i),i}let r={id:n,role:`assistant`,toolCalls:[]};return e.push(r),r}function Vg(e,t){return!e||t.metadata===void 0?!1:(e.metadata=Oc(e.metadata,Ag(t.metadata)),!0)}var Hg=(e,t,n,r,i)=>{let a=Lg(i),o=Ag(n.messages),s=Ag(e.state),c={},l=e=>{e.messages!==void 0&&(o=e.messages,c.messages=e.messages),e.state!==void 0&&(s=e.state,c.state=e.state)},u=()=>{let e=Ag(c);return c={},e.messages!==void 0||e.state!==void 0?ff(e):Md};return t.pipe(Sf(async t=>{let i=await Fg(r,o,s,(r,i,a)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:a}));if(l(i),i.stopPropagation===!0?a?.event(`APPLY`,`Event dropped:`,t,{type:t.type,reason:`stopPropagation by subscriber`}):a?.event(`APPLY`,`Event applied:`,t,{type:t.type,subscribers:r.length}),i.stopPropagation===!0)return u();switch(t.type){case V.TEXT_MESSAGE_START:{let i=await Fg(r,o,s,(r,i,a)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,role:n=`assistant`,name:r,subagentRunId:i}=t,a=o.find(t=>t.id===e);if(a?.role===`activity`)return console.warn(`TEXT_MESSAGE_START: Message '${e}' is an activity message — message ids must be unique across activity and text messages`),u();let s=a;if(!s){let t={id:e,role:n,content:``,...r!==void 0&&{name:r},...i!=null&&{subagentRunId:i}};o.push(t),s=t}let c=Vg(s,t);(!a||c)&&l({messages:o})}return u()}case V.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),u();if(c.role===`activity`)return console.warn(`TEXT_MESSAGE_CONTENT: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),u();let d=await Fg(r,o,s,(r,i,a)=>r.onTextMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,textMessageBuffer:typeof c.content==`string`?c.content:``}));return l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,Vg(c,t),l({messages:o})),u()}case V.TEXT_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),u();if(a.role===`activity`)return console.warn(`TEXT_MESSAGE_END: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),u();let c=await Fg(r,o,s,(r,i,o)=>r.onTextMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,textMessageBuffer:typeof a.content==`string`?a.content:``}));return l(c),c.stopPropagation!==!0&&Vg(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case V.TOOL_CALL_START:{let i=await Fg(r,o,s,(r,i,a)=>r.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{toolCallId:e,toolCallName:n,parentMessageId:r,subagentRunId:i}=t,a=o.find(t=>t.toolCalls?.some(t=>t.id===e))?.toolCalls?.find(t=>t.id===e);if(a){let r=a.function.name!==n;return r&&(console.warn(`TOOL_CALL_START: tool call '${e}' already exists with name '${a.function.name}' — updating it to '${n}'`),a.function.name=n),(Vg(a,t)||r)&&l({messages:o}),u()}let s=new Set(o.map(e=>e.id)),c=Bg(o,r,e);!s.has(c.id)&&i!=null&&c.subagentRunId===void 0&&(c.subagentRunId=i),c.toolCalls??=[];let d={id:e,type:`function`,function:{name:n,arguments:``}};c.toolCalls.push(d),Vg(d,t),l({messages:o})}return u()}case V.TOOL_CALL_ARGS:{let{toolCallId:i,delta:a}=t,c=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!c)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),u();let d=c.toolCalls?.find(e=>e.id===i);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),u();let f=await Fg(r,o,s,(r,i,a)=>{let o=d.function.arguments,s=d.function.name,c={};try{c=kf(o)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallBuffer:o,toolCallName:s,partialToolCallArgs:c})});return l(f),f.stopPropagation!==!0&&(d.function.arguments+=a,Vg(d,t),l({messages:o})),u()}case V.TOOL_CALL_END:{let{toolCallId:i}=t,a=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),u();let c=a.toolCalls?.find(e=>e.id===i);if(!c)return console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),u();let d=await Fg(r,o,s,(r,i,a)=>{let o=c.function.arguments,s=c.function.name,l={};try{l=JSON.parse(o)}catch{}return r.onToolCallEndEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallName:s,toolCallArgs:l})});return l(d),d.stopPropagation!==!0&&Vg(c,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:c,messages:o,state:s,agent:n,input:e})})),u()}case V.TOOL_CALL_RESULT:{let i=await Fg(r,o,s,(r,i,a)=>r.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:i,toolCallId:a,content:c,role:u,subagentRunId:d}=t,f={id:i,toolCallId:a,role:u||`tool`,content:c,...d!=null&&{subagentRunId:d}};Vg(f,t);let p=o.findIndex(e=>e.role===`assistant`&&e.toolCalls?.some(e=>e.id===a));if(p===-1)o.push(f);else{let e=p+1;for(;e{t.onNewMessage?.({message:f,messages:o,state:s,agent:n,input:e})})),l({messages:o})}return u()}case V.STATE_SNAPSHOT:{let i=await Fg(r,o,s,(r,i,a)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{snapshot:e}=t;s=e,l({state:s})}return u()}case V.STATE_DELTA:{let i=await Fg(r,o,s,(r,i,a)=>r.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{delta:e}=t;try{s=Au.applyPatch(s,e,!0,!1).newDocument,l({state:s})}catch(t){let n=t instanceof Error?t.message:String(t);console.warn(`Failed to apply state patch:\nCurrent state: ${JSON.stringify(s,null,2)}\nPatch operations: ${JSON.stringify(e,null,2)}\nError: ${n}`)}}return u()}case V.MESSAGES_SNAPSHOT:{let i=await Fg(r,o,s,(r,i,a)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messages:e}=t,n=e.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}),r=new Map(n.map(e=>[e.id,e])),i=n.some(e=>e.role===`activity`),a=n.some(e=>e.role===`reasoning`),s=e=>e.role===`activity`&&!i||e.role===`reasoning`&&!a;o=o.filter(e=>s(e)||r.has(e.id)).map(e=>s(e)?e:r.get(e.id));let c=new Set(o.map(e=>e.id));for(let e of n)c.has(e.id)||o.push(e);l({messages:o})}return u()}case V.ACTIVITY_SNAPSHOT:{let i=t,a=o.findIndex(e=>e.id===i.messageId),c=a>=0?o[a]:void 0,d=c?.role===`activity`?c:void 0,f=i.replace??!0,p=await Fg(r,o,s,(t,r,a)=>t.onActivitySnapshotEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d,existingMessage:c}));if(l(p),p.stopPropagation!==!0){let t={id:i.messageId,role:`activity`,activityType:i.activityType,content:Ag(i.content),...i.subagentRunId!=null&&{subagentRunId:i.subagentRunId}},c,u;a===-1?(o.push(t),c=t,u=t):d?(f&&(o[a]={...d,activityType:i.activityType,content:Ag(i.content),subagentRunId:i.subagentRunId},i.subagentRunId??delete o[a].subagentRunId),u=o[a]):f&&(o[a]=t,c=t,u=t),Vg(u,i),l({messages:o}),c&&await Promise.all(r.map(t=>t.onNewMessage?.({message:c,messages:o,state:s,agent:n,input:e})))}return u()}case V.ACTIVITY_DELTA:{let i=t,a=o.findIndex(e=>e.id===i.messageId);if(a===-1)return u();let c=o[a];if(c.role!==`activity`)return console.warn(`ACTIVITY_DELTA: Message '${i.messageId}' is not an activity message`),u();let d=c,f=await Fg(r,o,s,(t,r,a)=>t.onActivityDeltaEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d}));if(l(f),f.stopPropagation!==!0)try{Vg(d,i)&&l({messages:o});let e=Ag(d.content??{}),t=Au.applyPatch(e,i.patch??[],!0,!1).newDocument;o[a]={...d,content:Ag(t),activityType:i.activityType},l({messages:o})}catch(e){let t=e instanceof Error?e.message:String(e);console.warn(`Failed to apply activity patch for '${i.messageId}': ${t}`)}return u()}case V.RAW:return l(await Fg(r,o,s,(r,i,a)=>r.onRawEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.CUSTOM:return l(await Fg(r,o,s,(r,i,a)=>r.onCustomEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.RUN_STARTED:{let i=await Fg(r,o,s,(r,i,a)=>r.onRunStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let e=t;if(e.input?.messages){for(let t of e.input.messages){let e=t;if(t.subagentRunId===null){let n={...t};delete n.subagentRunId,e=n}o.find(t=>t.id===e.id)||o.push(e)}l({messages:o})}}return u()}case V.RUN_FINISHED:{let i=t,a=i.outcome?.type===`interrupt`?{event:i,outcome:`interrupt`,interrupts:i.outcome.interrupts}:{event:i,outcome:`success`,result:i.result},c=await Fg(r,o,s,(t,r,i)=>t.onRunFinishedEvent?.({...a,messages:r,state:i,agent:n,input:e}));return l(c),c.stopPropagation!==!0&&(n.pendingInterrupts=a.outcome===`interrupt`?a.interrupts.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}):[]),u()}case V.RUN_ERROR:return l(await Fg(r,o,s,(r,i,a)=>r.onRunErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.STEP_STARTED:return l(await Fg(r,o,s,(r,i,a)=>r.onStepStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.STEP_FINISHED:return l(await Fg(r,o,s,(r,i,a)=>r.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.TEXT_MESSAGE_CHUNK:throw Error(`TEXT_MESSAGE_CHUNK must be transformed before being applied`);case V.TOOL_CALL_CHUNK:throw Error(`TOOL_CALL_CHUNK must be transformed before being applied`);case V.THINKING_START:return u();case V.THINKING_END:return u();case V.THINKING_TEXT_MESSAGE_START:return u();case V.THINKING_TEXT_MESSAGE_CONTENT:return u();case V.THINKING_TEXT_MESSAGE_END:return u();case V.REASONING_START:return l(await Fg(r,o,s,(r,i,a)=>r.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.REASONING_MESSAGE_START:{let i=await Fg(r,o,s,(r,i,a)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,subagentRunId:n}=t,r=o.find(t=>t.id===e),i=r;if(!i){let t={id:e,role:`reasoning`,content:``,...n!=null&&{subagentRunId:n}};o.push(t),i=t}let a=Vg(i,t);(!r||a)&&l({messages:o})}return u()}case V.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),u();let d=await Fg(r,o,s,(r,i,a)=>r.onReasoningMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,reasoningMessageBuffer:typeof c.content==`string`?c.content:``}));return l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,Vg(c,t),l({messages:o})),u()}case V.REASONING_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),u();let c=await Fg(r,o,s,(r,i,o)=>r.onReasoningMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,reasoningMessageBuffer:typeof a.content==`string`?a.content:``}));return l(c),c.stopPropagation!==!0&&Vg(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case V.REASONING_MESSAGE_CHUNK:throw Error(`REASONING_MESSAGE_CHUNK must be transformed before being applied`);case V.REASONING_END:return l(await Fg(r,o,s,(r,i,a)=>r.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:d}=t,f=await Fg(r,o,s,(r,i,a)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(f),f.stopPropagation!==!0){let e=!1;if(i===`tool-call`){for(let t of o)if(t.role===`assistant`&&t.toolCalls){let n=t.toolCalls.find(e=>e.id===a);if(n){n.encryptedValue=d,e=!0;break}}}else{let t=o.find(e=>e.id===a);t?.role!==`activity`&&t&&(t.encryptedValue=d,e=!0)}e&&(c.messages=o)}return u()}case V.SUBAGENT_STARTED:return l(await Fg(r,o,s,(r,i,a)=>r.onSubagentStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.SUBAGENT_FINISHED:return l(await Fg(r,o,s,(r,i,a)=>r.onSubagentFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.SUBAGENT_ERROR:return l(await Fg(r,o,s,(r,i,a)=>r.onSubagentErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u()}return t.type,u()}),vf(),r.length>0?Cf({}):e=>e)},Ug=e=>t=>{let n=Lg(e),r=new Set,i=new Set,a=new Set,o={message:new Map,toolCall:new Map,activity:new Map,reasoning:new Map},s=!1,c=!1,l=!1,u=new Map,d=e=>{let t=u.get(e);return t||(t=new Map,u.set(e,t)),t},f=()=>{for(let e of u.values())if(e.size>0)return!0;return!1},p=new Map,m=new Set,h=!1,g=!1,_=!1,v=()=>{r.clear(),i.clear(),a.clear(),o.message.clear(),o.toolCall.clear(),o.activity.clear(),o.reasoning.clear(),u.clear(),p.clear(),m.clear(),h=!1,g=!1,s=!1,c=!1,_=!0},y=(e,t)=>{let n=e??[];if(Array.isArray(n))for(let e of n){if(!e||typeof e.id!=`string`)continue;if(e.subagentRunId===null)return new B(`Cannot send a message (id '${e.id}') with 'subagentRunId: null'. The field is optional — omit it entirely.`);let n=e.role===`reasoning`?o.reasoning:e.role===`activity`?o.activity:o.message;(t||!n.has(e.id))&&n.set(e.id,{subagentRunId:e.subagentRunId});for(let n of e.toolCalls??[])n&&typeof n.id==`string`&&(t||!o.toolCall.has(n.id))&&o.toolCall.set(n.id,{subagentRunId:e.subagentRunId??void 0})}},b=(e,t,n,r,i)=>{if(t!==void 0&&n&&n.subagentRunId!==t)return new B(`Cannot send '${e}': subagentRunId '${t}' does not match the ${r} '${i}' opener's subagent '${n.subagentRunId??`(the parent agent)`}'.`)};return t.pipe(_f(e=>{let t=e.type;if(n?.event(`VERIFY`,`Event:`,e,{type:e.type}),c&&t!==V.RUN_STARTED)return H(()=>new B(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(s&&t!==V.RUN_ERROR&&t!==V.RUN_STARTED)return H(()=>new B(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(!l){if(l=!0,t!==V.RUN_STARTED&&t!==V.RUN_ERROR)return H(()=>new B(`First event must be 'RUN_STARTED'`))}else if(t===V.RUN_STARTED){if(_&&!s&&!c)return H(()=>new B(`Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run.`));(s||c)&&v()}if(e.subagentRunId===null)return H(()=>new B(`Cannot send '${t}' with 'subagentRunId: null'. The field is optional — omit it entirely.`));if(t===V.SUBAGENT_STARTED||t===V.SUBAGENT_FINISHED||t===V.SUBAGENT_ERROR){let n=t===V.SUBAGENT_STARTED?[`description`,`parentSubagentRunId`,`parentToolCallId`,`parentMessageId`]:t===V.SUBAGENT_FINISHED?[`outcome`]:[`code`];for(let r of n)if(e[r]===null)return H(()=>new B(`Cannot send '${t}' with '${r}: null'. The field is optional — omit it entirely.`));let r=e.outcome;if(r!=null&&r.type!==`success`&&r.type!==`suspended`)return H(()=>new B(`Cannot send '${t}' with outcome type '${String(r.type)}'. The outcome is either { type: "success" } or { type: "suspended" }.`));if(r&&r.interruptIds===null)return H(()=>new B(`Cannot send '${t}' with 'outcome.interruptIds: null'. The field is optional — omit it entirely.`));if(r&&Array.isArray(r.interruptIds)&&r.interruptIds.some(e=>typeof e!=`string`))return H(()=>new B(`Cannot send '${t}' with a non-string entry in 'outcome.interruptIds'. Interrupt ids are strings.`))}if(t===V.RUN_FINISHED){let t=e.outcome;if(t?.type===`interrupt`&&Array.isArray(t.interrupts)){for(let e of t.interrupts)if(e&&e.subagentRunId===null)return H(()=>new B(`Cannot send 'RUN_FINISHED' with an interrupt (id '${e.id}') carrying 'subagentRunId: null'. The field is optional — omit it entirely.`))}}switch(t){case V.TEXT_MESSAGE_START:{let n=e.messageId;if(r.has(n))return H(()=>new B(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${n}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`));let i=o.message.get(n);if(i){let r=b(t,e.subagentRunId,i,`message`,n);if(r)return H(()=>r)}return r.add(n),i||o.message.set(n,{subagentRunId:e.subagentRunId}),ff(e)}case V.TEXT_MESSAGE_CONTENT:{let n=e.messageId;if(!r.has(n))return H(()=>new B(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${n}'. Start a text message with 'TEXT_MESSAGE_START' first.`));let i=b(t,e.subagentRunId,o.message.get(n),`message`,n);return i?H(()=>i):ff(e)}case V.TEXT_MESSAGE_END:{let n=e.messageId;if(!r.has(n))return H(()=>new B(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${n}'. A 'TEXT_MESSAGE_START' event must be sent first.`));let i=b(t,e.subagentRunId,o.message.get(n),`message`,n);return i?H(()=>i):(r.delete(n),ff(e))}case V.TOOL_CALL_START:{let n=e.toolCallId;if(i.has(n))return H(()=>new B(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${n}' is already in progress. Complete it with 'TOOL_CALL_END' first.`));let r=e.parentMessageId,a=e.subagentRunId,s;if(r!==void 0){let e=o.message.get(r);if(e){if(a!==void 0&&a!==e.subagentRunId)return H(()=>new B(`Cannot send 'TOOL_CALL_START': subagentRunId '${a}' does not match its parent message '${r}' owner '${e.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`));s=e}}let c=o.toolCall.get(n);if(c){let e=b(t,a,c,`tool call`,n);if(e)return H(()=>e);if(a===void 0&&s&&s.subagentRunId!==c.subagentRunId)return H(()=>new B(`Cannot send 'TOOL_CALL_START': tool call '${n}' is owned by '${c.subagentRunId??`(the parent agent)`}' but its parent message '${r}' is owned by '${s.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`))}return i.add(n),c||o.toolCall.set(n,a===void 0?s??{subagentRunId:void 0}:{subagentRunId:a}),ff(e)}case V.TOOL_CALL_ARGS:{let n=e.toolCallId;if(!i.has(n))return H(()=>new B(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${n}'. Start a tool call with 'TOOL_CALL_START' first.`));let r=b(t,e.subagentRunId,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):ff(e)}case V.TOOL_CALL_END:{let n=e.toolCallId;if(!i.has(n))return H(()=>new B(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${n}'. A 'TOOL_CALL_START' event must be sent first.`));let r=b(t,e.subagentRunId,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):(i.delete(n),ff(e))}case V.STEP_STARTED:{let t=e.stepName,n=e.subagentRunId;return d(n).has(t)?H(()=>new B(`Step "${t}" is already active for 'STEP_STARTED'${n===void 0?``:` in subagent '${n}'`}`)):(d(n).set(t,!0),ff(e))}case V.STEP_FINISHED:{let t=e.stepName,n=e.subagentRunId;if(!d(n).has(t)){let e,r=!1;for(let[i,a]of u)if(i!==n&&a.has(t)){e=i,r=!0;break}return H(r?()=>new B(`Cannot send 'STEP_FINISHED' for step "${t}" attributed to ${n===void 0?`the parent agent`:`subagent '${n}'`}: that step is open under ${e===void 0?`the parent agent`:`subagent '${e}'`}. A step must be finished by whoever started it.`):()=>new B(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}return d(n).delete(t),ff(e)}case V.ACTIVITY_SNAPSHOT:{let t=e.messageId;return(!o.activity.has(t)||e.replace!==!1)&&o.activity.set(t,{subagentRunId:e.subagentRunId}),ff(e)}case V.TOOL_CALL_RESULT:{let t=e.messageId;return typeof t==`string`&&o.message.set(t,{subagentRunId:e.subagentRunId}),ff(e)}case V.REASONING_START:case V.REASONING_MESSAGE_START:{let n=e.messageId,r=o.reasoning.get(n);if(r){let i=b(t,e.subagentRunId,r,`reasoning message`,n);if(i)return H(()=>i)}return a.add(n),r||o.reasoning.set(n,{subagentRunId:e.subagentRunId}),ff(e)}case V.REASONING_MESSAGE_CONTENT:case V.REASONING_MESSAGE_END:case V.REASONING_END:{let n=e.messageId,r=b(t,e.subagentRunId,o.reasoning.get(n),`reasoning message`,n);return r?H(()=>r):(t===V.REASONING_END&&a.delete(n),ff(e))}case V.REASONING_ENCRYPTED_VALUE:{let n=e.entityId,r=e.subtype,i=r===`tool-call`?o.toolCall.get(n):r===`message`?o.message.get(n)??o.reasoning.get(n):o.reasoning.get(n),a=r===`tool-call`?`tool call`:r===`message`?`message`:`reasoning message`,s=b(t,e.subagentRunId,i,a,n);return s?H(()=>s):ff(e)}case V.ACTIVITY_DELTA:{let n=e.messageId,r=b(t,e.subagentRunId,o.activity.get(n),`activity`,n);return r?H(()=>r):ff(e)}case V.SUBAGENT_STARTED:{if(typeof e.subagentRunId!=`string`)return H(()=>new B(`Cannot send 'SUBAGENT_STARTED' without a 'subagentRunId'.`));if(typeof e.name!=`string`)return H(()=>new B(`Cannot send 'SUBAGENT_STARTED' without a 'name'.`));let t=e.subagentRunId,n=e.parentSubagentRunId;return p.has(t)?H(()=>new B(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' is already active. Finish it with 'SUBAGENT_FINISHED' first.`)):m.has(t)?H(()=>new B(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' has already finished in this run. Subagent IDs are per-invocation and cannot be reused.`)):n!==void 0&&!p.has(n)&&!m.has(n)?H(()=>new B(`Cannot send 'SUBAGENT_STARTED': parentSubagentRunId '${n}' has not been started in this run.`)):(p.set(t,!0),ff(e))}case V.SUBAGENT_FINISHED:case V.SUBAGENT_ERROR:{if(typeof e.subagentRunId!=`string`)return H(()=>new B(`Cannot send '${t}' without a 'subagentRunId'.`));if(t===V.SUBAGENT_ERROR&&typeof e.message!=`string`)return H(()=>new B(`Cannot send 'SUBAGENT_ERROR' without a 'message'.`));let n=e.subagentRunId;return p.has(n)?(p.delete(n),m.add(n),ff(e)):H(()=>new B(`Cannot send '${t}': no active subagent found with ID '${n}'. A 'SUBAGENT_STARTED' event must be sent first.`))}case V.MESSAGES_SNAPSHOT:{let t=y(e.messages,!0);if(t)return H(()=>t)}return ff(e);case V.RUN_STARTED:_=!0;{let t=y((e.input??{}).messages,!1);if(t)return H(()=>t)}return ff(e);case V.RUN_FINISHED:if(f()){let e=[];for(let[t,n]of u)for(let r of n.keys())e.push(t===void 0?r:`${r} (subagent '${t}')`);let t=e.join(`, `);return H(()=>new B(`Cannot send 'RUN_FINISHED' while steps are still active: ${t}`))}if(r.size>0){let e=Array.from(r.keys()).join(`, `);return H(()=>new B(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(`, `);return H(()=>new B(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}if(p.size>0){let e=Array.from(p.keys()).join(`, `);return H(()=>new B(`Cannot send 'RUN_FINISHED' while subagents are still active: ${e}`))}return s=!0,ff(e);case V.RUN_ERROR:return c=!0,ff(e);case V.CUSTOM:return ff(e);case V.THINKING_TEXT_MESSAGE_START:return h?g?H(()=>new B(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.`)):(g=!0,ff(e)):H(()=>new B(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first.`));case V.THINKING_TEXT_MESSAGE_CONTENT:return g?ff(e):H(()=>new B(`Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first.`));case V.THINKING_TEXT_MESSAGE_END:return g?(g=!1,ff(e)):H(()=>new B(`Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first.`));case V.THINKING_START:return h?H(()=>new B(`Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.`)):(h=!0,ff(e));case V.THINKING_END:return h?(h=!1,ff(e)):H(()=>new B(`Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first.`));default:return ff(e)}}))},Wg=function(e){return e.HEADERS=`headers`,e.DATA=`data`,e}({}),Gg=e=>yf(()=>df(e())).pipe(Tf(e=>{if(!e.ok){let t=e.headers.get(`content-type`)||``;return df(e.text()).pipe(_f(n=>{let r=n;if(t.includes(`application/json`))try{r=JSON.parse(n)}catch{}let i=Error(`HTTP ${e.status}: ${typeof r==`string`?r:JSON.stringify(r)}`);return i.status=e.status,i.payload=r,H(()=>i)}))}let t={type:Wg.HEADERS,status:e.status,headers:e.headers},n=e.body?.getReader();return n?new yd(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:r}=await n.read();if(t)break;let i={type:Wg.DATA,data:r};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{n.cancel().catch(e=>{if(e?.name!==`AbortError`)throw e})})):H(()=>Error(`Failed to getReader() from response`))})),Kg=(e,t)=>{let n=Lg(t),r=new Od,i=new TextDecoder(`utf-8`,{fatal:!1}),a=``;e.subscribe({next:e=>{if(e.type!==Wg.HEADERS&&e.type===Wg.DATA&&e.data){let t=i.decode(e.data,{stream:!0});a+=t;let n=a.split(/\n\n/);a=n.pop()||``;for(let e of n)o(e)}},error:e=>r.error(e),complete:()=>{a&&(a+=i.decode(),o(a)),r.complete()}});function o(e){let t=e.split(` `),i=[];for(let e of t)e.startsWith(`data:`)&&i.push(e.slice(5).replace(/^ /,``));if(i.length>0)try{let e=i.join(` `),t=JSON.parse(e);n?.event(`SSE`,`Event received:`,t,{type:t.type}),r.next(t)}catch(e){r.error(e)}}return r.asObservable()},qg=e=>{let t=new Od,n=new Uint8Array;e.subscribe({next:e=>{if(e.type!==Wg.HEADERS&&e.type===Wg.DATA&&e.data){let t=new Uint8Array(n.length+e.data.length);t.set(n,0),t.set(e.data,n.length),n=t,r()}},error:e=>t.error(e),complete:()=>{if(n.length>0)try{r()}catch{console.warn(`Incomplete or invalid protocol buffer data at stream end`)}t.complete()}});function r(){for(;n.length>=4;){let e=4+new DataView(n.buffer,n.byteOffset,4).getUint32(0,!1);if(n.length{let n=Lg(t),r=new Od,i=new jd,a=!1;return e.subscribe({next:e=>{if(i.next(e),e.type===Wg.HEADERS&&!a){a=!0;let t=e.headers.get(`content-type`);n?.lifecycle(`HTTP`,`Stream format detected:`,{contentType:t,parser:t===`application/vnd.ag-ui.event+proto`?`protobuf`:`sse`}),t===`application/vnd.ag-ui.event+proto`?qg(i).subscribe({next:e=>r.next(e),error:e=>r.error(e),complete:()=>r.complete()}):Kg(i,n).subscribe({next:e=>{try{let t=Jl.parse(e);n?.event(`HTTP`,`Event validated:`,t,{type:t.type,valid:!0}),r.next(t)}catch(t){n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),r.error(t)}},error:e=>{if(e?.name===`AbortError`){r.next({type:V.RUN_ERROR,message:e.message||`Request aborted`,code:`abort`,rawEvent:e}),r.complete();return}return r.error(e)},complete:()=>r.complete()})}else a||r.error(Error(`No headers event received before data events`))},error:e=>{i.error(e),r.error(e)},complete:()=>{i.complete()}}),r.asObservable()},Yg=xg([`TextMessageStart`,`TextMessageContent`,`TextMessageEnd`,`ActionExecutionStart`,`ActionExecutionArgs`,`ActionExecutionEnd`,`ActionExecutionResult`,`AgentStateMessage`,`MetaEvent`,`RunStarted`,`RunFinished`,`RunError`,`NodeStarted`,`NodeFinished`]),Xg=xg([`LangGraphInterruptEvent`,`PredictState`,`Exit`]);yg(`type`,[vg({type:bg(Yg.enum.TextMessageStart),messageId:hg(),parentMessageId:hg().optional(),role:hg().optional()}),vg({type:bg(Yg.enum.TextMessageContent),messageId:hg(),content:hg()}),vg({type:bg(Yg.enum.TextMessageEnd),messageId:hg()}),vg({type:bg(Yg.enum.ActionExecutionStart),actionExecutionId:hg(),actionName:hg(),parentMessageId:hg().optional()}),vg({type:bg(Yg.enum.ActionExecutionArgs),actionExecutionId:hg(),args:hg()}),vg({type:bg(Yg.enum.ActionExecutionEnd),actionExecutionId:hg()}),vg({type:bg(Yg.enum.ActionExecutionResult),actionName:hg(),actionExecutionId:hg(),result:hg()}),vg({type:bg(Yg.enum.AgentStateMessage),threadId:hg(),agentName:hg(),nodeName:hg(),runId:hg(),active:gg(),role:hg(),state:hg(),running:gg()}),vg({type:bg(Yg.enum.MetaEvent),name:Xg,value:_g()}),vg({type:bg(Yg.enum.RunError),message:hg(),code:hg().optional()})]),vg({id:hg(),role:hg(),content:hg(),parentMessageId:hg().optional()}),vg({id:hg(),name:hg(),arguments:_g(),parentMessageId:hg().optional()}),vg({id:hg(),result:_g(),actionExecutionId:hg(),actionName:hg()});var Zg=e=>{if(typeof e==`string`)return e;if(!Array.isArray(e))return;let t=e.filter(e=>e.type===`text`).map(e=>e.text).filter(e=>e.length>0);if(t.length!==0)return t.join(` -`)},Qg=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(_f(r=>{switch(r.type){case V.TEXT_MESSAGE_START:{let e=r;return[{type:Yg.enum.TextMessageStart,messageId:e.messageId,role:e.role}]}case V.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:Yg.enum.TextMessageContent,messageId:e.messageId,content:e.delta}]}case V.TEXT_MESSAGE_END:{let e=r;return[{type:Yg.enum.TextMessageEnd,messageId:e.messageId}]}case V.TOOL_CALL_START:{let e=r;return u.push({id:e.toolCallId,type:`function`,function:{name:e.toolCallName,arguments:``}}),o=!0,d[e.toolCallId]=e.toolCallName,[{type:Yg.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case V.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let p=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(kf(d.function.arguments));e.tool_argument&&e.tool_argument in t?(f({...i,[e.state_key]:t[e.tool_argument]}),p=!0):e.tool_argument||(f({...i,[e.state_key]:t}),p=!0)}catch{}}return[{type:Yg.enum.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...p?[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case V.TOOL_CALL_END:{let e=r;return[{type:Yg.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case V.TOOL_CALL_RESULT:{let e=r;return[{type:Yg.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:d[e.toolCallId]||`unknown`}]}case V.RAW:return[];case V.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:Yg.enum.MetaEvent,name:e.name,value:e.value}]}case V.STATE_SNAPSHOT:return f(r.snapshot),[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case V.STATE_DELTA:{let c=r,l=Au.applyPatch(i,c.delta,!0,!1);return l?(f(l.newDocument),[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]):[]}case V.MESSAGES_SNAPSHOT:return c=r.messages,[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case V.RUN_STARTED:return[];case V.RUN_FINISHED:return c&&(i.messages=c),Object.keys(i).length===0?[]:[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:$g(c)}:{}}),active:!1}];case V.RUN_ERROR:{let e=r;return[{type:Yg.enum.RunError,message:e.message,code:e.code}]}case V.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case V.STEP_FINISHED:return u=[],l=null,[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function $g(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=Zg(n.content);if(e){let r={id:n.id,role:n.role,content:e};t.push(r)}if(n.role===`assistant`&&n.toolCalls&&n.toolCalls.length>0)for(let e of n.toolCalls){let r={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:n.id};t.push(r)}}else if(n.role===`tool`){let r=`unknown`;for(let t of e)if(t.role===`assistant`&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===n.toolCallId){r=e.function.name;break}}let i={id:n.id,result:n.content,actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var e_=e=>e.kind===`tool`?e.fields.toolCallId:e.fields.messageId,t_=e=>e===`tool`?`toolCallId`:`messageId`,n_=(e,t)=>t.metadata===void 0?e:{...e,metadata:t.metadata},r_=e=>t=>{let n=Lg(e),r=new Map,i=e=>{let t=r.get(e);if(!t)return[];switch(r.delete(e),t.kind){case`text`:{let e={type:V.TEXT_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),[e]}case`tool`:{let e={type:V.TOOL_CALL_END,toolCallId:t.fields.toolCallId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),[e]}case`reasoning`:{let e={type:V.REASONING_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`REASONING_MESSAGE_END`,e,{messageId:e.messageId}),[e]}}},a=()=>[...r.keys()].flatMap(e=>i(e)),o=(e,t)=>{for(let[n,i]of r)if(i.kind===e&&e_(i)===t)return{owner:n}},s=(e,t,n,i,a)=>{if(t!==void 0){let r=o(e,t);if(r){if(n!==void 0&&n!==r.owner)throw Error(`Cannot continue ${a} '${t}': chunk subagentRunId '${n}' does not match the open stream's subagent '${r.owner??`(the parent agent)`}'.`);return r.owner}return n}if(n!==void 0)return n;if(r.get(void 0)?.kind===e)return;let s=[...r.entries()].filter(([,t])=>t.kind===e);if(s.length===1)return s[0][0];if(s.length>1)throw Error(`Ambiguous ${i}: it carries neither a ${t_(e)} nor a subagentRunId, but ${s.length} lanes have an open ${a}. Attribute the chunk to the subagent it belongs to.`)};return t.pipe(_f(e=>{switch(e.type){case V.TEXT_MESSAGE_START:case V.TEXT_MESSAGE_CONTENT:case V.TEXT_MESSAGE_END:case V.TOOL_CALL_START:case V.TOOL_CALL_ARGS:case V.TOOL_CALL_END:case V.TOOL_CALL_RESULT:case V.STATE_SNAPSHOT:case V.STATE_DELTA:case V.CUSTOM:case V.STEP_STARTED:case V.STEP_FINISHED:case V.THINKING_START:case V.THINKING_END:case V.THINKING_TEXT_MESSAGE_START:case V.THINKING_TEXT_MESSAGE_CONTENT:case V.THINKING_TEXT_MESSAGE_END:case V.REASONING_START:case V.REASONING_MESSAGE_START:case V.REASONING_MESSAGE_CONTENT:case V.REASONING_MESSAGE_END:case V.REASONING_END:return[...i(e.subagentRunId??void 0),e];case V.RUN_STARTED:case V.RUN_FINISHED:case V.RUN_ERROR:case V.MESSAGES_SNAPSHOT:return[...a(),e];case V.RAW:case V.ACTIVITY_SNAPSHOT:case V.ACTIVITY_DELTA:case V.REASONING_ENCRYPTED_VALUE:case V.SUBAGENT_STARTED:return[e];case V.SUBAGENT_FINISHED:case V.SUBAGENT_ERROR:{let t=e.subagentRunId;return t==null?[e]:[...i(t),e]}case V.TEXT_MESSAGE_CHUNK:{let t=e,a=s(`text`,t.messageId,t.subagentRunId??void 0,`TEXT_MESSAGE_CHUNK`,`text message`),o=r.get(a),c=[],l;if(o?.kind===`text`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,name:t.name,subagentRunId:t.subagentRunId},r.set(a,{kind:`text`,fields:l});let e=n_({type:V.TEXT_MESSAGE_START,messageId:t.messageId,role:t.role||`assistant`,...t.name!==void 0&&{name:t.name},...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=n_({type:V.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:V.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case V.TOOL_CALL_CHUNK:{let t=e,a=s(`tool`,t.toolCallId,t.subagentRunId??void 0,`TOOL_CALL_CHUNK`,`tool call`),o=r.get(a),c=[],l;if(o?.kind===`tool`&&(t.toolCallId===void 0||t.toolCallId===o.fields.toolCallId))l=o.fields;else{if(c.push(...i(a)),t.toolCallId===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallId`);if(t.toolCallName===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallName`);l={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`tool`,fields:l});let e=n_({type:V.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=n_({type:V.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,r,{toolCallId:l.toolCallId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:V.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case V.REASONING_MESSAGE_CHUNK:{let t=e,a=s(`reasoning`,t.messageId,t.subagentRunId??void 0,`REASONING_MESSAGE_CHUNK`,`reasoning message`),o=r.get(a),c=[],l;if(o?.kind===`reasoning`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`reasoning`,fields:l});let e=n_({type:V.REASONING_MESSAGE_START,messageId:t.messageId,role:`reasoning`,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=n_({type:V.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:V.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}}return e.type,[]}),wf(()=>{a()}))};function i_(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}var a_=class{runNext(e,t){return t.run(e).pipe(r_(!1))}runNextWithState(e,t){let n=Ag(e.messages||[]),r=Ag(e.state||{}),i=new jd;return Hg(e,i,t,[]).subscribe(e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)}),this.runNext(e,t).pipe(Sf(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:Ag(n),state:Ag(r)})))}},o_=class extends a_{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function s_(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(``);return{...e,content:n}}return typeof t==`string`?e:{...e,content:``}}var c_=class extends a_{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(s_)};return this.runNext(i,t)}},l_=`THINKING_START`,u_=`THINKING_END`,d_=`THINKING_TEXT_MESSAGE_START`,f_=`THINKING_TEXT_MESSAGE_CONTENT`,p_=`THINKING_TEXT_MESSAGE_END`,m_=class extends a_{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(hf(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case l_:{this.currentReasoningId=jg();let{title:t,...n}=e;return this.warnAboutTransformation(l_,V.REASONING_START),{...n,type:V.REASONING_START,messageId:this.currentReasoningId}}case d_:return this.currentMessageId=jg(),this.warnAboutTransformation(d_,V.REASONING_MESSAGE_START),{...e,type:V.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`assistant`};case f_:{let{delta:t,...n}=e;return this.warnAboutTransformation(f_,V.REASONING_MESSAGE_CONTENT),{...n,type:V.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??jg(),delta:t}}case p_:{let t=this.currentMessageId??jg();return this.warnAboutTransformation(p_,V.REASONING_MESSAGE_END),{...e,type:V.REASONING_MESSAGE_END,messageId:t}}case u_:{let t=this.currentReasoningId??jg();return this.warnAboutTransformation(u_,V.REASONING_END),{...e,type:V.REASONING_END,messageId:t}}default:return e}}};function h_(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function g_(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function __(e){let t=h_(e.mimeType);return e.data?{type:t,source:{type:`data`,value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:t,source:{type:`url`,value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e}function v_(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.map(e=>g_(e)?__(e):e);return{...e,content:n}}var y_=class extends a_{run(e,t){let n={...e,messages:e.messages.map(v_)};return this.runNext(n,t)}},b_=`SUBAGENT_STARTED`,x_=`SUBAGENT_FINISHED`,S_=`SUBAGENT_ERROR`;function C_(e){if(e&&typeof e==`object`&&`subagentRunId`in e){let{subagentRunId:t,...n}=e;return n}return e}function w_(e){return e.map(e=>C_(e))}var T_=class extends a_{warnDroppedLifecycleEvent(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is dropping ${e} because the target agent predates subagent support. To remove this warning, upgrade your AG-UI integration package. To suppress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){let n={...e,messages:(e.messages??[]).map(e=>C_(e))};return this.runNext(n,t).pipe(Df(e=>{let t=e.type;(t===b_||t===x_||t===S_)&&this.warnDroppedLifecycleEvent(t)}),bf(e=>{let t=e.type;return t!==b_&&t!==x_&&t!==S_}),hf(e=>{let t=C_(e);if(t.type===V.MESSAGES_SNAPSHOT){let e=t;if(Array.isArray(e.messages))return{...e,messages:w_(e.messages)}}if(t.type===V.RUN_FINISHED){let e=t;if(e.outcome&&Array.isArray(e.outcome.interrupts))return{...e,outcome:{...e.outcome,interrupts:e.outcome.interrupts.map(e=>C_(e))}}}if(t.type===V.RUN_STARTED){let e=t;if(e.input&&Array.isArray(e.input.messages))return{...e,input:{...e.input,messages:w_(e.input.messages)}}}return t}))}},E_=`0.0.59`,D_=class{get maxVersion(){return E_}get debug(){return this._debug}set debug(e){this._debug=Ig(e),this._debugLogger=zg(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?zg(Ig(!0)):void 0:e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.agentId=e,this.description=t??``,this.threadId=n??Vo(),this.messages=Ag(r??[]),this.state=Ag(i??{}),this._debug=Ig(a),this._debugLogger=zg(this._debug),kg(this.maxVersion,`0.0.39`)<=0&&this.middlewares.unshift(new c_),kg(this.maxVersion,`0.0.45`)<=0&&this.middlewares.unshift(new m_),kg(this.maxVersion,`0.0.47`)<=0&&this.middlewares.unshift(new y_),kg(this.maxVersion,`0.0.57`)<=0&&this.middlewares.unshift(new T_)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>typeof e==`function`?new o_(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Vo();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle(`LIFECYCLE`,`Run started:`,{agentId:this.agentId,threadId:this.threadId});let r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new Od;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await mf(_d(()=>this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),r_(this.debugLogger),Ug(this.debugLogger),e=>e.pipe(Ef(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),xf(e=>(this.debugLogger?.lifecycle(`LIFECYCLE`,`Run errored:`,{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,a))),wf(()=>{this.debugLogger?.lifecycle(`LIFECYCLE`,`Run finished:`,{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(ff(null)));let s=Ag(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new Jc}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Vo();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new Od;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await mf(_d(()=>yf(()=>this.connect(n)),r_(this.debugLogger),Ug(this.debugLogger),e=>e.pipe(Ef(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),xf(e=>(this.isRunning=!1,e instanceof Jc?Md:this.onError(n,e,a))),wf(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(ff(null)),{defaultValue:void 0});let s=Ag(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}apply(e,t,n){return Hg(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe(Df(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=Ag(this.messages);for(let e of t)e.subagentRunId===null&&delete e.subagentRunId;let n=t.filter(e=>e.role!==`activity`);return{threadId:this.threadId,runId:e?.runId||Vo(),tools:Ag(e?.tools??[]),context:Ag(e?.context??[]),forwardedProps:Ag(e?.forwardedProps??{}),state:Ag(this.state),messages:n,...e?.resume===void 0?{}:{resume:Ag(e.resume)}}}async onInitialize(e,t){if(this.pendingInterrupts.length>0){let t=new Set((e.resume??[]).map(e=>e.interruptId)),n=this.pendingInterrupts.map(e=>e.id).filter(e=>!t.has(e));if(n.length>0)throw new B(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let e of this.pendingInterrupts)if(i_(e))throw new B(`Interrupt ${e.id} expired at ${e.expiresAt}`)}let n=await Fg(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));if(n.messages!==void 0||n.state!==void 0){if(n.messages){this.messages=n.messages;for(let e of n.messages)e.subagentRunId===null&&delete e.subagentRunId;e.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})}n.state&&(this.state=n.state,e.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}}onError(e,t,n){return df(Fg(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(hf(r=>{let i=r;if((i.messages!==void 0||i.state!==void 0)&&(i.messages!==void 0&&(this.messages=i.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),i.state!==void 0&&(this.state=i.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),i.stopPropagation!==!0){let e=String(t);if(t.name!==`AbortError`&&t.message!==`Fetch is aborted`&&t.message!==`signal is aborted without reason`&&t.message!==`component unmounted`&&e!==`component unmounted`)throw console.error(`Agent execution failed:`,t),t}return{}}))}async onFinalize(e,t){let n=await Fg(t,this.messages,this.state,(t,n,r)=>t.onRunFinalized?.({messages:n,state:r,agent:this,input:e}));(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=Ag(this.messages),e.state=Ag(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=Ag(this.pendingInterrupts),e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if(e.role===`assistant`&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if(t.role===`assistant`&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=Ag(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=Ag(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){this.agentId=this.agentId??Vo();let t=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(t):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t)).pipe(r_(this.debugLogger),Ug(this.debugLogger),Qg(this.threadId,t.runId,this.agentId),e=>e.pipe(hf(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}};function O_(e){if(!Array.isArray(e.messages))return e;let t=!1,n=e.messages.map(e=>{if(e.subagentRunId===null){t=!0;let n={...e};return delete n.subagentRunId,n}return e});return t?{...e,messages:n}:e}var k_=class extends D_{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(O_(e)),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=Ag(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return Jg(Gg(()=>this.fetch(this.url,this.requestInit(e))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=Ag(this.headers??{}),e.fetch=this.fetch;let t=new AbortController,n=this.abortController.signal;return n.aborted&&t.abort(n.reason),e.abortController=t,e}},A_=class extends Ht{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Bt(t,n.data),hasPreviousPage:et(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},j_=class extends qe{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Re({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=M_(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=M_(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=M_(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=M_(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){at.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Pe(t,e))}findAll(e={}){return this.getAll().filter(t=>Pe(e,t))}notify(e){at.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return at.batch(()=>Promise.all(e.map(e=>e.continue().catch(Ge))))}};function M_(e){return e.options.scope?.id}var N_=class extends qe{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??gn(r,t),a=this.get(i);return a||(a=new Me({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){at.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>gt(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>gt(e,t)):t}notify(e){at.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){at.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){at.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},P_=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new N_,this.#t=e.mutationCache||new j_,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=He.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=nt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(vt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Qe(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return at.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;at.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return at.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=at.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Ge).catch(Ge)}invalidateQueries(e,t={}){return at.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=at.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Ge)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Ge)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(vt(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(vt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ge).catch(Ge)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ge).catch(Ge)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return nt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(ct(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{mt(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(ct(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{mt(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=gn(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Qt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function F_(e,t){return Be(e,A_,t)}var I_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M208,104v8a48,48,0,0,1-48,48H136a32,32,0,0,1,32,32v40H104V192a32,32,0,0,1,32-32H112a48,48,0,0,1-48-48v-8a49.28,49.28,0,0,1,8.51-27.3A51.92,51.92,0,0,1,76,32a52,52,0,0,1,43.83,24h32.34A52,52,0,0,1,196,32a51.92,51.92,0,0,1,3.49,44.7A49.28,49.28,0,0,1,208,104Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M208.3,75.68A59.74,59.74,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58,58,0,0,0,208.3,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.76,41.76,0,0,1,200,104Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M206.13,75.92A57.79,57.79,0,0,0,201.2,29a6,6,0,0,0-5.2-3,57.77,57.77,0,0,0-47,24H123A57.77,57.77,0,0,0,76,26a6,6,0,0,0-5.2,3,57.79,57.79,0,0,0-4.93,46.92A55.88,55.88,0,0,0,58,104v8a54.06,54.06,0,0,0,50.45,53.87A37.85,37.85,0,0,0,98,192v10H72a26,26,0,0,1-26-26A38,38,0,0,0,8,138a6,6,0,0,0,0,12,26,26,0,0,1,26,26,38,38,0,0,0,38,38H98v18a6,6,0,0,0,12,0V192a26,26,0,0,1,52,0v40a6,6,0,0,0,12,0V192a37.85,37.85,0,0,0-10.45-26.13A54.06,54.06,0,0,0,214,112v-8A55.88,55.88,0,0,0,206.13,75.92ZM202,112a42,42,0,0,1-42,42H112a42,42,0,0,1-42-42v-8a43.86,43.86,0,0,1,7.3-23.69,6,6,0,0,0,.81-5.76,45.85,45.85,0,0,1,1.43-36.42,45.85,45.85,0,0,1,35.23,21.1A6,6,0,0,0,119.83,62h32.34a6,6,0,0,0,5.06-2.76,45.83,45.83,0,0,1,35.23-21.11,45.85,45.85,0,0,1,1.43,36.42,6,6,0,0,0,.79,5.74A43.78,43.78,0,0,1,202,104Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M208.31,75.68A59.78,59.78,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58.14,58.14,0,0,0,208.31,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.72,41.72,0,0,1,200,104Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M203.94,76.16A55.73,55.73,0,0,0,199.46,30,4,4,0,0,0,196,28a55.78,55.78,0,0,0-46,24H122A55.78,55.78,0,0,0,76,28a4,4,0,0,0-3.46,2,55.73,55.73,0,0,0-4.48,46.16A53.78,53.78,0,0,0,60,104v8a52.06,52.06,0,0,0,52,52h1.41A36,36,0,0,0,100,192v12H72a28,28,0,0,1-28-28A36,36,0,0,0,8,140a4,4,0,0,0,0,8,28,28,0,0,1,28,28,36,36,0,0,0,36,36h28v20a4,4,0,0,0,8,0V192a28,28,0,0,1,56,0v40a4,4,0,0,0,8,0V192a36,36,0,0,0-13.41-28H160a52.06,52.06,0,0,0,52-52v-8A53.78,53.78,0,0,0,203.94,76.16ZM204,112a44.05,44.05,0,0,1-44,44H112a44.05,44.05,0,0,1-44-44v-8a45.76,45.76,0,0,1,7.71-24.89,4,4,0,0,0,.53-3.84,47.82,47.82,0,0,1,2.1-39.21,47.8,47.8,0,0,1,38.12,22.1A4,4,0,0,0,119.83,60h32.34a4,4,0,0,0,3.37-1.84,47.8,47.8,0,0,1,38.12-22.1,47.82,47.82,0,0,1,2.1,39.21,4,4,0,0,0,.53,3.83A45.85,45.85,0,0,1,204,104Z`}))]]),L_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm84,108a83.64,83.64,0,0,1-4.47,27L167,130a19.65,19.65,0,0,0-7.8-2.78l-22.82-3.08A20.14,20.14,0,0,0,117.72,132h-4.07l-2.71-5.6a19.88,19.88,0,0,0-13.8-10.84L94.46,115l4-7h14.39a20,20,0,0,0,9.66-2.49l12.25-6.76a20.57,20.57,0,0,0,3.74-2.68l26.92-24.33A20,20,0,0,0,172,56.49,84,84,0,0,1,212,128ZM140.76,45l6.2,11.1L122.75,78l-10.93,6H96.14A20.05,20.05,0,0,0,78.78,94.06l-4.49,7.85L67.68,84.28l9.91-23.42A83.91,83.91,0,0,1,140.76,45ZM44,128a83.52,83.52,0,0,1,4.4-26.77l7.74,20.65a19.89,19.89,0,0,0,14.52,12.53l19.53,4.2,3,6.1a20.11,20.11,0,0,0,13.55,10.77l-5,11.12a20,20,0,0,0,3.58,21.71l.21.22,18.16,18.7-.89,4.59A84.09,84.09,0,0,1,44,128Zm103.65,81.66a20.11,20.11,0,0,0-5-17.3l-.21-.22-17.72-18.25,11.37-25.52,19,2.56,41.43,25.48A84.2,84.2,0,0,1,147.65,209.66Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M213.09,172.48a96,96,0,0,1-80.41,51.41l3.17-16.44a8,8,0,0,0-2-6.95l-19.74-20.33a8,8,0,0,1-1.44-8.69l13.7-30.74a8,8,0,0,1,8.38-4.67l22.82,3.08a8.11,8.11,0,0,1,3.12,1.11ZM116.71,95,129,88.24a7.46,7.46,0,0,0,1.5-1.07l26.91-24.33A8,8,0,0,0,159,53l-10.5-18.81A96.62,96.62,0,0,0,128,32,95.61,95.61,0,0,0,67.78,53.23L56,81.08A8,8,0,0,0,55.88,87l11.5,30.67a8,8,0,0,0,5.81,5l2.69.58L89.2,100a8,8,0,0,1,6.94-4h16.71A7.9,7.9,0,0,0,116.71,95Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM143.31,41.34,152,56.9,125.09,81.24,112.85,88H96.14a16,16,0,0,0-13.88,8l-8.73,15.23L63.38,84.19,74.32,58.32a87.87,87.87,0,0,1,69-17ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Zm102.58,86.78,1.13-5.81a16.09,16.09,0,0,0-4-13.9,1.85,1.85,0,0,1-.14-.14L120,174.74,133.7,144l22.82,3.08,45.72,28.12A88.18,88.18,0,0,1,142.58,214.78Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm90,102a89.55,89.55,0,0,1-7.46,35.86l-46.69-28.71a13.94,13.94,0,0,0-5.46-2l-22.82-3.07A14.06,14.06,0,0,0,121.06,138h-9.92a2,2,0,0,1-1.8-1.13l-3.8-7.86a13.94,13.94,0,0,0-9.66-7.59l-10.71-2.3L94.4,103a2,2,0,0,1,1.74-1h16.71a13.9,13.9,0,0,0,6.76-1.75l12.25-6.75a14.73,14.73,0,0,0,2.62-1.88l26.91-24.33a13.93,13.93,0,0,0,2.83-17.21L161,44.25A90.16,90.16,0,0,1,218,128ZM144.6,39.54l9.15,16.39a2,2,0,0,1-.41,2.46L126.43,82.72a1.84,1.84,0,0,1-.37.27l-12.25,6.76a2,2,0,0,1-1,.25H96.14A14,14,0,0,0,84,97L73.18,115.91a2,2,0,0,1-.19-.35L61.5,84.89a2,2,0,0,1,0-1.48L72.68,57.06A89.9,89.9,0,0,1,144.6,39.54ZM38,128A89.52,89.52,0,0,1,49.38,84.23a13.85,13.85,0,0,0,.89,4.87l11.49,30.67a13.94,13.94,0,0,0,10.16,8.78l21.44,4.6a2,2,0,0,1,1.38,1.09l3.8,7.86a14.07,14.07,0,0,0,12.6,7.9h4.56l-8.49,19a14,14,0,0,0,2.51,15.2l.1.11,19.68,20.26a2,2,0,0,1,.46,1.7L127.7,218A90.1,90.1,0,0,1,38,128Zm102.08,89.19,1.67-8.6a14.07,14.07,0,0,0-3.47-12.16l-.1-.11L118.5,176.06a2,2,0,0,1-.33-2.14l13.7-30.73A2,2,0,0,1,134,142l22.82,3.08a2,2,0,0,1,.78.27L205,174.55A90.18,90.18,0,0,1,140.08,217.19Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM143.31,41.34,152,56.9,125.09,81.24,112.85,88H96.14a16,16,0,0,0-13.88,8l-8.73,15.23L63.38,84.19,74.32,58.32a87.87,87.87,0,0,1,69-17ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Zm102.58,86.78,1.13-5.81a16.09,16.09,0,0,0-4-13.9,1.85,1.85,0,0,1-.14-.14L120,174.74,133.7,144l22.82,3.08,45.72,28.12A88.18,88.18,0,0,1,142.58,214.78Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm92,100a91.44,91.44,0,0,1-8.58,38.76L162.8,136.85a12.07,12.07,0,0,0-4.68-1.67l-22.82-3.07a12,12,0,0,0-12.56,7l-.4.88h-11.2a4,4,0,0,1-3.6-2.26l-3.8-7.86a11.93,11.93,0,0,0-8.28-6.5L82.07,120.5,92.67,102a4,4,0,0,1,3.47-2h16.71a12,12,0,0,0,5.8-1.5l12.24-6.76a11.79,11.79,0,0,0,2.25-1.6L160.05,65.8a12,12,0,0,0,2.43-14.75l-5.86-10.49A92.17,92.17,0,0,1,220,128ZM145.89,37.75l9.6,17.2a4,4,0,0,1-.81,4.92L127.77,84.21a4.41,4.41,0,0,1-.75.53L114.78,91.5a4,4,0,0,1-1.93.5H96.14a12,12,0,0,0-10.41,6l-11.86,20.7a4,4,0,0,1-2.75-2.47L59.63,85.6a4,4,0,0,1,.06-3L71,55.81A91.51,91.51,0,0,1,128,36,92.53,92.53,0,0,1,145.89,37.75ZM36,128A91.52,91.52,0,0,1,56,70.77l-3.71,8.75a12,12,0,0,0-.18,8.88l11.49,30.67a11.93,11.93,0,0,0,8.72,7.52l21.43,4.61a4,4,0,0,1,2.76,2.17l3.8,7.86a12.07,12.07,0,0,0,10.8,6.77h7.64L109,169.85A12,12,0,0,0,111.26,183l19.68,20.26a4,4,0,0,1,1,3.47L129.36,220,128,220A92.1,92.1,0,0,1,36,128Zm101.6,91.5,2.18-11.29a12.08,12.08,0,0,0-3-10.49l-19.68-20.26a4,4,0,0,1-.71-4.35l13.7-30.74a4,4,0,0,1,4.18-2.33l22.82,3.07a4.12,4.12,0,0,1,1.56.56l49.11,30.2A92.12,92.12,0,0,1,137.6,219.5Z`}))]]),R_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),z_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),B_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),V_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),H_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),U_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:I_}));U_.displayName=`GithubLogoIcon`;var W_=U_,G_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:L_}));G_.displayName=`GlobeHemisphereWestIcon`;var K_=G_,q_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:R_}));q_.displayName=`MagnifyingGlassIcon`;var J_=q_,Y_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:z_}));Y_.displayName=`MoonIcon`;var X_=Y_,Z_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:B_}));Z_.displayName=`PencilSimpleIcon`;var Q_=Z_,$_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:V_}));$_.displayName=`SignOutIcon`;var ev=$_,tv=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:H_}));tv.displayName=`SunIcon`;var nv=tv;async function rv(e,t){let n=new URLSearchParams({limit:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await Te(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load chats (${r.status})`);return r.json()}function iv({agentAvailable:e,activeThreadID:t,activeDashboardID:n,autoFocusSearch:r=!1,onNewChat:i,onSelectThread:a,onDeletedThread:o,onSelectDashboard:s,onCreateDashboard:c,onInvestigateService:l,ref:u}){let d=St(),[f,p]=(0,T.useState)(``),[m]=la(f.trim(),250),[h,g]=(0,T.useState)(null),[v,x]=(0,T.useState)(null),[S,te]=(0,T.useState)(``),[re,ie]=(0,T.useState)(``),[ae,oe]=(0,T.useState)(!1),ce=(0,T.useRef)(null);(0,T.useImperativeHandle)(u,()=>({focusSearch:()=>ce.current?.focus()}),[]),(0,T.useEffect)(()=>{r&&requestAnimationFrame(()=>ce.current?.focus())},[r]);let le=F_({queryKey:[...kt,m],queryFn:({pageParam:e})=>rv(m,e),initialPageParam:``,getNextPageParam:e=>e.nextCursor||void 0,enabled:e}),ue=ft({queryKey:cn,queryFn:()=>mn(`/api/dashboards`),refetchInterval:3e4}),de=(0,T.useMemo)(()=>le.data?.pages.flatMap(e=>e.threads)??[],[le.data]),C=(0,T.useMemo)(()=>uv(de),[de]),fe=Gt(`overview`,It({window:`1h`,namespace:``}),!!m&&!!l),me=(0,T.useMemo)(()=>{if(!m)return[];let e=m.toLowerCase();return(fe.data?.data.services??[]).map(e=>e.service).filter(t=>t.toLowerCase().includes(e)).slice(0,6)},[fe.data,m]),he=(0,T.useMemo)(()=>{let e=ue.data?.dashboards??[],t=m.toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[ue.data,m]);function ge(e){ie(``),te(e.title),g(e)}async function w(){if(h&&S.trim()){oe(!0),ie(``);try{let e=await Te(`/api/agent/threads/${encodeURIComponent(h.threadId)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:S.trim()})});if(!e.ok)throw Error(`Unable to rename chat (${e.status})`);await d.invalidateQueries({queryKey:kt}),g(null)}catch(e){ie(e instanceof Error?e.message:`Unable to rename this chat.`)}finally{oe(!1)}}}async function ve(){if(v){oe(!0),ie(``);try{let e=await Te(`/api/agent/threads/${encodeURIComponent(v.threadId)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete chat (${e.status})`);let t=v.threadId;x(null),await d.invalidateQueries({queryKey:kt}),o(t)}catch(e){ie(e instanceof Error?e.message:`Unable to delete this chat.`)}finally{oe(!1)}}}return(0,E.jsxs)(pe,{gap:`sm`,h:`100%`,component:`nav`,"aria-label":`Navigation`,children:[e&&(0,E.jsx)(_e,{leftSection:(0,E.jsx)(Ie,{size:16,weight:`bold`}),onClick:i,children:`New chat`}),(0,E.jsx)(xn,{type:`auto`,offsetScrollbars:!0,flex:1,mx:-4,px:4,children:(0,E.jsxs)(pe,{gap:`lg`,pb:`sm`,children:[e&&(0,E.jsxs)(pe,{gap:4,children:[(0,E.jsx)(av,{children:`Chats`}),le.isLoading&&(0,E.jsx)(se,{py:`md`,children:(0,E.jsx)(_,{size:`xs`})}),le.isError&&(0,E.jsx)(ee,{color:`bad`,radius:`md`,p:`xs`,children:`Chats could not be loaded.`}),!le.isLoading&&!le.isError&&de.length===0&&(0,E.jsx)(b,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:m?`No matching chats`:`No chats yet`}),C.map(e=>(0,E.jsxs)(pe,{gap:2,children:[C.length>1&&(0,E.jsx)(b,{c:`dimmed`,size:`xs`,px:`sm`,pt:4,children:e.label}),e.threads.map(e=>(0,E.jsx)(ov,{thread:e,active:e.threadId===t,onSelect:()=>a(e.threadId),onRename:()=>ge(e),onDelete:()=>{ie(``),x(e)}},e.threadId))]},e.label)),le.hasNextPage&&(0,E.jsx)(_e,{variant:`subtle`,color:`gray`,size:`compact-sm`,loading:le.isFetchingNextPage,onClick:()=>void le.fetchNextPage(),children:`See all`})]}),me.length>0&&l&&(0,E.jsxs)(pe,{gap:4,children:[(0,E.jsx)(av,{children:`Services`}),me.map(e=>(0,E.jsx)(y,{className:`rail-row`,p:`sm`,onClick:()=>l(e),children:(0,E.jsx)(b,{size:`sm`,fw:500,truncate:!0,children:e})},e))]}),(0,E.jsxs)(pe,{gap:4,children:[(0,E.jsx)(av,{children:`Dashboards`}),ue.isLoading&&(0,E.jsx)(se,{py:`md`,children:(0,E.jsx)(_,{size:`xs`})}),ue.isError&&(0,E.jsx)(ee,{color:`bad`,radius:`md`,p:`xs`,children:`Dashboards could not be loaded.`}),!ue.isLoading&&!ue.isError&&m&&he.length===0&&(0,E.jsx)(b,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:`No matching dashboards`}),he.map(e=>{let t=e.id===n;return(0,E.jsx)(y,{className:`rail-row`,"data-active":t||void 0,"aria-current":t?`page`:void 0,p:`sm`,onClick:()=>s(e.id),children:(0,E.jsxs)(ne,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,E.jsx)(b,{size:`sm`,fw:t?600:500,truncate:!0,children:e.name}),e.is_default&&(0,E.jsx)(st,{size:`xs`,variant:`light`,color:`gray`,children:`Default`})]})},e.id)}),e&&(0,E.jsx)(_e,{variant:`subtle`,color:`gray`,size:`compact-sm`,justify:`flex-start`,leftSection:(0,E.jsx)(ut,{size:14,weight:`fill`}),onClick:c,children:`Create with AI`})]})]})}),(0,E.jsx)(Oe,{ref:ce,value:f,onChange:e=>p(e.currentTarget.value),leftSection:(0,E.jsx)(J_,{size:15}),rightSection:(0,E.jsx)(Fo,{size:`xs`,children:`⌘K`}),rightSectionWidth:44,placeholder:`Search`,"aria-label":`Search chats, dashboards and services`,size:`sm`}),(0,E.jsx)(bt,{opened:h!==null,onClose:()=>!ae&&g(null),title:`Rename chat`,centered:!0,children:(0,E.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),w()},children:(0,E.jsxs)(pe,{children:[(0,E.jsx)(Oe,{label:`Name`,value:S,onChange:e=>te(e.currentTarget.value),maxLength:120,autoFocus:!0}),re&&(0,E.jsx)(ee,{color:`bad`,children:re}),(0,E.jsxs)(ne,{justify:`flex-end`,children:[(0,E.jsx)(_e,{variant:`default`,onClick:()=>g(null),disabled:ae,children:`Cancel`}),(0,E.jsx)(_e,{type:`submit`,loading:ae,disabled:!S.trim(),children:`Save`})]})]})})}),(0,E.jsx)(bt,{opened:v!==null,onClose:()=>!ae&&x(null),title:`Delete chat?`,centered:!0,children:(0,E.jsxs)(pe,{children:[(0,E.jsxs)(b,{size:`sm`,children:[`This permanently removes `,(0,E.jsx)(b,{span:!0,fw:650,children:v?.title}),` and its saved messages.`]}),re&&(0,E.jsx)(ee,{color:`bad`,children:re}),(0,E.jsxs)(ne,{justify:`flex-end`,children:[(0,E.jsx)(_e,{variant:`default`,onClick:()=>x(null),disabled:ae,children:`Cancel`}),(0,E.jsx)(_e,{color:`bad`,loading:ae,onClick:()=>void ve(),children:`Delete`})]})]})})]})}function av({children:e}){return(0,E.jsx)(b,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e})}function ov({thread:e,active:t,onSelect:n,onRename:r,onDelete:i}){return(0,E.jsx)(ye,{"data-active":t||void 0,className:`rail-row`,children:(0,E.jsxs)(ne,{gap:2,wrap:`nowrap`,children:[(0,E.jsx)(y,{onClick:n,"aria-current":t?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,E.jsxs)(pe,{gap:0,children:[(0,E.jsx)(b,{size:`sm`,fw:t?600:500,truncate:!0,children:e.title}),(0,E.jsx)(b,{c:`dimmed`,size:`xs`,children:dv(e.updatedAt)})]})}),(0,E.jsxs)(wt,{position:`bottom-end`,withinPortal:!0,children:[(0,E.jsx)(wt.Target,{children:(0,E.jsx)(Dn,{className:`rail-row-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:4,"aria-label":`Actions for ${e.title}`,children:(0,E.jsx)(un,{size:18,weight:`bold`})})}),(0,E.jsxs)(wt.Dropdown,{children:[(0,E.jsx)(wt.Item,{leftSection:(0,E.jsx)(Q_,{size:15}),onClick:r,children:`Rename`}),(0,E.jsx)(wt.Item,{color:`bad`,leftSection:(0,E.jsx)(fn,{size:15}),onClick:i,children:`Delete`})]})]})]})})}function sv(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function cv(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}var lv=[`Today`,`Yesterday`,`Previous 7 days`,`Older`];function uv(e){let t=cv(new Date),n=new Map;for(let r of e){let e=Math.floor((t-cv(sv(r.updatedAt)))/864e5),i=e<=0?`Today`:e===1?`Yesterday`:e<=7?`Previous 7 days`:`Older`,a=n.get(i)??[];a.push(r),n.set(i,a)}return lv.filter(e=>n.has(e)).map(e=>({label:e,threads:n.get(e)}))}function dv(e){let t=sv(e),n=cv(new Date);return Math.floor((n-cv(t))/864e5)<=1?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(t):new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}).format(t)}function fv({children:e}){let{agentAvailable:t,threadID:n,threadMissing:r,newThread:i,selectThread:a,openChat:o}=bn(),s=Ee(),c=ca({select:e=>e.location.pathname}),{dashboardId:l}=At({strict:!1}),u=c===`/chat`||c.startsWith(`/chat/`),[d,f]=ua(!1),[p,m]=(0,T.useState)(!1),[h,g]=(0,T.useState)(``),_=(0,T.useRef)(null),v=ue(`(max-width: 62em)`),y=(0,T.useRef)(v);y.current=v,(0,T.useEffect)(()=>{f.close()},[c]),(0,T.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),y.current?(m(!0),f.open()):_.current?.focusSearch())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let b={agentAvailable:t,activeThreadID:u&&!r&&c!==`/chat`?n:void 0,activeDashboardID:l,onNewChat:i,onSelectThread:a,onDeletedThread:e=>{e===n&&i()},onSelectDashboard:e=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e}}),onCreateDashboard:()=>o(Sn),onInvestigateService:e=>o(`Investigate the ${e} service. Explain its errors and latency.`)};return(0,E.jsxs)(Qa,{header:{height:52},navbar:{width:256,breakpoint:`md`,collapsed:{mobile:!0}},padding:0,children:[(0,E.jsx)(Qa.Header,{children:(0,E.jsxs)(ne,{h:`100%`,px:{base:`sm`,sm:`md`},justify:`space-between`,wrap:`nowrap`,children:[(0,E.jsxs)(ne,{gap:`sm`,wrap:`nowrap`,children:[(0,E.jsx)(po,{hiddenFrom:`md`,opened:d,onClick:()=>{m(!1),f.toggle()},size:`sm`,"aria-label":d?`Close navigation`:`Open navigation`}),(0,E.jsx)(he,{size:`small`})]}),(0,E.jsxs)(ne,{gap:`xs`,wrap:`nowrap`,children:[(0,E.jsx)(pv,{}),(0,E.jsx)(mv,{onError:g})]})]})}),(0,E.jsx)(Qa.Navbar,{p:`sm`,children:(0,E.jsx)(iv,{ref:_,...b})}),(0,E.jsx)(Mo,{opened:d,onClose:f.close,hiddenFrom:`md`,size:288,padding:`sm`,title:(0,E.jsx)(he,{size:`small`}),overlayProps:{backgroundOpacity:.24,blur:1},children:(0,E.jsx)(iv,{...b,autoFocusSearch:d&&p})}),(0,E.jsxs)(Qa.Main,{children:[h&&(0,E.jsx)(ee,{color:`bad`,m:`md`,withCloseButton:!0,onClose:()=>g(``),children:h}),e]})]})}function pv(){let{setColorScheme:e}=kn(),t=An(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`;return(0,E.jsx)(Tn,{label:`Switch to ${n} theme`,children:(0,E.jsx)(Dn,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onClick:()=>e(n),children:t===`dark`?(0,E.jsx)(nv,{size:17,weight:`bold`}):(0,E.jsx)(X_,{size:17,weight:`bold`})})})}function mv({onError:e}){let t=ke(),n=(t.name.trim()||t.email.trim()||`?`).charAt(0).toUpperCase();return(0,E.jsxs)(wt,{position:`bottom-end`,withinPortal:!0,shadow:`md`,children:[(0,E.jsx)(wt.Target,{children:(0,E.jsx)(Dn,{variant:`subtle`,color:`gray`,size:`lg`,radius:`xl`,"aria-label":`Account menu`,children:(0,E.jsx)(lo,{size:26,radius:`xl`,color:`brand`,children:n})})}),(0,E.jsxs)(wt.Dropdown,{children:[(0,E.jsx)(wt.Label,{children:t.email||`Signed in`}),(0,E.jsx)(wt.Item,{component:`a`,href:`https://github.com/labstack/fanout`,target:`_blank`,rel:`noopener noreferrer`,leftSection:(0,E.jsx)(W_,{size:15,weight:`bold`}),children:`Fanout on GitHub`}),(0,E.jsx)(wt.Item,{component:`a`,href:`https://labstack.com`,target:`_blank`,rel:`noopener noreferrer`,leftSection:(0,E.jsx)(K_,{size:15}),children:`LabStack`}),(0,E.jsx)(wt.Divider,{}),(0,E.jsx)(wt.Item,{leftSection:(0,E.jsx)(ev,{size:15}),onClick:()=>void xe().catch(t=>e(t instanceof Error?t.message:`Sign-out failed — your session is still active.`)),children:`Sign out`})]})]})}function hv(){let{agent_available:e}=De(),t=Ee(),n=St(),{threadId:r}=At({strict:!1}),[i,a]=(0,T.useState)(Tt),o=(0,T.useRef)(new Set),s=r??i,[c,l]=(0,T.useState)([]),[u,d]=(0,T.useState)({}),[f,p]=(0,T.useState)(``),[m,h]=(0,T.useState)(!1),[g,_]=(0,T.useState)(!1),[v,y]=(0,T.useState)(``),[b,x]=(0,T.useState)(``),[ee,S]=(0,T.useState)(``),[te,ne]=(0,T.useState)(0),re=(0,T.useRef)(``),ie=(0,T.useRef)(null),ae=(0,T.useRef)(null),oe=(0,T.useRef)(0),se=(0,T.useMemo)(()=>new k_({url:`/api/agent`,threadId:s,fetch:(e,t)=>Te(e,t)}),[s]),ce=!e||f===s;function le(){oe.current=0,y(``)}(0,T.useEffect)(()=>{let t=!0;if(l([]),d({}),p(``),h(!1),_(!1),le(),S(``),!e){p(s);return}!r||o.current.has(s)?(se.setMessages([]),p(s)):Te(`/api/agent/threads/${encodeURIComponent(s)}`).then(async e=>{if(e.status===404)return null;if(!e.ok)throw Error(`Unable to load thread (${e.status})`);return e.json()}).then(e=>{if(t){if(e===null){h(!0),p(s);return}se.setMessages(e.messages??[]),l([...e.messages??[]]),p(s)}}).catch(()=>{t&&(re.current=``,S(`This chat could not be restored. Start a new chat or try again.`))});let i=se.subscribe({onEvent:({messages:e})=>l([...e]),onRunInitialized:()=>{_(!0),S(``)},onToolCallStartEvent:({event:e})=>{oe.current+=1,y(En(e.toolCallName))},onToolCallEndEvent:()=>{oe.current=Math.max(0,oe.current-1),oe.current===0&&y(``)},onRunFinalized:({messages:e})=>{let t=[...e];l(t),d(e=>{let n={...e};for(let e of t)e.role===`assistant`&&!n[e.id]&&(n[e.id]=Date.now());return n}),_(!1),le(),o.current.delete(s),n.invalidateQueries({queryKey:kt})},onRunFailed:e=>{console.error(`Agent run failed`,e),S(`Fanout could not complete this analysis.`),_(!1),le(),o.current.delete(s),n.invalidateQueries({queryKey:kt})}});return()=>{t=!1,i.unsubscribe(),se.abortRun()}},[se,e,n,te,s]),(0,T.useEffect)(()=>{ie.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[c,g]),(0,T.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,i=n?.matches(`input, textarea, [contenteditable='true']`);e.key===`/`&&!i&&(e.preventDefault(),r?requestAnimationFrame(()=>ae.current?.focus()):t({to:`/chat`}).then(()=>requestAnimationFrame(()=>ae.current?.focus()))),e.key===`Escape`&&n===ae.current&&(x(``),ae.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]);async function ue(){_(!0),S(``);try{await se.runAgent()}catch(e){console.error(`Agent run failed`,e),S(`Fanout could not complete this analysis.`),_(!1),le(),o.current.delete(s)}}async function de(n){let i=n.trim();if(!e||!i||g||!ce||m)return;r||(o.current.add(s),t({to:`/chat/$threadId`,params:{threadId:s},replace:!0}));let a={id:Tt(),role:`user`,content:i};se.addMessage(a),l([...se.messages]),d(e=>({...e,[a.id]:Date.now()})),x(``),await ue()}(0,T.useEffect)(()=>{let e=re.current;ce&&r&&e&&(re.current=``,de(e))},[ce,r,s]);function C(e){e.preventDefault(),de(b)}function fe(){se.abortRun(),_(!1),le(),o.current.delete(s)}function pe(){!g&&se.messages.some(e=>e.role===`user`)&&ue()}function me(n){if(!e)return;let r=Tt();o.current.add(r),re.current=n??``,t({to:`/chat/$threadId`,params:{threadId:r}})}function he(){se.abortRun(),re.current=``,a(Tt()),t({to:`/chat`})}function ge(e){t({to:`/chat/$threadId`,params:{threadId:e}})}function _e(){ne(e=>e+1)}return(0,E.jsx)(wn.Provider,{value:{agentAvailable:e,threadID:s,threadMissing:m,messages:c,messageTimes:u,ready:ce,running:g,activity:v,input:b,setInput:x,error:ee,bottomRef:ie,inputRef:ae,send:de,submit:C,stop:fe,retry:pe,reloadThread:_e,openChat:me,newThread:he,selectThread:ge},children:(0,E.jsx)(fv,{children:(0,E.jsx)(Qi,{})})})}function gv(){let e=(0,T.useMemo)(()=>new P_,[]);return(0,E.jsx)(Ye,{client:e,children:(0,E.jsx)(Ae,{children:(0,E.jsx)(hv,{})})})}var _v=hn({component:gv,notFoundComponent:()=>(0,E.jsx)(Se,{to:`/`,replace:!0})}),vv=ln(`/`)({component:Et(()=>On(()=>import(`./routes-4U_e7tED.js`),__vite__mapDeps([0,1,2])),`component`)}),yv=ln(`/chat/`)({component:Et(()=>On(()=>import(`./chat.index-CtOVI6Uj.js`),__vite__mapDeps([3,4,1,5,6])),`component`)}),bv=ln(`/chat/$threadId`)({component:Et(()=>On(()=>import(`./chat._threadId-CtOVI6Uj.js`),__vite__mapDeps([7,4,1,5,6])),`component`)}),xv=ln(`/dashboards/`)({component:Et(()=>On(()=>import(`./dashboards.index-CtpFH5E-.js`),__vite__mapDeps([8,1,2,5,9,10,11,6])),`component`),validateSearch:sn}),Sv=ln(`/dashboards/$dashboardId`)({component:Et(()=>On(()=>import(`./dashboards._dashboardId-BPYRZzG3.js`),__vite__mapDeps([12,1,2,5,9,10,11,6])),`component`),validateSearch:sn}),Cv=vv.update({id:`/`,path:`/`,getParentRoute:()=>_v}),wv=yv.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>_v}),Tv=bv.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>_v}),Ev=xv.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>_v}),Dv={IndexRoute:Cv,ChatThreadIdRoute:Tv,DashboardsDashboardIdRoute:Sv.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>_v}),ChatIndexRoute:wv,DashboardsIndexRoute:Ev},Ov=ia({routeTree:_v._addFileChildren(Dv)._addFileTypes(),defaultPreload:`intent`,scrollRestoration:!0}),kv={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:an,brand:en,ok:nn,warn:Wt,bad:qt,info:Yt},defaultRadius:`md`,fontFamily:Dt.body,fontFamilyMonospace:Dt.display,headings:{fontFamily:Dt.body,fontWeight:`600`},cursorType:`pointer`},Av=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":Rt.light.muted},dark:{}}),jv=Oa(kv);(0,Ec.createRoot)(document.getElementById(`root`)).render((0,E.jsx)(T.StrictMode,{children:(0,E.jsx)(Da,{theme:jv,defaultColorScheme:`auto`,cssVariablesResolver:Av,children:(0,E.jsx)(sa,{router:Ov})})}));export{xv as n,Sv as t}; \ No newline at end of file +`)},Qg=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(_f(r=>{switch(r.type){case V.TEXT_MESSAGE_START:{let e=r;return[{type:Yg.enum.TextMessageStart,messageId:e.messageId,role:e.role}]}case V.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:Yg.enum.TextMessageContent,messageId:e.messageId,content:e.delta}]}case V.TEXT_MESSAGE_END:{let e=r;return[{type:Yg.enum.TextMessageEnd,messageId:e.messageId}]}case V.TOOL_CALL_START:{let e=r;return u.push({id:e.toolCallId,type:`function`,function:{name:e.toolCallName,arguments:``}}),o=!0,d[e.toolCallId]=e.toolCallName,[{type:Yg.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case V.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let p=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(kf(d.function.arguments));e.tool_argument&&e.tool_argument in t?(f({...i,[e.state_key]:t[e.tool_argument]}),p=!0):e.tool_argument||(f({...i,[e.state_key]:t}),p=!0)}catch{}}return[{type:Yg.enum.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...p?[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case V.TOOL_CALL_END:{let e=r;return[{type:Yg.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case V.TOOL_CALL_RESULT:{let e=r;return[{type:Yg.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:d[e.toolCallId]||`unknown`}]}case V.RAW:return[];case V.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:Yg.enum.MetaEvent,name:e.name,value:e.value}]}case V.STATE_SNAPSHOT:return f(r.snapshot),[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case V.STATE_DELTA:{let c=r,l=Au.applyPatch(i,c.delta,!0,!1);return l?(f(l.newDocument),[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]):[]}case V.MESSAGES_SNAPSHOT:return c=r.messages,[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case V.RUN_STARTED:return[];case V.RUN_FINISHED:return c&&(i.messages=c),Object.keys(i).length===0?[]:[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:$g(c)}:{}}),active:!1}];case V.RUN_ERROR:{let e=r;return[{type:Yg.enum.RunError,message:e.message,code:e.code}]}case V.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case V.STEP_FINISHED:return u=[],l=null,[{type:Yg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function $g(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=Zg(n.content);if(e){let r={id:n.id,role:n.role,content:e};t.push(r)}if(n.role===`assistant`&&n.toolCalls&&n.toolCalls.length>0)for(let e of n.toolCalls){let r={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:n.id};t.push(r)}}else if(n.role===`tool`){let r=`unknown`;for(let t of e)if(t.role===`assistant`&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===n.toolCallId){r=e.function.name;break}}let i={id:n.id,result:n.content,actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var e_=e=>e.kind===`tool`?e.fields.toolCallId:e.fields.messageId,t_=e=>e===`tool`?`toolCallId`:`messageId`,n_=(e,t)=>t.metadata===void 0?e:{...e,metadata:t.metadata},r_=e=>t=>{let n=Lg(e),r=new Map,i=e=>{let t=r.get(e);if(!t)return[];switch(r.delete(e),t.kind){case`text`:{let e={type:V.TEXT_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),[e]}case`tool`:{let e={type:V.TOOL_CALL_END,toolCallId:t.fields.toolCallId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),[e]}case`reasoning`:{let e={type:V.REASONING_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`REASONING_MESSAGE_END`,e,{messageId:e.messageId}),[e]}}},a=()=>[...r.keys()].flatMap(e=>i(e)),o=(e,t)=>{for(let[n,i]of r)if(i.kind===e&&e_(i)===t)return{owner:n}},s=(e,t,n,i,a)=>{if(t!==void 0){let r=o(e,t);if(r){if(n!==void 0&&n!==r.owner)throw Error(`Cannot continue ${a} '${t}': chunk subagentRunId '${n}' does not match the open stream's subagent '${r.owner??`(the parent agent)`}'.`);return r.owner}return n}if(n!==void 0)return n;if(r.get(void 0)?.kind===e)return;let s=[...r.entries()].filter(([,t])=>t.kind===e);if(s.length===1)return s[0][0];if(s.length>1)throw Error(`Ambiguous ${i}: it carries neither a ${t_(e)} nor a subagentRunId, but ${s.length} lanes have an open ${a}. Attribute the chunk to the subagent it belongs to.`)};return t.pipe(_f(e=>{switch(e.type){case V.TEXT_MESSAGE_START:case V.TEXT_MESSAGE_CONTENT:case V.TEXT_MESSAGE_END:case V.TOOL_CALL_START:case V.TOOL_CALL_ARGS:case V.TOOL_CALL_END:case V.TOOL_CALL_RESULT:case V.STATE_SNAPSHOT:case V.STATE_DELTA:case V.CUSTOM:case V.STEP_STARTED:case V.STEP_FINISHED:case V.THINKING_START:case V.THINKING_END:case V.THINKING_TEXT_MESSAGE_START:case V.THINKING_TEXT_MESSAGE_CONTENT:case V.THINKING_TEXT_MESSAGE_END:case V.REASONING_START:case V.REASONING_MESSAGE_START:case V.REASONING_MESSAGE_CONTENT:case V.REASONING_MESSAGE_END:case V.REASONING_END:return[...i(e.subagentRunId??void 0),e];case V.RUN_STARTED:case V.RUN_FINISHED:case V.RUN_ERROR:case V.MESSAGES_SNAPSHOT:return[...a(),e];case V.RAW:case V.ACTIVITY_SNAPSHOT:case V.ACTIVITY_DELTA:case V.REASONING_ENCRYPTED_VALUE:case V.SUBAGENT_STARTED:return[e];case V.SUBAGENT_FINISHED:case V.SUBAGENT_ERROR:{let t=e.subagentRunId;return t==null?[e]:[...i(t),e]}case V.TEXT_MESSAGE_CHUNK:{let t=e,a=s(`text`,t.messageId,t.subagentRunId??void 0,`TEXT_MESSAGE_CHUNK`,`text message`),o=r.get(a),c=[],l;if(o?.kind===`text`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,name:t.name,subagentRunId:t.subagentRunId},r.set(a,{kind:`text`,fields:l});let e=n_({type:V.TEXT_MESSAGE_START,messageId:t.messageId,role:t.role||`assistant`,...t.name!==void 0&&{name:t.name},...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=n_({type:V.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:V.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case V.TOOL_CALL_CHUNK:{let t=e,a=s(`tool`,t.toolCallId,t.subagentRunId??void 0,`TOOL_CALL_CHUNK`,`tool call`),o=r.get(a),c=[],l;if(o?.kind===`tool`&&(t.toolCallId===void 0||t.toolCallId===o.fields.toolCallId))l=o.fields;else{if(c.push(...i(a)),t.toolCallId===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallId`);if(t.toolCallName===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallName`);l={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`tool`,fields:l});let e=n_({type:V.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=n_({type:V.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,r,{toolCallId:l.toolCallId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:V.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case V.REASONING_MESSAGE_CHUNK:{let t=e,a=s(`reasoning`,t.messageId,t.subagentRunId??void 0,`REASONING_MESSAGE_CHUNK`,`reasoning message`),o=r.get(a),c=[],l;if(o?.kind===`reasoning`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`reasoning`,fields:l});let e=n_({type:V.REASONING_MESSAGE_START,messageId:t.messageId,role:`reasoning`,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=n_({type:V.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:V.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}}return e.type,[]}),wf(()=>{a()}))};function i_(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}var a_=class{runNext(e,t){return t.run(e).pipe(r_(!1))}runNextWithState(e,t){let n=Ag(e.messages||[]),r=Ag(e.state||{}),i=new jd;return Hg(e,i,t,[]).subscribe(e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)}),this.runNext(e,t).pipe(Sf(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:Ag(n),state:Ag(r)})))}},o_=class extends a_{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function s_(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(``);return{...e,content:n}}return typeof t==`string`?e:{...e,content:``}}var c_=class extends a_{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(s_)};return this.runNext(i,t)}},l_=`THINKING_START`,u_=`THINKING_END`,d_=`THINKING_TEXT_MESSAGE_START`,f_=`THINKING_TEXT_MESSAGE_CONTENT`,p_=`THINKING_TEXT_MESSAGE_END`,m_=class extends a_{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(hf(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case l_:{this.currentReasoningId=jg();let{title:t,...n}=e;return this.warnAboutTransformation(l_,V.REASONING_START),{...n,type:V.REASONING_START,messageId:this.currentReasoningId}}case d_:return this.currentMessageId=jg(),this.warnAboutTransformation(d_,V.REASONING_MESSAGE_START),{...e,type:V.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`assistant`};case f_:{let{delta:t,...n}=e;return this.warnAboutTransformation(f_,V.REASONING_MESSAGE_CONTENT),{...n,type:V.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??jg(),delta:t}}case p_:{let t=this.currentMessageId??jg();return this.warnAboutTransformation(p_,V.REASONING_MESSAGE_END),{...e,type:V.REASONING_MESSAGE_END,messageId:t}}case u_:{let t=this.currentReasoningId??jg();return this.warnAboutTransformation(u_,V.REASONING_END),{...e,type:V.REASONING_END,messageId:t}}default:return e}}};function h_(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function g_(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function __(e){let t=h_(e.mimeType);return e.data?{type:t,source:{type:`data`,value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:t,source:{type:`url`,value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e}function v_(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.map(e=>g_(e)?__(e):e);return{...e,content:n}}var y_=class extends a_{run(e,t){let n={...e,messages:e.messages.map(v_)};return this.runNext(n,t)}},b_=`SUBAGENT_STARTED`,x_=`SUBAGENT_FINISHED`,S_=`SUBAGENT_ERROR`;function C_(e){if(e&&typeof e==`object`&&`subagentRunId`in e){let{subagentRunId:t,...n}=e;return n}return e}function w_(e){return e.map(e=>C_(e))}var T_=class extends a_{warnDroppedLifecycleEvent(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is dropping ${e} because the target agent predates subagent support. To remove this warning, upgrade your AG-UI integration package. To suppress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){let n={...e,messages:(e.messages??[]).map(e=>C_(e))};return this.runNext(n,t).pipe(Df(e=>{let t=e.type;(t===b_||t===x_||t===S_)&&this.warnDroppedLifecycleEvent(t)}),bf(e=>{let t=e.type;return t!==b_&&t!==x_&&t!==S_}),hf(e=>{let t=C_(e);if(t.type===V.MESSAGES_SNAPSHOT){let e=t;if(Array.isArray(e.messages))return{...e,messages:w_(e.messages)}}if(t.type===V.RUN_FINISHED){let e=t;if(e.outcome&&Array.isArray(e.outcome.interrupts))return{...e,outcome:{...e.outcome,interrupts:e.outcome.interrupts.map(e=>C_(e))}}}if(t.type===V.RUN_STARTED){let e=t;if(e.input&&Array.isArray(e.input.messages))return{...e,input:{...e.input,messages:w_(e.input.messages)}}}return t}))}},E_=`0.0.59`,D_=class{get maxVersion(){return E_}get debug(){return this._debug}set debug(e){this._debug=Ig(e),this._debugLogger=zg(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?zg(Ig(!0)):void 0:e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.agentId=e,this.description=t??``,this.threadId=n??Vo(),this.messages=Ag(r??[]),this.state=Ag(i??{}),this._debug=Ig(a),this._debugLogger=zg(this._debug),kg(this.maxVersion,`0.0.39`)<=0&&this.middlewares.unshift(new c_),kg(this.maxVersion,`0.0.45`)<=0&&this.middlewares.unshift(new m_),kg(this.maxVersion,`0.0.47`)<=0&&this.middlewares.unshift(new y_),kg(this.maxVersion,`0.0.57`)<=0&&this.middlewares.unshift(new T_)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>typeof e==`function`?new o_(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Vo();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle(`LIFECYCLE`,`Run started:`,{agentId:this.agentId,threadId:this.threadId});let r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new Od;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await mf(_d(()=>this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),r_(this.debugLogger),Ug(this.debugLogger),e=>e.pipe(Ef(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),xf(e=>(this.debugLogger?.lifecycle(`LIFECYCLE`,`Run errored:`,{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,a))),wf(()=>{this.debugLogger?.lifecycle(`LIFECYCLE`,`Run finished:`,{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(ff(null)));let s=Ag(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new Jc}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Vo();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new Od;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await mf(_d(()=>yf(()=>this.connect(n)),r_(this.debugLogger),Ug(this.debugLogger),e=>e.pipe(Ef(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),xf(e=>(this.isRunning=!1,e instanceof Jc?Md:this.onError(n,e,a))),wf(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(ff(null)),{defaultValue:void 0});let s=Ag(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}apply(e,t,n){return Hg(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe(Df(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=Ag(this.messages);for(let e of t)e.subagentRunId===null&&delete e.subagentRunId;let n=t.filter(e=>e.role!==`activity`);return{threadId:this.threadId,runId:e?.runId||Vo(),tools:Ag(e?.tools??[]),context:Ag(e?.context??[]),forwardedProps:Ag(e?.forwardedProps??{}),state:Ag(this.state),messages:n,...e?.resume===void 0?{}:{resume:Ag(e.resume)}}}async onInitialize(e,t){if(this.pendingInterrupts.length>0){let t=new Set((e.resume??[]).map(e=>e.interruptId)),n=this.pendingInterrupts.map(e=>e.id).filter(e=>!t.has(e));if(n.length>0)throw new B(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let e of this.pendingInterrupts)if(i_(e))throw new B(`Interrupt ${e.id} expired at ${e.expiresAt}`)}let n=await Fg(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));if(n.messages!==void 0||n.state!==void 0){if(n.messages){this.messages=n.messages;for(let e of n.messages)e.subagentRunId===null&&delete e.subagentRunId;e.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})}n.state&&(this.state=n.state,e.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}}onError(e,t,n){return df(Fg(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(hf(r=>{let i=r;if((i.messages!==void 0||i.state!==void 0)&&(i.messages!==void 0&&(this.messages=i.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),i.state!==void 0&&(this.state=i.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),i.stopPropagation!==!0){let e=String(t);if(t.name!==`AbortError`&&t.message!==`Fetch is aborted`&&t.message!==`signal is aborted without reason`&&t.message!==`component unmounted`&&e!==`component unmounted`)throw console.error(`Agent execution failed:`,t),t}return{}}))}async onFinalize(e,t){let n=await Fg(t,this.messages,this.state,(t,n,r)=>t.onRunFinalized?.({messages:n,state:r,agent:this,input:e}));(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=Ag(this.messages),e.state=Ag(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=Ag(this.pendingInterrupts),e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if(e.role===`assistant`&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if(t.role===`assistant`&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=Ag(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=Ag(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){this.agentId=this.agentId??Vo();let t=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(t):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t)).pipe(r_(this.debugLogger),Ug(this.debugLogger),Qg(this.threadId,t.runId,this.agentId),e=>e.pipe(hf(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}};function O_(e){if(!Array.isArray(e.messages))return e;let t=!1,n=e.messages.map(e=>{if(e.subagentRunId===null){t=!0;let n={...e};return delete n.subagentRunId,n}return e});return t?{...e,messages:n}:e}var k_=class extends D_{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(O_(e)),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=Ag(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return Jg(Gg(()=>this.fetch(this.url,this.requestInit(e))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=Ag(this.headers??{}),e.fetch=this.fetch;let t=new AbortController,n=this.abortController.signal;return n.aborted&&t.abort(n.reason),e.abortController=t,e}},A_=class extends Ht{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Bt(t,n.data),hasPreviousPage:et(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},j_=class extends qe{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Re({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=M_(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=M_(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=M_(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=M_(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){at.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Pe(t,e))}findAll(e={}){return this.getAll().filter(t=>Pe(e,t))}notify(e){at.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return at.batch(()=>Promise.all(e.map(e=>e.continue().catch(Ge))))}};function M_(e){return e.options.scope?.id}var N_=class extends qe{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??gn(r,t),a=this.get(i);return a||(a=new Me({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){at.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>gt(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>gt(e,t)):t}notify(e){at.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){at.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){at.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},P_=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new N_,this.#t=e.mutationCache||new j_,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=He.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=nt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(vt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Qe(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return at.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;at.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return at.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=at.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Ge).catch(Ge)}invalidateQueries(e,t={}){return at.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=at.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Ge)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Ge)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(vt(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(vt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ge).catch(Ge)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ge).catch(Ge)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return nt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(ct(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{mt(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(ct(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{mt(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=gn(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Qt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function F_(e,t){return Be(e,A_,t)}var I_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M208,104v8a48,48,0,0,1-48,48H136a32,32,0,0,1,32,32v40H104V192a32,32,0,0,1,32-32H112a48,48,0,0,1-48-48v-8a49.28,49.28,0,0,1,8.51-27.3A51.92,51.92,0,0,1,76,32a52,52,0,0,1,43.83,24h32.34A52,52,0,0,1,196,32a51.92,51.92,0,0,1,3.49,44.7A49.28,49.28,0,0,1,208,104Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M208.3,75.68A59.74,59.74,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58,58,0,0,0,208.3,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.76,41.76,0,0,1,200,104Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M206.13,75.92A57.79,57.79,0,0,0,201.2,29a6,6,0,0,0-5.2-3,57.77,57.77,0,0,0-47,24H123A57.77,57.77,0,0,0,76,26a6,6,0,0,0-5.2,3,57.79,57.79,0,0,0-4.93,46.92A55.88,55.88,0,0,0,58,104v8a54.06,54.06,0,0,0,50.45,53.87A37.85,37.85,0,0,0,98,192v10H72a26,26,0,0,1-26-26A38,38,0,0,0,8,138a6,6,0,0,0,0,12,26,26,0,0,1,26,26,38,38,0,0,0,38,38H98v18a6,6,0,0,0,12,0V192a26,26,0,0,1,52,0v40a6,6,0,0,0,12,0V192a37.85,37.85,0,0,0-10.45-26.13A54.06,54.06,0,0,0,214,112v-8A55.88,55.88,0,0,0,206.13,75.92ZM202,112a42,42,0,0,1-42,42H112a42,42,0,0,1-42-42v-8a43.86,43.86,0,0,1,7.3-23.69,6,6,0,0,0,.81-5.76,45.85,45.85,0,0,1,1.43-36.42,45.85,45.85,0,0,1,35.23,21.1A6,6,0,0,0,119.83,62h32.34a6,6,0,0,0,5.06-2.76,45.83,45.83,0,0,1,35.23-21.11,45.85,45.85,0,0,1,1.43,36.42,6,6,0,0,0,.79,5.74A43.78,43.78,0,0,1,202,104Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M208.31,75.68A59.78,59.78,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58.14,58.14,0,0,0,208.31,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.72,41.72,0,0,1,200,104Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M203.94,76.16A55.73,55.73,0,0,0,199.46,30,4,4,0,0,0,196,28a55.78,55.78,0,0,0-46,24H122A55.78,55.78,0,0,0,76,28a4,4,0,0,0-3.46,2,55.73,55.73,0,0,0-4.48,46.16A53.78,53.78,0,0,0,60,104v8a52.06,52.06,0,0,0,52,52h1.41A36,36,0,0,0,100,192v12H72a28,28,0,0,1-28-28A36,36,0,0,0,8,140a4,4,0,0,0,0,8,28,28,0,0,1,28,28,36,36,0,0,0,36,36h28v20a4,4,0,0,0,8,0V192a28,28,0,0,1,56,0v40a4,4,0,0,0,8,0V192a36,36,0,0,0-13.41-28H160a52.06,52.06,0,0,0,52-52v-8A53.78,53.78,0,0,0,203.94,76.16ZM204,112a44.05,44.05,0,0,1-44,44H112a44.05,44.05,0,0,1-44-44v-8a45.76,45.76,0,0,1,7.71-24.89,4,4,0,0,0,.53-3.84,47.82,47.82,0,0,1,2.1-39.21,47.8,47.8,0,0,1,38.12,22.1A4,4,0,0,0,119.83,60h32.34a4,4,0,0,0,3.37-1.84,47.8,47.8,0,0,1,38.12-22.1,47.82,47.82,0,0,1,2.1,39.21,4,4,0,0,0,.53,3.83A45.85,45.85,0,0,1,204,104Z`}))]]),L_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm84,108a83.64,83.64,0,0,1-4.47,27L167,130a19.65,19.65,0,0,0-7.8-2.78l-22.82-3.08A20.14,20.14,0,0,0,117.72,132h-4.07l-2.71-5.6a19.88,19.88,0,0,0-13.8-10.84L94.46,115l4-7h14.39a20,20,0,0,0,9.66-2.49l12.25-6.76a20.57,20.57,0,0,0,3.74-2.68l26.92-24.33A20,20,0,0,0,172,56.49,84,84,0,0,1,212,128ZM140.76,45l6.2,11.1L122.75,78l-10.93,6H96.14A20.05,20.05,0,0,0,78.78,94.06l-4.49,7.85L67.68,84.28l9.91-23.42A83.91,83.91,0,0,1,140.76,45ZM44,128a83.52,83.52,0,0,1,4.4-26.77l7.74,20.65a19.89,19.89,0,0,0,14.52,12.53l19.53,4.2,3,6.1a20.11,20.11,0,0,0,13.55,10.77l-5,11.12a20,20,0,0,0,3.58,21.71l.21.22,18.16,18.7-.89,4.59A84.09,84.09,0,0,1,44,128Zm103.65,81.66a20.11,20.11,0,0,0-5-17.3l-.21-.22-17.72-18.25,11.37-25.52,19,2.56,41.43,25.48A84.2,84.2,0,0,1,147.65,209.66Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M213.09,172.48a96,96,0,0,1-80.41,51.41l3.17-16.44a8,8,0,0,0-2-6.95l-19.74-20.33a8,8,0,0,1-1.44-8.69l13.7-30.74a8,8,0,0,1,8.38-4.67l22.82,3.08a8.11,8.11,0,0,1,3.12,1.11ZM116.71,95,129,88.24a7.46,7.46,0,0,0,1.5-1.07l26.91-24.33A8,8,0,0,0,159,53l-10.5-18.81A96.62,96.62,0,0,0,128,32,95.61,95.61,0,0,0,67.78,53.23L56,81.08A8,8,0,0,0,55.88,87l11.5,30.67a8,8,0,0,0,5.81,5l2.69.58L89.2,100a8,8,0,0,1,6.94-4h16.71A7.9,7.9,0,0,0,116.71,95Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM143.31,41.34,152,56.9,125.09,81.24,112.85,88H96.14a16,16,0,0,0-13.88,8l-8.73,15.23L63.38,84.19,74.32,58.32a87.87,87.87,0,0,1,69-17ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Zm102.58,86.78,1.13-5.81a16.09,16.09,0,0,0-4-13.9,1.85,1.85,0,0,1-.14-.14L120,174.74,133.7,144l22.82,3.08,45.72,28.12A88.18,88.18,0,0,1,142.58,214.78Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm90,102a89.55,89.55,0,0,1-7.46,35.86l-46.69-28.71a13.94,13.94,0,0,0-5.46-2l-22.82-3.07A14.06,14.06,0,0,0,121.06,138h-9.92a2,2,0,0,1-1.8-1.13l-3.8-7.86a13.94,13.94,0,0,0-9.66-7.59l-10.71-2.3L94.4,103a2,2,0,0,1,1.74-1h16.71a13.9,13.9,0,0,0,6.76-1.75l12.25-6.75a14.73,14.73,0,0,0,2.62-1.88l26.91-24.33a13.93,13.93,0,0,0,2.83-17.21L161,44.25A90.16,90.16,0,0,1,218,128ZM144.6,39.54l9.15,16.39a2,2,0,0,1-.41,2.46L126.43,82.72a1.84,1.84,0,0,1-.37.27l-12.25,6.76a2,2,0,0,1-1,.25H96.14A14,14,0,0,0,84,97L73.18,115.91a2,2,0,0,1-.19-.35L61.5,84.89a2,2,0,0,1,0-1.48L72.68,57.06A89.9,89.9,0,0,1,144.6,39.54ZM38,128A89.52,89.52,0,0,1,49.38,84.23a13.85,13.85,0,0,0,.89,4.87l11.49,30.67a13.94,13.94,0,0,0,10.16,8.78l21.44,4.6a2,2,0,0,1,1.38,1.09l3.8,7.86a14.07,14.07,0,0,0,12.6,7.9h4.56l-8.49,19a14,14,0,0,0,2.51,15.2l.1.11,19.68,20.26a2,2,0,0,1,.46,1.7L127.7,218A90.1,90.1,0,0,1,38,128Zm102.08,89.19,1.67-8.6a14.07,14.07,0,0,0-3.47-12.16l-.1-.11L118.5,176.06a2,2,0,0,1-.33-2.14l13.7-30.73A2,2,0,0,1,134,142l22.82,3.08a2,2,0,0,1,.78.27L205,174.55A90.18,90.18,0,0,1,140.08,217.19Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM143.31,41.34,152,56.9,125.09,81.24,112.85,88H96.14a16,16,0,0,0-13.88,8l-8.73,15.23L63.38,84.19,74.32,58.32a87.87,87.87,0,0,1,69-17ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Zm102.58,86.78,1.13-5.81a16.09,16.09,0,0,0-4-13.9,1.85,1.85,0,0,1-.14-.14L120,174.74,133.7,144l22.82,3.08,45.72,28.12A88.18,88.18,0,0,1,142.58,214.78Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm92,100a91.44,91.44,0,0,1-8.58,38.76L162.8,136.85a12.07,12.07,0,0,0-4.68-1.67l-22.82-3.07a12,12,0,0,0-12.56,7l-.4.88h-11.2a4,4,0,0,1-3.6-2.26l-3.8-7.86a11.93,11.93,0,0,0-8.28-6.5L82.07,120.5,92.67,102a4,4,0,0,1,3.47-2h16.71a12,12,0,0,0,5.8-1.5l12.24-6.76a11.79,11.79,0,0,0,2.25-1.6L160.05,65.8a12,12,0,0,0,2.43-14.75l-5.86-10.49A92.17,92.17,0,0,1,220,128ZM145.89,37.75l9.6,17.2a4,4,0,0,1-.81,4.92L127.77,84.21a4.41,4.41,0,0,1-.75.53L114.78,91.5a4,4,0,0,1-1.93.5H96.14a12,12,0,0,0-10.41,6l-11.86,20.7a4,4,0,0,1-2.75-2.47L59.63,85.6a4,4,0,0,1,.06-3L71,55.81A91.51,91.51,0,0,1,128,36,92.53,92.53,0,0,1,145.89,37.75ZM36,128A91.52,91.52,0,0,1,56,70.77l-3.71,8.75a12,12,0,0,0-.18,8.88l11.49,30.67a11.93,11.93,0,0,0,8.72,7.52l21.43,4.61a4,4,0,0,1,2.76,2.17l3.8,7.86a12.07,12.07,0,0,0,10.8,6.77h7.64L109,169.85A12,12,0,0,0,111.26,183l19.68,20.26a4,4,0,0,1,1,3.47L129.36,220,128,220A92.1,92.1,0,0,1,36,128Zm101.6,91.5,2.18-11.29a12.08,12.08,0,0,0-3-10.49l-19.68-20.26a4,4,0,0,1-.71-4.35l13.7-30.74a4,4,0,0,1,4.18-2.33l22.82,3.07a4.12,4.12,0,0,1,1.56.56l49.11,30.2A92.12,92.12,0,0,1,137.6,219.5Z`}))]]),R_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),z_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),B_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),V_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),H_=new Map([[`bold`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),T.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,T.createElement(T.Fragment,null,T.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),U_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:I_}));U_.displayName=`GithubLogoIcon`;var W_=U_,G_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:L_}));G_.displayName=`GlobeHemisphereWestIcon`;var K_=G_,q_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:R_}));q_.displayName=`MagnifyingGlassIcon`;var J_=q_,Y_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:z_}));Y_.displayName=`MoonIcon`;var X_=Y_,Z_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:B_}));Z_.displayName=`PencilSimpleIcon`;var Q_=Z_,$_=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:V_}));$_.displayName=`SignOutIcon`;var ev=$_,tv=T.forwardRef((e,t)=>T.createElement(v,{ref:t,...e,weights:H_}));tv.displayName=`SunIcon`;var nv=tv;async function rv(e,t){let n=new URLSearchParams({limit:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await Te(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load chats (${r.status})`);return r.json()}function iv({agentAvailable:e,activeThreadID:t,activeDashboardID:n,autoFocusSearch:r=!1,onNewChat:i,onSelectThread:a,onDeletedThread:o,onSelectDashboard:s,onCreateDashboard:c,onInvestigateService:l,ref:u}){let d=St(),[f,p]=(0,T.useState)(``),[m]=la(f.trim(),250),[h,g]=(0,T.useState)(null),[v,x]=(0,T.useState)(null),[S,te]=(0,T.useState)(``),[re,ie]=(0,T.useState)(``),[ae,oe]=(0,T.useState)(!1),ce=(0,T.useRef)(null);(0,T.useImperativeHandle)(u,()=>({focusSearch:()=>ce.current?.focus()}),[]),(0,T.useEffect)(()=>{r&&requestAnimationFrame(()=>ce.current?.focus())},[r]);let le=F_({queryKey:[...kt,m],queryFn:({pageParam:e})=>rv(m,e),initialPageParam:``,getNextPageParam:e=>e.nextCursor||void 0,enabled:e}),ue=ft({queryKey:cn,queryFn:()=>mn(`/api/dashboards`),refetchInterval:3e4}),de=(0,T.useMemo)(()=>le.data?.pages.flatMap(e=>e.threads)??[],[le.data]),C=(0,T.useMemo)(()=>uv(de),[de]),fe=Gt(`overview`,It({window:`1h`,namespace:``}),!!m&&!!l),me=(0,T.useMemo)(()=>{if(!m)return[];let e=m.toLowerCase();return(fe.data?.data.services??[]).map(e=>e.service).filter(t=>t.toLowerCase().includes(e)).slice(0,6)},[fe.data,m]),he=(0,T.useMemo)(()=>{let e=ue.data?.dashboards??[],t=m.toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[ue.data,m]);function ge(e){ie(``),te(e.title),g(e)}async function w(){if(h&&S.trim()){oe(!0),ie(``);try{let e=await Te(`/api/agent/threads/${encodeURIComponent(h.threadId)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:S.trim()})});if(!e.ok)throw Error(`Unable to rename chat (${e.status})`);await d.invalidateQueries({queryKey:kt}),g(null)}catch(e){ie(e instanceof Error?e.message:`Unable to rename this chat.`)}finally{oe(!1)}}}async function ve(){if(v){oe(!0),ie(``);try{let e=await Te(`/api/agent/threads/${encodeURIComponent(v.threadId)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete chat (${e.status})`);let t=v.threadId;x(null),await d.invalidateQueries({queryKey:kt}),o(t)}catch(e){ie(e instanceof Error?e.message:`Unable to delete this chat.`)}finally{oe(!1)}}}return(0,E.jsxs)(pe,{gap:`sm`,h:`100%`,component:`nav`,"aria-label":`Navigation`,children:[e&&(0,E.jsx)(_e,{leftSection:(0,E.jsx)(Ie,{size:16,weight:`bold`}),onClick:i,children:`New chat`}),(0,E.jsx)(xn,{type:`auto`,offsetScrollbars:!0,flex:1,mx:-4,px:4,children:(0,E.jsxs)(pe,{gap:`lg`,pb:`sm`,children:[e&&(0,E.jsxs)(pe,{gap:4,children:[(0,E.jsx)(av,{children:`Chats`}),le.isLoading&&(0,E.jsx)(se,{py:`md`,children:(0,E.jsx)(_,{size:`xs`})}),le.isError&&(0,E.jsx)(ee,{color:`bad`,radius:`md`,p:`xs`,children:`Chats could not be loaded.`}),!le.isLoading&&!le.isError&&de.length===0&&(0,E.jsx)(b,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:m?`No matching chats`:`No chats yet`}),C.map(e=>(0,E.jsxs)(pe,{gap:2,children:[C.length>1&&(0,E.jsx)(b,{c:`dimmed`,size:`xs`,px:`sm`,pt:4,children:e.label}),e.threads.map(e=>(0,E.jsx)(ov,{thread:e,active:e.threadId===t,onSelect:()=>a(e.threadId),onRename:()=>ge(e),onDelete:()=>{ie(``),x(e)}},e.threadId))]},e.label)),le.hasNextPage&&(0,E.jsx)(_e,{variant:`subtle`,color:`gray`,size:`compact-sm`,loading:le.isFetchingNextPage,onClick:()=>void le.fetchNextPage(),children:`See all`})]}),me.length>0&&l&&(0,E.jsxs)(pe,{gap:4,children:[(0,E.jsx)(av,{children:`Services`}),me.map(e=>(0,E.jsx)(y,{className:`rail-row`,p:`sm`,onClick:()=>l(e),children:(0,E.jsx)(b,{size:`sm`,fw:500,truncate:!0,children:e})},e))]}),(0,E.jsxs)(pe,{gap:4,children:[(0,E.jsx)(av,{children:`Dashboards`}),ue.isLoading&&(0,E.jsx)(se,{py:`md`,children:(0,E.jsx)(_,{size:`xs`})}),ue.isError&&(0,E.jsx)(ee,{color:`bad`,radius:`md`,p:`xs`,children:`Dashboards could not be loaded.`}),!ue.isLoading&&!ue.isError&&m&&he.length===0&&(0,E.jsx)(b,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:`No matching dashboards`}),he.map(e=>{let t=e.id===n;return(0,E.jsx)(y,{className:`rail-row`,"data-active":t||void 0,"aria-current":t?`page`:void 0,p:`sm`,onClick:()=>s(e.id),children:(0,E.jsxs)(ne,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,E.jsx)(b,{size:`sm`,fw:t?600:500,truncate:!0,children:e.name}),e.is_default&&(0,E.jsx)(st,{size:`xs`,variant:`light`,color:`gray`,children:`Default`})]})},e.id)}),e&&(0,E.jsx)(_e,{variant:`subtle`,color:`gray`,size:`compact-sm`,justify:`flex-start`,leftSection:(0,E.jsx)(ut,{size:14,weight:`fill`}),onClick:c,children:`Create with AI`})]})]})}),(0,E.jsx)(Oe,{ref:ce,value:f,onChange:e=>p(e.currentTarget.value),leftSection:(0,E.jsx)(J_,{size:15}),rightSection:(0,E.jsx)(Fo,{size:`xs`,children:`⌘K`}),rightSectionWidth:44,placeholder:`Search`,"aria-label":`Search chats, dashboards and services`,size:`sm`}),(0,E.jsx)(bt,{opened:h!==null,onClose:()=>!ae&&g(null),title:`Rename chat`,centered:!0,children:(0,E.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),w()},children:(0,E.jsxs)(pe,{children:[(0,E.jsx)(Oe,{label:`Name`,value:S,onChange:e=>te(e.currentTarget.value),maxLength:120,autoFocus:!0}),re&&(0,E.jsx)(ee,{color:`bad`,children:re}),(0,E.jsxs)(ne,{justify:`flex-end`,children:[(0,E.jsx)(_e,{variant:`default`,onClick:()=>g(null),disabled:ae,children:`Cancel`}),(0,E.jsx)(_e,{type:`submit`,loading:ae,disabled:!S.trim(),children:`Save`})]})]})})}),(0,E.jsx)(bt,{opened:v!==null,onClose:()=>!ae&&x(null),title:`Delete chat?`,centered:!0,children:(0,E.jsxs)(pe,{children:[(0,E.jsxs)(b,{size:`sm`,children:[`This permanently removes `,(0,E.jsx)(b,{span:!0,fw:650,children:v?.title}),` and its saved messages.`]}),re&&(0,E.jsx)(ee,{color:`bad`,children:re}),(0,E.jsxs)(ne,{justify:`flex-end`,children:[(0,E.jsx)(_e,{variant:`default`,onClick:()=>x(null),disabled:ae,children:`Cancel`}),(0,E.jsx)(_e,{color:`bad`,loading:ae,onClick:()=>void ve(),children:`Delete`})]})]})})]})}function av({children:e}){return(0,E.jsx)(b,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e})}function ov({thread:e,active:t,onSelect:n,onRename:r,onDelete:i}){return(0,E.jsx)(ye,{"data-active":t||void 0,className:`rail-row`,children:(0,E.jsxs)(ne,{gap:2,wrap:`nowrap`,children:[(0,E.jsx)(y,{onClick:n,"aria-current":t?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,E.jsxs)(pe,{gap:0,children:[(0,E.jsx)(b,{size:`sm`,fw:t?600:500,truncate:!0,children:e.title}),(0,E.jsx)(b,{c:`dimmed`,size:`xs`,children:dv(e.updatedAt)})]})}),(0,E.jsxs)(wt,{position:`bottom-end`,withinPortal:!0,children:[(0,E.jsx)(wt.Target,{children:(0,E.jsx)(Dn,{className:`rail-row-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:4,"aria-label":`Actions for ${e.title}`,children:(0,E.jsx)(un,{size:18,weight:`bold`})})}),(0,E.jsxs)(wt.Dropdown,{children:[(0,E.jsx)(wt.Item,{leftSection:(0,E.jsx)(Q_,{size:15}),onClick:r,children:`Rename`}),(0,E.jsx)(wt.Item,{color:`bad`,leftSection:(0,E.jsx)(fn,{size:15}),onClick:i,children:`Delete`})]})]})]})})}function sv(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function cv(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}var lv=[`Today`,`Yesterday`,`Previous 7 days`,`Older`];function uv(e){let t=cv(new Date),n=new Map;for(let r of e){let e=Math.floor((t-cv(sv(r.updatedAt)))/864e5),i=e<=0?`Today`:e===1?`Yesterday`:e<=7?`Previous 7 days`:`Older`,a=n.get(i)??[];a.push(r),n.set(i,a)}return lv.filter(e=>n.has(e)).map(e=>({label:e,threads:n.get(e)}))}function dv(e){let t=sv(e),n=cv(new Date);return Math.floor((n-cv(t))/864e5)<=1?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(t):new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}).format(t)}function fv({children:e}){let{agentAvailable:t,threadID:n,threadMissing:r,newThread:i,selectThread:a,openChat:o}=bn(),s=Ee(),c=ca({select:e=>e.location.pathname}),{dashboardId:l}=At({strict:!1}),u=c===`/chat`||c.startsWith(`/chat/`),[d,f]=ua(!1),[p,m]=(0,T.useState)(!1),[h,g]=(0,T.useState)(``),_=(0,T.useRef)(null),v=ue(`(max-width: 62em)`),y=(0,T.useRef)(v);y.current=v,(0,T.useEffect)(()=>{f.close()},[c]),(0,T.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),y.current?(m(!0),f.open()):_.current?.focusSearch())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let b={agentAvailable:t,activeThreadID:u&&!r&&c!==`/chat`?n:void 0,activeDashboardID:l,onNewChat:i,onSelectThread:a,onDeletedThread:e=>{e===n&&i()},onSelectDashboard:e=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e}}),onCreateDashboard:()=>o(Sn),onInvestigateService:e=>o(`Investigate the ${e} service. Explain its errors and latency.`)};return(0,E.jsxs)(Qa,{header:{height:52},navbar:{width:256,breakpoint:`md`,collapsed:{mobile:!0}},padding:0,children:[(0,E.jsx)(Qa.Header,{children:(0,E.jsxs)(ne,{h:`100%`,px:{base:`sm`,sm:`md`},justify:`space-between`,wrap:`nowrap`,children:[(0,E.jsxs)(ne,{gap:`sm`,wrap:`nowrap`,children:[(0,E.jsx)(po,{hiddenFrom:`md`,opened:d,onClick:()=>{m(!1),f.toggle()},size:`sm`,"aria-label":d?`Close navigation`:`Open navigation`}),(0,E.jsx)(he,{size:`small`})]}),(0,E.jsxs)(ne,{gap:`xs`,wrap:`nowrap`,children:[(0,E.jsx)(pv,{}),(0,E.jsx)(mv,{onError:g})]})]})}),(0,E.jsx)(Qa.Navbar,{p:`sm`,children:(0,E.jsx)(iv,{ref:_,...b})}),(0,E.jsx)(Mo,{opened:d,onClose:f.close,hiddenFrom:`md`,size:288,padding:`sm`,title:(0,E.jsx)(he,{size:`small`}),overlayProps:{backgroundOpacity:.24,blur:1},children:(0,E.jsx)(iv,{...b,autoFocusSearch:d&&p})}),(0,E.jsxs)(Qa.Main,{children:[h&&(0,E.jsx)(ee,{color:`bad`,m:`md`,withCloseButton:!0,onClose:()=>g(``),children:h}),e]})]})}function pv(){let{setColorScheme:e}=kn(),t=An(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`;return(0,E.jsx)(Tn,{label:`Switch to ${n} theme`,children:(0,E.jsx)(Dn,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onClick:()=>e(n),children:t===`dark`?(0,E.jsx)(nv,{size:17,weight:`bold`}):(0,E.jsx)(X_,{size:17,weight:`bold`})})})}function mv({onError:e}){let t=ke(),n=(t.name.trim()||t.email.trim()||`?`).charAt(0).toUpperCase();return(0,E.jsxs)(wt,{position:`bottom-end`,withinPortal:!0,shadow:`md`,children:[(0,E.jsx)(wt.Target,{children:(0,E.jsx)(Dn,{variant:`subtle`,color:`gray`,size:`lg`,radius:`xl`,"aria-label":`Account menu`,children:(0,E.jsx)(lo,{size:26,radius:`xl`,color:`brand`,children:n})})}),(0,E.jsxs)(wt.Dropdown,{children:[(0,E.jsx)(wt.Label,{children:t.email||`Signed in`}),(0,E.jsx)(wt.Item,{component:`a`,href:`https://github.com/labstack/fanout`,target:`_blank`,rel:`noopener noreferrer`,leftSection:(0,E.jsx)(W_,{size:15,weight:`bold`}),children:`Fanout on GitHub`}),(0,E.jsx)(wt.Item,{component:`a`,href:`https://labstack.com`,target:`_blank`,rel:`noopener noreferrer`,leftSection:(0,E.jsx)(K_,{size:15}),children:`LabStack`}),(0,E.jsx)(wt.Divider,{}),(0,E.jsx)(wt.Item,{leftSection:(0,E.jsx)(ev,{size:15}),onClick:()=>void xe().catch(t=>e(t instanceof Error?t.message:`Sign-out failed — your session is still active.`)),children:`Sign out`})]})]})}function hv(){let{agent_available:e}=De(),t=Ee(),n=St(),{threadId:r}=At({strict:!1}),[i,a]=(0,T.useState)(Tt),o=(0,T.useRef)(new Set),s=r??i,[c,l]=(0,T.useState)([]),[u,d]=(0,T.useState)({}),[f,p]=(0,T.useState)(``),[m,h]=(0,T.useState)(!1),[g,_]=(0,T.useState)(!1),[v,y]=(0,T.useState)(``),[b,x]=(0,T.useState)(``),[ee,S]=(0,T.useState)(``),[te,ne]=(0,T.useState)(0),re=(0,T.useRef)(``),ie=(0,T.useRef)(null),ae=(0,T.useRef)(null),oe=(0,T.useRef)(0),se=(0,T.useMemo)(()=>new k_({url:`/api/agent`,threadId:s,fetch:(e,t)=>Te(e,t)}),[s]),ce=!e||f===s;function le(){oe.current=0,y(``)}(0,T.useEffect)(()=>{let t=!0;if(l([]),d({}),p(``),h(!1),_(!1),le(),S(``),!e){p(s);return}!r||o.current.has(s)?(se.setMessages([]),p(s)):Te(`/api/agent/threads/${encodeURIComponent(s)}`).then(async e=>{if(e.status===404)return null;if(!e.ok)throw Error(`Unable to load thread (${e.status})`);return e.json()}).then(e=>{if(t){if(e===null){h(!0),p(s);return}se.setMessages(e.messages??[]),l([...e.messages??[]]),p(s)}}).catch(()=>{t&&(re.current=``,S(`This chat could not be restored. Start a new chat or try again.`))});let i=se.subscribe({onEvent:({messages:e})=>l([...e]),onRunInitialized:()=>{_(!0),S(``)},onToolCallStartEvent:({event:e})=>{oe.current+=1,y(En(e.toolCallName))},onToolCallEndEvent:()=>{oe.current=Math.max(0,oe.current-1),oe.current===0&&y(``)},onRunFinalized:({messages:e})=>{let t=[...e];l(t),d(e=>{let n={...e};for(let e of t)e.role===`assistant`&&!n[e.id]&&(n[e.id]=Date.now());return n}),_(!1),le(),o.current.delete(s),n.invalidateQueries({queryKey:kt})},onRunFailed:e=>{console.error(`Agent run failed`,e),S(`Fanout could not complete this analysis.`),_(!1),le(),o.current.delete(s),n.invalidateQueries({queryKey:kt})}});return()=>{t=!1,i.unsubscribe(),se.abortRun()}},[se,e,n,te,s]),(0,T.useEffect)(()=>{ie.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[c,g]),(0,T.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,i=n?.matches(`input, textarea, [contenteditable='true']`);e.key===`/`&&!i&&(e.preventDefault(),r?requestAnimationFrame(()=>ae.current?.focus()):t({to:`/chat`}).then(()=>requestAnimationFrame(()=>ae.current?.focus()))),e.key===`Escape`&&n===ae.current&&(x(``),ae.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]);async function ue(){_(!0),S(``);try{await se.runAgent()}catch(e){console.error(`Agent run failed`,e),S(`Fanout could not complete this analysis.`),_(!1),le(),o.current.delete(s)}}async function de(n){let i=n.trim();if(!e||!i||g||!ce||m)return;r||(o.current.add(s),t({to:`/chat/$threadId`,params:{threadId:s},replace:!0}));let a={id:Tt(),role:`user`,content:i};se.addMessage(a),l([...se.messages]),d(e=>({...e,[a.id]:Date.now()})),x(``),await ue()}(0,T.useEffect)(()=>{let e=re.current;ce&&r&&e&&(re.current=``,de(e))},[ce,r,s]);function C(e){e.preventDefault(),de(b)}function fe(){se.abortRun(),_(!1),le(),o.current.delete(s)}function pe(){!g&&se.messages.some(e=>e.role===`user`)&&ue()}function me(n){if(!e)return;let r=Tt();o.current.add(r),re.current=n??``,t({to:`/chat/$threadId`,params:{threadId:r}})}function he(){se.abortRun(),re.current=``,a(Tt()),t({to:`/chat`})}function ge(e){t({to:`/chat/$threadId`,params:{threadId:e}})}function _e(){ne(e=>e+1)}return(0,E.jsx)(wn.Provider,{value:{agentAvailable:e,threadID:s,threadMissing:m,messages:c,messageTimes:u,ready:ce,running:g,activity:v,input:b,setInput:x,error:ee,bottomRef:ie,inputRef:ae,send:de,submit:C,stop:fe,retry:pe,reloadThread:_e,openChat:me,newThread:he,selectThread:ge},children:(0,E.jsx)(fv,{children:(0,E.jsx)(Qi,{})})})}function gv(){let e=(0,T.useMemo)(()=>new P_,[]);return(0,E.jsx)(Ye,{client:e,children:(0,E.jsx)(Ae,{children:(0,E.jsx)(hv,{})})})}var _v=hn({component:gv,notFoundComponent:()=>(0,E.jsx)(Se,{to:`/`,replace:!0})}),vv=ln(`/`)({component:Et(()=>On(()=>import(`./routes-4U_e7tED.js`),__vite__mapDeps([0,1,2])),`component`)}),yv=ln(`/chat/`)({component:Et(()=>On(()=>import(`./chat.index-CtOVI6Uj.js`),__vite__mapDeps([3,4,1,5,6])),`component`)}),bv=ln(`/chat/$threadId`)({component:Et(()=>On(()=>import(`./chat._threadId-CtOVI6Uj.js`),__vite__mapDeps([7,4,1,5,6])),`component`)}),xv=ln(`/dashboards/`)({component:Et(()=>On(()=>import(`./dashboards.index-CvFJDsq9.js`),__vite__mapDeps([8,1,2,5,9,10,11,6])),`component`),validateSearch:sn}),Sv=ln(`/dashboards/$dashboardId`)({component:Et(()=>On(()=>import(`./dashboards._dashboardId-CNMYsiMO.js`),__vite__mapDeps([12,1,2,5,9,10,11,6])),`component`),validateSearch:sn}),Cv=vv.update({id:`/`,path:`/`,getParentRoute:()=>_v}),wv=yv.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>_v}),Tv=bv.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>_v}),Ev=xv.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>_v}),Dv={IndexRoute:Cv,ChatThreadIdRoute:Tv,DashboardsDashboardIdRoute:Sv.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>_v}),ChatIndexRoute:wv,DashboardsIndexRoute:Ev},Ov=ia({routeTree:_v._addFileChildren(Dv)._addFileTypes(),defaultPreload:`intent`,scrollRestoration:!0}),kv={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:an,brand:en,ok:nn,warn:Wt,bad:qt,info:Yt},defaultRadius:`md`,fontFamily:Dt.body,fontFamilyMonospace:Dt.display,headings:{fontFamily:Dt.body,fontWeight:`600`},cursorType:`pointer`},Av=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":Rt.light.muted},dark:{}}),jv=Oa(kv);(0,Ec.createRoot)(document.getElementById(`root`)).render((0,E.jsx)(T.StrictMode,{children:(0,E.jsx)(Da,{theme:jv,defaultColorScheme:`auto`,cssVariablesResolver:Av,children:(0,E.jsx)(sa,{router:Ov})})}));export{xv as n,Sv as t}; \ No newline at end of file diff --git a/internal/ui/dist/index.html b/internal/ui/dist/index.html index 8af378879..72aa754b0 100644 --- a/internal/ui/dist/index.html +++ b/internal/ui/dist/index.html @@ -21,7 +21,7 @@ document.documentElement.setAttribute("data-mantine-color-scheme", computed); } catch (e) {} - + diff --git a/ui/apps/src/performance.tsx b/ui/apps/src/performance.tsx index 8d49a1f33..dfaf17f71 100644 --- a/ui/apps/src/performance.tsx +++ b/ui/apps/src/performance.tsx @@ -43,14 +43,60 @@ function ActivityView({ data, dark, window }: { data: Performance; dark: boolean return = 750 ? "warn" : "ok"} />= .01 ? "bad" : "ok"} /> point.spans), color: seriesColor("operations", dark) }, { name: "Logs", data: data.points.map((point) => point.log_count), color: seriesColor("logs", dark) }]} /> - point.p95_ms), color: statusHex(dark).warn }, { name: "Error rate × 1000", data: data.points.map((point) => point.error_rate * 1000), color: statusHex(dark).bad }]} /> + point.p95_ms), color: statusHex(dark).warn, axis: "duration" }, { name: "Error rate", data: data.points.map((point) => point.error_rate), color: statusHex(dark).bad, axis: "percent" }]} /> ; } -function PerformanceChart({ labels, title, series, dark, window }: { labels: string[]; title: string; series: Array<{ name: string; data: number[]; color: string }>; dark: boolean; window: string }) { +type Axis = "count" | "duration" | "percent"; + +const axisFormat: Record string> = { + count: (value) => integer.format(value), + duration, + percent, +}; + +/* Tick labels are not table cells. `percent` says "<0.01%" for a rate too small + to write out, which is right in a cell and useless on an axis — every + gridline would carry the same label. Ticks state the number they sit on. */ +const tickFormat: Record string> = { + count: (value) => integer.format(value), + duration, + percent: (value) => `${(value * 100).toFixed(value >= 0.1 ? 0 : 2)}%`, +}; + +/* Each series is drawn against an axis in its own units. A rate used to be + multiplied by a thousand so it could share the latency axis, which put + "Error rate × 1000" in the legend and left the reader converting in their + head. Latency labels read in the units `duration` chooses, so one axis no + longer carries both "0.0ms" and "100.00s". */ +function PerformanceChart({ labels, title, series, dark, window }: { labels: string[]; title: string; series: Array<{ name: string; data: number[]; color: string; axis?: Axis }>; dark: boolean; window: string }) { const option = useMemo(() => { const colors = chartTheme(dark); - return { color: series.map((item) => item.color), grid: { left: 42, right: 18, top: 42, bottom: 30 }, legend: { top: 5, left: 0, textStyle: { color: colors.muted, fontSize: 10 }, icon: "circle", itemWidth: 7, itemHeight: 7 }, tooltip: { trigger: "axis", backgroundColor: colors.surface, borderColor: colors.border, textStyle: { color: colors.text, fontSize: 10 } }, xAxis: { type: "category", data: labels.map((value) => timelineTimestamp(value, window)), boundaryGap: false, axisLine: { lineStyle: { color: colors.border } }, axisTick: { show: false }, axisLabel: { color: colors.muted, fontSize: 9, hideOverlap: true } }, yAxis: { type: "value", splitLine: { lineStyle: { color: colors.grid } }, axisLabel: { color: colors.muted, fontSize: 9 } }, series: series.map((item) => ({ name: item.name, type: "line", data: item.data, smooth: .22, showSymbol: false, lineStyle: { width: 2 }, areaStyle: { opacity: .045 } })) }; + const axes = [...new Set(series.map((item) => item.axis ?? "count"))] as Axis[]; + const unitOf = (name: string) => series.find((item) => item.name === name)?.axis ?? "count"; + return { + color: series.map((item) => item.color), + grid: { left: 46, right: axes.length > 1 ? 54 : 18, top: 42, bottom: 30 }, + legend: { top: 5, left: 0, textStyle: { color: colors.muted, fontSize: 10 }, icon: "circle", itemWidth: 7, itemHeight: 7 }, + tooltip: { + trigger: "axis", backgroundColor: colors.surface, borderColor: colors.border, textStyle: { color: colors.text, fontSize: 10 }, + formatter: (params: Array<{ seriesName: string; value: number; marker: string; axisValueLabel: string }>) => + [params[0]?.axisValueLabel, ...params.map((entry) => `${entry.marker}${entry.seriesName}: ${axisFormat[unitOf(entry.seriesName)](entry.value)}`)].join("
"), + }, + xAxis: { type: "category", data: labels.map((value) => timelineTimestamp(value, window)), boundaryGap: false, axisLine: { lineStyle: { color: colors.border } }, axisTick: { show: false }, axisLabel: { color: colors.muted, fontSize: 9, hideOverlap: true } }, + yAxis: axes.map((kind, index) => ({ + type: "value", + position: index === 0 ? "left" : "right", + min: 0, + // A rate series that is all zeroes has no range of its own, and the + // chart would invent one: a "100.0%" tick above a window with no errors + // in it. + ...(kind === "percent" && !series.some((item) => item.axis === "percent" && item.data.some((value) => value > 0)) ? { max: 0.01 } : {}), + splitLine: index === 0 ? { lineStyle: { color: colors.grid } } : { show: false }, + axisLabel: { color: colors.muted, fontSize: 9, formatter: (value: number) => tickFormat[kind](value) }, + })), + series: series.map((item) => ({ name: item.name, type: "line", yAxisIndex: axes.indexOf(item.axis ?? "count"), data: item.data, smooth: .22, showSymbol: false, lineStyle: { width: 2 }, areaStyle: { opacity: .045 } })), + }; }, [dark, labels, series, window]); return {title}; } diff --git a/ui/format.ts b/ui/format.ts index ad11aeb31..d75aea510 100644 --- a/ui/format.ts +++ b/ui/format.ts @@ -1,12 +1,48 @@ export const integer = new Intl.NumberFormat(undefined, { maximumFractionDigits: 0 }); +/** A rate as a percentage. A rate that is small but real is said to be small + * rather than rounded away: "0.00%" beside a red health badge reads as a + * contradiction, and the reader cannot tell it from a service with no errors + * at all. */ export function percent(value: number) { + if (!Number.isFinite(value)) return "—"; + if (value > 0 && value < 0.0001) return "<0.01%"; return `${(value * 100).toFixed(value >= 0.1 ? 1 : 2)}%`; } -export function duration(value: number) { - if (value >= 1000) return `${(value / 1000).toFixed(2)}s`; - return `${value.toFixed(value >= 100 ? 0 : 1)}ms`; +/** A duration in the largest unit that still says something precise. + * + * Ten minutes was printed as "600.00s": two decimals of false precision on a + * number nobody reads in seconds, and it sat in the same column as "25.0ms", + * so a glance could not compare them. Above a minute the value reads in + * minutes and hours, and the decimals shrink as the magnitude grows. */ +export function duration(value: number): string { + if (!Number.isFinite(value)) return "—"; + // A negative duration is bad data, not missing data, and saying so is more + // use than an em dash that reads as "nothing recorded". + if (value < 0) return `-${duration(-value)}`; + if (value === 0) return "0ms"; + // Small but real, for the same reason percent says "<0.01%": a four-microsecond + // span is not a zero-length one, and the waterfall is full of them. + if (value < 0.01) return "<0.01ms"; + if (value < 1) return `${value.toFixed(2)}ms`; + // Each unit decides its precision on the value it will actually print, so a + // number never rounds up into the next unit's territory — 999.5ms was + // rendered "1000ms", four digits of milliseconds in a column of seconds. + if (Math.round(value * 10) / 10 < 100) return `${value.toFixed(1)}ms`; + if (Math.round(value) < 1000) return `${Math.round(value)}ms`; + + const totalSeconds = Math.round(value / 100) / 10; + if (totalSeconds < 10) return `${(value / 1000).toFixed(2)}s`; + if (totalSeconds < 60) return `${totalSeconds.toFixed(1)}s`; + + const whole = Math.round(value / 1000); + const minutes = Math.floor(whole / 60); + const seconds = whole % 60; + if (minutes < 60) return seconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`; + const hours = Math.floor(minutes / 60); + const restMinutes = minutes % 60; + return restMinutes === 0 ? `${hours}h` : `${hours}h ${restMinutes}m`; } export function windowLabel(window: string) { diff --git a/ui/health.ts b/ui/health.ts new file mode 100644 index 000000000..b5e1a3d0d --- /dev/null +++ b/ui/health.ts @@ -0,0 +1,25 @@ +/* The thresholds a number is graded against, mirroring classify() in + internal/observability/service.go. They live here so a cell can be coloured + by the signal it actually shows: a service can be unhealthy on latency alone, + and colouring its error rate by that verdict paints "0.00%" red on a row with + no errors at all. The row badge still carries the combined verdict. */ + +export const latencyDegradedMS = 750; +export const latencyUnhealthyMS = 2000; +export const errorRateDegraded = 0.01; +export const errorRateUnhealthy = 0.05; + +/** Mantine colour for a latency figure, or undefined to leave it unstyled. */ +export function latencyTone(ms: number): string | undefined { + if (ms >= latencyUnhealthyMS) return "bad"; + if (ms >= latencyDegradedMS) return "warn"; + return undefined; +} + +/** Mantine colour for an error rate. Dimmed rather than green: a rate of zero + * is the resting state, and it should recede rather than announce itself. */ +export function errorRateTone(rate: number): string { + if (rate >= errorRateUnhealthy) return "bad"; + if (rate >= errorRateDegraded) return "warn"; + return "dimmed"; +} diff --git a/ui/host/src/format.test.ts b/ui/host/src/format.test.ts new file mode 100644 index 000000000..f82795e2e --- /dev/null +++ b/ui/host/src/format.test.ts @@ -0,0 +1,73 @@ +import { describe, expect, it } from "vitest"; +import { duration, percent } from "../../format"; + +describe("duration", () => { + it("keeps sub-millisecond values legible", () => { + expect(duration(0)).toBe("0ms"); + expect(duration(0.42)).toBe("0.42ms"); + }); + + it("drops decimals as the millisecond value grows", () => { + expect(duration(48.16)).toBe("48.2ms"); + expect(duration(240)).toBe("240ms"); + }); + + it("reads seconds without false precision", () => { + expect(duration(7650)).toBe("7.65s"); + expect(duration(13691)).toBe("13.7s"); + }); + + // "600.00s" was two decimals of false precision on ten minutes, sitting in + // the same column as "25.0ms". + it("reads minutes and hours above a minute", () => { + expect(duration(600_000)).toBe("10m"); + expect(duration(240_020)).toBe("4m"); + expect(duration(263_000)).toBe("4m 23s"); + expect(duration(3_600_000)).toBe("1h"); + expect(duration(5_400_000)).toBe("1h 30m"); + }); + + it("never rounds seconds up into a full minute", () => { + expect(duration(119_600)).toBe("2m"); + }); + + it("says nothing rather than something wrong", () => { + expect(duration(Number.NaN)).toBe("—"); + }); +}); + +describe("percent", () => { + it("keeps two decimals for small rates and one for large", () => { + expect(percent(0.0216)).toBe("2.16%"); + expect(percent(0.141)).toBe("14.1%"); + }); + + // A rate that rounds to zero beside a red badge reads as a contradiction. + it("says a small rate is small rather than zero", () => { + expect(percent(0.00002)).toBe("<0.01%"); + expect(percent(0)).toBe("0.00%"); + }); +}); + +describe("duration seams", () => { + // 999.5ms used to print "1000ms": four digits of milliseconds sitting in a + // column of seconds. + it("never rounds up into the unit it just left", () => { + expect(duration(999.5)).toBe("1.00s"); + expect(duration(999.9)).toBe("1.00s"); + expect(duration(99.96)).toBe("100ms"); + expect(duration(59_950)).toBe("1m"); + expect(duration(3_599_600)).toBe("1h"); + }); + + // A microsecond span is not a zero-length one, for the same reason a rate of + // 0.002% is not no errors. + it("says a tiny duration is tiny rather than zero", () => { + expect(duration(0.004)).toBe("<0.01ms"); + expect(duration(0)).toBe("0ms"); + }); + + it("shows a negative duration rather than hiding it as missing", () => { + expect(duration(-5)).toBe("-5.0ms"); + }); +}); diff --git a/ui/host/src/widgets/activity.tsx b/ui/host/src/widgets/activity.tsx index 5c1380973..5e78866ed 100644 --- a/ui/host/src/widgets/activity.tsx +++ b/ui/host/src/widgets/activity.tsx @@ -2,6 +2,7 @@ import { ScrollArea, Table, Text } from "@mantine/core"; import type { KeyboardEvent } from "react"; import type { Overview } from "../../../contracts"; import { duration, percent } from "../../../format"; +import { errorRateTone, latencyTone } from "../../../health"; import { useObservability, widgetParams } from "./data"; import { Empty, HealthBadge, WidgetError } from "./pieces"; import type { WidgetBodyProps } from "./widget-card"; @@ -30,8 +31,13 @@ export default function ActivityWidget({ widget, filters, agentAvailable, onOpen style: { cursor: "pointer" }, })}> - {duration(entry.p95_ms)} - = 0.01 ? "bad" : "dimmed"}>{percent(entry.error_rate)} + {duration(entry.p95_ms)} + {/* Each number is coloured by the signal it shows, against the same + thresholds the badge is computed from. Colouring the rate by the row + verdict instead put "0.00%" in red on a service that was unhealthy + purely on latency — red where there were no errors, and nothing on + the figure that caused it. */} + {percent(entry.error_rate)} )} ;