diff --git a/dist/assets/index.d79bd832.js b/dist/assets/index.d44a9096.js similarity index 95% rename from dist/assets/index.d79bd832.js rename to dist/assets/index.d44a9096.js index a12d65d..2d1e0f2 100644 --- a/dist/assets/index.d79bd832.js +++ b/dist/assets/index.d44a9096.js @@ -762,7 +762,7 @@ html body { top:0 !important; right:0 !important; pointer-events: none !important; -`,Xae=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],WC={},Ha;function Yae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&WC[n])return WC[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),s=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),a=Xae.map(function(f){return"".concat(f,":").concat(r.getPropertyValue(f))}).join(";"),u={sizingStyle:a,paddingSize:o,borderSize:s,boxSizing:i};return t&&n&&(WC[n]=u),u}function Qae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ha||(Ha=document.createElement("textarea"),Ha.setAttribute("tab-index","-1"),Ha.setAttribute("aria-hidden","true"),document.body.appendChild(Ha)),e.getAttribute("wrap")?Ha.setAttribute("wrap",e.getAttribute("wrap")):Ha.removeAttribute("wrap");var i=Yae(e,t),o=i.paddingSize,s=i.borderSize,a=i.boxSizing,u=i.sizingStyle;Ha.setAttribute("style","".concat(u,";").concat(Zae)),Ha.value=e.value||e.placeholder||"";var f=void 0,p=void 0,g,v=Ha.scrollHeight;if(a==="border-box"?v+=s:a==="content-box"&&(v-=o),n!==null||r!==null){Ha.value=" ";var b=Ha.scrollHeight-o;n!==null&&(f=b*n,a==="border-box"&&(f=f+o+s),v=Math.max(f,v)),r!==null&&(p=b*r,a==="border-box"&&(p=p+o+s),g=v>p?"":"hidden",v=Math.min(p,v))}var _={height:v,overflowY:g,resize:"none"};return f&&(_.minHeight=f),p&&(_.maxHeight=p),_}var Jae=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],GC=0,qC=1,ZC=2,ese=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-textarea":n;e.onPressEnter;var i=e.defaultValue,o=e.value,s=e.autoSize,a=e.onResize,u=e.className,f=e.style,p=e.disabled,g=e.onChange;e.onInternalAutoSize;var v=kn(e,Jae),b=Ei(i,{value:o,postState:function(Ie){return Ie!=null?Ie:""}}),_=$e(b,2),T=_[0],I=_[1],P=function(Ie){I(Ie.target.value),g==null||g(Ie)},M=E.exports.useRef();E.exports.useImperativeHandle(t,function(){return{textArea:M.current}});var D=E.exports.useMemo(function(){return s&&on(s)==="object"?[s.minRows,s.maxRows]:[]},[s]),N=$e(D,2),z=N[0],$=N[1],j=!!s,U=function(){try{if(document.activeElement===M.current){var Ie=M.current,Me=Ie.selectionStart,Ae=Ie.selectionEnd,ze=Ie.scrollTop;M.current.setSelectionRange(Me,Ae),M.current.scrollTop=ze}}catch{}},q=E.exports.useState(ZC),Y=$e(q,2),te=Y[0],Z=Y[1],X=E.exports.useState(),J=$e(X,2),ue=J[0],re=J[1],se=function(){Z(GC)};Si(function(){j&&se()},[o,z,$,j]),Si(function(){if(te===GC)Z(qC);else if(te===qC){var Re=Qae(M.current,!1,z,$);Z(ZC),re(Re)}else U()},[te]);var oe=E.exports.useRef(),he=function(){cr.cancel(oe.current)},Ce=function(Ie){te===ZC&&(a==null||a(Ie),s&&(he(),oe.current=cr(function(){se()})))};E.exports.useEffect(function(){return he},[]);var Se=j?ue:null,be=me(me({},f),Se);return(te===GC||te===qC)&&(be.overflowY="hidden",be.overflowX="hidden"),A(Ql,{onResize:Ce,disabled:!(s||a),children:A("textarea",{...v,ref:M,style:be,className:je(r,u,ae({},"".concat(r,"-disabled"),p)),disabled:p,value:T,onChange:P})})}),tse=function(e){si(n,e);var t=li(n);function n(r){var i;jr(this,n),i=t.call(this,r),i.resizableTextArea=void 0,i.focus=function(){i.resizableTextArea.textArea.focus()},i.saveTextArea=function(s){i.resizableTextArea=s},i.handleChange=function(s){var a=i.props.onChange;i.setValue(s.target.value),a&&a(s)},i.handleKeyDown=function(s){var a=i.props,u=a.onPressEnter,f=a.onKeyDown;s.keyCode===13&&u&&u(s),f&&f(s)};var o=typeof r.value>"u"||r.value===null?r.defaultValue:r.value;return i.state={value:o},i}return Hr(n,[{key:"setValue",value:function(i,o){"value"in this.props||this.setState({value:i},o)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return A(ese,{...this.props,value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea})}}],[{key:"getDerivedStateFromProps",value:function(i){return"value"in i?{value:i.value}:null}}]),n}(E.exports.Component),nse=aa("text","input");function rse(e){return!!(e.addonBefore||e.addonAfter)}var ise=function(e){si(n,e);var t=li(n);function n(){return jr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"renderClearIcon",value:function(i){var o,s=this.props,a=s.value,u=s.disabled,f=s.readOnly,p=s.handleReset,g=s.suffix,v=!u&&!f&&a,b="".concat(i,"-clear-icon");return A(zh,{onClick:p,onMouseDown:function(T){return T.preventDefault()},className:je((o={},ae(o,"".concat(b,"-hidden"),!v),ae(o,"".concat(b,"-has-suffix"),!!g),o),b),role:"button"})}},{key:"renderTextAreaWithClearIcon",value:function(i,o,s){var a,u=this.props,f=u.value,p=u.allowClear,g=u.className,v=u.style,b=u.direction,_=u.bordered,T=u.hidden,I=u.status,P=s.status,M=s.hasFeedback;if(!p)return Pi(o,{value:f});var D=je("".concat(i,"-affix-wrapper"),"".concat(i,"-affix-wrapper-textarea-with-clear-btn"),Xc("".concat(i,"-affix-wrapper"),nv(P,I),M),(a={},ae(a,"".concat(i,"-affix-wrapper-rtl"),b==="rtl"),ae(a,"".concat(i,"-affix-wrapper-borderless"),!_),ae(a,"".concat(g),!rse(this.props)&&g),a));return it("span",{className:D,style:v,hidden:T,children:[Pi(o,{style:null,value:f}),this.renderClearIcon(i)]})}},{key:"render",value:function(){var i=this;return A(Rs.Consumer,{children:function(o){var s=i.props,a=s.prefixCls,u=s.inputType,f=s.element;if(u===nse[0])return i.renderTextAreaWithClearIcon(a,f,o)}})}}]),n}(E.exports.Component);const ose=ise;var ase=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);ir&&(i=t),i}var sse=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.bordered,o=i===void 0?!0:i,s=e.showCount,a=s===void 0?!1:s,u=e.maxLength,f=e.className,p=e.style,g=e.size,v=e.disabled,b=e.onCompositionStart,_=e.onCompositionEnd,T=e.onChange,I=e.status,P=ase(e,["prefixCls","bordered","showCount","maxLength","className","style","size","disabled","onCompositionStart","onCompositionEnd","onChange","status"]),M=E.exports.useContext(zn),D=M.getPrefixCls,N=M.direction,z=E.exports.useContext(Jl),$=E.exports.useContext(fu),j=v!=null?v:$,U=E.exports.useContext(Rs),q=U.status,Y=U.hasFeedback,te=U.isFormItemInput,Z=U.feedbackIcon,X=nv(q,I),J=E.exports.useRef(null),ue=E.exports.useRef(null),re=E.exports.useState(!1),se=$e(re,2),oe=se[0],he=se[1],Ce=E.exports.useRef(),Se=E.exports.useRef(0),be=Ei(P.defaultValue,{value:P.value}),Re=$e(be,2),Ie=Re[0],Me=Re[1],Ae=P.hidden,ze=function(at,He){P.value===void 0&&(Me(at),He==null||He())},Ke=Number(u)>0,Ue=function(at){he(!0),Ce.current=Ie,Se.current=at.currentTarget.selectionStart,b==null||b(at)},pt=function(at){var He;he(!1);var ut=at.currentTarget.value;if(Ke){var bt=Se.current>=u+1||Se.current===((He=Ce.current)===null||He===void 0?void 0:He.length);ut=sN(bt,Ce.current,ut,u)}ut!==Ie&&(ze(ut),KC(at.currentTarget,at,T,ut)),_==null||_(at)},gt=function(at){var He=at.target.value;if(!oe&&Ke){var ut=at.target.selectionStart>=u+1||at.target.selectionStart===He.length||!at.target.selectionStart;He=sN(ut,Ie,He,u)}ze(He),KC(at.currentTarget,at,T,He)},Ot=function(at){var He,ut,bt;ze(""),(He=J.current)===null||He===void 0||He.focus(),KC((bt=(ut=J.current)===null||ut===void 0?void 0:ut.resizableTextArea)===null||bt===void 0?void 0:bt.textArea,at,T)},qe=D("input",r);E.exports.useImperativeHandle(t,function(){var ct;return{resizableTextArea:(ct=J.current)===null||ct===void 0?void 0:ct.resizableTextArea,focus:function(He){var ut,bt;zae((bt=(ut=J.current)===null||ut===void 0?void 0:ut.resizableTextArea)===null||bt===void 0?void 0:bt.textArea,He)},blur:function(){var He;return(He=J.current)===null||He===void 0?void 0:He.blur()}}});var Ct=A(tse,{...Gi(P,["allowClear"]),disabled:j,className:je((n={},ae(n,"".concat(qe,"-borderless"),!o),ae(n,f,f&&!a),ae(n,"".concat(qe,"-sm"),z==="small"||g==="small"),ae(n,"".concat(qe,"-lg"),z==="large"||g==="large"),n),Xc(qe,X)),style:a?{resize:p==null?void 0:p.resize}:p,prefixCls:qe,onCompositionStart:Ue,onChange:gt,onCompositionEnd:pt,ref:J}),ot=Lae(Ie);!oe&&Ke&&(P.value===null||P.value===void 0)&&(ot=O8(ot,u));var vt=A(ose,{disabled:j,...P,prefixCls:qe,direction:N,inputType:"text",value:ot,element:Ct,handleReset:Ot,ref:ue,bordered:o,status:I,style:a?void 0:p});if(a||Y){var yt,Tt=Mt(ot).length,et="";return on(a)==="object"?et=a.formatter({value:ot,count:Tt,maxLength:u}):et="".concat(Tt).concat(Ke?" / ".concat(u):""),it("div",{hidden:Ae,className:je("".concat(qe,"-textarea"),(yt={},ae(yt,"".concat(qe,"-textarea-rtl"),N==="rtl"),ae(yt,"".concat(qe,"-textarea-show-count"),a),ae(yt,"".concat(qe,"-textarea-in-form-item"),te),yt),Xc("".concat(qe,"-textarea"),X,Y),f),style:p,"data-count":et,children:[vt,Y&&A("span",{className:"".concat(qe,"-textarea-suffix"),children:Z})]})}return vt});const D8=sse;var cv=$I;cv.Group=kae;cv.Search=qae;cv.TextArea=D8;cv.Password=Kae;const lse=cv;var cse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};const use=cse;var A8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:use})})};A8.displayName="DoubleLeftOutlined";const dse=E.exports.forwardRef(A8);var fse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const hse=fse;var N8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:hse})})};N8.displayName="DoubleRightOutlined";const pse=E.exports.forwardRef(N8);var sm=function(t){var n,r="".concat(t.rootPrefixCls,"-item"),i=je(r,"".concat(r,"-").concat(t.page),(n={},ae(n,"".concat(r,"-active"),t.active),ae(n,"".concat(r,"-disabled"),!t.page),ae(n,t.className,!!t.className),n)),o=function(){t.onClick(t.page)},s=function(u){t.onKeyPress(u,t.onClick,t.page)};return A("li",{title:t.showTitle?t.page:null,className:i,onClick:o,onKeyPress:s,tabIndex:"0",children:t.itemRender(t.page,"page",A("a",{rel:"nofollow",children:t.page}))})};const Qu={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40};var L8=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0||a.relatedTarget.className.indexOf("".concat(g,"-item"))>=0))&&p(r.getValidValue()))},r.go=function(a){var u=r.state.goInputText;u!==""&&(a.keyCode===Qu.ENTER||a.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Hr(n,[{key:"getValidValue",value:function(){var i=this.state.goInputText;return!i||isNaN(i)?void 0:Number(i)}},{key:"getPageSizeOptions",value:function(){var i=this.props,o=i.pageSize,s=i.pageSizeOptions;return s.some(function(a){return a.toString()===o.toString()})?s:s.concat([o.toString()]).sort(function(a,u){var f=isNaN(Number(a))?0:Number(a),p=isNaN(Number(u))?0:Number(u);return f-p})}},{key:"render",value:function(){var i=this,o=this.props,s=o.pageSize,a=o.locale,u=o.rootPrefixCls,f=o.changeSize,p=o.quickGo,g=o.goButton,v=o.selectComponentClass,b=o.buildOptionText,_=o.selectPrefixCls,T=o.disabled,I=this.state.goInputText,P="".concat(u,"-options"),M=v,D=null,N=null,z=null;if(!f&&!p)return null;var $=this.getPageSizeOptions();if(f&&M){var j=$.map(function(U,q){return A(M.Option,{value:U.toString(),children:(b||i.buildOptionText)(U)},q)});D=A(M,{disabled:T,prefixCls:_,showSearch:!1,className:"".concat(P,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(s||$[0]).toString(),onChange:this.changeSize,getPopupContainer:function(q){return q.parentNode},"aria-label":a.page_size,defaultOpen:!1,children:j})}return p&&(g&&(z=typeof g=="boolean"?A("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:T,className:"".concat(P,"-quick-jumper-button"),children:a.jump_to_confirm}):A("span",{onClick:this.go,onKeyUp:this.go,children:g})),N=it("div",{className:"".concat(P,"-quick-jumper"),children:[a.jump_to,A("input",{disabled:T,type:"text",value:I,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":a.page}),a.page,z]})),it("li",{className:"".concat(P),children:[D,N]})}}]),n}(Un.Component);L8.defaultProps={pageSizeOptions:["10","20","50","100"]};const mse={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"};function BE(){}function lN(e){var t=Number(e);return typeof t=="number"&&!isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function gse(e,t,n){return n}function _c(e,t,n){var r=typeof e>"u"?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var z8=function(e){si(n,e);var t=li(n);function n(r){var i;jr(this,n),i=t.call(this,r),i.getJumpPrevPage=function(){return Math.max(1,i.state.current-(i.props.showLessItems?3:5))},i.getJumpNextPage=function(){return Math.min(_c(void 0,i.state,i.props),i.state.current+(i.props.showLessItems?3:5))},i.getItemIcon=function(f,p){var g=i.props.prefixCls,v=f||A("button",{type:"button","aria-label":p,className:"".concat(g,"-item-link")});return typeof f=="function"&&(v=Un.createElement(f,me({},i.props))),v},i.savePaginationNode=function(f){i.paginationNode=f},i.isValid=function(f){var p=i.props.total;return lN(f)&&f!==i.state.current&&lN(p)&&p>0},i.shouldDisplayQuickJumper=function(){var f=i.props,p=f.showQuickJumper,g=f.total,v=i.state.pageSize;return g<=v?!1:p},i.handleKeyDown=function(f){(f.keyCode===Qu.ARROW_UP||f.keyCode===Qu.ARROW_DOWN)&&f.preventDefault()},i.handleKeyUp=function(f){var p=i.getValidValue(f),g=i.state.currentInputValue;p!==g&&i.setState({currentInputValue:p}),f.keyCode===Qu.ENTER?i.handleChange(p):f.keyCode===Qu.ARROW_UP?i.handleChange(p-1):f.keyCode===Qu.ARROW_DOWN&&i.handleChange(p+1)},i.handleBlur=function(f){var p=i.getValidValue(f);i.handleChange(p)},i.changePageSize=function(f){var p=i.state.current,g=_c(f,i.state,i.props);p=p>g?g:p,g===0&&(p=i.state.current),typeof f=="number"&&("pageSize"in i.props||i.setState({pageSize:f}),"current"in i.props||i.setState({current:p,currentInputValue:p})),i.props.onShowSizeChange(p,f),"onChange"in i.props&&i.props.onChange&&i.props.onChange(p,f)},i.handleChange=function(f){var p=i.props,g=p.disabled,v=p.onChange,b=i.state,_=b.pageSize,T=b.current,I=b.currentInputValue;if(i.isValid(f)&&!g){var P=_c(void 0,i.state,i.props),M=f;return f>P?M=P:f<1&&(M=1),"current"in i.props||i.setState({current:M}),M!==I&&i.setState({currentInputValue:M}),v(M,_),M}return T},i.prev=function(){i.hasPrev()&&i.handleChange(i.state.current-1)},i.next=function(){i.hasNext()&&i.handleChange(i.state.current+1)},i.jumpPrev=function(){i.handleChange(i.getJumpPrevPage())},i.jumpNext=function(){i.handleChange(i.getJumpNextPage())},i.hasPrev=function(){return i.state.current>1},i.hasNext=function(){return i.state.current<_c(void 0,i.state,i.props)},i.runIfEnter=function(f,p){if(f.key==="Enter"||f.charCode===13){for(var g=arguments.length,v=new Array(g>2?g-2:0),b=2;b=s?u=s:u=Number(o),u}},{key:"getShowSizeChanger",value:function(){var i=this.props,o=i.showSizeChanger,s=i.total,a=i.totalBoundaryShowSizeChanger;return typeof o<"u"?o:s>a}},{key:"renderPrev",value:function(i){var o=this.props,s=o.prevIcon,a=o.itemRender,u=a(i,"prev",this.getItemIcon(s,"prev page")),f=!this.hasPrev();return E.exports.isValidElement(u)?E.exports.cloneElement(u,{disabled:f}):u}},{key:"renderNext",value:function(i){var o=this.props,s=o.nextIcon,a=o.itemRender,u=a(i,"next",this.getItemIcon(s,"next page")),f=!this.hasNext();return E.exports.isValidElement(u)?E.exports.cloneElement(u,{disabled:f}):u}},{key:"render",value:function(){var i=this,o=this.props,s=o.prefixCls,a=o.className,u=o.style,f=o.disabled,p=o.hideOnSinglePage,g=o.total,v=o.locale,b=o.showQuickJumper,_=o.showLessItems,T=o.showTitle,I=o.showTotal,P=o.simple,M=o.itemRender,D=o.showPrevNextJumpers,N=o.jumpPrevIcon,z=o.jumpNextIcon,$=o.selectComponentClass,j=o.selectPrefixCls,U=o.pageSizeOptions,q=this.state,Y=q.current,te=q.pageSize,Z=q.currentInputValue;if(p===!0&&g<=te)return null;var X=_c(void 0,this.state,this.props),J=[],ue=null,re=null,se=null,oe=null,he=null,Ce=b&&b.goButton,Se=_?1:2,be=Y-1>0?Y-1:0,Re=Y+1g?g:Y*te])});if(P)return Ce&&(typeof Ce=="boolean"?he=A("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:v.jump_to_confirm}):he=A("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:Ce}),he=A("li",{title:T?"".concat(v.jump_to).concat(Y,"/").concat(X):null,className:"".concat(s,"-simple-pager"),children:he})),it("ul",{className:je(s,"".concat(s,"-simple"),ae({},"".concat(s,"-disabled"),f),a),style:u,ref:this.savePaginationNode,...Ie,children:[Me,A("li",{title:T?v.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:je("".concat(s,"-prev"),ae({},"".concat(s,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev(),children:this.renderPrev(be)}),it("li",{title:T?"".concat(Y,"/").concat(X):null,className:"".concat(s,"-simple-pager"),children:[A("input",{type:"text",value:Z,disabled:f,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),A("span",{className:"".concat(s,"-slash"),children:"/"}),X]}),A("li",{title:T?v.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:je("".concat(s,"-next"),ae({},"".concat(s,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext(),children:this.renderNext(Re)}),he]});if(X<=3+Se*2){var Ae={locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:T,itemRender:M};X||J.push(E.exports.createElement(sm,{...Ae,key:"noPager",page:1,className:"".concat(s,"-item-disabled")}));for(var ze=1;ze<=X;ze+=1){var Ke=Y===ze;J.push(E.exports.createElement(sm,{...Ae,key:ze,page:ze,active:Ke}))}}else{var Ue=_?v.prev_3:v.prev_5,pt=_?v.next_3:v.next_5;D&&(ue=A("li",{title:T?Ue:null,onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:je("".concat(s,"-jump-prev"),ae({},"".concat(s,"-jump-prev-custom-icon"),!!N)),children:M(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(N,"prev page"))},"prev"),re=A("li",{title:T?pt:null,tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:je("".concat(s,"-jump-next"),ae({},"".concat(s,"-jump-next-custom-icon"),!!z)),children:M(this.getJumpNextPage(),"jump-next",this.getItemIcon(z,"next page"))},"next")),oe=A(sm,{locale:v,last:!0,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:X,active:!1,showTitle:T,itemRender:M},X),se=A(sm,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:1,active:!1,showTitle:T,itemRender:M},1);var gt=Math.max(1,Y-Se),Ot=Math.min(Y+Se,X);Y-1<=Se&&(Ot=1+Se*2),X-Y<=Se&&(gt=X-Se*2);for(var qe=gt;qe<=Ot;qe+=1){var Ct=Y===qe;J.push(A(sm,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:qe,active:Ct,showTitle:T,itemRender:M},qe))}Y-1>=Se*2&&Y!==1+2&&(J[0]=E.exports.cloneElement(J[0],{className:"".concat(s,"-item-after-jump-prev")}),J.unshift(ue)),X-Y>=Se*2&&Y!==X-2&&(J[J.length-1]=E.exports.cloneElement(J[J.length-1],{className:"".concat(s,"-item-before-jump-next")}),J.push(re)),gt!==1&&J.unshift(se),Ot!==X&&J.push(oe)}var ot=!this.hasPrev()||!X,vt=!this.hasNext()||!X;return it("ul",{className:je(s,a,ae({},"".concat(s,"-disabled"),f)),style:u,ref:this.savePaginationNode,...Ie,children:[Me,A("li",{title:T?v.prev_page:null,onClick:this.prev,tabIndex:ot?null:0,onKeyPress:this.runIfEnterPrev,className:je("".concat(s,"-prev"),ae({},"".concat(s,"-disabled"),ot)),"aria-disabled":ot,children:this.renderPrev(be)}),J,A("li",{title:T?v.next_page:null,onClick:this.next,tabIndex:vt?null:0,onKeyPress:this.runIfEnterNext,className:je("".concat(s,"-next"),ae({},"".concat(s,"-disabled"),vt)),"aria-disabled":vt,children:this.renderNext(Re)}),A(L8,{disabled:f,locale:v,rootPrefixCls:s,selectComponentClass:$,selectPrefixCls:j,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Y,pageSize:te,pageSizeOptions:U,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ce})]})}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s={};if("current"in i&&(s.current=i.current,i.current!==o.current&&(s.currentInputValue=s.current)),"pageSize"in i&&i.pageSize!==o.pageSize){var a=o.current,u=_c(i.pageSize,o,i);a=a>u?u:a,"current"in i||(s.current=a,s.currentInputValue=a),s.pageSize=i.pageSize}return s}}]),n}(Un.Component);z8.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:BE,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:BE,locale:mse,style:{},itemRender:gse,totalBoundaryShowSizeChanger:50};var F8=function(t){return A(Vd,{...t,size:"small"})},$8=function(t){return A(Vd,{...t,size:"middle"})};F8.Option=Vd.Option;$8.Option=Vd.Option;var vse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i10&&arguments[10]!==void 0?arguments[10]:0,v=r/100*360*((360-s)/360),b=s===0?0:{bottom:0,top:180,left:90,right:-90}[a],_=(100-i)/100*n;return f==="round"&&i!==100&&(_+=p/2,_>=n&&(_=n-.01)),{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:_+g,transform:"rotate(".concat(o+v+b,"deg)"),transformOrigin:"0 0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},BI=function(t){var n=t.id,r=t.prefixCls,i=t.steps,o=t.strokeWidth,s=t.trailWidth,a=t.gapDegree,u=a===void 0?0:a,f=t.gapPosition,p=t.trailColor,g=t.strokeLinecap,v=t.style,b=t.className,_=t.strokeColor,T=t.percent,I=kn(t,Wse),P=Kse(n),M="".concat(P,"-gradient"),D=lm/2-o/2,N=Math.PI*2*D,z=u>0?90+u/2:-90,$=N*((360-u)/360),j=on(i)==="object"?i:{count:i,space:2},U=j.count,q=j.space,Y=XC(N,$,0,100,z,u,f,p,g,o),te=mN(T),Z=mN(_),X=Z.find(function(se){return se&&on(se)==="object"}),J=Use(),ue=function(){var oe=0;return te.map(function(he,Ce){var Se=Z[Ce]||Z[Z.length-1],be=Se&&on(Se)==="object"?"url(#".concat(M,")"):void 0,Re=XC(N,$,oe,he,z,u,f,Se,g,o);return oe+=he,A("circle",{className:"".concat(r,"-circle-path"),r:D,cx:0,cy:0,stroke:be,strokeLinecap:g,strokeWidth:o,opacity:he===0?0:1,style:Re,ref:function(Me){J[Ce]=Me}},Ce)}).reverse()},re=function(){var oe=Math.round(U*(te[0]/100)),he=100/U,Ce=0;return new Array(U).fill(null).map(function(Se,be){var Re=be<=oe-1?Z[0]:p,Ie=Re&&on(Re)==="object"?"url(#".concat(M,")"):void 0,Me=XC(N,$,Ce,he,z,u,f,Re,"butt",o,q);return Ce+=($-Me.strokeDashoffset+q)*100/$,A("circle",{className:"".concat(r,"-circle-path"),r:D,cx:0,cy:0,stroke:Ie,strokeWidth:o,opacity:1,style:Me,ref:function(ze){J[be]=ze}},be)})};return it("svg",{className:je("".concat(r,"-circle"),b),viewBox:"".concat(-lm/2," ").concat(-lm/2," ").concat(lm," ").concat(lm),style:v,id:n,role:"presentation",...I,children:[X&&A("defs",{children:A("linearGradient",{id:M,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:Object.keys(X).sort(function(se,oe){return pN(se)-pN(oe)}).map(function(se,oe){return A("stop",{offset:se,stopColor:X[se]},oe)})})}),!U&&A("circle",{className:"".concat(r,"-circle-trail"),r:D,cx:0,cy:0,stroke:p,strokeLinecap:g,strokeWidth:s||o,style:Y}),U?re():ue()]})};BI.defaultProps=Vse;BI.displayName="Circle";function xd(e){return!e||e<0?0:e>100?100:e}function Cb(e){var t=e.success,n=e.successPercent,r=n;return t&&"progress"in t&&(r=t.progress),t&&"percent"in t&&(r=t.percent),r}function Gse(e){var t=e.percent,n=e.success,r=e.successPercent,i=xd(Cb({success:n,successPercent:r}));return[i,xd(xd(t)-i)]}function qse(e){var t=e.success,n=t===void 0?{}:t,r=e.strokeColor,i=n.strokeColor;return[i||eh.green,r||null]}var Zse=function(t){var n=t.prefixCls,r=t.width,i=t.strokeWidth,o=t.trailColor,s=o===void 0?null:o,a=t.strokeLinecap,u=a===void 0?"round":a,f=t.gapPosition,p=t.gapDegree,g=t.type,v=t.children,b=t.success,_=r||120,T={width:_,height:_,fontSize:_*.15+6},I=i||6,P=f||g==="dashboard"&&"bottom"||void 0,M=function(){if(p||p===0)return p;if(g==="dashboard")return 75},D=Object.prototype.toString.call(t.strokeColor)==="[object Object]",N=qse({success:b,strokeColor:t.strokeColor}),z=je("".concat(n,"-inner"),ae({},"".concat(n,"-circle-gradient"),D));return it("div",{className:z,style:T,children:[A(BI,{percent:Gse(t),strokeWidth:I,trailWidth:I,strokeColor:N,strokeLinecap:u,trailColor:s,prefixCls:n,gapDegree:M(),gapPosition:P}),v]})};const Xse=Zse;var Yse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=100?"success":X||"normal"}function M(X,J){var ue=t.format,re=Cb(t);if(!v)return null;var se,oe=ue||function(Ce){return"".concat(Ce,"%")},he=_==="line";return ue||J!=="exception"&&J!=="success"?se=oe(xd(u),xd(re)):J==="exception"?se=he?A(zh,{}):A(Fh,{}):J==="success"&&(se=he?A(XT,{}):A(xI,{})),A("span",{className:"".concat(X,"-text"),title:typeof se=="string"?se:void 0,children:se})}var D=E.exports.useContext(zn),N=D.getPrefixCls,z=D.direction,$=N("progress",r),j=P(),U=M($,j),q=Array.isArray(s)?s[0]:s,Y=typeof s=="string"||Array.isArray(s)?s:void 0,te;_==="line"?te=o?A(rle,{...t,strokeColor:Y,prefixCls:$,steps:o,children:U}):A(tle,{...t,strokeColor:q,prefixCls:$,direction:z,children:U}):(_==="circle"||_==="dashboard")&&(te=A(Xse,{...t,strokeColor:q,prefixCls:$,progressStatus:j,children:U}));var Z=je($,(n={},ae(n,"".concat($,"-").concat(_==="dashboard"&&"circle"||o&&"steps"||_),!0),ae(n,"".concat($,"-status-").concat(j),!0),ae(n,"".concat($,"-show-info"),v),ae(n,"".concat($,"-").concat(p),p),ae(n,"".concat($,"-rtl"),z==="rtl"),n),i);return A("div",{...Gi(T,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"]),className:Z,role:"progressbar",children:te})};const VI=ale;var Ud=E.exports.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function UE(e,t,n){return(e-t)/(n-t)}function UI(e,t,n,r){var i=UE(t,n,r),o={};switch(e){case"rtl":o.right="".concat(i*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(i*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(i*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(i*100,"%"),o.transform="translateX(-50%)";break}return o}function Wf(e,t){return Array.isArray(e)?e[t]:e}var sle=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],lle=E.exports.forwardRef(function(e,t){var n,r,i=e.prefixCls,o=e.value,s=e.valueIndex,a=e.onStartMove,u=e.style,f=e.render,p=e.dragging,g=e.onOffsetChange,v=kn(e,sle),b=E.exports.useContext(Ud),_=b.min,T=b.max,I=b.direction,P=b.disabled,M=b.range,D=b.tabIndex,N=b.ariaLabelForHandle,z=b.ariaLabelledByForHandle,$=b.ariaValueTextFormatterForHandle,j="".concat(i,"-handle"),U=function(X){P||a(X,s)},q=function(X){if(!P){var J=null;switch(X.which||X.keyCode){case Pt.LEFT:J=I==="ltr"||I==="btt"?-1:1;break;case Pt.RIGHT:J=I==="ltr"||I==="btt"?1:-1;break;case Pt.UP:J=I!=="ttb"?1:-1;break;case Pt.DOWN:J=I!=="ttb"?-1:1;break;case Pt.HOME:J="min";break;case Pt.END:J="max";break;case Pt.PAGE_UP:J=2;break;case Pt.PAGE_DOWN:J=-2;break}J!==null&&(X.preventDefault(),g(J,s))}},Y=UI(I,o,_,T),te=A("div",{ref:t,className:je(j,(n={},ae(n,"".concat(j,"-").concat(s+1),M),ae(n,"".concat(j,"-dragging"),p),n)),style:me(me({},Y),u),onMouseDown:U,onTouchStart:U,onKeyDown:q,tabIndex:P?null:Wf(D,s),role:"slider","aria-valuemin":_,"aria-valuemax":T,"aria-valuenow":o,"aria-disabled":P,"aria-label":Wf(N,s),"aria-labelledby":Wf(z,s),"aria-valuetext":(r=Wf($,s))===null||r===void 0?void 0:r(o),...v});return f&&(te=f(te,{index:s,prefixCls:i,value:o,dragging:p})),te}),cle=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],ule=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,o=e.onOffsetChange,s=e.values,a=e.handleRender,u=e.draggingIndex,f=kn(e,cle),p=E.exports.useRef({});return E.exports.useImperativeHandle(t,function(){return{focus:function(v){var b;(b=p.current[v])===null||b===void 0||b.focus()}}}),A(nr,{children:s.map(function(g,v){return A(lle,{ref:function(_){_?p.current[v]=_:delete p.current[v]},dragging:u===v,prefixCls:n,style:Wf(r,v),value:g,valueIndex:v,onStartMove:i,onOffsetChange:o,render:a,...f},v)})})});function gN(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function dle(e,t,n,r,i,o,s,a,u){var f=E.exports.useState(null),p=$e(f,2),g=p[0],v=p[1],b=E.exports.useState(-1),_=$e(b,2),T=_[0],I=_[1],P=E.exports.useState(n),M=$e(P,2),D=M[0],N=M[1],z=E.exports.useState(n),$=$e(z,2),j=$[0],U=$[1],q=E.exports.useRef(null),Y=E.exports.useRef(null);E.exports.useEffect(function(){T===-1&&N(n)},[n,T]),E.exports.useEffect(function(){return function(){document.removeEventListener("mousemove",q.current),document.removeEventListener("mouseup",Y.current),document.removeEventListener("touchmove",q.current),document.removeEventListener("touchend",Y.current)}},[]);var te=function(se,oe){D.some(function(he,Ce){return he!==se[Ce]})&&(oe!==void 0&&v(oe),N(se),s(se))},Z=function(se,oe){if(se===-1){var he=j[0],Ce=j[j.length-1],Se=r-he,be=i-Ce,Re=oe*(i-r);Re=Math.max(Re,Se),Re=Math.min(Re,be);var Ie=o(he+Re);Re=Ie-he;var Me=j.map(function(Ue){return Ue+Re});te(Me)}else{var Ae=(i-r)*oe,ze=Mt(D);ze[se]=j[se];var Ke=u(ze,Ae,se,"dist");te(Ke.values,Ke.value)}},X=E.exports.useRef(Z);X.current=Z;var J=function(se,oe){se.stopPropagation();var he=n[oe];I(oe),v(he),U(n);var Ce=gN(se),Se=Ce.pageX,be=Ce.pageY,Re=function(Ae){Ae.preventDefault();var ze=gN(Ae),Ke=ze.pageX,Ue=ze.pageY,pt=Ke-Se,gt=Ue-be,Ot=e.current.getBoundingClientRect(),qe=Ot.width,Ct=Ot.height,ot;switch(t){case"btt":ot=-gt/Ct;break;case"ttb":ot=gt/Ct;break;case"rtl":ot=-pt/qe;break;default:ot=pt/qe}X.current(oe,ot)},Ie=function Me(Ae){Ae.preventDefault(),document.removeEventListener("mouseup",Me),document.removeEventListener("mousemove",Re),document.removeEventListener("touchend",Me),document.removeEventListener("touchmove",Re),q.current=null,Y.current=null,I(-1),a()};document.addEventListener("mouseup",Ie),document.addEventListener("mousemove",Re),document.addEventListener("touchend",Ie),document.addEventListener("touchmove",Re),q.current=Re,Y.current=Ie},ue=E.exports.useMemo(function(){var re=Mt(n).sort(function(oe,he){return oe-he}),se=Mt(D).sort(function(oe,he){return oe-he});return re.every(function(oe,he){return oe===se[he]})?D:n},[n,D]);return[T,g,ue,J]}function fle(e){var t=e.prefixCls,n=e.style,r=e.start,i=e.end,o=e.index,s=e.onStartMove,a=E.exports.useContext(Ud),u=a.direction,f=a.min,p=a.max,g=a.disabled,v=a.range,b="".concat(t,"-track"),_=UE(r,f,p),T=UE(i,f,p),I=function(D){!g&&s&&s(D,-1)},P={};switch(u){case"rtl":P.right="".concat(_*100,"%"),P.width="".concat(T*100-_*100,"%");break;case"btt":P.bottom="".concat(_*100,"%"),P.height="".concat(T*100-_*100,"%");break;case"ttb":P.top="".concat(_*100,"%"),P.height="".concat(T*100-_*100,"%");break;default:P.left="".concat(_*100,"%"),P.width="".concat(T*100-_*100,"%")}return A("div",{className:je(b,v&&"".concat(b,"-").concat(o+1)),style:me(me({},P),n),onMouseDown:I,onTouchStart:I})}function hle(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,o=e.onStartMove,s=E.exports.useContext(Ud),a=s.included,u=s.range,f=s.min,p=E.exports.useMemo(function(){if(!u){if(r.length===0)return[];var g=i!=null?i:f,v=r[0];return[{start:Math.min(g,v),end:Math.max(g,v)}]}for(var b=[],_=0;_3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof T=="number"){var M,D=_[I],N=D+T,z=[];r.forEach(function(Y){z.push(Y.value)}),z.push(e,t),z.push(a(D));var $=T>0?1:-1;P==="unit"?z.push(a(D+$*n)):z.push(a(N)),z=z.filter(function(Y){return Y!==null}).filter(function(Y){return T<0?Y<=D:Y>=D}),P==="unit"&&(z=z.filter(function(Y){return Y!==D}));var j=P==="unit"?D:N;M=z[0];var U=Math.abs(M-j);if(z.forEach(function(Y){var te=Math.abs(Y-j);te1){var q=Mt(_);return q[I]=M,b(q,T-$,I,P)}return M}else{if(T==="min")return e;if(T==="max")return t}},p=function(_,T,I){var P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",M=_[I],D=f(_,T,I,P);return{value:D,changed:D!==M}},g=function(_){return o===null&&_===0||typeof o=="number"&&_3&&arguments[3]!==void 0?arguments[3]:"unit",M=_.map(u),D=M[I],N=f(M,T,I,P);if(M[I]=N,i===!1){var z=o||0;I>0&&M[I-1]!==D&&(M[I]=Math.max(M[I],M[I-1]+z)),I0;q-=1)for(var Y=!0;g(M[q]-M[q-1])&&Y;){var te=p(M,-1,q-1);M[q-1]=te.value,Y=te.changed}for(var Z=M.length-1;Z>0;Z-=1)for(var X=!0;g(M[Z]-M[Z-1])&&X;){var J=p(M,-1,Z-1);M[Z-1]=J.value,X=J.changed}for(var ue=0;ue=0?Z:!1},[Z,yt]),et=E.exports.useMemo(function(){var ye=Object.keys(Ie||{});return ye.map(function(W){var Q=Ie[W],fe={value:Number(W)};return Q&&on(Q)==="object"&&!E.exports.isValidElement(Q)&&("label"in Q||"style"in Q)?(fe.style=Q.style,fe.label=Q.label):fe.label=Q,fe}).filter(function(W){var Q=W.label;return Q||typeof Q=="number"}).sort(function(W,Q){return W.value-Q.value})},[Ie]),ct=yle(ot,vt,yt,et,Y,Tt),at=$e(ct,2),He=at[0],ut=at[1],bt=Ei(D,{value:M}),Dt=$e(bt,2),Lt=Dt[0],Ht=Dt[1],Fe=E.exports.useMemo(function(){var ye=Lt==null?[]:Array.isArray(Lt)?Lt:[Lt],W=$e(ye,1),Q=W[0],fe=Q===void 0?ot:Q,ce=Lt===null?[]:[fe];if(N){if(ce=Mt(ye),z||Lt===void 0){var xe=z>=0?z+1:2;for(ce=ce.slice(0,xe);ce.length=0&&Ot.current.focus(ye)}tt(null)},[pn]);var qt=E.exports.useMemo(function(){return X&&yt===null?!1:X},[X,yt]),En=function(){U==null||U(Zt(Ye.current))},yn=dle(qe,Ct,Fe,ot,vt,He,an,En,ut),St=$e(yn,4),Pn=St[0],_n=St[1],tn=St[2],Ft=St[3],dt=function(W,Q){Ft(W,Q),j==null||j(Zt(Ye.current))},mt=Pn!==-1;E.exports.useEffect(function(){if(!mt){var ye=Fe.lastIndexOf(_n);Ot.current.focus(ye)}},[mt]);var $t=E.exports.useMemo(function(){return Mt(tn).sort(function(ye,W){return ye-W})},[tn]),Wt=E.exports.useMemo(function(){return N?[$t[0],$t[$t.length-1]]:[ot,$t[0]]},[$t,N,ot]),mn=$e(Wt,2),An=mn[0],Qn=mn[1];E.exports.useImperativeHandle(t,function(){return{focus:function(){Ot.current.focus(0)},blur:function(){var W=document,Q=W.activeElement;qe.current.contains(Q)&&(Q==null||Q.blur())}}}),E.exports.useEffect(function(){f&&Ot.current.focus(0)},[]);var Jn=E.exports.useMemo(function(){return{min:ot,max:vt,direction:Ct,disabled:u,step:yt,included:se,includedStart:An,includedEnd:Qn,range:N,tabIndex:Ke,ariaLabelForHandle:Ue,ariaLabelledByForHandle:pt,ariaValueTextFormatterForHandle:gt}},[ot,vt,Ct,u,yt,se,An,Qn,N,Ke,Ue,pt,gt]);return A(Ud.Provider,{value:Jn,children:it("div",{ref:qe,className:je(i,o,(n={},ae(n,"".concat(i,"-disabled"),u),ae(n,"".concat(i,"-vertical"),ue),ae(n,"".concat(i,"-horizontal"),!ue),ae(n,"".concat(i,"-with-marks"),et.length),n)),style:s,onMouseDown:Vt,children:[A("div",{className:"".concat(i,"-rail"),style:Se}),A(hle,{prefixCls:i,style:he,values:$t,startPoint:oe,onStartMove:qt?dt:null}),A(vle,{prefixCls:i,marks:et,dots:Me,style:be,activeStyle:Re}),A(ule,{ref:Ot,prefixCls:i,style:Ce,values:tn,draggingIndex:Pn,onStartMove:dt,onOffsetChange:At,onFocus:p,onBlur:g,handleRender:Ae}),A(mle,{prefixCls:i,marks:et,onClick:Kt})]})})}),ble=E.exports.forwardRef(function(e,t){var n=e.open,r=E.exports.useRef(null),i=E.exports.useRef(null);function o(){cr.cancel(i.current),i.current=null}function s(){i.current=cr(function(){var a;(a=r.current)===null||a===void 0||a.forcePopupAlign(),i.current=null})}return E.exports.useEffect(function(){return n?s():o(),o},[n,e.title]),A(ka,{ref:Aa(r,t),...e})});const _le=ble;var wle=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=n}function Ole(e){return e&&on(e)==="object"&&!Array.isArray(e)&&!E.exports.isValidElement(e)}function Dle(e){return typeof e=="string"?!0:Nh(e)}var Ale=function(t){var n=t.ellipsis,r=t.rowType,i=t.children,o,s=n===!0?{showTitle:!0}:n;return s&&(s.showTitle||r==="header")&&(typeof i=="string"||typeof i=="number"?o=i.toString():E.exports.isValidElement(i)&&typeof i.props.children=="string"&&(o=i.props.children)),o};function Nle(e,t){var n,r,i,o=e.prefixCls,s=e.className,a=e.record,u=e.index,f=e.renderIndex,p=e.dataIndex,g=e.render,v=e.children,b=e.component,_=b===void 0?"td":b,T=e.colSpan,I=e.rowSpan,P=e.fixLeft,M=e.fixRight,D=e.firstFixLeft,N=e.lastFixLeft,z=e.firstFixRight,$=e.lastFixRight,j=e.appendNode,U=e.additionalProps,q=U===void 0?{}:U,Y=e.ellipsis,te=e.align,Z=e.rowType,X=e.isSticky,J=e.hovering,ue=e.onHover,re="".concat(o,"-cell"),se=E.exports.useContext(tV),oe=E.exports.useContext(J8),he=E.exports.useContext(n1),Ce=he.allColumnsFixedLeft,Se=E.exports.useMemo(function(){if(jE(v))return[v];var He=Q8(a,p),ut=He,bt=void 0;if(g){var Dt=g(He,a,f);Ole(Dt)?(ut=Dt.children,bt=Dt.props,se.renderWithProps=!0):ut=Dt}return[ut,bt]},[se.renderWithProps?Math.random():0,v,p,se,a,g,f]),be=$e(Se,2),Re=be[0],Ie=be[1],Me=Re;on(Me)==="object"&&!Array.isArray(Me)&&!E.exports.isValidElement(Me)&&(Me=null),Y&&(N||z)&&(Me=A("span",{className:"".concat(re,"-content"),children:Me}));var Ae=Ie||{},ze=Ae.colSpan,Ke=Ae.rowSpan,Ue=Ae.style,pt=Ae.className,gt=kn(Ae,Mle),Ot=(n=ze!==void 0?ze:T)!==null&&n!==void 0?n:1,qe=(r=Ke!==void 0?Ke:I)!==null&&r!==void 0?r:1;if(Ot===0||qe===0)return null;var Ct={},ot=typeof P=="number"&&oe,vt=typeof M=="number"&&oe;ot&&(Ct.position="sticky",Ct.left=P),vt&&(Ct.position="sticky",Ct.right=M);var yt={};te&&(yt.textAlign=te);var Tt=function(ut){var bt;a&&ue(u,u+qe-1),q==null||(bt=q.onMouseEnter)===null||bt===void 0||bt.call(q,ut)},et=function(ut){var bt;a&&ue(-1,-1),q==null||(bt=q.onMouseLeave)===null||bt===void 0||bt.call(q,ut)},ct=Ale({rowType:Z,ellipsis:Y,children:Re}),at=me(me(me({title:ct},gt),q),{},{colSpan:Ot!==1?Ot:null,rowSpan:qe!==1?qe:null,className:je(re,s,(i={},ae(i,"".concat(re,"-fix-left"),ot&&oe),ae(i,"".concat(re,"-fix-left-first"),D&&oe),ae(i,"".concat(re,"-fix-left-last"),N&&oe),ae(i,"".concat(re,"-fix-left-all"),N&&Ce&&oe),ae(i,"".concat(re,"-fix-right"),vt&&oe),ae(i,"".concat(re,"-fix-right-first"),z&&oe),ae(i,"".concat(re,"-fix-right-last"),$&&oe),ae(i,"".concat(re,"-ellipsis"),Y),ae(i,"".concat(re,"-with-append"),j),ae(i,"".concat(re,"-fix-sticky"),(ot||vt)&&X&&oe),ae(i,"".concat(re,"-row-hover"),!Ie&&J),i),q.className,pt),style:me(me(me(me({},q.style),yt),Ct),Ue),onMouseEnter:Tt,onMouseLeave:et,ref:Dle(_)?t:null});return it(_,{...at,children:[j,Me]})}var nV=E.exports.forwardRef(Nle);nV.displayName="Cell";var Lle=["expanded","className","hovering"],zle=E.exports.memo(nV,function(e,t){return t.shouldCellUpdate?Lle.every(function(n){return e[n]===t[n]})&&!t.shouldCellUpdate(t.record,e.record):kd(e,t)}),fv=E.exports.forwardRef(function(e,t){var n=e.index,r=e.additionalProps,i=r===void 0?{}:r,o=e.colSpan,s=e.rowSpan,a=i.colSpan,u=i.rowSpan,f=o!=null?o:a,p=s!=null?s:u,g=kle(eV,function(_){var T=Rle(n,p||1,_==null?void 0:_.startRow,_==null?void 0:_.endRow);return{onHover:_==null?void 0:_.onHover,hovering:T}}),v=g.onHover,b=g.hovering;return A(zle,{...e,colSpan:f,rowSpan:p,hovering:b,ref:t,onHover:v})});fv.displayName="WrappedCell";var cl=E.exports.createContext(null);function jI(e,t,n,r,i){var o=n[e]||{},s=n[t]||{},a,u;o.fixed==="left"?a=r.left[e]:s.fixed==="right"&&(u=r.right[t]);var f=!1,p=!1,g=!1,v=!1,b=n[t+1],_=n[e-1];if(i==="rtl"){if(a!==void 0){var T=_&&_.fixed==="left";v=!T}else if(u!==void 0){var I=b&&b.fixed==="right";g=!I}}else if(a!==void 0){var P=b&&b.fixed==="left";f=!P}else if(u!==void 0){var M=_&&_.fixed==="right";p=!M}return{fixLeft:a,fixRight:u,lastFixLeft:f,firstFixRight:p,lastFixRight:g,firstFixLeft:v,isSticky:r.isSticky}}function rV(e){var t=e.cells,n=e.stickyOffsets,r=e.flattenColumns,i=e.rowComponent,o=e.cellComponent,s=e.onHeaderRow,a=e.index,u=E.exports.useContext(cl),f=u.prefixCls,p=u.direction,g;s&&(g=s(t.map(function(b){return b.column}),a));var v=t1(t.map(function(b){return b.column}));return A(i,{...g,children:t.map(function(b,_){var T=b.column,I=jI(b.colStart,b.colEnd,r,n,p),P;return T&&T.onHeaderCell&&(P=b.column.onHeaderCell(T)),E.exports.createElement(fv,{...b,ellipsis:T.ellipsis,align:T.align,component:o,prefixCls:f,key:v[_],...I,additionalProps:P,rowType:"header"})})})}rV.displayName="HeaderRow";function Fle(e){var t=[];function n(s,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[u]=t[u]||[];var f=a,p=s.filter(Boolean).map(function(g){var v={key:g.key,className:g.className||"",children:g.title,column:g,colStart:f},b=1,_=g.children;return _&&_.length>0&&(b=n(_,f,u+1).reduce(function(T,I){return T+I},0),v.hasSubColumns=!0),"colSpan"in g&&(b=g.colSpan),"rowSpan"in g&&(v.rowSpan=g.rowSpan),v.colSpan=b,v.colEnd=v.colStart+b-1,t[u].push(v),f+=b,b});return p}n(e,0);for(var r=t.length,i=function(a){t[a].forEach(function(u){!("rowSpan"in u)&&!u.hasSubColumns&&(u.rowSpan=r-a)})},o=0;o1?ot-1:0),yt=1;yt0?[].concat(Mt(t),Mt(HE(o).map(function(s){return me({fixed:i},s)}))):[].concat(Mt(t),[me(me({},n),{},{fixed:i})])},[])}function Gle(e){return e.map(function(t){var n=t.fixed,r=kn(t,Wle),i=n;return n==="left"?i="right":n==="right"&&(i="left"),me({fixed:i},r)})}function qle(e,t){var n=e.prefixCls,r=e.columns,i=e.children,o=e.expandable,s=e.expandedKeys,a=e.columnTitle,u=e.getRowKey,f=e.onTriggerExpand,p=e.expandIcon,g=e.rowExpandable,v=e.expandIconColumnIndex,b=e.direction,_=e.expandRowByClick,T=e.columnWidth,I=e.fixed,P=E.exports.useMemo(function(){return r||HI(i)},[r,i]),M=E.exports.useMemo(function(){if(o){var z,$=P.slice();if(!$.includes(Ju)){var j=v||0;j>=0&&$.splice(j,0,Ju)}var U=$.indexOf(Ju);$=$.filter(function(Z,X){return Z!==Ju||X===U});var q=P[U],Y;(I==="left"||I)&&!v?Y="left":(I==="right"||I)&&v===P.length?Y="right":Y=q?q.fixed:null;var te=(z={},ae(z,qm,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),ae(z,"title",a),ae(z,"fixed",Y),ae(z,"className","".concat(n,"-row-expand-icon-cell")),ae(z,"width",T),ae(z,"render",function(X,J,ue){var re=u(J,ue),se=s.has(re),oe=g?g(J):!0,he=p({prefixCls:n,expanded:se,expandable:oe,record:J,onExpand:f});return _?A("span",{onClick:function(Se){return Se.stopPropagation()},children:he}):he}),z);return $.map(function(Z){return Z===Ju?te:Z})}return P.filter(function(Z){return Z!==Ju})},[o,P,u,s,p,b]),D=E.exports.useMemo(function(){var z=M;return t&&(z=t(z)),z.length||(z=[{render:function(){return null}}]),z},[t,M,b]),N=E.exports.useMemo(function(){return b==="rtl"?Gle(HE(D)):HE(D)},[D,b]);return[D,N]}function uV(e){var t=E.exports.useRef(e),n=E.exports.useState({}),r=$e(n,2),i=r[1],o=E.exports.useRef(null),s=E.exports.useRef([]);function a(u){s.current.push(u);var f=Promise.resolve();o.current=f,f.then(function(){if(o.current===f){var p=s.current,g=t.current;s.current=[],p.forEach(function(v){t.current=v(t.current)}),o.current=null,g!==t.current&&i({})}})}return E.exports.useEffect(function(){return function(){o.current=null}},[]),[t.current,a]}function Zle(e){var t=E.exports.useRef(e||null),n=E.exports.useRef();function r(){window.clearTimeout(n.current)}function i(s){t.current=s,r(),n.current=window.setTimeout(function(){t.current=null,n.current=void 0},100)}function o(){return t.current}return E.exports.useEffect(function(){return r},[]),[i,o]}function Xle(e,t,n){var r=E.exports.useMemo(function(){for(var i=[],o=[],s=0,a=0,u=0;u=0;a-=1){var u=t[a],f=n&&n[a],p=f&&f[qm];if(u||p||s){var g=p||{};g.columnType;var v=kn(g,Yle);i.unshift(A("col",{style:{width:u},...v},a)),s=!0}}return A("colgroup",{children:i})}function yN(e){var t=e.className,n=e.children;return A("div",{className:t,children:n})}var fV=E.exports.createContext({});function Qle(e){var t=e.className,n=e.index,r=e.children,i=e.colSpan,o=i===void 0?1:i,s=e.rowSpan,a=e.align,u=E.exports.useContext(cl),f=u.prefixCls,p=u.direction,g=E.exports.useContext(fV),v=g.scrollColumnIndex,b=g.stickyOffsets,_=g.flattenColumns,T=n+o-1,I=T+1===v?o+1:o,P=jI(n,n+I-1,_,b,p);return A(fv,{className:t,index:n,component:"td",prefixCls:f,record:null,dataIndex:null,align:a,colSpan:I,rowSpan:s,render:function(){return r},...P})}var Jle=["children"];function ece(e){var t=e.children,n=kn(e,Jle);return A("tr",{...n,children:t})}function r1(e){var t=e.children;return t}r1.Row=ece;r1.Cell=Qle;function mx(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,i=E.exports.useContext(cl),o=i.prefixCls,s=r.length-1,a=r[s],u=E.exports.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:a!=null&&a.scrollbar?s:null}},[a,r,s,n]);return A(fV.Provider,{value:u,children:A("tfoot",{className:"".concat(o,"-summary"),children:t})})}var hV=r1;function tce(e){var t,n=e.prefixCls,r=e.record,i=e.onExpand,o=e.expanded,s=e.expandable,a="".concat(n,"-row-expand-icon");if(!s)return A("span",{className:je(a,"".concat(n,"-row-spaced"))});var u=function(p){i(r,p),p.stopPropagation()};return A("span",{className:je(a,(t={},ae(t,"".concat(n,"-row-expanded"),o),ae(t,"".concat(n,"-row-collapsed"),!o),t)),onClick:u})}function nce(e,t,n){var r=[];function i(o){(o||[]).forEach(function(s,a){r.push(t(s,a)),i(s[n])})}return i(e),r}var rce=function(t,n){var r,i,o=t.scrollBodyRef,s=t.onScroll,a=t.offsetScroll,u=t.container,f=E.exports.useContext(cl),p=f.prefixCls,g=((r=o.current)===null||r===void 0?void 0:r.scrollWidth)||0,v=((i=o.current)===null||i===void 0?void 0:i.clientWidth)||0,b=g&&v*(v/g),_=E.exports.useRef(),T=uV({scrollLeft:0,isHiddenScrollBar:!1}),I=$e(T,2),P=I[0],M=I[1],D=E.exports.useRef({delta:0,x:0}),N=E.exports.useState(!1),z=$e(N,2),$=z[0],j=z[1],U=function(){j(!1)},q=function(J){J.persist(),D.current.delta=J.pageX-P.scrollLeft,D.current.x=0,j(!0),J.preventDefault()},Y=function(J){var ue,re=J||((ue=window)===null||ue===void 0?void 0:ue.event),se=re.buttons;if(!$||se===0){$&&j(!1);return}var oe=D.current.x+J.pageX-D.current.x-D.current.delta;oe<=0&&(oe=0),oe+b>=v&&(oe=v-b),s({scrollLeft:oe/v*(g+2)}),D.current.x=J.pageX},te=function(){if(!!o.current){var J=$E(o.current).top,ue=J+o.current.offsetHeight,re=u===window?document.documentElement.scrollTop+window.innerHeight:$E(u).top+u.clientHeight;ue-wb()<=re||J>=re-a?M(function(se){return me(me({},se),{},{isHiddenScrollBar:!0})}):M(function(se){return me(me({},se),{},{isHiddenScrollBar:!1})})}},Z=function(J){M(function(ue){return me(me({},ue),{},{scrollLeft:J/g*v||0})})};return E.exports.useImperativeHandle(n,function(){return{setScrollLeft:Z}}),E.exports.useEffect(function(){var X=Qo(document.body,"mouseup",U,!1),J=Qo(document.body,"mousemove",Y,!1);return te(),function(){X.remove(),J.remove()}},[b,$]),E.exports.useEffect(function(){var X=Qo(u,"scroll",te,!1),J=Qo(window,"resize",te,!1);return function(){X.remove(),J.remove()}},[u]),E.exports.useEffect(function(){P.isHiddenScrollBar||M(function(X){var J=o.current;return J?me(me({},X),{},{scrollLeft:J.scrollLeft/J.scrollWidth*J.clientWidth}):X})},[P.isHiddenScrollBar]),g<=v||!b||P.isHiddenScrollBar?null:A("div",{style:{height:wb(),width:v,bottom:a},className:"".concat(p,"-sticky-scroll"),children:A("div",{onMouseDown:q,ref:_,className:je("".concat(p,"-sticky-scroll-bar"),ae({},"".concat(p,"-sticky-scroll-bar-active"),$)),style:{width:"".concat(b,"px"),transform:"translate3d(".concat(P.scrollLeft,"px, 0, 0)")}})})};const ice=E.exports.forwardRef(rce);var xN=To()?window:null;function oce(e,t){var n=on(e)==="object"?e:{},r=n.offsetHeader,i=r===void 0?0:r,o=n.offsetSummary,s=o===void 0?0:o,a=n.offsetScroll,u=a===void 0?0:a,f=n.getContainer,p=f===void 0?function(){return xN}:f,g=p()||xN;return E.exports.useMemo(function(){var v=!!e;return{isSticky:v,stickyClassName:v?"".concat(t,"-sticky-holder"):"",offsetHeader:i,offsetSummary:s,offsetScroll:u,container:g}},[u,i,s,t,g])}var ace=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function sce(e,t){return E.exports.useMemo(function(){for(var n=[],r=0;r=0})},[o]),Y=o[o.length-1],te={fixed:Y?Y.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(D,"-cell-scrollbar")}}},Z=E.exports.useMemo(function(){return $?[].concat(Mt(i),[te]):i},[$,i]),X=E.exports.useMemo(function(){return $?[].concat(Mt(o),[te]):o},[$,o]),J=E.exports.useMemo(function(){var re=u.right,se=u.left;return me(me({},u),{},{left:f==="rtl"?[].concat(Mt(se.map(function(oe){return oe+$})),[0]):se,right:f==="rtl"?re:[].concat(Mt(re.map(function(oe){return oe+$})),[0]),isSticky:z})},[$,u,z]),ue=sce(s,a);return A("div",{style:me({overflow:"hidden"},z?{top:g,bottom:v}:{}),ref:U,className:je(n,ae({},b,!!b)),children:it("table",{style:{tableLayout:"fixed",visibility:r||ue?null:"hidden"},children:[(!r||!T||q)&&A(dV,{colWidths:ue?[].concat(Mt(ue),[$]):[],columCount:a+1,columns:X}),I(me(me({},P),{},{stickyOffsets:J,columns:Z,flattenColumns:X}))]})})});KE.displayName="FixedHolder";var lce=[],cce={},f0="rc-table-internal-hook",uce=E.exports.memo(function(e){var t=e.children;return t},function(e,t){return kd(e.props,t.props)?e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight:!1});function jd(e){var t,n=e.prefixCls,r=e.className,i=e.rowClassName,o=e.style,s=e.data,a=e.rowKey,u=e.scroll,f=e.tableLayout,p=e.direction,g=e.title,v=e.footer,b=e.summary,_=e.id,T=e.showHeader,I=e.components,P=e.emptyText,M=e.onRow,D=e.onHeaderRow,N=e.internalHooks,z=e.transformColumns,$=e.internalRefs,j=e.sticky,U=s||lce,q=!!U.length,Y=E.exports.useCallback(function(Vn,er){return Q8(I||{},Vn)||er},[I]),te=E.exports.useMemo(function(){return typeof a=="function"?a:function(Vn){var er=Vn&&Vn[a];return er}},[a]),Z=Hle(e),X=Z.expandIcon,J=Z.expandedRowKeys,ue=Z.defaultExpandedRowKeys,re=Z.defaultExpandAllRows,se=Z.expandedRowRender,oe=Z.columnTitle,he=Z.onExpand,Ce=Z.onExpandedRowsChange,Se=Z.expandRowByClick,be=Z.rowExpandable,Re=Z.expandIconColumnIndex,Ie=Z.expandedRowClassName,Me=Z.childrenColumnName,Ae=Z.indentSize,ze=X||tce,Ke=Me||"children",Ue=E.exports.useMemo(function(){return se?"row":e.expandable&&N===f0&&e.expandable.__PARENT_RENDER_ICON__||U.some(function(Vn){return Vn&&on(Vn)==="object"&&Vn[Ke]})?"nest":!1},[!!se,U]),pt=E.exports.useState(function(){return ue||(re?nce(U,te,Ke):[])}),gt=$e(pt,2),Ot=gt[0],qe=gt[1],Ct=E.exports.useMemo(function(){return new Set(J||Ot||[])},[J,Ot]),ot=E.exports.useCallback(function(Vn){var er=te(Vn,U.indexOf(Vn)),Fr,zi=Ct.has(er);zi?(Ct.delete(er),Fr=Mt(Ct)):Fr=[].concat(Mt(Ct),[er]),qe(Fr),he&&he(!zi,Vn),Ce&&Ce(Fr)},[te,Ct,U,he,Ce]),vt=E.exports.useState(0),yt=$e(vt,2),Tt=yt[0],et=yt[1],ct=qle(me(me(me({},e),Z),{},{expandable:!!se,columnTitle:oe,expandedKeys:Ct,getRowKey:te,onTriggerExpand:ot,expandIcon:ze,expandIconColumnIndex:Re,direction:p}),N===f0?z:null),at=$e(ct,2),He=at[0],ut=at[1],bt=E.exports.useMemo(function(){return{columns:He,flattenColumns:ut}},[He,ut]),Dt=E.exports.useRef(),Lt=E.exports.useRef(),Ht=E.exports.useRef(),Fe=E.exports.useRef(),Ye=E.exports.useRef(),Zt=E.exports.useState(!1),an=$e(Zt,2),Kt=an[0],Vt=an[1],It=E.exports.useState(!1),Xt=$e(It,2),pn=Xt[0],tt=Xt[1],At=uV(new Map),qt=$e(At,2),En=qt[0],yn=qt[1],St=t1(ut),Pn=St.map(function(Vn){return En.get(Vn)}),_n=E.exports.useMemo(function(){return Pn},[Pn.join("_")]),tn=Xle(_n,ut.length,p),Ft=u&&jE(u.y),dt=u&&jE(u.x)||Boolean(Z.fixed),mt=dt&&ut.some(function(Vn){var er=Vn.fixed;return er}),$t=E.exports.useRef(),Wt=oce(j,n),mn=Wt.isSticky,An=Wt.offsetHeader,Qn=Wt.offsetSummary,Jn=Wt.offsetScroll,ye=Wt.stickyClassName,W=Wt.container,Q=b==null?void 0:b(U),fe=(Ft||mn)&&E.exports.isValidElement(Q)&&Q.type===r1&&Q.props.fixed,ce,xe,ke;Ft&&(xe={overflowY:"scroll",maxHeight:u.y}),dt&&(ce={overflowX:"auto"},Ft||(xe={overflowY:"hidden"}),ke={width:(u==null?void 0:u.x)===!0?"auto":u==null?void 0:u.x,minWidth:"100%"});var we=E.exports.useCallback(function(Vn,er){fI(Dt.current)&&yn(function(Fr){if(Fr.get(Vn)!==er){var zi=new Map(Fr);return zi.set(Vn,er),zi}return Fr})},[]),Pe=Zle(null),Le=$e(Pe,2),Ze=Le[0],Xe=Le[1];function Ve(Vn,er){!er||(typeof er=="function"?er(Vn):er.scrollLeft!==Vn&&(er.scrollLeft=Vn))}var Bt=function(er){var Fr=er.currentTarget,zi=er.scrollLeft,As=p==="rtl",Ho=typeof zi=="number"?zi:Fr.scrollLeft,dl=Fr||cce;if(!Xe()||Xe()===dl){var cs;Ze(dl),Ve(Ho,Lt.current),Ve(Ho,Ht.current),Ve(Ho,Ye.current),Ve(Ho,(cs=$t.current)===null||cs===void 0?void 0:cs.setScrollLeft)}if(Fr){var Cr=Fr.scrollWidth,us=Fr.clientWidth;if(Cr===us){Vt(!1),tt(!1);return}As?(Vt(-Ho0)):(Vt(Ho>0),tt(Ho-1}var Dce=Oce,Ace=a1;function Nce(e,t){var n=this.__data__,r=Ace(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Lce=Nce,zce=xce,Fce=Tce,$ce=Mce,Bce=Dce,Vce=Lce;function Uh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ta))return!1;var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var g=-1,v=!0,b=n&sfe?new rfe:void 0;for(o.set(e,t),o.set(t,e);++g-1&&e%1==0&&e-1&&e%1==0&&e<=mhe}var _V=ghe,vhe=ov,yhe=_V,xhe=av,bhe="[object Arguments]",_he="[object Array]",whe="[object Boolean]",Che="[object Date]",She="[object Error]",Ehe="[object Function]",Phe="[object Map]",The="[object Number]",Ihe="[object Object]",khe="[object RegExp]",Mhe="[object Set]",Rhe="[object String]",Ohe="[object WeakMap]",Dhe="[object ArrayBuffer]",Ahe="[object DataView]",Nhe="[object Float32Array]",Lhe="[object Float64Array]",zhe="[object Int8Array]",Fhe="[object Int16Array]",$he="[object Int32Array]",Bhe="[object Uint8Array]",Vhe="[object Uint8ClampedArray]",Uhe="[object Uint16Array]",jhe="[object Uint32Array]",Jr={};Jr[Nhe]=Jr[Lhe]=Jr[zhe]=Jr[Fhe]=Jr[$he]=Jr[Bhe]=Jr[Vhe]=Jr[Uhe]=Jr[jhe]=!0;Jr[bhe]=Jr[_he]=Jr[Dhe]=Jr[whe]=Jr[Ahe]=Jr[Che]=Jr[She]=Jr[Ehe]=Jr[Phe]=Jr[The]=Jr[Ihe]=Jr[khe]=Jr[Mhe]=Jr[Rhe]=Jr[Ohe]=!1;function Hhe(e){return xhe(e)&&yhe(e.length)&&!!Jr[vhe(e)]}var Khe=Hhe;function Whe(e){return function(t){return e(t)}}var Ghe=Whe,WE={exports:{}};(function(e,t){var n=i8,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a})(WE,WE.exports);var qhe=Khe,Zhe=Ghe,IN=WE.exports,kN=IN&&IN.isTypedArray,Xhe=kN?Zhe(kN):qhe,wV=Xhe,Yhe=Qfe,Qhe=lhe,Jhe=RI,epe=Eb.exports,tpe=phe,npe=wV,rpe=Object.prototype,ipe=rpe.hasOwnProperty;function ope(e,t){var n=Jhe(e),r=!n&&Qhe(e),i=!n&&!r&&epe(e),o=!n&&!r&&!i&&npe(e),s=n||r||i||o,a=s?Yhe(e.length,String):[],u=a.length;for(var f in e)(t||ipe.call(e,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||tpe(f,u)))&&a.push(f);return a}var ape=ope,spe=Object.prototype;function lpe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||spe;return e===n}var cpe=lpe;function upe(e,t){return function(n){return e(t(n))}}var dpe=upe,fpe=dpe,hpe=fpe(Object.keys,Object),ppe=hpe,mpe=cpe,gpe=ppe,vpe=Object.prototype,ype=vpe.hasOwnProperty;function xpe(e){if(!mpe(e))return gpe(e);var t=[];for(var n in Object(e))ype.call(e,n)&&n!="constructor"&&t.push(n);return t}var bpe=xpe,_pe=gV,wpe=_V;function Cpe(e){return e!=null&&wpe(e.length)&&!_pe(e)}var Spe=Cpe,Epe=ape,Ppe=bpe,Tpe=Spe;function Ipe(e){return Tpe(e)?Epe(e):Ppe(e)}var kpe=Ipe,Mpe=Bfe,Rpe=Xfe,Ope=kpe;function Dpe(e){return Mpe(e,Ope,Rpe)}var Ape=Dpe,MN=Ape,Npe=1,Lpe=Object.prototype,zpe=Lpe.hasOwnProperty;function Fpe(e,t,n,r,i,o){var s=n&Npe,a=MN(e),u=a.length,f=MN(t),p=f.length;if(u!=p&&!s)return!1;for(var g=u;g--;){var v=a[g];if(!(s?v in t:zpe.call(t,v)))return!1}var b=o.get(e),_=o.get(t);if(b&&_)return b==t&&_==e;var T=!0;o.set(e,t),o.set(t,e);for(var I=s;++g0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(o,s){var a=new Map;o.forEach(function(f){a.set(f,!0)});var u=s.filter(function(f){return!a.has(f)});return u.length===1?u[0]:null}return n ").concat(t);return t}var IV=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var i=e.expandedKeys,o=e.selectedKeys,s=e.checkedKeys,a=e.loadedKeys,u=e.loadingKeys,f=e.halfCheckedKeys,p=e.keyEntities,g=e.disabled,v=e.dragging,b=e.dragOverNodeKey,_=e.dropPosition,T=e.motion,I=e.height,P=e.itemHeight,M=e.virtual,D=e.focusable,N=e.activeItem,z=e.focused,$=e.tabIndex,j=e.onKeyDown,U=e.onFocus,q=e.onBlur,Y=e.onActiveChange,te=e.onListChangeStart,Z=e.onListChangeEnd,X=kn(e,Sme),J=E.exports.useRef(null),ue=E.exports.useRef(null);E.exports.useImperativeHandle(t,function(){return{scrollTo:function(at){J.current.scrollTo(at)},getIndentWidth:function(){return ue.current.offsetWidth}}});var re=E.exports.useState(i),se=$e(re,2),oe=se[0],he=se[1],Ce=E.exports.useState(r),Se=$e(Ce,2),be=Se[0],Re=Se[1],Ie=E.exports.useState(r),Me=$e(Ie,2),Ae=Me[0],ze=Me[1],Ke=E.exports.useState([]),Ue=$e(Ke,2),pt=Ue[0],gt=Ue[1],Ot=E.exports.useState(null),qe=$e(Ot,2),Ct=qe[0],ot=qe[1],vt=E.exports.useRef(r);vt.current=r;function yt(){var ct=vt.current;Re(ct),ze(ct),gt([]),ot(null),Z()}E.exports.useEffect(function(){he(i);var ct=Cme(oe,i);if(ct.key!==null)if(ct.add){var at=be.findIndex(function(Ht){var Fe=Ht.key;return Fe===ct.key}),He=GN(HN(be,r,ct.key),M,I,P),ut=be.slice();ut.splice(at+1,0,WN),ze(ut),gt(He),ot("show")}else{var bt=r.findIndex(function(Ht){var Fe=Ht.key;return Fe===ct.key}),Dt=GN(HN(r,be,ct.key),M,I,P),Lt=r.slice();Lt.splice(bt+1,0,WN),ze(Lt),gt(Dt),ot("hide")}else be!==r&&(Re(r),ze(r))},[i,r]),E.exports.useEffect(function(){v||yt()},[v]);var Tt=T?Ae:r,et={expandedKeys:i,selectedKeys:o,loadedKeys:a,loadingKeys:u,checkedKeys:s,halfCheckedKeys:f,dragOverNodeKey:b,dropPosition:_,keyEntities:p};return it(nr,{children:[z&&N&&A("span",{style:KN,"aria-live":"assertive",children:Pme(N)}),A("div",{children:A("input",{style:KN,disabled:D===!1||g,tabIndex:D!==!1?$:null,onKeyDown:j,onFocus:U,onBlur:q,value:"",onChange:Eme,"aria-label":"for screen reader"})}),A("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0},children:A("div",{className:"".concat(n,"-indent"),children:A("div",{ref:ue,className:"".concat(n,"-indent-unit")})})}),A(mI,{...X,data:Tt,itemKey:qN,height:I,fullHeight:!1,virtual:M,itemHeight:P,prefixCls:"".concat(n,"-list"),ref:J,onVisibleChange:function(at,He){var ut=new Set(at),bt=He.filter(function(Dt){return!ut.has(Dt)});bt.some(function(Dt){return qN(Dt)===Rd})&&yt()},children:function(ct){var at=ct.pos,He=Je({},(EV(ct.data),ct.data)),ut=ct.title,bt=ct.key,Dt=ct.isStart,Lt=ct.isEnd,Ht=sv(bt,at);delete He.key,delete He.children;var Fe=Wm(Ht,et);return A(wme,{...He,...Fe,title:ut,active:!!N&&bt===N.key,pos:at,data:ct.data,isStart:Dt,isEnd:Lt,motion:T,motionNodes:bt===Rd?pt:null,motionType:Ct,onMotionStart:te,onMotionEnd:yt,treeNodeRequiredProps:et,onMouseMove:function(){Y(null)}})}})]})});IV.displayName="NodeList";function Tme(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return A("div",{style:i})}var Ime=10,u1=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,g=r.state,v=g.dragChildrenKeys,b=g.dropPosition,_=g.dropTargetKey,T=g.dropTargetPos,I=g.dropAllowed;if(!!I){var P=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),_!==null){var M=me(me({},Wm(_,r.getTreeNodeRequiredProps())),{},{active:((f=r.getActiveItem())===null||f===void 0?void 0:f.key)===_,data:r.state.keyEntities[_].node}),D=v.indexOf(_)!==-1;Lr(!D,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var N=AI(T),z={event:a,node:Di(M),dragNode:r.dragNode?Di(r.dragNode.props):null,dragNodesKeys:[r.dragNode.props.eventKey].concat(v),dropToGap:b!==0,dropPosition:b+Number(N[N.length-1])};p||P==null||P(z),r.dragNode=null}}},r.cleanDragState=function(){var a=r.state.draggingNodeKey;a!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null},r.triggerExpandActionExpand=function(a,u){var f=r.state,p=f.expandedKeys,g=f.flattenNodes,v=u.expanded,b=u.key,_=u.isLeaf;if(!(_||a.shiftKey||a.metaKey||a.ctrlKey)){var T=g.filter(function(P){return P.key===b})[0],I=Di(me(me({},Wm(b,r.getTreeNodeRequiredProps())),{},{data:T.data}));r.setExpandedKeys(v?Ks(p,b):Tl(p,b)),r.onNodeExpand(a,I)}},r.onNodeClick=function(a,u){var f=r.props,p=f.onClick,g=f.expandAction;g==="click"&&r.triggerExpandActionExpand(a,u),p==null||p(a,u)},r.onNodeDoubleClick=function(a,u){var f=r.props,p=f.onDoubleClick,g=f.expandAction;g==="doubleClick"&&r.triggerExpandActionExpand(a,u),p==null||p(a,u)},r.onNodeSelect=function(a,u){var f=r.state.selectedKeys,p=r.state,g=p.keyEntities,v=p.fieldNames,b=r.props,_=b.onSelect,T=b.multiple,I=u.selected,P=u[v.key],M=!I;M?T?f=Tl(f,P):f=[P]:f=Ks(f,P);var D=f.map(function(N){var z=g[N];return z?z.node:null}).filter(function(N){return N});r.setUncontrolledState({selectedKeys:f}),_==null||_(f,{event:"select",selected:M,node:u,selectedNodes:D,nativeEvent:a.nativeEvent})},r.onNodeCheck=function(a,u,f){var p=r.state,g=p.keyEntities,v=p.checkedKeys,b=p.halfCheckedKeys,_=r.props,T=_.checkStrictly,I=_.onCheck,P=u.key,M,D={event:"check",node:u,checked:f,nativeEvent:a.nativeEvent};if(T){var N=f?Tl(v,P):Ks(v,P),z=Ks(b,P);M={checked:N,halfChecked:z},D.checkedNodes=N.map(function(te){return g[te]}).filter(function(te){return te}).map(function(te){return te.node}),r.setUncontrolledState({checkedKeys:N})}else{var $=jl([].concat(Mt(v),[P]),!0,g),j=$.checkedKeys,U=$.halfCheckedKeys;if(!f){var q=new Set(j);q.delete(P);var Y=jl(Array.from(q),{checked:!1,halfCheckedKeys:U},g);j=Y.checkedKeys,U=Y.halfCheckedKeys}M=j,D.checkedNodes=[],D.checkedNodesPositions=[],D.halfCheckedKeys=U,j.forEach(function(te){var Z=g[te];if(!!Z){var X=Z.node,J=Z.pos;D.checkedNodes.push(X),D.checkedNodesPositions.push({node:X,pos:J})}}),r.setUncontrolledState({checkedKeys:j},!1,{halfCheckedKeys:U})}I==null||I(M,D)},r.onNodeLoad=function(a){var u=a.key,f=new Promise(function(p,g){r.setState(function(v){var b=v.loadedKeys,_=b===void 0?[]:b,T=v.loadingKeys,I=T===void 0?[]:T,P=r.props,M=P.loadData,D=P.onLoad;if(!M||_.indexOf(u)!==-1||I.indexOf(u)!==-1)return null;var N=M(a);return N.then(function(){var z=r.state.loadedKeys,$=Tl(z,u);D==null||D($,{event:"load",node:a}),r.setUncontrolledState({loadedKeys:$}),r.setState(function(j){return{loadingKeys:Ks(j.loadingKeys,u)}}),p()}).catch(function(z){if(r.setState(function(j){return{loadingKeys:Ks(j.loadingKeys,u)}}),r.loadingRetryTimes[u]=(r.loadingRetryTimes[u]||0)+1,r.loadingRetryTimes[u]>=Ime){var $=r.state.loadedKeys;Lr(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Tl($,u)}),p()}g(z)}),{loadingKeys:Tl(I,u)}})});return f.catch(function(){}),f},r.onNodeMouseEnter=function(a,u){var f=r.props.onMouseEnter;f==null||f({event:a,node:u})},r.onNodeMouseLeave=function(a,u){var f=r.props.onMouseLeave;f==null||f({event:a,node:u})},r.onNodeContextMenu=function(a,u){var f=r.props.onRightClick;f&&(a.preventDefault(),f({event:a,node:u}))},r.onFocus=function(){var a=r.props.onFocus;r.setState({focused:!0});for(var u=arguments.length,f=new Array(u),p=0;p1&&arguments[1]!==void 0?arguments[1]:!1,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var p=!1,g=!0,v={};Object.keys(a).forEach(function(b){if(b in r.props){g=!1;return}p=!0,v[b]=a[b]}),p&&(!u||g)&&r.setState(me(me({},v),f))}},r.scrollTo=function(a){r.listRef.current.scrollTo(a)},r}return Hr(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var i=this.props.activeKey;i!==void 0&&i!==this.state.activeKey&&(this.setState({activeKey:i}),i!==null&&this.scrollTo({key:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var i,o=this.state,s=o.focused,a=o.flattenNodes,u=o.keyEntities,f=o.draggingNodeKey,p=o.activeKey,g=o.dropLevelOffset,v=o.dropContainerKey,b=o.dropTargetKey,_=o.dropPosition,T=o.dragOverNodeKey,I=o.indent,P=this.props,M=P.prefixCls,D=P.className,N=P.style,z=P.showLine,$=P.focusable,j=P.tabIndex,U=j===void 0?0:j,q=P.selectable,Y=P.showIcon,te=P.icon,Z=P.switcherIcon,X=P.draggable,J=P.checkable,ue=P.checkStrictly,re=P.disabled,se=P.motion,oe=P.loadData,he=P.filterTreeNode,Ce=P.height,Se=P.itemHeight,be=P.virtual,Re=P.titleRender,Ie=P.dropIndicatorRender,Me=P.onContextMenu,Ae=P.onScroll,ze=P.direction,Ke=P.rootClassName,Ue=P.rootStyle,pt=Zl(this.props,{aria:!0,data:!0}),gt;return X&&(on(X)==="object"?gt=X:typeof X=="function"?gt={nodeDraggable:X}:gt={}),A(DI.Provider,{value:{prefixCls:M,selectable:q,showIcon:Y,icon:te,switcherIcon:Z,draggable:gt,draggingNodeKey:f,checkable:J,checkStrictly:ue,disabled:re,keyEntities:u,dropLevelOffset:g,dropContainerKey:v,dropTargetKey:b,dropPosition:_,dragOverNodeKey:T,indent:I,direction:ze,dropIndicatorRender:Ie,loadData:oe,filterTreeNode:he,titleRender:Re,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop},children:A("div",{role:"tree",className:je(M,D,Ke,(i={},ae(i,"".concat(M,"-show-line"),z),ae(i,"".concat(M,"-focused"),s),ae(i,"".concat(M,"-active-focused"),p!==null),i)),style:Ue,children:A(IV,{ref:this.listRef,prefixCls:M,style:N,data:a,disabled:re,selectable:q,checkable:!!J,motion:se,dragging:f!==null,height:Ce,itemHeight:Se,virtual:be,focusable:$,focused:s,tabIndex:U,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Me,onScroll:Ae,...this.getTreeNodeRequiredProps(),...pt})})})}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,a={prevProps:i};function u($){return!s&&$ in i||s&&s[$]!==i[$]}var f,p=o.fieldNames;if(u("fieldNames")&&(p=bb(i.fieldNames),a.fieldNames=p),u("treeData")?f=i.treeData:u("children")&&(Lr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),f=d8(i.children)),f){a.treeData=f;var g=J_(f,{fieldNames:p});a.keyEntities=me(ae({},Rd,TV),g.keyEntities)}var v=a.keyEntities||o.keyEntities;if(u("expandedKeys")||s&&u("autoExpandParent"))a.expandedKeys=i.autoExpandParent||!s&&i.defaultExpandParent?FE(i.expandedKeys,v):i.expandedKeys;else if(!s&&i.defaultExpandAll){var b=me({},v);delete b[Rd],a.expandedKeys=Object.keys(b).map(function($){return b[$].key})}else!s&&i.defaultExpandedKeys&&(a.expandedKeys=i.autoExpandParent||i.defaultExpandParent?FE(i.defaultExpandedKeys,v):i.defaultExpandedKeys);if(a.expandedKeys||delete a.expandedKeys,f||a.expandedKeys){var _=jC(f||o.treeData,a.expandedKeys||o.expandedKeys,p);a.flattenNodes=_}if(i.selectable&&(u("selectedKeys")?a.selectedKeys=VA(i.selectedKeys,i):!s&&i.defaultSelectedKeys&&(a.selectedKeys=VA(i.defaultSelectedKeys,i))),i.checkable){var T;if(u("checkedKeys")?T=UC(i.checkedKeys)||{}:!s&&i.defaultCheckedKeys?T=UC(i.defaultCheckedKeys)||{}:f&&(T=UC(i.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),T){var I=T,P=I.checkedKeys,M=P===void 0?[]:P,D=I.halfCheckedKeys,N=D===void 0?[]:D;if(!i.checkStrictly){var z=jl(M,!0,v);M=z.checkedKeys,N=z.halfCheckedKeys}a.checkedKeys=M,a.halfCheckedKeys=N}}return u("loadedKeys")&&(a.loadedKeys=i.loadedKeys),a}}]),n}(E.exports.Component);u1.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Tme,allowDrop:function(){return!0},expandAction:!1};u1.TreeNode=Md;var kme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};const Mme=kme;var kV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Mme})})};kV.displayName="HolderOutlined";const Rme=E.exports.forwardRef(kV);var ZN=4;function Ome(e){var t,n=e.dropPosition,r=e.dropLevelOffset,i=e.prefixCls,o=e.indent,s=e.direction,a=s===void 0?"ltr":s,u=a==="ltr"?"left":"right",f=a==="ltr"?"right":"left",p=(t={},ae(t,u,-r*o+ZN),ae(t,f,0),t);switch(n){case-1:p.top=-3;break;case 1:p.bottom=-3;break;default:p.bottom=-3,p[u]=o+ZN;break}return A("div",{style:p,className:"".concat(i,"-drop-indicator")})}var Dme={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};const Ame=Dme;var MV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Ame})})};MV.displayName="CaretDownFilled";const Nme=E.exports.forwardRef(MV);var Lme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const zme=Lme;var RV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:zme})})};RV.displayName="FileOutlined";const OV=E.exports.forwardRef(RV);var Fme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};const $me=Fme;var DV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:$me})})};DV.displayName="MinusSquareOutlined";const Bme=E.exports.forwardRef(DV);var Vme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};const Ume=Vme;var AV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Ume})})};AV.displayName="PlusSquareOutlined";const jme=E.exports.forwardRef(AV);function NV(e,t,n,r){var i=r.isLeaf,o=r.expanded,s=r.loading;if(s)return A(Id,{className:"".concat(e,"-switcher-loading-icon")});var a;if(n&&on(n)==="object"&&(a=n.showLeafIcon),i){if(!n)return null;if(typeof a!="boolean"&&!!a){var u=typeof a=="function"?a(r):a,f="".concat(e,"-switcher-line-custom-icon");return Ta(u)?Pi(u,{className:je(u.props.className||"",f)}):u}return a?A(OV,{className:"".concat(e,"-switcher-line-icon")}):A("span",{className:"".concat(e,"-switcher-leaf-line")})}var p="".concat(e,"-switcher-icon"),g=typeof t=="function"?t(r):t;return Ta(g)?Pi(g,{className:je(g.props.className||"",p)}):g||(n?o?A(Bme,{className:"".concat(e,"-switcher-line-icon")}):A(jme,{className:"".concat(e,"-switcher-line-icon")}):A(Nme,{className:p}))}var Hme=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=r.virtual,a=e.prefixCls,u=e.className,f=e.showIcon,p=f===void 0?!1:f,g=e.showLine,v=e.switcherIcon,b=e.blockNode,_=b===void 0?!1:b,T=e.children,I=e.checkable,P=I===void 0?!1:I,M=e.selectable,D=M===void 0?!0:M,N=e.draggable,z=e.motion,$=z===void 0?Je(Je({},U_),{motionAppear:!1}):z,j=i("tree",a),U=Je(Je({},e),{checkable:P,selectable:D,showIcon:p,motion:$,blockNode:_,showLine:Boolean(g),dropIndicatorRender:Ome}),q=E.exports.useMemo(function(){if(!N)return!1;var Y={};switch(on(N)){case"function":Y.nodeDraggable=N;break;case"object":Y=Je({},N);break}return Y.icon!==!1&&(Y.icon=Y.icon||A(Rme,{})),Y},[N]);return A(u1,{itemHeight:20,ref:t,virtual:s,...U,prefixCls:j,className:je((n={},ae(n,"".concat(j,"-icon-hide"),!p),ae(n,"".concat(j,"-block-node"),_),ae(n,"".concat(j,"-unselectable"),!D),ae(n,"".concat(j,"-rtl"),o==="rtl"),n),u),direction:o,checkable:P&&A("span",{className:"".concat(j,"-checkbox-inner")}),selectable:D,switcherIcon:function(te){return NV(j,v,g,te)},draggable:q,children:T})});const LV=Hme;var Kme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const Wme=Kme;var zV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Wme})})};zV.displayName="FolderOpenOutlined";const Gme=E.exports.forwardRef(zV);var qme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};const Zme=qme;var FV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Zme})})};FV.displayName="FolderOutlined";const Xme=E.exports.forwardRef(FV);var Rl;(function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"})(Rl||(Rl={}));function WI(e,t){function n(r){var i=r.key,o=r.children;t(i,r)!==!1&&WI(o||[],t)}e.forEach(n)}function Yme(e){var t=e.treeData,n=e.expandedKeys,r=e.startKey,i=e.endKey,o=[],s=Rl.None;if(r&&r===i)return[r];if(!r||!i)return[];function a(u){return u===r||u===i}return WI(t,function(u){if(s===Rl.End)return!1;if(a(u)){if(o.push(u),s===Rl.None)s=Rl.Start;else if(s===Rl.Start)return s=Rl.End,!1}else s===Rl.Start&&o.push(u);return n.includes(u)}),o}function eS(e,t){var n=Mt(t),r=[];return WI(e,function(i,o){var s=n.indexOf(i);return s!==-1&&(r.push(o),n.splice(s,1)),!!n.length}),r}var XN=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1},Zt=Ye.confirm,an=Ye.closeDropdown;Zt&>([]),an&&Z(!1),Ue(""),oe(z?($||[]).map(function(Kt){return String(Kt)}):[])},Ct=function(){var Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0},Zt=Ye.closeDropdown;Zt&&Z(!1),gt(se())},ot=function(Ye){Ye&&J!==void 0&&oe(J||[]),Z(Ye),!Ye&&!i.filterDropdown&&Ot()},vt=je(ae({},"".concat(o,"-menu-without-submenu"),!sge(i.filters||[]))),yt=function(Ye){if(Ye.target.checked){var Zt=rh(i==null?void 0:i.filters).map(function(an){return String(an)});oe(Zt)}else oe([])},Tt=function Fe(Ye){var Zt=Ye.filters;return(Zt||[]).map(function(an,Kt){var Vt=String(an.value),It={title:an.text,key:an.value!==void 0?Vt:Kt};return an.children&&(It.children=Fe({filters:an.children})),It})},et=function Fe(Ye){var Zt;return Je(Je({},Ye),{text:Ye.title,value:Ye.key,children:((Zt=Ye.children)===null||Zt===void 0?void 0:Zt.map(function(an){return Fe(an)}))||[]})},ct;if(typeof i.filterDropdown=="function")ct=i.filterDropdown({prefixCls:"".concat(o,"-custom"),setSelectedKeys:function(Ye){return he({selectedKeys:Ye})},selectedKeys:se(),confirm:Ct,clearFilters:qe,filters:i.filters,visible:X,close:function(){Z(!1)}});else if(i.filterDropdown)ct=i.filterDropdown;else{var at=se()||[],He=function(){return(i.filters||[]).length===0?A(Ys,{image:Ys.PRESENTED_IMAGE_SIMPLE,description:_.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):f==="tree"?it(nr,{children:[A(QN,{filterSearch:g,value:Ke,onChange:pt,tablePrefixCls:n,locale:_}),it("div",{className:"".concat(n,"-filter-dropdown-tree"),children:[a?A(xh,{checked:at.length===rh(i.filters).length,indeterminate:at.length>0&&at.length0?o:e}),v=Math.ceil((o||e)/g.pageSize);g.current>v&&(g.current=v||1);var b=function(I,P){p({current:I!=null?I:1,pageSize:P||g.pageSize})},_=function(I,P){var M;t&&((M=t.onChange)===null||M===void 0||M.call(t,I,P)),b(I,P),n(I,P||(g==null?void 0:g.pageSize))};return t===!1?[{},function(){}]:[Je(Je({},g),{onChange:_}),b]}var Ec={},eP="SELECT_ALL",tP="SELECT_INVERT",nP="SELECT_NONE",tL=[];function jV(e,t){var n=[];return(e||[]).forEach(function(r){n.push(r),r&&on(r)==="object"&&t in r&&(n=[].concat(Mt(n),Mt(jV(r[t],t))))}),n}function mge(e,t){var n=e||{},r=n.preserveSelectedRowKeys,i=n.selectedRowKeys,o=n.defaultSelectedRowKeys,s=n.getCheckboxProps,a=n.onChange,u=n.onSelect,f=n.onSelectAll,p=n.onSelectInvert,g=n.onSelectNone,v=n.onSelectMultiple,b=n.columnWidth,_=n.type,T=n.selections,I=n.fixed,P=n.renderCell,M=n.hideSelectAll,D=n.checkStrictly,N=D===void 0?!0:D,z=t.prefixCls,$=t.data,j=t.pageData,U=t.getRecordByKey,q=t.getRowKey,Y=t.expandType,te=t.childrenColumnName,Z=t.locale,X=t.getPopupContainer,J=Ei(i||o||tL,{value:i}),ue=$e(J,2),re=ue[0],se=ue[1],oe=E.exports.useRef(new Map),he=E.exports.useCallback(function(et){if(r){var ct=new Map;et.forEach(function(at){var He=U(at);!He&&oe.current.has(at)&&(He=oe.current.get(at)),ct.set(at,He)}),oe.current=ct}},[U,r]);E.exports.useEffect(function(){he(re)},[re]);var Ce=E.exports.useMemo(function(){return N?{keyEntities:null}:J_($,{externalGetKey:q,childrenPropName:te})},[$,q,N,te]),Se=Ce.keyEntities,be=E.exports.useMemo(function(){return jV(j,te)},[j,te]),Re=E.exports.useMemo(function(){var et=new Map;return be.forEach(function(ct,at){var He=q(ct,at),ut=(s?s(ct):null)||{};et.set(He,ut)}),et},[be,q,s]),Ie=E.exports.useCallback(function(et){var ct;return!!(!((ct=Re.get(q(et)))===null||ct===void 0)&&ct.disabled)},[Re,q]),Me=E.exports.useMemo(function(){if(N)return[re||[],[]];var et=jl(re,!0,Se,Ie),ct=et.checkedKeys,at=et.halfCheckedKeys;return[ct||[],at]},[re,N,Se,Ie]),Ae=$e(Me,2),ze=Ae[0],Ke=Ae[1],Ue=E.exports.useMemo(function(){var et=_==="radio"?ze.slice(0,1):ze;return new Set(et)},[ze,_]),pt=E.exports.useMemo(function(){return _==="radio"?new Set:new Set(Ke)},[Ke,_]),gt=E.exports.useState(null),Ot=$e(gt,2),qe=Ot[0],Ct=Ot[1];E.exports.useEffect(function(){e||se(tL)},[!!e]);var ot=E.exports.useCallback(function(et,ct){var at,He;he(et),r?(at=et,He=et.map(function(ut){return oe.current.get(ut)})):(at=[],He=[],et.forEach(function(ut){var bt=U(ut);bt!==void 0&&(at.push(ut),He.push(bt))})),se(at),a==null||a(at,He,{type:ct})},[se,U,a,r]),vt=E.exports.useCallback(function(et,ct,at,He){if(u){var ut=at.map(function(bt){return U(bt)});u(U(et),ct,ut,He)}ot(at,"single")},[u,U,ot]),yt=E.exports.useMemo(function(){if(!T||M)return null;var et=T===!0?[eP,tP,nP]:T;return et.map(function(ct){return ct===eP?{key:"all",text:Z.selectionAll,onSelect:function(){ot($.map(function(He,ut){return q(He,ut)}).filter(function(He){var ut=Re.get(He);return!(ut!=null&&ut.disabled)||Ue.has(He)}),"all")}}:ct===tP?{key:"invert",text:Z.selectInvert,onSelect:function(){var He=new Set(Ue);j.forEach(function(bt,Dt){var Lt=q(bt,Dt),Ht=Re.get(Lt);Ht!=null&&Ht.disabled||(He.has(Lt)?He.delete(Lt):He.add(Lt))});var ut=Array.from(He);p&&p(ut),ot(ut,"invert")}}:ct===nP?{key:"none",text:Z.selectNone,onSelect:function(){g==null||g(),ot(Array.from(Ue).filter(function(He){var ut=Re.get(He);return ut==null?void 0:ut.disabled}),"none")}}:ct}).map(function(ct){return Je(Je({},ct),{onSelect:function(){for(var He,ut,bt=arguments.length,Dt=new Array(bt),Lt=0;Lt2&&arguments[2]!==void 0?arguments[2]:!1,nt=Je(Je({},He),Ve);Et&&(He.resetPagination(),nt.pagination.current&&(nt.pagination.current=1),p&&p.onChange&&p.onChange(1,nt.pagination.pageSize)),Y&&Y.scrollToFirstRowOnChange!==!1&&yt.body.current&&GJ(0,{getContainer:function(){return yt.body.current}}),M==null||M(nt.pagination,nt.filters,nt.sorter,{currentDataSource:eL(iP(Ke,nt.sorterStates,ot),nt.filterStates),action:Bt})},bt=function(Ve,Bt){ut({sorter:Ve,sorterStates:Bt},"sort",!1)},Dt=Cge({prefixCls:gt,mergedColumns:oe,onSorterChange:bt,sortDirections:te||["ascend","descend"],tableLocale:ze,showSorterTooltip:J}),Lt=$e(Dt,4),Ht=Lt[0],Fe=Lt[1],Ye=Lt[2],Zt=Lt[3],an=E.exports.useMemo(function(){return iP(Ke,Fe,ot)},[Ke,Fe]);He.sorter=Zt(),He.sorterStates=Fe;var Kt=function(Ve,Bt){ut({filters:Ve,filterStates:Bt},"filter",!0)},Vt=cge({prefixCls:gt,locale:ze,dropdownPrefixCls:Ot,mergedColumns:oe,onFilterChange:Kt,getPopupContainer:D}),It=$e(Vt,3),Xt=It[0],pn=It[1],tt=It[2],At=eL(an,pn);He.filters=tt,He.filterStates=pn;var qt=E.exports.useMemo(function(){var Xe={};return Object.keys(tt).forEach(function(Ve){tt[Ve]!==null&&(Xe[Ve]=tt[Ve])}),Je(Je({},Ye),{filters:Xe})},[Ye,tt]),En=Sge(qt),yn=$e(En,1),St=yn[0],Pn=function(Ve,Bt){ut({pagination:Je(Je({},He.pagination),{current:Ve,pageSize:Bt})},"paginate")},_n=pge(At.length,p,Pn),tn=$e(_n,2),Ft=tn[0],dt=tn[1];He.pagination=p===!1?{}:fge(p,Ft),He.resetPagination=dt;var mt=E.exports.useMemo(function(){if(p===!1||!Ft.pageSize)return At;var Xe=Ft.current,Ve=Xe===void 0?1:Xe,Bt=Ft.total,Et=Ft.pageSize,nt=Et===void 0?UV:Et;return At.lengthnt?At.slice((Ve-1)*nt,Ve*nt):At:At.slice((Ve-1)*nt,Ve*nt)},[!!p,At,Ft&&Ft.current,Ft&&Ft.pageSize,Ft&&Ft.total]),$t=mge(g,{prefixCls:gt,data:At,pageData:mt,getRowKey:Tt,getRecordByKey:at,expandType:vt,childrenColumnName:ot,locale:ze,getPopupContainer:D}),Wt=$e($t,2),mn=Wt[0],An=Wt[1],Qn=function(Ve,Bt,Et){var nt;return typeof _=="function"?nt=je(_(Ve,Bt,Et)):nt=je(_),je(ae({},"".concat(gt,"-row-selected"),An.has(Tt(Ve,Bt))),nt)};qe.__PARENT_RENDER_ICON__=qe.expandIcon,qe.expandIcon=qe.expandIcon||z||hce(ze),vt==="nest"&&qe.expandIconColumnIndex===void 0?qe.expandIconColumnIndex=g?1:0:qe.expandIconColumnIndex>0&&g&&(qe.expandIconColumnIndex-=1),typeof qe.indentSize!="number"&&(qe.indentSize=typeof q=="number"?q:15);var Jn=E.exports.useCallback(function(Xe){return St(mn(Xt(Ht(Xe))))},[Ht,Xt,mn]),ye,W;if(p!==!1&&(Ft==null?void 0:Ft.total)){var Q;Ft.size?Q=Ft.size:Q=Ae==="small"||Ae==="middle"?"small":void 0;var fe=function(Ve){return A(xse,{...Ft,className:je("".concat(gt,"-pagination ").concat(gt,"-pagination-").concat(Ve),Ft.className),size:Q})},ce=Me==="rtl"?"left":"right",xe=Ft.position;if(xe!==null&&Array.isArray(xe)){var ke=xe.find(function(Xe){return Xe.includes("top")}),we=xe.find(function(Xe){return Xe.includes("bottom")}),Pe=xe.every(function(Xe){return"".concat(Xe)==="none"});!ke&&!we&&!Pe&&(W=fe(ce)),ke&&(ye=fe(ke.toLowerCase().replace("top",""))),we&&(W=fe(we.toLowerCase().replace("bottom","")))}else W=fe(ce)}var Le;typeof N=="boolean"?Le={spinning:N}:on(N)==="object"&&(Le=Je({spinning:!0},N));var Ze=je("".concat(gt,"-wrapper"),ae({},"".concat(gt,"-wrapper-rtl"),Me==="rtl"),i);return A("div",{ref:t,className:Ze,style:o,children:it(uv,{spinning:!1,...Le,children:[ye,A(jd,{...he,columns:oe,direction:Me,expandable:qe,prefixCls:gt,className:je((n={},ae(n,"".concat(gt,"-middle"),Ae==="middle"),ae(n,"".concat(gt,"-small"),Ae==="small"),ae(n,"".concat(gt,"-bordered"),a),ae(n,"".concat(gt,"-empty"),Ke.length===0),n)),data:mt,rowKey:Tt,rowClassName:Qn,emptyText:Z&&Z.emptyText||(Ie||yI)("Table"),internalHooks:f0,internalRefs:yt,transformColumns:Jn}),W]})})}var Tge=E.exports.forwardRef(Pge),ec=Tge;ec.SELECTION_COLUMN=Ec;ec.EXPAND_COLUMN=jd.EXPAND_COLUMN;ec.SELECTION_ALL=eP;ec.SELECTION_INVERT=tP;ec.SELECTION_NONE=nP;ec.Column=dce;ec.ColumnGroup=fce;ec.Summary=hV;const Ige=ec;var kge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const Mge=kge;var qV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Mge})})};qV.displayName="DeleteOutlined";const Rge=E.exports.forwardRef(qV);var ZV=E.exports.createContext(null),XV=E.exports.createContext(null);function Oge(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Dge(e){var t=e||{},n=t.label,r=t.value,i=t.children,o=r||"value";return{_title:n?[n]:["title","label"],value:o,key:o,children:i||"children"}}function oP(e){return!e||e.disabled||e.disableCheckbox||e.checkable===!1}function Age(e,t){var n=[];function r(i){i.forEach(function(o){var s=o[t.children];s&&(n.push(o[t.value]),r(s))})}return r(e),n}function oL(e){return e==null}var Nge={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Lge=function(t,n){var r=L$(),i=r.prefixCls,o=r.multiple,s=r.searchValue,a=r.toggleOpen,u=r.open,f=r.notFoundContent,p=E.exports.useContext(XV),g=p.virtual,v=p.listHeight,b=p.listItemHeight,_=p.treeData,T=p.fieldNames,I=p.onSelect,P=p.dropdownMatchSelectWidth,M=p.treeExpandAction,D=E.exports.useContext(ZV),N=D.checkable,z=D.checkedKeys,$=D.halfCheckedKeys,j=D.treeExpandedKeys,U=D.treeDefaultExpandAll,q=D.treeDefaultExpandedKeys,Y=D.onTreeExpand,te=D.treeIcon,Z=D.showTreeIcon,X=D.switcherIcon,J=D.treeLine,ue=D.treeNodeFilterProp,re=D.loadData,se=D.treeLoadedKeys,oe=D.treeMotion,he=D.onTreeLoad,Ce=D.keyEntities,Se=E.exports.useRef(),be=Xg(function(){return _},[u,_],function(bt,Dt){return Dt[0]&&bt[1]!==Dt[1]}),Re=E.exports.useMemo(function(){return N?{checked:z,halfChecked:$}:null},[N,z,$]);E.exports.useEffect(function(){if(u&&!o&&z.length){var bt;(bt=Se.current)===null||bt===void 0||bt.scrollTo({key:z[0]})}},[u]);var Ie=String(s).toLowerCase(),Me=function(Dt){return Ie?String(Dt[ue]).toLowerCase().includes(Ie):!1},Ae=E.exports.useState(q),ze=$e(Ae,2),Ke=ze[0],Ue=ze[1],pt=E.exports.useState(null),gt=$e(pt,2),Ot=gt[0],qe=gt[1],Ct=E.exports.useMemo(function(){return j?Mt(j):s?Ot:Ke},[Ke,Ot,j,s]);E.exports.useEffect(function(){s&&qe(Age(_,T))},[s]);var ot=function(Dt){Ue(Dt),qe(Dt),Y&&Y(Dt)},vt=function(Dt){Dt.preventDefault()},yt=function(Dt,Lt){var Ht=Lt.node;N&&oP(Ht)||(I(Ht.key,{selected:!z.includes(Ht.key)}),o||a(!1))},Tt=E.exports.useState(null),et=$e(Tt,2),ct=et[0],at=et[1],He=Ce[ct];if(E.exports.useImperativeHandle(n,function(){var bt;return{scrollTo:(bt=Se.current)===null||bt===void 0?void 0:bt.scrollTo,onKeyDown:function(Lt){var Ht,Fe=Lt.which;switch(Fe){case Pt.UP:case Pt.DOWN:case Pt.LEFT:case Pt.RIGHT:(Ht=Se.current)===null||Ht===void 0||Ht.onKeyDown(Lt);break;case Pt.ENTER:{if(He){var Ye=(He==null?void 0:He.node)||{},Zt=Ye.selectable,an=Ye.value;Zt!==!1&&yt(null,{node:{key:ct},selected:!z.includes(an)})}break}case Pt.ESC:a(!1)}},onKeyUp:function(){}}}),be.length===0)return A("div",{role:"listbox",className:"".concat(i,"-empty"),onMouseDown:vt,children:f});var ut={fieldNames:T};return se&&(ut.loadedKeys=se),Ct&&(ut.expandedKeys=Ct),it("div",{onMouseDown:vt,children:[He&&u&&A("span",{style:Nge,"aria-live":"assertive",children:He.node.value}),A(u1,{ref:Se,focusable:!1,prefixCls:"".concat(i,"-tree"),treeData:be,height:v,itemHeight:b,virtual:g!==!1&&P!==!1,multiple:o,icon:te,showIcon:Z,switcherIcon:X,showLine:J,loadData:s?null:re,motion:oe,activeKey:ct,checkable:N,checkStrictly:!0,checkedKeys:Re,selectedKeys:N?[]:z,defaultExpandAll:U,...ut,onActiveChange:at,onSelect:yt,onCheck:yt,onExpand:ot,onLoad:he,filterTreeNode:Me,expandAction:M})]})},YV=E.exports.forwardRef(Lge);YV.displayName="OptionList";var qI=function(){return null},QV="SHOW_ALL",ZI="SHOW_PARENT",d1="SHOW_CHILD";function aL(e,t,n,r){var i=new Set(e);return t===d1?e.filter(function(o){var s=n[o];return!(s&&s.children&&s.children.some(function(a){var u=a.node;return i.has(u[r.value])})&&s.children.every(function(a){var u=a.node;return oP(u)||i.has(u[r.value])}))}):t===ZI?e.filter(function(o){var s=n[o],a=s?s.parent:null;return!(a&&!oP(a.node)&&i.has(a.key))}):e}var zge=["children","value"];function JV(e){return Po(e).map(function(t){if(!E.exports.isValidElement(t)||!t.type)return null;var n=t,r=n.key,i=n.props,o=i.children,s=i.value,a=kn(i,zge),u=me({key:r,value:s},a),f=JV(o);return f.length&&(u.children=f),u}).filter(function(t){return t})}function aP(e){if(!e)return e;var t=me({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Lr(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function Fge(e,t,n,r,i,o){var s=null,a=null;function u(){function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return p.map(function(b,_){var T="".concat(g,"-").concat(_),I=b[o.value],P=n.includes(I),M=f(b[o.children]||[],T,P),D=A(qI,{...b,children:M.map(function(z){return z.node})});if(t===I&&(s=D),P){var N={pos:T,node:D,children:M};return v||a.push(N),N}return null}).filter(function(b){return b})}a||(a=[],f(r),a.sort(function(p,g){var v=p.node.props.value,b=g.node.props.value,_=n.indexOf(v),T=n.indexOf(b);return _-T}))}Object.defineProperty(e,"triggerNode",{get:function(){return Lr(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),u(),s}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return Lr(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),u(),i?a:a.map(function(p){var g=p.node;return g})}})}function $ge(e,t){var n=t.id,r=t.pId,i=t.rootPId,o={},s=[],a=e.map(function(u){var f=me({},u),p=f[n];return o[p]=f,f.key=f.key||p,f});return a.forEach(function(u){var f=u[r],p=o[f];p&&(p.children=p.children||[],p.children.push(u)),(f===i||!p&&i===null)&&s.push(u)}),s}function Bge(e,t,n){return E.exports.useMemo(function(){return e?n?$ge(e,me({id:"id",pId:"pId",rootPId:null},n!==!0?n:{})):e:JV(t)},[t,n,e])}const Vge=function(e){var t=E.exports.useRef({valueLabels:new Map});return E.exports.useMemo(function(){var n=t.current.valueLabels,r=new Map,i=e.map(function(o){var s,a=o.value,u=(s=o.label)!==null&&s!==void 0?s:n.get(a);return r.set(a,u),me(me({},o),{},{label:u})});return t.current.valueLabels=r,[i]},[e])};function sL(e){var t=E.exports.useRef();t.current=e;var n=E.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}const Uge=function(e,t){return E.exports.useMemo(function(){var n=J_(e,{fieldNames:t,initWrapper:function(i){return me(me({},i),{},{valueEntities:new Map})},processEntity:function(i,o){var s=i.node[t.value];o.valueEntities.set(s,i)}});return n},[e,t])},jge=function(e,t,n,r){return E.exports.useMemo(function(){var i=e.map(function(u){var f=u.value;return f}),o=t.map(function(u){var f=u.value;return f}),s=i.filter(function(u){return!r[u]});if(n){var a=jl(i,!0,r);i=a.checkedKeys,o=a.halfCheckedKeys}return[Array.from(new Set([].concat(Mt(s),Mt(i)))),o]},[e,t,n,r])},Hge=function(e,t,n){var r=n.treeNodeFilterProp,i=n.filterTreeNode,o=n.fieldNames,s=o.children;return E.exports.useMemo(function(){if(!t||i===!1)return e;var a;if(typeof i=="function")a=i;else{var u=t.toUpperCase();a=function(g,v){var b=v[r];return String(b).toUpperCase().includes(u)}}function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return p.map(function(v){var b=v[s],_=g||a(t,aP(v)),T=f(b||[],_);return _||T.length?me(me({},v),{},ae({isLeaf:void 0},s,T)):null}).filter(function(v){return v})}return f(e)},[e,t,s,r,i])};var Kge=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function Wge(e){return!e||on(e)!=="object"}var Gge=E.exports.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tree-select":r,o=e.value,s=e.defaultValue,a=e.onChange,u=e.onSelect,f=e.onDeselect,p=e.searchValue,g=e.inputValue,v=e.onSearch,b=e.autoClearSearchValue,_=b===void 0?!0:b,T=e.filterTreeNode,I=e.treeNodeFilterProp,P=I===void 0?"value":I,M=e.showCheckedStrategy,D=M===void 0?d1:M,N=e.treeNodeLabelProp,z=e.multiple,$=e.treeCheckable,j=e.treeCheckStrictly,U=e.labelInValue,q=e.fieldNames,Y=e.treeDataSimpleMode,te=e.treeData,Z=e.children,X=e.loadData,J=e.treeLoadedKeys,ue=e.onTreeLoad,re=e.treeDefaultExpandAll,se=e.treeExpandedKeys,oe=e.treeDefaultExpandedKeys,he=e.onTreeExpand,Ce=e.treeExpandAction,Se=e.virtual,be=e.listHeight,Re=be===void 0?200:be,Ie=e.listItemHeight,Me=Ie===void 0?20:Ie,Ae=e.onDropdownVisibleChange,ze=e.dropdownMatchSelectWidth,Ke=ze===void 0?!0:ze,Ue=e.treeLine,pt=e.treeIcon,gt=e.showTreeIcon,Ot=e.switcherIcon,qe=e.treeMotion,Ct=kn(e,Kge),ot=aB(n),vt=$&&!j,yt=$||j,Tt=j||U,et=yt||z,ct=Ei(s,{value:o}),at=$e(ct,2),He=at[0],ut=at[1],bt=E.exports.useMemo(function(){return Dge(q)},[JSON.stringify(q)]),Dt=Ei("",{value:p!==void 0?p:g,postState:function(xe){return xe||""}}),Lt=$e(Dt,2),Ht=Lt[0],Fe=Lt[1],Ye=function(xe){Fe(xe),v==null||v(xe)},Zt=Bge(te,Z,Y),an=Uge(Zt,bt),Kt=an.keyEntities,Vt=an.valueEntities,It=E.exports.useCallback(function(ce){var xe=[],ke=[];return ce.forEach(function(we){Vt.has(we)?ke.push(we):xe.push(we)}),{missingRawValues:xe,existRawValues:ke}},[Vt]),Xt=Hge(Zt,Ht,{fieldNames:bt,treeNodeFilterProp:P,filterTreeNode:T}),pn=E.exports.useCallback(function(ce){if(ce){if(N)return ce[N];for(var xe=bt._title,ke=0;ke"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=lL[t.format]||lL.default;window.clipboardData.setData(g,e)}else p.clipboardData.clearData(),p.clipboardData.setData(t.format,e);t.onCopy&&(p.preventDefault(),t.onCopy(p.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var f=document.execCommand("copy");if(!f)throw new Error("copy command was unsuccessful");u=!0}catch(p){n&&console.error("unable to copy using execCommand: ",p),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(g){n&&console.error("unable to copy using clipboardData: ",g),n&&console.error("falling back to prompt"),r=ave("message"in t?t.message:ove),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return u}var lve=sve,cve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};const uve=cve;var nU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:uve})})};nU.displayName="EnterOutlined";const dve=E.exports.forwardRef(nU);var fve=function(t){var n=t.prefixCls,r=t["aria-label"],i=t.className,o=t.style,s=t.direction,a=t.maxLength,u=t.autoSize,f=u===void 0?!0:u,p=t.value,g=t.onSave,v=t.onCancel,b=t.onEnd,_=t.component,T=t.enterIcon,I=T===void 0?A(dve,{}):T,P=E.exports.useRef(null),M=E.exports.useRef(!1),D=E.exports.useRef(),N=E.exports.useState(p),z=$e(N,2),$=z[0],j=z[1];E.exports.useEffect(function(){j(p)},[p]),E.exports.useEffect(function(){if(P.current&&P.current.resizableTextArea){var se=P.current.resizableTextArea.textArea;se.focus();var oe=se.value.length;se.setSelectionRange(oe,oe)}},[]);var U=function(oe){var he=oe.target;j(he.value.replace(/[\n\r]/g,""))},q=function(){M.current=!0},Y=function(){M.current=!1},te=function(oe){var he=oe.keyCode;M.current||(D.current=he)},Z=function(){g($.trim())},X=function(oe){var he=oe.keyCode,Ce=oe.ctrlKey,Se=oe.altKey,be=oe.metaKey,Re=oe.shiftKey;D.current===he&&!M.current&&!Ce&&!Se&&!be&&!Re&&(he===Pt.ENTER?(Z(),b==null||b()):he===Pt.ESC&&v())},J=function(){Z()},ue=_?"".concat(n,"-").concat(_):"",re=je(n,"".concat(n,"-edit-content"),ae({},"".concat(n,"-rtl"),s==="rtl"),i,ue);return it("div",{className:re,style:o,children:[A(D8,{ref:P,maxLength:a,value:$,onChange:U,onKeyDown:te,onKeyUp:X,onCompositionStart:q,onCompositionEnd:Y,onBlur:J,"aria-label":r,rows:1,autoSize:f}),I!==null?Pi(I,{className:"".concat(n,"-edit-content-confirm")}):null]})};const hve=fve;function nS(e,t){return E.exports.useMemo(function(){var n=!!e;return[n,Je(Je({},t),n&&on(e)==="object"?e:null)]},[e])}var pve=function(t,n){var r=E.exports.useRef(!1);E.exports.useEffect(function(){r.current?t():r.current=!0},n)};const mve=pve;var gve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);it){var f=t-n;return r.push(String(o).slice(0,f)),r}r.push(o),n=u}return e}var xve=0,vx=1,uL=2,rS=3,dL=4,bve=function(t){var n=t.enabledMeasure,r=t.children,i=t.text,o=t.width,s=t.fontSize,a=t.rows,u=t.onEllipsis,f=E.exports.useState([0,0,0]),p=$e(f,2),g=$e(p[0],3),v=g[0],b=g[1],_=g[2],T=p[1],I=E.exports.useState(xve),P=$e(I,2),M=P[0],D=P[1],N=E.exports.useState(0),z=$e(N,2),$=z[0],j=z[1],U=E.exports.useRef(null),q=E.exports.useRef(null),Y=E.exports.useMemo(function(){return Po(i)},[i]),te=E.exports.useMemo(function(){return yve(Y)},[Y]),Z=E.exports.useMemo(function(){return!n||M!==rS?r(Y,!1):r(cL(Y,b),b1&&dt,mn=function(nt){var zt;Lt(!0),(zt=St.onExpand)===null||zt===void 0||zt.call(St,nt)},An=E.exports.useState(0),Qn=$e(An,2),Jn=Qn[0],ye=Qn[1],W=E.exports.useState(0),Q=$e(W,2),fe=Q[0],ce=Q[1],xe=function(nt,zt){var Gt=nt.offsetWidth,wn;ye(Gt),ce(parseInt((wn=window.getComputedStyle)===null||wn===void 0?void 0:wn.call(window,zt).fontSize,10)||0)},ke=function(nt){var zt;Zt(nt),Ye!==nt&&((zt=St.onEllipsis)===null||zt===void 0||zt.call(St,nt))};E.exports.useEffect(function(){var Et=z.current;if(yn&&dt&&Et){var nt=Wt?Et.offsetHeight"u"||!Et||!dt||!Pn)){var nt=new IntersectionObserver(function(){At(!!Et.offsetParent)});return nt.observe(Et),function(){nt.disconnect()}}},[dt,Pn]);var we={};St.tooltip===!0?we={title:(n=Z.text)!==null&&n!==void 0?n:p}:E.exports.isValidElement(St.tooltip)?we={title:St.tooltip}:on(St.tooltip)==="object"?we=Je({title:(r=Z.text)!==null&&r!==void 0?r:p},St.tooltip):we={title:St.tooltip};var Pe=E.exports.useMemo(function(){var Et=function(zt){return["string","number"].includes(on(zt))};if(!(!yn||dt)){if(Et(Z.text))return Z.text;if(Et(p))return p;if(Et(T))return T;if(Et(we.title))return we.title}},[yn,dt,T,we.title,mt]);if(ue)return A(hve,{value:(i=Z.text)!==null&&i!==void 0?i:typeof p=="string"?p:"",onSave:Se,onCancel:be,onEnd:Z.onEnd,prefixCls:j,className:s,style:a,direction:D,component:_,maxLength:Z.maxLength,autoSize:Z.autoSize,enterIcon:Z.enterIcon});var Le=function(){var nt=St.expandable,zt=St.symbol;if(!nt)return null;var Gt;return zt?Gt=zt:Gt=N.expand,A("a",{className:"".concat(j,"-expand"),onClick:mn,"aria-label":N.expand,children:Gt},"expand")},Ze=function(){if(!!te){var nt=Z.icon,zt=Z.tooltip,Gt=Po(zt)[0]||N.edit,wn=typeof Gt=="string"?Gt:"";return oe.includes("icon")?A(ka,{title:zt===!1?"":Gt,children:A(fN,{ref:$,className:"".concat(j,"-edit"),onClick:Ce,"aria-label":wn,children:nt||A(nve,{role:"button"})})},"edit"):null}},Xe=function(){if(!!Me){var nt=Ae.tooltips,zt=Ae.icon,Gt=fL(nt),wn=fL(zt),dn=Ue?yx(Gt[1],N.copied):yx(Gt[0],N.copy),Cn=Ue?N.copied:N.copy,jn=typeof dn=="string"?dn:Cn;return A(ka,{title:dn,children:A(fN,{className:je("".concat(j,"-copy"),Ue&&"".concat(j,"-copy-success")),onClick:Ct,"aria-label":jn,children:Ue?yx(wn[1],A(xI,{}),!0):yx(wn[0],A(Jge,{}),!0)})},"copy")}},Ve=function(nt){return[nt&&Le(),Ze(),Xe()]},Bt=function(nt){return[nt&&A("span",{"aria-hidden":!0,children:Pve},"ellipsis"),St.suffix,Ve(nt)]};return A(Ql,{onResize:xe,disabled:!Pn||dt,children:function(Et){var nt;return A(Cve,{tooltipProps:we,enabledEllipsis:Pn,isEllipsis:mt,children:A(rU,{className:je((nt={},ae(nt,"".concat(j,"-").concat(u),u),ae(nt,"".concat(j,"-disabled"),f),ae(nt,"".concat(j,"-ellipsis"),yn),ae(nt,"".concat(j,"-single-line"),Pn&&tn===1),ae(nt,"".concat(j,"-ellipsis-single-line"),$t),ae(nt,"".concat(j,"-ellipsis-multiple-line"),Wt),nt),s),prefixCls:o,style:Je(Je({},a),{WebkitLineClamp:Wt?tn:void 0}),component:_,ref:Aa(Et,z,t),direction:D,onClick:oe.includes("text")?Ce:void 0,"aria-label":Pe==null?void 0:Pe.toString(),title:T,...U,children:A(_ve,{enabledMeasure:Pn&&!dt,text:p,rows:tn,width:Jn,fontSize:fe,onEllipsis:ke,children:function(zt,Gt){var wn=zt;zt.length&&Gt&&Pe&&(wn=A("span",{"aria-hidden":!0,children:wn},"show-content"));var dn=Eve(e,it(nr,{children:[wn,Bt(Gt)]}));return dn}})})})}})});const h1=Tve;var Ive=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i0&&(o.percent=o.loaded/o.total*100),e.onProgress(o)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(i){var o=e.data[i];if(Array.isArray(o)){o.forEach(function(s){n.append("".concat(i,"[]"),s)});return}n.append(i,o)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(o){e.onError(o)},t.onload=function(){return t.status<200||t.status>=300?e.onError(Vve(e,t),hL(t)):e.onSuccess(hL(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return r["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(i){r[i]!==null&&t.setRequestHeader(i,r[i])}),t.send(n),{abort:function(){t.abort()}}}var jve=+new Date,Hve=0;function iS(){return"rc-upload-".concat(jve,"-").concat(++Hve)}const oS=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(a.charAt(0)==="."){var u=r.toLowerCase(),f=a.toLowerCase(),p=[f];return(f===".jpg"||f===".jpeg")&&(p=[".jpg",".jpeg"]),p.some(function(g){return u.endsWith(g)})}return/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):i===a?!0:/^\w+$/.test(a)?(Lr(!1,"Upload takes an invalidate 'accept' type '".concat(a,"'.Skip for check.")),!0):!1})}return!0};function Kve(e,t){var n=e.createReader(),r=[];function i(){n.readEntries(function(o){var s=Array.prototype.slice.apply(o);r=r.concat(s);var a=!s.length;a?t(r):i()})}i()}var Wve=function(t,n,r){var i=function o(s,a){s.path=a||"",s.isFile?s.file(function(u){r(u)&&(s.fullPath&&!u.webkitRelativePath&&(Object.defineProperties(u,{webkitRelativePath:{writable:!0}}),u.webkitRelativePath=s.fullPath.replace(/^\//,""),Object.defineProperties(u,{webkitRelativePath:{writable:!1}})),n([u]))}):s.isDirectory&&Kve(s,function(u){u.forEach(function(f){o(f,"".concat(a).concat(s.name,"/"))})})};t.forEach(function(o){i(o.webkitGetAsEntry())})},Gve=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],qve=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:"",n=t.split("/"),r=n[n.length-1],i=r.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(i)||[""])[0]},lU=function(t){return t.indexOf("image/")===0},aye=function(t){if(t.type&&!t.thumbUrl)return lU(t.type);var n=t.thumbUrl||t.url||"",r=oye(n);return/^data:image\//.test(n)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r)?!0:!(/^data:/.test(n)||r)},wc=200;function sye(e){return new Promise(function(t){if(!e.type||!lU(e.type)){t("");return}var n=document.createElement("canvas");n.width=wc,n.height=wc,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(wc,"px; height: ").concat(wc,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),i=new Image;if(i.onload=function(){var s=i.width,a=i.height,u=wc,f=wc,p=0,g=0;s>a?(f=a*(wc/s),g=-(f-u)/2):(u=s*(wc/a),p=-(u-f)/2),r.drawImage(i,p,g,u,f);var v=n.toDataURL();document.body.removeChild(n),t(v)},i.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){var o=new FileReader;o.addEventListener("load",function(){o.result&&(i.src=o.result)}),o.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var lye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const cU=lye;var uU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:cU})})};uU.displayName="DownloadOutlined";const cye=E.exports.forwardRef(uU);var uye=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.className,o=e.style,s=e.locale,a=e.listType,u=e.file,f=e.items,p=e.progress,g=e.iconRender,v=e.actionIconRender,b=e.itemRender,_=e.isImgUrl,T=e.showPreviewIcon,I=e.showRemoveIcon,P=e.showDownloadIcon,M=e.previewIcon,D=e.removeIcon,N=e.downloadIcon,z=e.onPreview,$=e.onDownload,j=e.onClose,U,q,Y=u.status,te=E.exports.useState(Y),Z=$e(te,2),X=Z[0],J=Z[1];E.exports.useEffect(function(){Y!=="removed"&&J(Y)},[Y]);var ue=E.exports.useState(!1),re=$e(ue,2),se=re[0],oe=re[1],he=E.exports.useRef(null);E.exports.useEffect(function(){return he.current=setTimeout(function(){oe(!0)},300),function(){he.current&&clearTimeout(he.current)}},[]);var Ce="".concat(r,"-span"),Se=g(u),be=A("div",{className:"".concat(r,"-text-icon"),children:Se});if(a==="picture"||a==="picture-card")if(X==="uploading"||!u.thumbUrl&&!u.url){var Re,Ie=je((Re={},ae(Re,"".concat(r,"-list-item-thumbnail"),!0),ae(Re,"".concat(r,"-list-item-file"),X!=="uploading"),Re));be=A("div",{className:Ie,children:Se})}else{var Me,Ae=_!=null&&_(u)?A("img",{src:u.thumbUrl||u.url,alt:u.name,className:"".concat(r,"-list-item-image"),crossOrigin:u.crossOrigin}):Se,ze=je((Me={},ae(Me,"".concat(r,"-list-item-thumbnail"),!0),ae(Me,"".concat(r,"-list-item-file"),_&&!_(u)),Me));be=A("a",{className:ze,onClick:function(Ht){return z(u,Ht)},href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer",children:Ae})}var Ke=je((n={},ae(n,"".concat(r,"-list-item"),!0),ae(n,"".concat(r,"-list-item-").concat(X),!0),ae(n,"".concat(r,"-list-item-list-type-").concat(a),!0),n)),Ue=typeof u.linkProps=="string"?JSON.parse(u.linkProps):u.linkProps,pt=I?v((typeof D=="function"?D(u):D)||A(Rge,{}),function(){return j(u)},r,s.removeFile):null,gt=P&&X==="done"?v((typeof N=="function"?N(u):N)||A(cye,{}),function(){return $(u)},r,s.downloadFile):null,Ot=a!=="picture-card"&&it("span",{className:je("".concat(r,"-list-item-card-actions"),{picture:a==="picture"}),children:[gt,pt]},"download-delete"),qe=je("".concat(r,"-list-item-name")),Ct=u.url?[A("a",{target:"_blank",rel:"noopener noreferrer",className:qe,title:u.name,...Ue,href:u.url,onClick:function(Ht){return z(u,Ht)},children:u.name},"view"),Ot]:[A("span",{className:qe,onClick:function(Ht){return z(u,Ht)},title:u.name,children:u.name},"view"),Ot],ot={pointerEvents:"none",opacity:.5},vt=T?A("a",{href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:u.url||u.thumbUrl?void 0:ot,onClick:function(Ht){return z(u,Ht)},title:s.previewFile,children:typeof M=="function"?M(u):M||A(LI,{})}):null,yt=a==="picture-card"&&X!=="uploading"&&it("span",{className:"".concat(r,"-list-item-actions"),children:[vt,X==="done"&>,pt]}),Tt;u.response&&typeof u.response=="string"?Tt=u.response:Tt=((U=u.error)===null||U===void 0?void 0:U.statusText)||((q=u.error)===null||q===void 0?void 0:q.message)||s.uploadError;var et=it("span",{className:Ce,children:[be,Ct]}),ct=E.exports.useContext(zn),at=ct.getPrefixCls,He=at(),ut=it("div",{className:Ke,children:[A("div",{className:"".concat(r,"-list-item-info"),children:et}),yt,se&&A(oa,{motionName:"".concat(He,"-fade"),visible:X==="uploading",motionDeadline:2e3,children:function(Lt){var Ht=Lt.className,Fe="percent"in u?A(VI,{...p,type:"line",percent:u.percent}):null;return A("div",{className:je("".concat(r,"-list-item-progress"),Ht),children:Fe})}})]}),bt=je("".concat(r,"-list-").concat(a,"-container"),i),Dt=X==="error"?A(ka,{title:Tt,getPopupContainer:function(Ht){return Ht.parentNode},children:ut}):ut;return A("div",{className:bt,style:o,ref:t,children:b?b(Dt,u,f,{download:$.bind(null,u),preview:z.bind(null,u),remove:j.bind(null,u)}):Dt})});const dye=uye;var p1=Je({},U_);delete p1.onAppearEnd;delete p1.onEnterEnd;delete p1.onLeaveEnd;var fye=function(t,n){var r,i=t.listType,o=i===void 0?"text":i,s=t.previewFile,a=s===void 0?sye:s,u=t.onPreview,f=t.onDownload,p=t.onRemove,g=t.locale,v=t.iconRender,b=t.isImageUrl,_=b===void 0?aye:b,T=t.prefixCls,I=t.items,P=I===void 0?[]:I,M=t.showPreviewIcon,D=M===void 0?!0:M,N=t.showRemoveIcon,z=N===void 0?!0:N,$=t.showDownloadIcon,j=$===void 0?!1:$,U=t.removeIcon,q=t.previewIcon,Y=t.downloadIcon,te=t.progress,Z=te===void 0?{strokeWidth:2,showInfo:!1}:te,X=t.appendAction,J=t.appendActionVisible,ue=J===void 0?!0:J,re=t.itemRender,se=_I(),oe=E.exports.useState(!1),he=$e(oe,2),Ce=he[0],Se=he[1];E.exports.useEffect(function(){o!=="picture"&&o!=="picture-card"||(P||[]).forEach(function(ot){typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(ot.originFileObj instanceof File||ot.originFileObj instanceof Blob)||ot.thumbUrl!==void 0||(ot.thumbUrl="",a&&a(ot.originFileObj).then(function(vt){ot.thumbUrl=vt||"",se()}))})},[o,P,a]),E.exports.useEffect(function(){Se(!0)},[]);var be=function(vt,yt){if(!!u)return yt==null||yt.preventDefault(),u(vt)},Re=function(vt){typeof f=="function"?f(vt):vt.url&&window.open(vt.url)},Ie=function(vt){p==null||p(vt)},Me=function(vt){if(v)return v(vt,o);var yt=vt.status==="uploading",Tt=_&&_(vt)?A(rye,{}):A(Yve,{}),et=yt?A(Id,{}):A(eye,{});return o==="picture"?et=yt?A(Id,{}):Tt:o==="picture-card"&&(et=yt?g.uploading:Tt),et},Ae=function(vt,yt,Tt,et){var ct={type:"text",size:"small",title:et,onClick:function(ut){yt(),Ta(vt)&&vt.props.onClick&&vt.props.onClick(ut)},className:"".concat(Tt,"-list-item-card-actions-btn")};if(Ta(vt)){var at=Pi(vt,Je(Je({},vt.props),{onClick:function(){}}));return A(Yr,{...ct,icon:at})}return A(Yr,{...ct,children:A("span",{children:vt})})};E.exports.useImperativeHandle(n,function(){return{handlePreview:be,handleDownload:Re}});var ze=E.exports.useContext(zn),Ke=ze.getPrefixCls,Ue=ze.direction,pt=Ke("upload",T),gt=je((r={},ae(r,"".concat(pt,"-list"),!0),ae(r,"".concat(pt,"-list-").concat(o),!0),ae(r,"".concat(pt,"-list-rtl"),Ue==="rtl"),r)),Ot=Mt(P.map(function(ot){return{key:ot.uid,file:ot}})),qe=o==="picture-card"?"animate-inline":"animate",Ct={motionDeadline:2e3,motionName:"".concat(pt,"-").concat(qe),keys:Ot,motionAppear:Ce};return o!=="picture-card"&&(Ct=Je(Je({},p1),Ct)),it("div",{className:gt,children:[A(J6,{...Ct,component:!1,children:function(ot){var vt=ot.key,yt=ot.file,Tt=ot.className,et=ot.style;return A(dye,{locale:g,prefixCls:pt,className:Tt,style:et,file:yt,items:P,progress:Z,listType:o,isImgUrl:_,showPreviewIcon:D,showRemoveIcon:z,showDownloadIcon:j,removeIcon:U,previewIcon:q,downloadIcon:Y,iconRender:Me,actionIconRender:Ae,itemRender:re,onPreview:be,onDownload:Re,onClose:Ie},vt)}}),X&&A(oa,{...Ct,visible:ue,forceRender:!0,children:function(ot){var vt=ot.className,yt=ot.style;return Pi(X,function(Tt){return{className:je(Tt.className,vt),style:Je(Je(Je({},yt),{pointerEvents:vt?"none":void 0}),Tt.style)}})}})]})},hye=E.exports.forwardRef(fye);const pye=hye;var mye=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(p){try{f(r.next(p))}catch(g){s(g)}}function u(p){try{f(r.throw(p))}catch(g){s(g)}}function f(p){p.done?o(p.value):i(p.value).then(a,u)}f((r=r.apply(e,t||[])).next())})},Em="__LIST_IGNORE_".concat(Date.now(),"__"),gye=function(t,n){var r,i=t.fileList,o=t.defaultFileList,s=t.onRemove,a=t.showUploadList,u=a===void 0?!0:a,f=t.listType,p=f===void 0?"text":f,g=t.onPreview,v=t.onDownload,b=t.onChange,_=t.onDrop,T=t.previewFile,I=t.disabled,P=t.locale,M=t.iconRender,D=t.isImageUrl,N=t.progress,z=t.prefixCls,$=t.className,j=t.type,U=j===void 0?"select":j,q=t.children,Y=t.style,te=t.itemRender,Z=t.maxCount,X=t.data,J=X===void 0?{}:X,ue=t.multiple,re=ue===void 0?!1:ue,se=t.action,oe=se===void 0?"":se,he=t.accept,Ce=he===void 0?"":he,Se=t.supportServerRender,be=Se===void 0?!0:Se,Re=E.exports.useContext(fu),Ie=I!=null?I:Re,Me=Ei(o||[],{value:i,postState:function(It){return It!=null?It:[]}}),Ae=$e(Me,2),ze=Ae[0],Ke=Ae[1],Ue=E.exports.useState("drop"),pt=$e(Ue,2),gt=pt[0],Ot=pt[1],qe=E.exports.useRef(null);E.exports.useMemo(function(){var Vt=Date.now();(i||[]).forEach(function(It,Xt){!It.uid&&!Object.isFrozen(It)&&(It.uid="__AUTO__".concat(Vt,"_").concat(Xt,"__"))})},[i]);var Ct=function(It,Xt,pn){var tt=Mt(Xt);Z===1?tt=tt.slice(-1):Z&&(tt=tt.slice(0,Z)),al.exports.flushSync(function(){Ke(tt)});var At={file:It,fileList:tt};pn&&(At.event=pn),b==null||b(At)},ot=function(It,Xt){return mye(void 0,void 0,void 0,Hi().mark(function pn(){var tt,At,qt,En;return Hi().wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(tt=t.beforeUpload,At=t.transformFile,qt=It,!tt){St.next=13;break}return St.next=5,tt(It,Xt);case 5:if(En=St.sent,En!==!1){St.next=8;break}return St.abrupt("return",!1);case 8:if(delete It[Em],En!==Em){St.next=12;break}return Object.defineProperty(It,Em,{value:!0,configurable:!0}),St.abrupt("return",!1);case 12:on(En)==="object"&&En&&(qt=En);case 13:if(!At){St.next=17;break}return St.next=16,At(qt);case 16:qt=St.sent;case 17:return St.abrupt("return",qt);case 18:case"end":return St.stop()}},pn)}))},vt=function(It){var Xt=It.filter(function(At){return!At.file[Em]});if(!!Xt.length){var pn=Xt.map(function(At){return xx(At.file)}),tt=Mt(ze);pn.forEach(function(At){tt=bx(At,tt)}),pn.forEach(function(At,qt){var En=At;if(Xt[qt].parsedFile)At.status="uploading";else{var yn=At.originFileObj,St;try{St=new File([yn],yn.name,{type:yn.type})}catch{St=new Blob([yn],{type:yn.type}),St.name=yn.name,St.lastModifiedDate=new Date,St.lastModified=new Date().getTime()}St.uid=At.uid,En=St}Ct(En,tt)})}},yt=function(It,Xt,pn){try{typeof It=="string"&&(It=JSON.parse(It))}catch{}if(!!sS(Xt,ze)){var tt=xx(Xt);tt.status="done",tt.percent=100,tt.response=It,tt.xhr=pn;var At=bx(tt,ze);Ct(tt,At)}},Tt=function(It,Xt){if(!!sS(Xt,ze)){var pn=xx(Xt);pn.status="uploading",pn.percent=It.percent;var tt=bx(pn,ze);Ct(pn,tt,It)}},et=function(It,Xt,pn){if(!!sS(pn,ze)){var tt=xx(pn);tt.error=It,tt.response=Xt,tt.status="error";var At=bx(tt,ze);Ct(tt,At)}},ct=function(It){var Xt;Promise.resolve(typeof s=="function"?s(It):s).then(function(pn){var tt;if(pn!==!1){var At=iye(It,ze);At&&(Xt=Je(Je({},It),{status:"removed"}),ze==null||ze.forEach(function(qt){var En=Xt.uid!==void 0?"uid":"name";qt[En]===Xt[En]&&!Object.isFrozen(qt)&&(qt.status="removed")}),(tt=qe.current)===null||tt===void 0||tt.abort(Xt),Ct(Xt,At))}})},at=function(It){Ot(It.type),It.type==="drop"&&(_==null||_(It))};E.exports.useImperativeHandle(n,function(){return{onBatchStart:vt,onSuccess:yt,onProgress:Tt,onError:et,fileList:ze,upload:qe.current}});var He=E.exports.useContext(zn),ut=He.getPrefixCls,bt=He.direction,Dt=ut("upload",z),Lt=Je(Je({onBatchStart:vt,onError:et,onProgress:Tt,onSuccess:yt},t),{data:J,multiple:re,action:oe,accept:Ce,supportServerRender:be,prefixCls:Dt,disabled:Ie,beforeUpload:ot,onChange:void 0});delete Lt.className,delete Lt.style,(!q||Ie)&&delete Lt.id;var Ht=function(It,Xt){return u?A(Lh,{componentName:"Upload",defaultLocale:Ms.Upload,children:function(pn){var tt=typeof u=="boolean"?{}:u,At=tt.showRemoveIcon,qt=tt.showPreviewIcon,En=tt.showDownloadIcon,yn=tt.removeIcon,St=tt.previewIcon,Pn=tt.downloadIcon;return A(pye,{prefixCls:Dt,listType:p,items:ze,previewFile:T,onPreview:g,onDownload:v,onRemove:ct,showRemoveIcon:!Ie&&At,showPreviewIcon:qt,showDownloadIcon:En,removeIcon:yn,previewIcon:St,downloadIcon:Pn,iconRender:M,locale:Je(Je({},pn),P),isImageUrl:D,progress:N,appendAction:It,appendActionVisible:Xt,itemRender:te})}}):It};if(U==="drag"){var Fe,Ye=je(Dt,(Fe={},ae(Fe,"".concat(Dt,"-drag"),!0),ae(Fe,"".concat(Dt,"-drag-uploading"),ze.some(function(Vt){return Vt.status==="uploading"})),ae(Fe,"".concat(Dt,"-drag-hover"),gt==="dragover"),ae(Fe,"".concat(Dt,"-disabled"),Ie),ae(Fe,"".concat(Dt,"-rtl"),bt==="rtl"),Fe),$);return it("span",{children:[A("div",{className:Ye,onDrop:at,onDragOver:at,onDragLeave:at,style:Y,children:A(sP,{...Lt,ref:qe,className:"".concat(Dt,"-btn"),children:A("div",{className:"".concat(Dt,"-drag-container"),children:q})})}),Ht()]})}var Zt=je(Dt,(r={},ae(r,"".concat(Dt,"-select"),!0),ae(r,"".concat(Dt,"-select-").concat(p),!0),ae(r,"".concat(Dt,"-disabled"),Ie),ae(r,"".concat(Dt,"-rtl"),bt==="rtl"),r)),an=function(It){return A("div",{className:Zt,style:It,children:A(sP,{...Lt,ref:qe})})},Kt=an(q?void 0:{display:"none"});return p==="picture-card"?A("span",{className:je("".concat(Dt,"-picture-card-wrapper"),$),children:Ht(Kt,!!q)}):it("span",{className:$,children:[Kt,Ht()]})},vye=E.exports.forwardRef(gye);const dU=vye;var yye=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{let t;const n=new Set,r=(u,f)=>{const p=typeof u=="function"?u(t):u;if(!Object.is(p,t)){const g=t;t=(f!=null?f:typeof p!="object")?p:Object.assign({},t,p),n.forEach(v=>v(t,g))}},i=()=>t,a={setState:r,getState:i,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{var u;((u={VITE_API_URL:"https://geoenergy.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:u.MODE)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,a),a},wye=e=>e?pL(e):pL;var fU={exports:{}},hU={},YI={exports:{}},pU={};/** +`,Xae=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],WC={},Ha;function Yae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&WC[n])return WC[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),s=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),a=Xae.map(function(f){return"".concat(f,":").concat(r.getPropertyValue(f))}).join(";"),u={sizingStyle:a,paddingSize:o,borderSize:s,boxSizing:i};return t&&n&&(WC[n]=u),u}function Qae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ha||(Ha=document.createElement("textarea"),Ha.setAttribute("tab-index","-1"),Ha.setAttribute("aria-hidden","true"),document.body.appendChild(Ha)),e.getAttribute("wrap")?Ha.setAttribute("wrap",e.getAttribute("wrap")):Ha.removeAttribute("wrap");var i=Yae(e,t),o=i.paddingSize,s=i.borderSize,a=i.boxSizing,u=i.sizingStyle;Ha.setAttribute("style","".concat(u,";").concat(Zae)),Ha.value=e.value||e.placeholder||"";var f=void 0,p=void 0,g,v=Ha.scrollHeight;if(a==="border-box"?v+=s:a==="content-box"&&(v-=o),n!==null||r!==null){Ha.value=" ";var b=Ha.scrollHeight-o;n!==null&&(f=b*n,a==="border-box"&&(f=f+o+s),v=Math.max(f,v)),r!==null&&(p=b*r,a==="border-box"&&(p=p+o+s),g=v>p?"":"hidden",v=Math.min(p,v))}var _={height:v,overflowY:g,resize:"none"};return f&&(_.minHeight=f),p&&(_.maxHeight=p),_}var Jae=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],GC=0,qC=1,ZC=2,ese=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-textarea":n;e.onPressEnter;var i=e.defaultValue,o=e.value,s=e.autoSize,a=e.onResize,u=e.className,f=e.style,p=e.disabled,g=e.onChange;e.onInternalAutoSize;var v=kn(e,Jae),b=Ei(i,{value:o,postState:function(Ie){return Ie!=null?Ie:""}}),_=$e(b,2),T=_[0],I=_[1],P=function(Ie){I(Ie.target.value),g==null||g(Ie)},M=E.exports.useRef();E.exports.useImperativeHandle(t,function(){return{textArea:M.current}});var D=E.exports.useMemo(function(){return s&&on(s)==="object"?[s.minRows,s.maxRows]:[]},[s]),N=$e(D,2),z=N[0],$=N[1],j=!!s,U=function(){try{if(document.activeElement===M.current){var Ie=M.current,Me=Ie.selectionStart,Ae=Ie.selectionEnd,ze=Ie.scrollTop;M.current.setSelectionRange(Me,Ae),M.current.scrollTop=ze}}catch{}},q=E.exports.useState(ZC),Y=$e(q,2),te=Y[0],Z=Y[1],X=E.exports.useState(),J=$e(X,2),ue=J[0],re=J[1],se=function(){Z(GC)};Si(function(){j&&se()},[o,z,$,j]),Si(function(){if(te===GC)Z(qC);else if(te===qC){var Re=Qae(M.current,!1,z,$);Z(ZC),re(Re)}else U()},[te]);var oe=E.exports.useRef(),he=function(){cr.cancel(oe.current)},Ce=function(Ie){te===ZC&&(a==null||a(Ie),s&&(he(),oe.current=cr(function(){se()})))};E.exports.useEffect(function(){return he},[]);var Se=j?ue:null,be=me(me({},f),Se);return(te===GC||te===qC)&&(be.overflowY="hidden",be.overflowX="hidden"),A(Ql,{onResize:Ce,disabled:!(s||a),children:A("textarea",{...v,ref:M,style:be,className:je(r,u,ae({},"".concat(r,"-disabled"),p)),disabled:p,value:T,onChange:P})})}),tse=function(e){si(n,e);var t=li(n);function n(r){var i;jr(this,n),i=t.call(this,r),i.resizableTextArea=void 0,i.focus=function(){i.resizableTextArea.textArea.focus()},i.saveTextArea=function(s){i.resizableTextArea=s},i.handleChange=function(s){var a=i.props.onChange;i.setValue(s.target.value),a&&a(s)},i.handleKeyDown=function(s){var a=i.props,u=a.onPressEnter,f=a.onKeyDown;s.keyCode===13&&u&&u(s),f&&f(s)};var o=typeof r.value>"u"||r.value===null?r.defaultValue:r.value;return i.state={value:o},i}return Hr(n,[{key:"setValue",value:function(i,o){"value"in this.props||this.setState({value:i},o)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return A(ese,{...this.props,value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea})}}],[{key:"getDerivedStateFromProps",value:function(i){return"value"in i?{value:i.value}:null}}]),n}(E.exports.Component),nse=aa("text","input");function rse(e){return!!(e.addonBefore||e.addonAfter)}var ise=function(e){si(n,e);var t=li(n);function n(){return jr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"renderClearIcon",value:function(i){var o,s=this.props,a=s.value,u=s.disabled,f=s.readOnly,p=s.handleReset,g=s.suffix,v=!u&&!f&&a,b="".concat(i,"-clear-icon");return A(zh,{onClick:p,onMouseDown:function(T){return T.preventDefault()},className:je((o={},ae(o,"".concat(b,"-hidden"),!v),ae(o,"".concat(b,"-has-suffix"),!!g),o),b),role:"button"})}},{key:"renderTextAreaWithClearIcon",value:function(i,o,s){var a,u=this.props,f=u.value,p=u.allowClear,g=u.className,v=u.style,b=u.direction,_=u.bordered,T=u.hidden,I=u.status,P=s.status,M=s.hasFeedback;if(!p)return Pi(o,{value:f});var D=je("".concat(i,"-affix-wrapper"),"".concat(i,"-affix-wrapper-textarea-with-clear-btn"),Xc("".concat(i,"-affix-wrapper"),nv(P,I),M),(a={},ae(a,"".concat(i,"-affix-wrapper-rtl"),b==="rtl"),ae(a,"".concat(i,"-affix-wrapper-borderless"),!_),ae(a,"".concat(g),!rse(this.props)&&g),a));return it("span",{className:D,style:v,hidden:T,children:[Pi(o,{style:null,value:f}),this.renderClearIcon(i)]})}},{key:"render",value:function(){var i=this;return A(Rs.Consumer,{children:function(o){var s=i.props,a=s.prefixCls,u=s.inputType,f=s.element;if(u===nse[0])return i.renderTextAreaWithClearIcon(a,f,o)}})}}]),n}(E.exports.Component);const ose=ise;var ase=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);ir&&(i=t),i}var sse=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.bordered,o=i===void 0?!0:i,s=e.showCount,a=s===void 0?!1:s,u=e.maxLength,f=e.className,p=e.style,g=e.size,v=e.disabled,b=e.onCompositionStart,_=e.onCompositionEnd,T=e.onChange,I=e.status,P=ase(e,["prefixCls","bordered","showCount","maxLength","className","style","size","disabled","onCompositionStart","onCompositionEnd","onChange","status"]),M=E.exports.useContext(zn),D=M.getPrefixCls,N=M.direction,z=E.exports.useContext(Jl),$=E.exports.useContext(fu),j=v!=null?v:$,U=E.exports.useContext(Rs),q=U.status,Y=U.hasFeedback,te=U.isFormItemInput,Z=U.feedbackIcon,X=nv(q,I),J=E.exports.useRef(null),ue=E.exports.useRef(null),re=E.exports.useState(!1),se=$e(re,2),oe=se[0],he=se[1],Ce=E.exports.useRef(),Se=E.exports.useRef(0),be=Ei(P.defaultValue,{value:P.value}),Re=$e(be,2),Ie=Re[0],Me=Re[1],Ae=P.hidden,ze=function(at,He){P.value===void 0&&(Me(at),He==null||He())},Ke=Number(u)>0,Ue=function(at){he(!0),Ce.current=Ie,Se.current=at.currentTarget.selectionStart,b==null||b(at)},pt=function(at){var He;he(!1);var ut=at.currentTarget.value;if(Ke){var bt=Se.current>=u+1||Se.current===((He=Ce.current)===null||He===void 0?void 0:He.length);ut=sN(bt,Ce.current,ut,u)}ut!==Ie&&(ze(ut),KC(at.currentTarget,at,T,ut)),_==null||_(at)},gt=function(at){var He=at.target.value;if(!oe&&Ke){var ut=at.target.selectionStart>=u+1||at.target.selectionStart===He.length||!at.target.selectionStart;He=sN(ut,Ie,He,u)}ze(He),KC(at.currentTarget,at,T,He)},Ot=function(at){var He,ut,bt;ze(""),(He=J.current)===null||He===void 0||He.focus(),KC((bt=(ut=J.current)===null||ut===void 0?void 0:ut.resizableTextArea)===null||bt===void 0?void 0:bt.textArea,at,T)},qe=D("input",r);E.exports.useImperativeHandle(t,function(){var ct;return{resizableTextArea:(ct=J.current)===null||ct===void 0?void 0:ct.resizableTextArea,focus:function(He){var ut,bt;zae((bt=(ut=J.current)===null||ut===void 0?void 0:ut.resizableTextArea)===null||bt===void 0?void 0:bt.textArea,He)},blur:function(){var He;return(He=J.current)===null||He===void 0?void 0:He.blur()}}});var Ct=A(tse,{...Gi(P,["allowClear"]),disabled:j,className:je((n={},ae(n,"".concat(qe,"-borderless"),!o),ae(n,f,f&&!a),ae(n,"".concat(qe,"-sm"),z==="small"||g==="small"),ae(n,"".concat(qe,"-lg"),z==="large"||g==="large"),n),Xc(qe,X)),style:a?{resize:p==null?void 0:p.resize}:p,prefixCls:qe,onCompositionStart:Ue,onChange:gt,onCompositionEnd:pt,ref:J}),ot=Lae(Ie);!oe&&Ke&&(P.value===null||P.value===void 0)&&(ot=O8(ot,u));var vt=A(ose,{disabled:j,...P,prefixCls:qe,direction:N,inputType:"text",value:ot,element:Ct,handleReset:Ot,ref:ue,bordered:o,status:I,style:a?void 0:p});if(a||Y){var yt,Tt=Mt(ot).length,et="";return on(a)==="object"?et=a.formatter({value:ot,count:Tt,maxLength:u}):et="".concat(Tt).concat(Ke?" / ".concat(u):""),it("div",{hidden:Ae,className:je("".concat(qe,"-textarea"),(yt={},ae(yt,"".concat(qe,"-textarea-rtl"),N==="rtl"),ae(yt,"".concat(qe,"-textarea-show-count"),a),ae(yt,"".concat(qe,"-textarea-in-form-item"),te),yt),Xc("".concat(qe,"-textarea"),X,Y),f),style:p,"data-count":et,children:[vt,Y&&A("span",{className:"".concat(qe,"-textarea-suffix"),children:Z})]})}return vt});const D8=sse;var cv=$I;cv.Group=kae;cv.Search=qae;cv.TextArea=D8;cv.Password=Kae;const lse=cv;var cse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};const use=cse;var A8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:use})})};A8.displayName="DoubleLeftOutlined";const dse=E.exports.forwardRef(A8);var fse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const hse=fse;var N8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:hse})})};N8.displayName="DoubleRightOutlined";const pse=E.exports.forwardRef(N8);var sm=function(t){var n,r="".concat(t.rootPrefixCls,"-item"),i=je(r,"".concat(r,"-").concat(t.page),(n={},ae(n,"".concat(r,"-active"),t.active),ae(n,"".concat(r,"-disabled"),!t.page),ae(n,t.className,!!t.className),n)),o=function(){t.onClick(t.page)},s=function(u){t.onKeyPress(u,t.onClick,t.page)};return A("li",{title:t.showTitle?t.page:null,className:i,onClick:o,onKeyPress:s,tabIndex:"0",children:t.itemRender(t.page,"page",A("a",{rel:"nofollow",children:t.page}))})};const Qu={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40};var L8=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0||a.relatedTarget.className.indexOf("".concat(g,"-item"))>=0))&&p(r.getValidValue()))},r.go=function(a){var u=r.state.goInputText;u!==""&&(a.keyCode===Qu.ENTER||a.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Hr(n,[{key:"getValidValue",value:function(){var i=this.state.goInputText;return!i||isNaN(i)?void 0:Number(i)}},{key:"getPageSizeOptions",value:function(){var i=this.props,o=i.pageSize,s=i.pageSizeOptions;return s.some(function(a){return a.toString()===o.toString()})?s:s.concat([o.toString()]).sort(function(a,u){var f=isNaN(Number(a))?0:Number(a),p=isNaN(Number(u))?0:Number(u);return f-p})}},{key:"render",value:function(){var i=this,o=this.props,s=o.pageSize,a=o.locale,u=o.rootPrefixCls,f=o.changeSize,p=o.quickGo,g=o.goButton,v=o.selectComponentClass,b=o.buildOptionText,_=o.selectPrefixCls,T=o.disabled,I=this.state.goInputText,P="".concat(u,"-options"),M=v,D=null,N=null,z=null;if(!f&&!p)return null;var $=this.getPageSizeOptions();if(f&&M){var j=$.map(function(U,q){return A(M.Option,{value:U.toString(),children:(b||i.buildOptionText)(U)},q)});D=A(M,{disabled:T,prefixCls:_,showSearch:!1,className:"".concat(P,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(s||$[0]).toString(),onChange:this.changeSize,getPopupContainer:function(q){return q.parentNode},"aria-label":a.page_size,defaultOpen:!1,children:j})}return p&&(g&&(z=typeof g=="boolean"?A("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:T,className:"".concat(P,"-quick-jumper-button"),children:a.jump_to_confirm}):A("span",{onClick:this.go,onKeyUp:this.go,children:g})),N=it("div",{className:"".concat(P,"-quick-jumper"),children:[a.jump_to,A("input",{disabled:T,type:"text",value:I,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":a.page}),a.page,z]})),it("li",{className:"".concat(P),children:[D,N]})}}]),n}(Un.Component);L8.defaultProps={pageSizeOptions:["10","20","50","100"]};const mse={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"};function BE(){}function lN(e){var t=Number(e);return typeof t=="number"&&!isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function gse(e,t,n){return n}function _c(e,t,n){var r=typeof e>"u"?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var z8=function(e){si(n,e);var t=li(n);function n(r){var i;jr(this,n),i=t.call(this,r),i.getJumpPrevPage=function(){return Math.max(1,i.state.current-(i.props.showLessItems?3:5))},i.getJumpNextPage=function(){return Math.min(_c(void 0,i.state,i.props),i.state.current+(i.props.showLessItems?3:5))},i.getItemIcon=function(f,p){var g=i.props.prefixCls,v=f||A("button",{type:"button","aria-label":p,className:"".concat(g,"-item-link")});return typeof f=="function"&&(v=Un.createElement(f,me({},i.props))),v},i.savePaginationNode=function(f){i.paginationNode=f},i.isValid=function(f){var p=i.props.total;return lN(f)&&f!==i.state.current&&lN(p)&&p>0},i.shouldDisplayQuickJumper=function(){var f=i.props,p=f.showQuickJumper,g=f.total,v=i.state.pageSize;return g<=v?!1:p},i.handleKeyDown=function(f){(f.keyCode===Qu.ARROW_UP||f.keyCode===Qu.ARROW_DOWN)&&f.preventDefault()},i.handleKeyUp=function(f){var p=i.getValidValue(f),g=i.state.currentInputValue;p!==g&&i.setState({currentInputValue:p}),f.keyCode===Qu.ENTER?i.handleChange(p):f.keyCode===Qu.ARROW_UP?i.handleChange(p-1):f.keyCode===Qu.ARROW_DOWN&&i.handleChange(p+1)},i.handleBlur=function(f){var p=i.getValidValue(f);i.handleChange(p)},i.changePageSize=function(f){var p=i.state.current,g=_c(f,i.state,i.props);p=p>g?g:p,g===0&&(p=i.state.current),typeof f=="number"&&("pageSize"in i.props||i.setState({pageSize:f}),"current"in i.props||i.setState({current:p,currentInputValue:p})),i.props.onShowSizeChange(p,f),"onChange"in i.props&&i.props.onChange&&i.props.onChange(p,f)},i.handleChange=function(f){var p=i.props,g=p.disabled,v=p.onChange,b=i.state,_=b.pageSize,T=b.current,I=b.currentInputValue;if(i.isValid(f)&&!g){var P=_c(void 0,i.state,i.props),M=f;return f>P?M=P:f<1&&(M=1),"current"in i.props||i.setState({current:M}),M!==I&&i.setState({currentInputValue:M}),v(M,_),M}return T},i.prev=function(){i.hasPrev()&&i.handleChange(i.state.current-1)},i.next=function(){i.hasNext()&&i.handleChange(i.state.current+1)},i.jumpPrev=function(){i.handleChange(i.getJumpPrevPage())},i.jumpNext=function(){i.handleChange(i.getJumpNextPage())},i.hasPrev=function(){return i.state.current>1},i.hasNext=function(){return i.state.current<_c(void 0,i.state,i.props)},i.runIfEnter=function(f,p){if(f.key==="Enter"||f.charCode===13){for(var g=arguments.length,v=new Array(g>2?g-2:0),b=2;b=s?u=s:u=Number(o),u}},{key:"getShowSizeChanger",value:function(){var i=this.props,o=i.showSizeChanger,s=i.total,a=i.totalBoundaryShowSizeChanger;return typeof o<"u"?o:s>a}},{key:"renderPrev",value:function(i){var o=this.props,s=o.prevIcon,a=o.itemRender,u=a(i,"prev",this.getItemIcon(s,"prev page")),f=!this.hasPrev();return E.exports.isValidElement(u)?E.exports.cloneElement(u,{disabled:f}):u}},{key:"renderNext",value:function(i){var o=this.props,s=o.nextIcon,a=o.itemRender,u=a(i,"next",this.getItemIcon(s,"next page")),f=!this.hasNext();return E.exports.isValidElement(u)?E.exports.cloneElement(u,{disabled:f}):u}},{key:"render",value:function(){var i=this,o=this.props,s=o.prefixCls,a=o.className,u=o.style,f=o.disabled,p=o.hideOnSinglePage,g=o.total,v=o.locale,b=o.showQuickJumper,_=o.showLessItems,T=o.showTitle,I=o.showTotal,P=o.simple,M=o.itemRender,D=o.showPrevNextJumpers,N=o.jumpPrevIcon,z=o.jumpNextIcon,$=o.selectComponentClass,j=o.selectPrefixCls,U=o.pageSizeOptions,q=this.state,Y=q.current,te=q.pageSize,Z=q.currentInputValue;if(p===!0&&g<=te)return null;var X=_c(void 0,this.state,this.props),J=[],ue=null,re=null,se=null,oe=null,he=null,Ce=b&&b.goButton,Se=_?1:2,be=Y-1>0?Y-1:0,Re=Y+1g?g:Y*te])});if(P)return Ce&&(typeof Ce=="boolean"?he=A("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:v.jump_to_confirm}):he=A("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:Ce}),he=A("li",{title:T?"".concat(v.jump_to).concat(Y,"/").concat(X):null,className:"".concat(s,"-simple-pager"),children:he})),it("ul",{className:je(s,"".concat(s,"-simple"),ae({},"".concat(s,"-disabled"),f),a),style:u,ref:this.savePaginationNode,...Ie,children:[Me,A("li",{title:T?v.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:je("".concat(s,"-prev"),ae({},"".concat(s,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev(),children:this.renderPrev(be)}),it("li",{title:T?"".concat(Y,"/").concat(X):null,className:"".concat(s,"-simple-pager"),children:[A("input",{type:"text",value:Z,disabled:f,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),A("span",{className:"".concat(s,"-slash"),children:"/"}),X]}),A("li",{title:T?v.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:je("".concat(s,"-next"),ae({},"".concat(s,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext(),children:this.renderNext(Re)}),he]});if(X<=3+Se*2){var Ae={locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:T,itemRender:M};X||J.push(E.exports.createElement(sm,{...Ae,key:"noPager",page:1,className:"".concat(s,"-item-disabled")}));for(var ze=1;ze<=X;ze+=1){var Ke=Y===ze;J.push(E.exports.createElement(sm,{...Ae,key:ze,page:ze,active:Ke}))}}else{var Ue=_?v.prev_3:v.prev_5,pt=_?v.next_3:v.next_5;D&&(ue=A("li",{title:T?Ue:null,onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:je("".concat(s,"-jump-prev"),ae({},"".concat(s,"-jump-prev-custom-icon"),!!N)),children:M(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(N,"prev page"))},"prev"),re=A("li",{title:T?pt:null,tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:je("".concat(s,"-jump-next"),ae({},"".concat(s,"-jump-next-custom-icon"),!!z)),children:M(this.getJumpNextPage(),"jump-next",this.getItemIcon(z,"next page"))},"next")),oe=A(sm,{locale:v,last:!0,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:X,active:!1,showTitle:T,itemRender:M},X),se=A(sm,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:1,active:!1,showTitle:T,itemRender:M},1);var gt=Math.max(1,Y-Se),Ot=Math.min(Y+Se,X);Y-1<=Se&&(Ot=1+Se*2),X-Y<=Se&&(gt=X-Se*2);for(var qe=gt;qe<=Ot;qe+=1){var Ct=Y===qe;J.push(A(sm,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:qe,active:Ct,showTitle:T,itemRender:M},qe))}Y-1>=Se*2&&Y!==1+2&&(J[0]=E.exports.cloneElement(J[0],{className:"".concat(s,"-item-after-jump-prev")}),J.unshift(ue)),X-Y>=Se*2&&Y!==X-2&&(J[J.length-1]=E.exports.cloneElement(J[J.length-1],{className:"".concat(s,"-item-before-jump-next")}),J.push(re)),gt!==1&&J.unshift(se),Ot!==X&&J.push(oe)}var ot=!this.hasPrev()||!X,vt=!this.hasNext()||!X;return it("ul",{className:je(s,a,ae({},"".concat(s,"-disabled"),f)),style:u,ref:this.savePaginationNode,...Ie,children:[Me,A("li",{title:T?v.prev_page:null,onClick:this.prev,tabIndex:ot?null:0,onKeyPress:this.runIfEnterPrev,className:je("".concat(s,"-prev"),ae({},"".concat(s,"-disabled"),ot)),"aria-disabled":ot,children:this.renderPrev(be)}),J,A("li",{title:T?v.next_page:null,onClick:this.next,tabIndex:vt?null:0,onKeyPress:this.runIfEnterNext,className:je("".concat(s,"-next"),ae({},"".concat(s,"-disabled"),vt)),"aria-disabled":vt,children:this.renderNext(Re)}),A(L8,{disabled:f,locale:v,rootPrefixCls:s,selectComponentClass:$,selectPrefixCls:j,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Y,pageSize:te,pageSizeOptions:U,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ce})]})}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s={};if("current"in i&&(s.current=i.current,i.current!==o.current&&(s.currentInputValue=s.current)),"pageSize"in i&&i.pageSize!==o.pageSize){var a=o.current,u=_c(i.pageSize,o,i);a=a>u?u:a,"current"in i||(s.current=a,s.currentInputValue=a),s.pageSize=i.pageSize}return s}}]),n}(Un.Component);z8.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:BE,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:BE,locale:mse,style:{},itemRender:gse,totalBoundaryShowSizeChanger:50};var F8=function(t){return A(Vd,{...t,size:"small"})},$8=function(t){return A(Vd,{...t,size:"middle"})};F8.Option=Vd.Option;$8.Option=Vd.Option;var vse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i10&&arguments[10]!==void 0?arguments[10]:0,v=r/100*360*((360-s)/360),b=s===0?0:{bottom:0,top:180,left:90,right:-90}[a],_=(100-i)/100*n;return f==="round"&&i!==100&&(_+=p/2,_>=n&&(_=n-.01)),{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:_+g,transform:"rotate(".concat(o+v+b,"deg)"),transformOrigin:"0 0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},BI=function(t){var n=t.id,r=t.prefixCls,i=t.steps,o=t.strokeWidth,s=t.trailWidth,a=t.gapDegree,u=a===void 0?0:a,f=t.gapPosition,p=t.trailColor,g=t.strokeLinecap,v=t.style,b=t.className,_=t.strokeColor,T=t.percent,I=kn(t,Wse),P=Kse(n),M="".concat(P,"-gradient"),D=lm/2-o/2,N=Math.PI*2*D,z=u>0?90+u/2:-90,$=N*((360-u)/360),j=on(i)==="object"?i:{count:i,space:2},U=j.count,q=j.space,Y=XC(N,$,0,100,z,u,f,p,g,o),te=mN(T),Z=mN(_),X=Z.find(function(se){return se&&on(se)==="object"}),J=Use(),ue=function(){var oe=0;return te.map(function(he,Ce){var Se=Z[Ce]||Z[Z.length-1],be=Se&&on(Se)==="object"?"url(#".concat(M,")"):void 0,Re=XC(N,$,oe,he,z,u,f,Se,g,o);return oe+=he,A("circle",{className:"".concat(r,"-circle-path"),r:D,cx:0,cy:0,stroke:be,strokeLinecap:g,strokeWidth:o,opacity:he===0?0:1,style:Re,ref:function(Me){J[Ce]=Me}},Ce)}).reverse()},re=function(){var oe=Math.round(U*(te[0]/100)),he=100/U,Ce=0;return new Array(U).fill(null).map(function(Se,be){var Re=be<=oe-1?Z[0]:p,Ie=Re&&on(Re)==="object"?"url(#".concat(M,")"):void 0,Me=XC(N,$,Ce,he,z,u,f,Re,"butt",o,q);return Ce+=($-Me.strokeDashoffset+q)*100/$,A("circle",{className:"".concat(r,"-circle-path"),r:D,cx:0,cy:0,stroke:Ie,strokeWidth:o,opacity:1,style:Me,ref:function(ze){J[be]=ze}},be)})};return it("svg",{className:je("".concat(r,"-circle"),b),viewBox:"".concat(-lm/2," ").concat(-lm/2," ").concat(lm," ").concat(lm),style:v,id:n,role:"presentation",...I,children:[X&&A("defs",{children:A("linearGradient",{id:M,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:Object.keys(X).sort(function(se,oe){return pN(se)-pN(oe)}).map(function(se,oe){return A("stop",{offset:se,stopColor:X[se]},oe)})})}),!U&&A("circle",{className:"".concat(r,"-circle-trail"),r:D,cx:0,cy:0,stroke:p,strokeLinecap:g,strokeWidth:s||o,style:Y}),U?re():ue()]})};BI.defaultProps=Vse;BI.displayName="Circle";function xd(e){return!e||e<0?0:e>100?100:e}function Cb(e){var t=e.success,n=e.successPercent,r=n;return t&&"progress"in t&&(r=t.progress),t&&"percent"in t&&(r=t.percent),r}function Gse(e){var t=e.percent,n=e.success,r=e.successPercent,i=xd(Cb({success:n,successPercent:r}));return[i,xd(xd(t)-i)]}function qse(e){var t=e.success,n=t===void 0?{}:t,r=e.strokeColor,i=n.strokeColor;return[i||eh.green,r||null]}var Zse=function(t){var n=t.prefixCls,r=t.width,i=t.strokeWidth,o=t.trailColor,s=o===void 0?null:o,a=t.strokeLinecap,u=a===void 0?"round":a,f=t.gapPosition,p=t.gapDegree,g=t.type,v=t.children,b=t.success,_=r||120,T={width:_,height:_,fontSize:_*.15+6},I=i||6,P=f||g==="dashboard"&&"bottom"||void 0,M=function(){if(p||p===0)return p;if(g==="dashboard")return 75},D=Object.prototype.toString.call(t.strokeColor)==="[object Object]",N=qse({success:b,strokeColor:t.strokeColor}),z=je("".concat(n,"-inner"),ae({},"".concat(n,"-circle-gradient"),D));return it("div",{className:z,style:T,children:[A(BI,{percent:Gse(t),strokeWidth:I,trailWidth:I,strokeColor:N,strokeLinecap:u,trailColor:s,prefixCls:n,gapDegree:M(),gapPosition:P}),v]})};const Xse=Zse;var Yse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=100?"success":X||"normal"}function M(X,J){var ue=t.format,re=Cb(t);if(!v)return null;var se,oe=ue||function(Ce){return"".concat(Ce,"%")},he=_==="line";return ue||J!=="exception"&&J!=="success"?se=oe(xd(u),xd(re)):J==="exception"?se=he?A(zh,{}):A(Fh,{}):J==="success"&&(se=he?A(XT,{}):A(xI,{})),A("span",{className:"".concat(X,"-text"),title:typeof se=="string"?se:void 0,children:se})}var D=E.exports.useContext(zn),N=D.getPrefixCls,z=D.direction,$=N("progress",r),j=P(),U=M($,j),q=Array.isArray(s)?s[0]:s,Y=typeof s=="string"||Array.isArray(s)?s:void 0,te;_==="line"?te=o?A(rle,{...t,strokeColor:Y,prefixCls:$,steps:o,children:U}):A(tle,{...t,strokeColor:q,prefixCls:$,direction:z,children:U}):(_==="circle"||_==="dashboard")&&(te=A(Xse,{...t,strokeColor:q,prefixCls:$,progressStatus:j,children:U}));var Z=je($,(n={},ae(n,"".concat($,"-").concat(_==="dashboard"&&"circle"||o&&"steps"||_),!0),ae(n,"".concat($,"-status-").concat(j),!0),ae(n,"".concat($,"-show-info"),v),ae(n,"".concat($,"-").concat(p),p),ae(n,"".concat($,"-rtl"),z==="rtl"),n),i);return A("div",{...Gi(T,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"]),className:Z,role:"progressbar",children:te})};const VI=ale;var Ud=E.exports.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function UE(e,t,n){return(e-t)/(n-t)}function UI(e,t,n,r){var i=UE(t,n,r),o={};switch(e){case"rtl":o.right="".concat(i*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(i*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(i*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(i*100,"%"),o.transform="translateX(-50%)";break}return o}function Wf(e,t){return Array.isArray(e)?e[t]:e}var sle=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],lle=E.exports.forwardRef(function(e,t){var n,r,i=e.prefixCls,o=e.value,s=e.valueIndex,a=e.onStartMove,u=e.style,f=e.render,p=e.dragging,g=e.onOffsetChange,v=kn(e,sle),b=E.exports.useContext(Ud),_=b.min,T=b.max,I=b.direction,P=b.disabled,M=b.range,D=b.tabIndex,N=b.ariaLabelForHandle,z=b.ariaLabelledByForHandle,$=b.ariaValueTextFormatterForHandle,j="".concat(i,"-handle"),U=function(X){P||a(X,s)},q=function(X){if(!P){var J=null;switch(X.which||X.keyCode){case Pt.LEFT:J=I==="ltr"||I==="btt"?-1:1;break;case Pt.RIGHT:J=I==="ltr"||I==="btt"?1:-1;break;case Pt.UP:J=I!=="ttb"?1:-1;break;case Pt.DOWN:J=I!=="ttb"?-1:1;break;case Pt.HOME:J="min";break;case Pt.END:J="max";break;case Pt.PAGE_UP:J=2;break;case Pt.PAGE_DOWN:J=-2;break}J!==null&&(X.preventDefault(),g(J,s))}},Y=UI(I,o,_,T),te=A("div",{ref:t,className:je(j,(n={},ae(n,"".concat(j,"-").concat(s+1),M),ae(n,"".concat(j,"-dragging"),p),n)),style:me(me({},Y),u),onMouseDown:U,onTouchStart:U,onKeyDown:q,tabIndex:P?null:Wf(D,s),role:"slider","aria-valuemin":_,"aria-valuemax":T,"aria-valuenow":o,"aria-disabled":P,"aria-label":Wf(N,s),"aria-labelledby":Wf(z,s),"aria-valuetext":(r=Wf($,s))===null||r===void 0?void 0:r(o),...v});return f&&(te=f(te,{index:s,prefixCls:i,value:o,dragging:p})),te}),cle=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],ule=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,o=e.onOffsetChange,s=e.values,a=e.handleRender,u=e.draggingIndex,f=kn(e,cle),p=E.exports.useRef({});return E.exports.useImperativeHandle(t,function(){return{focus:function(v){var b;(b=p.current[v])===null||b===void 0||b.focus()}}}),A(nr,{children:s.map(function(g,v){return A(lle,{ref:function(_){_?p.current[v]=_:delete p.current[v]},dragging:u===v,prefixCls:n,style:Wf(r,v),value:g,valueIndex:v,onStartMove:i,onOffsetChange:o,render:a,...f},v)})})});function gN(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function dle(e,t,n,r,i,o,s,a,u){var f=E.exports.useState(null),p=$e(f,2),g=p[0],v=p[1],b=E.exports.useState(-1),_=$e(b,2),T=_[0],I=_[1],P=E.exports.useState(n),M=$e(P,2),D=M[0],N=M[1],z=E.exports.useState(n),$=$e(z,2),j=$[0],U=$[1],q=E.exports.useRef(null),Y=E.exports.useRef(null);E.exports.useEffect(function(){T===-1&&N(n)},[n,T]),E.exports.useEffect(function(){return function(){document.removeEventListener("mousemove",q.current),document.removeEventListener("mouseup",Y.current),document.removeEventListener("touchmove",q.current),document.removeEventListener("touchend",Y.current)}},[]);var te=function(se,oe){D.some(function(he,Ce){return he!==se[Ce]})&&(oe!==void 0&&v(oe),N(se),s(se))},Z=function(se,oe){if(se===-1){var he=j[0],Ce=j[j.length-1],Se=r-he,be=i-Ce,Re=oe*(i-r);Re=Math.max(Re,Se),Re=Math.min(Re,be);var Ie=o(he+Re);Re=Ie-he;var Me=j.map(function(Ue){return Ue+Re});te(Me)}else{var Ae=(i-r)*oe,ze=Mt(D);ze[se]=j[se];var Ke=u(ze,Ae,se,"dist");te(Ke.values,Ke.value)}},X=E.exports.useRef(Z);X.current=Z;var J=function(se,oe){se.stopPropagation();var he=n[oe];I(oe),v(he),U(n);var Ce=gN(se),Se=Ce.pageX,be=Ce.pageY,Re=function(Ae){Ae.preventDefault();var ze=gN(Ae),Ke=ze.pageX,Ue=ze.pageY,pt=Ke-Se,gt=Ue-be,Ot=e.current.getBoundingClientRect(),qe=Ot.width,Ct=Ot.height,ot;switch(t){case"btt":ot=-gt/Ct;break;case"ttb":ot=gt/Ct;break;case"rtl":ot=-pt/qe;break;default:ot=pt/qe}X.current(oe,ot)},Ie=function Me(Ae){Ae.preventDefault(),document.removeEventListener("mouseup",Me),document.removeEventListener("mousemove",Re),document.removeEventListener("touchend",Me),document.removeEventListener("touchmove",Re),q.current=null,Y.current=null,I(-1),a()};document.addEventListener("mouseup",Ie),document.addEventListener("mousemove",Re),document.addEventListener("touchend",Ie),document.addEventListener("touchmove",Re),q.current=Re,Y.current=Ie},ue=E.exports.useMemo(function(){var re=Mt(n).sort(function(oe,he){return oe-he}),se=Mt(D).sort(function(oe,he){return oe-he});return re.every(function(oe,he){return oe===se[he]})?D:n},[n,D]);return[T,g,ue,J]}function fle(e){var t=e.prefixCls,n=e.style,r=e.start,i=e.end,o=e.index,s=e.onStartMove,a=E.exports.useContext(Ud),u=a.direction,f=a.min,p=a.max,g=a.disabled,v=a.range,b="".concat(t,"-track"),_=UE(r,f,p),T=UE(i,f,p),I=function(D){!g&&s&&s(D,-1)},P={};switch(u){case"rtl":P.right="".concat(_*100,"%"),P.width="".concat(T*100-_*100,"%");break;case"btt":P.bottom="".concat(_*100,"%"),P.height="".concat(T*100-_*100,"%");break;case"ttb":P.top="".concat(_*100,"%"),P.height="".concat(T*100-_*100,"%");break;default:P.left="".concat(_*100,"%"),P.width="".concat(T*100-_*100,"%")}return A("div",{className:je(b,v&&"".concat(b,"-").concat(o+1)),style:me(me({},P),n),onMouseDown:I,onTouchStart:I})}function hle(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,o=e.onStartMove,s=E.exports.useContext(Ud),a=s.included,u=s.range,f=s.min,p=E.exports.useMemo(function(){if(!u){if(r.length===0)return[];var g=i!=null?i:f,v=r[0];return[{start:Math.min(g,v),end:Math.max(g,v)}]}for(var b=[],_=0;_3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof T=="number"){var M,D=_[I],N=D+T,z=[];r.forEach(function(Y){z.push(Y.value)}),z.push(e,t),z.push(a(D));var $=T>0?1:-1;P==="unit"?z.push(a(D+$*n)):z.push(a(N)),z=z.filter(function(Y){return Y!==null}).filter(function(Y){return T<0?Y<=D:Y>=D}),P==="unit"&&(z=z.filter(function(Y){return Y!==D}));var j=P==="unit"?D:N;M=z[0];var U=Math.abs(M-j);if(z.forEach(function(Y){var te=Math.abs(Y-j);te1){var q=Mt(_);return q[I]=M,b(q,T-$,I,P)}return M}else{if(T==="min")return e;if(T==="max")return t}},p=function(_,T,I){var P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",M=_[I],D=f(_,T,I,P);return{value:D,changed:D!==M}},g=function(_){return o===null&&_===0||typeof o=="number"&&_3&&arguments[3]!==void 0?arguments[3]:"unit",M=_.map(u),D=M[I],N=f(M,T,I,P);if(M[I]=N,i===!1){var z=o||0;I>0&&M[I-1]!==D&&(M[I]=Math.max(M[I],M[I-1]+z)),I0;q-=1)for(var Y=!0;g(M[q]-M[q-1])&&Y;){var te=p(M,-1,q-1);M[q-1]=te.value,Y=te.changed}for(var Z=M.length-1;Z>0;Z-=1)for(var X=!0;g(M[Z]-M[Z-1])&&X;){var J=p(M,-1,Z-1);M[Z-1]=J.value,X=J.changed}for(var ue=0;ue=0?Z:!1},[Z,yt]),et=E.exports.useMemo(function(){var ye=Object.keys(Ie||{});return ye.map(function(W){var Q=Ie[W],fe={value:Number(W)};return Q&&on(Q)==="object"&&!E.exports.isValidElement(Q)&&("label"in Q||"style"in Q)?(fe.style=Q.style,fe.label=Q.label):fe.label=Q,fe}).filter(function(W){var Q=W.label;return Q||typeof Q=="number"}).sort(function(W,Q){return W.value-Q.value})},[Ie]),ct=yle(ot,vt,yt,et,Y,Tt),at=$e(ct,2),He=at[0],ut=at[1],bt=Ei(D,{value:M}),Dt=$e(bt,2),Lt=Dt[0],Ht=Dt[1],Fe=E.exports.useMemo(function(){var ye=Lt==null?[]:Array.isArray(Lt)?Lt:[Lt],W=$e(ye,1),Q=W[0],fe=Q===void 0?ot:Q,ce=Lt===null?[]:[fe];if(N){if(ce=Mt(ye),z||Lt===void 0){var xe=z>=0?z+1:2;for(ce=ce.slice(0,xe);ce.length=0&&Ot.current.focus(ye)}tt(null)},[pn]);var qt=E.exports.useMemo(function(){return X&&yt===null?!1:X},[X,yt]),En=function(){U==null||U(Zt(Ye.current))},yn=dle(qe,Ct,Fe,ot,vt,He,an,En,ut),St=$e(yn,4),Pn=St[0],_n=St[1],tn=St[2],Ft=St[3],dt=function(W,Q){Ft(W,Q),j==null||j(Zt(Ye.current))},mt=Pn!==-1;E.exports.useEffect(function(){if(!mt){var ye=Fe.lastIndexOf(_n);Ot.current.focus(ye)}},[mt]);var $t=E.exports.useMemo(function(){return Mt(tn).sort(function(ye,W){return ye-W})},[tn]),Wt=E.exports.useMemo(function(){return N?[$t[0],$t[$t.length-1]]:[ot,$t[0]]},[$t,N,ot]),mn=$e(Wt,2),An=mn[0],Qn=mn[1];E.exports.useImperativeHandle(t,function(){return{focus:function(){Ot.current.focus(0)},blur:function(){var W=document,Q=W.activeElement;qe.current.contains(Q)&&(Q==null||Q.blur())}}}),E.exports.useEffect(function(){f&&Ot.current.focus(0)},[]);var Jn=E.exports.useMemo(function(){return{min:ot,max:vt,direction:Ct,disabled:u,step:yt,included:se,includedStart:An,includedEnd:Qn,range:N,tabIndex:Ke,ariaLabelForHandle:Ue,ariaLabelledByForHandle:pt,ariaValueTextFormatterForHandle:gt}},[ot,vt,Ct,u,yt,se,An,Qn,N,Ke,Ue,pt,gt]);return A(Ud.Provider,{value:Jn,children:it("div",{ref:qe,className:je(i,o,(n={},ae(n,"".concat(i,"-disabled"),u),ae(n,"".concat(i,"-vertical"),ue),ae(n,"".concat(i,"-horizontal"),!ue),ae(n,"".concat(i,"-with-marks"),et.length),n)),style:s,onMouseDown:Vt,children:[A("div",{className:"".concat(i,"-rail"),style:Se}),A(hle,{prefixCls:i,style:he,values:$t,startPoint:oe,onStartMove:qt?dt:null}),A(vle,{prefixCls:i,marks:et,dots:Me,style:be,activeStyle:Re}),A(ule,{ref:Ot,prefixCls:i,style:Ce,values:tn,draggingIndex:Pn,onStartMove:dt,onOffsetChange:At,onFocus:p,onBlur:g,handleRender:Ae}),A(mle,{prefixCls:i,marks:et,onClick:Kt})]})})}),ble=E.exports.forwardRef(function(e,t){var n=e.open,r=E.exports.useRef(null),i=E.exports.useRef(null);function o(){cr.cancel(i.current),i.current=null}function s(){i.current=cr(function(){var a;(a=r.current)===null||a===void 0||a.forcePopupAlign(),i.current=null})}return E.exports.useEffect(function(){return n?s():o(),o},[n,e.title]),A(ka,{ref:Aa(r,t),...e})});const _le=ble;var wle=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=n}function Ole(e){return e&&on(e)==="object"&&!Array.isArray(e)&&!E.exports.isValidElement(e)}function Dle(e){return typeof e=="string"?!0:Nh(e)}var Ale=function(t){var n=t.ellipsis,r=t.rowType,i=t.children,o,s=n===!0?{showTitle:!0}:n;return s&&(s.showTitle||r==="header")&&(typeof i=="string"||typeof i=="number"?o=i.toString():E.exports.isValidElement(i)&&typeof i.props.children=="string"&&(o=i.props.children)),o};function Nle(e,t){var n,r,i,o=e.prefixCls,s=e.className,a=e.record,u=e.index,f=e.renderIndex,p=e.dataIndex,g=e.render,v=e.children,b=e.component,_=b===void 0?"td":b,T=e.colSpan,I=e.rowSpan,P=e.fixLeft,M=e.fixRight,D=e.firstFixLeft,N=e.lastFixLeft,z=e.firstFixRight,$=e.lastFixRight,j=e.appendNode,U=e.additionalProps,q=U===void 0?{}:U,Y=e.ellipsis,te=e.align,Z=e.rowType,X=e.isSticky,J=e.hovering,ue=e.onHover,re="".concat(o,"-cell"),se=E.exports.useContext(tV),oe=E.exports.useContext(J8),he=E.exports.useContext(n1),Ce=he.allColumnsFixedLeft,Se=E.exports.useMemo(function(){if(jE(v))return[v];var He=Q8(a,p),ut=He,bt=void 0;if(g){var Dt=g(He,a,f);Ole(Dt)?(ut=Dt.children,bt=Dt.props,se.renderWithProps=!0):ut=Dt}return[ut,bt]},[se.renderWithProps?Math.random():0,v,p,se,a,g,f]),be=$e(Se,2),Re=be[0],Ie=be[1],Me=Re;on(Me)==="object"&&!Array.isArray(Me)&&!E.exports.isValidElement(Me)&&(Me=null),Y&&(N||z)&&(Me=A("span",{className:"".concat(re,"-content"),children:Me}));var Ae=Ie||{},ze=Ae.colSpan,Ke=Ae.rowSpan,Ue=Ae.style,pt=Ae.className,gt=kn(Ae,Mle),Ot=(n=ze!==void 0?ze:T)!==null&&n!==void 0?n:1,qe=(r=Ke!==void 0?Ke:I)!==null&&r!==void 0?r:1;if(Ot===0||qe===0)return null;var Ct={},ot=typeof P=="number"&&oe,vt=typeof M=="number"&&oe;ot&&(Ct.position="sticky",Ct.left=P),vt&&(Ct.position="sticky",Ct.right=M);var yt={};te&&(yt.textAlign=te);var Tt=function(ut){var bt;a&&ue(u,u+qe-1),q==null||(bt=q.onMouseEnter)===null||bt===void 0||bt.call(q,ut)},et=function(ut){var bt;a&&ue(-1,-1),q==null||(bt=q.onMouseLeave)===null||bt===void 0||bt.call(q,ut)},ct=Ale({rowType:Z,ellipsis:Y,children:Re}),at=me(me(me({title:ct},gt),q),{},{colSpan:Ot!==1?Ot:null,rowSpan:qe!==1?qe:null,className:je(re,s,(i={},ae(i,"".concat(re,"-fix-left"),ot&&oe),ae(i,"".concat(re,"-fix-left-first"),D&&oe),ae(i,"".concat(re,"-fix-left-last"),N&&oe),ae(i,"".concat(re,"-fix-left-all"),N&&Ce&&oe),ae(i,"".concat(re,"-fix-right"),vt&&oe),ae(i,"".concat(re,"-fix-right-first"),z&&oe),ae(i,"".concat(re,"-fix-right-last"),$&&oe),ae(i,"".concat(re,"-ellipsis"),Y),ae(i,"".concat(re,"-with-append"),j),ae(i,"".concat(re,"-fix-sticky"),(ot||vt)&&X&&oe),ae(i,"".concat(re,"-row-hover"),!Ie&&J),i),q.className,pt),style:me(me(me(me({},q.style),yt),Ct),Ue),onMouseEnter:Tt,onMouseLeave:et,ref:Dle(_)?t:null});return it(_,{...at,children:[j,Me]})}var nV=E.exports.forwardRef(Nle);nV.displayName="Cell";var Lle=["expanded","className","hovering"],zle=E.exports.memo(nV,function(e,t){return t.shouldCellUpdate?Lle.every(function(n){return e[n]===t[n]})&&!t.shouldCellUpdate(t.record,e.record):kd(e,t)}),fv=E.exports.forwardRef(function(e,t){var n=e.index,r=e.additionalProps,i=r===void 0?{}:r,o=e.colSpan,s=e.rowSpan,a=i.colSpan,u=i.rowSpan,f=o!=null?o:a,p=s!=null?s:u,g=kle(eV,function(_){var T=Rle(n,p||1,_==null?void 0:_.startRow,_==null?void 0:_.endRow);return{onHover:_==null?void 0:_.onHover,hovering:T}}),v=g.onHover,b=g.hovering;return A(zle,{...e,colSpan:f,rowSpan:p,hovering:b,ref:t,onHover:v})});fv.displayName="WrappedCell";var cl=E.exports.createContext(null);function jI(e,t,n,r,i){var o=n[e]||{},s=n[t]||{},a,u;o.fixed==="left"?a=r.left[e]:s.fixed==="right"&&(u=r.right[t]);var f=!1,p=!1,g=!1,v=!1,b=n[t+1],_=n[e-1];if(i==="rtl"){if(a!==void 0){var T=_&&_.fixed==="left";v=!T}else if(u!==void 0){var I=b&&b.fixed==="right";g=!I}}else if(a!==void 0){var P=b&&b.fixed==="left";f=!P}else if(u!==void 0){var M=_&&_.fixed==="right";p=!M}return{fixLeft:a,fixRight:u,lastFixLeft:f,firstFixRight:p,lastFixRight:g,firstFixLeft:v,isSticky:r.isSticky}}function rV(e){var t=e.cells,n=e.stickyOffsets,r=e.flattenColumns,i=e.rowComponent,o=e.cellComponent,s=e.onHeaderRow,a=e.index,u=E.exports.useContext(cl),f=u.prefixCls,p=u.direction,g;s&&(g=s(t.map(function(b){return b.column}),a));var v=t1(t.map(function(b){return b.column}));return A(i,{...g,children:t.map(function(b,_){var T=b.column,I=jI(b.colStart,b.colEnd,r,n,p),P;return T&&T.onHeaderCell&&(P=b.column.onHeaderCell(T)),E.exports.createElement(fv,{...b,ellipsis:T.ellipsis,align:T.align,component:o,prefixCls:f,key:v[_],...I,additionalProps:P,rowType:"header"})})})}rV.displayName="HeaderRow";function Fle(e){var t=[];function n(s,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[u]=t[u]||[];var f=a,p=s.filter(Boolean).map(function(g){var v={key:g.key,className:g.className||"",children:g.title,column:g,colStart:f},b=1,_=g.children;return _&&_.length>0&&(b=n(_,f,u+1).reduce(function(T,I){return T+I},0),v.hasSubColumns=!0),"colSpan"in g&&(b=g.colSpan),"rowSpan"in g&&(v.rowSpan=g.rowSpan),v.colSpan=b,v.colEnd=v.colStart+b-1,t[u].push(v),f+=b,b});return p}n(e,0);for(var r=t.length,i=function(a){t[a].forEach(function(u){!("rowSpan"in u)&&!u.hasSubColumns&&(u.rowSpan=r-a)})},o=0;o1?ot-1:0),yt=1;yt0?[].concat(Mt(t),Mt(HE(o).map(function(s){return me({fixed:i},s)}))):[].concat(Mt(t),[me(me({},n),{},{fixed:i})])},[])}function Gle(e){return e.map(function(t){var n=t.fixed,r=kn(t,Wle),i=n;return n==="left"?i="right":n==="right"&&(i="left"),me({fixed:i},r)})}function qle(e,t){var n=e.prefixCls,r=e.columns,i=e.children,o=e.expandable,s=e.expandedKeys,a=e.columnTitle,u=e.getRowKey,f=e.onTriggerExpand,p=e.expandIcon,g=e.rowExpandable,v=e.expandIconColumnIndex,b=e.direction,_=e.expandRowByClick,T=e.columnWidth,I=e.fixed,P=E.exports.useMemo(function(){return r||HI(i)},[r,i]),M=E.exports.useMemo(function(){if(o){var z,$=P.slice();if(!$.includes(Ju)){var j=v||0;j>=0&&$.splice(j,0,Ju)}var U=$.indexOf(Ju);$=$.filter(function(Z,X){return Z!==Ju||X===U});var q=P[U],Y;(I==="left"||I)&&!v?Y="left":(I==="right"||I)&&v===P.length?Y="right":Y=q?q.fixed:null;var te=(z={},ae(z,qm,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),ae(z,"title",a),ae(z,"fixed",Y),ae(z,"className","".concat(n,"-row-expand-icon-cell")),ae(z,"width",T),ae(z,"render",function(X,J,ue){var re=u(J,ue),se=s.has(re),oe=g?g(J):!0,he=p({prefixCls:n,expanded:se,expandable:oe,record:J,onExpand:f});return _?A("span",{onClick:function(Se){return Se.stopPropagation()},children:he}):he}),z);return $.map(function(Z){return Z===Ju?te:Z})}return P.filter(function(Z){return Z!==Ju})},[o,P,u,s,p,b]),D=E.exports.useMemo(function(){var z=M;return t&&(z=t(z)),z.length||(z=[{render:function(){return null}}]),z},[t,M,b]),N=E.exports.useMemo(function(){return b==="rtl"?Gle(HE(D)):HE(D)},[D,b]);return[D,N]}function uV(e){var t=E.exports.useRef(e),n=E.exports.useState({}),r=$e(n,2),i=r[1],o=E.exports.useRef(null),s=E.exports.useRef([]);function a(u){s.current.push(u);var f=Promise.resolve();o.current=f,f.then(function(){if(o.current===f){var p=s.current,g=t.current;s.current=[],p.forEach(function(v){t.current=v(t.current)}),o.current=null,g!==t.current&&i({})}})}return E.exports.useEffect(function(){return function(){o.current=null}},[]),[t.current,a]}function Zle(e){var t=E.exports.useRef(e||null),n=E.exports.useRef();function r(){window.clearTimeout(n.current)}function i(s){t.current=s,r(),n.current=window.setTimeout(function(){t.current=null,n.current=void 0},100)}function o(){return t.current}return E.exports.useEffect(function(){return r},[]),[i,o]}function Xle(e,t,n){var r=E.exports.useMemo(function(){for(var i=[],o=[],s=0,a=0,u=0;u=0;a-=1){var u=t[a],f=n&&n[a],p=f&&f[qm];if(u||p||s){var g=p||{};g.columnType;var v=kn(g,Yle);i.unshift(A("col",{style:{width:u},...v},a)),s=!0}}return A("colgroup",{children:i})}function yN(e){var t=e.className,n=e.children;return A("div",{className:t,children:n})}var fV=E.exports.createContext({});function Qle(e){var t=e.className,n=e.index,r=e.children,i=e.colSpan,o=i===void 0?1:i,s=e.rowSpan,a=e.align,u=E.exports.useContext(cl),f=u.prefixCls,p=u.direction,g=E.exports.useContext(fV),v=g.scrollColumnIndex,b=g.stickyOffsets,_=g.flattenColumns,T=n+o-1,I=T+1===v?o+1:o,P=jI(n,n+I-1,_,b,p);return A(fv,{className:t,index:n,component:"td",prefixCls:f,record:null,dataIndex:null,align:a,colSpan:I,rowSpan:s,render:function(){return r},...P})}var Jle=["children"];function ece(e){var t=e.children,n=kn(e,Jle);return A("tr",{...n,children:t})}function r1(e){var t=e.children;return t}r1.Row=ece;r1.Cell=Qle;function mx(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,i=E.exports.useContext(cl),o=i.prefixCls,s=r.length-1,a=r[s],u=E.exports.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:a!=null&&a.scrollbar?s:null}},[a,r,s,n]);return A(fV.Provider,{value:u,children:A("tfoot",{className:"".concat(o,"-summary"),children:t})})}var hV=r1;function tce(e){var t,n=e.prefixCls,r=e.record,i=e.onExpand,o=e.expanded,s=e.expandable,a="".concat(n,"-row-expand-icon");if(!s)return A("span",{className:je(a,"".concat(n,"-row-spaced"))});var u=function(p){i(r,p),p.stopPropagation()};return A("span",{className:je(a,(t={},ae(t,"".concat(n,"-row-expanded"),o),ae(t,"".concat(n,"-row-collapsed"),!o),t)),onClick:u})}function nce(e,t,n){var r=[];function i(o){(o||[]).forEach(function(s,a){r.push(t(s,a)),i(s[n])})}return i(e),r}var rce=function(t,n){var r,i,o=t.scrollBodyRef,s=t.onScroll,a=t.offsetScroll,u=t.container,f=E.exports.useContext(cl),p=f.prefixCls,g=((r=o.current)===null||r===void 0?void 0:r.scrollWidth)||0,v=((i=o.current)===null||i===void 0?void 0:i.clientWidth)||0,b=g&&v*(v/g),_=E.exports.useRef(),T=uV({scrollLeft:0,isHiddenScrollBar:!1}),I=$e(T,2),P=I[0],M=I[1],D=E.exports.useRef({delta:0,x:0}),N=E.exports.useState(!1),z=$e(N,2),$=z[0],j=z[1],U=function(){j(!1)},q=function(J){J.persist(),D.current.delta=J.pageX-P.scrollLeft,D.current.x=0,j(!0),J.preventDefault()},Y=function(J){var ue,re=J||((ue=window)===null||ue===void 0?void 0:ue.event),se=re.buttons;if(!$||se===0){$&&j(!1);return}var oe=D.current.x+J.pageX-D.current.x-D.current.delta;oe<=0&&(oe=0),oe+b>=v&&(oe=v-b),s({scrollLeft:oe/v*(g+2)}),D.current.x=J.pageX},te=function(){if(!!o.current){var J=$E(o.current).top,ue=J+o.current.offsetHeight,re=u===window?document.documentElement.scrollTop+window.innerHeight:$E(u).top+u.clientHeight;ue-wb()<=re||J>=re-a?M(function(se){return me(me({},se),{},{isHiddenScrollBar:!0})}):M(function(se){return me(me({},se),{},{isHiddenScrollBar:!1})})}},Z=function(J){M(function(ue){return me(me({},ue),{},{scrollLeft:J/g*v||0})})};return E.exports.useImperativeHandle(n,function(){return{setScrollLeft:Z}}),E.exports.useEffect(function(){var X=Qo(document.body,"mouseup",U,!1),J=Qo(document.body,"mousemove",Y,!1);return te(),function(){X.remove(),J.remove()}},[b,$]),E.exports.useEffect(function(){var X=Qo(u,"scroll",te,!1),J=Qo(window,"resize",te,!1);return function(){X.remove(),J.remove()}},[u]),E.exports.useEffect(function(){P.isHiddenScrollBar||M(function(X){var J=o.current;return J?me(me({},X),{},{scrollLeft:J.scrollLeft/J.scrollWidth*J.clientWidth}):X})},[P.isHiddenScrollBar]),g<=v||!b||P.isHiddenScrollBar?null:A("div",{style:{height:wb(),width:v,bottom:a},className:"".concat(p,"-sticky-scroll"),children:A("div",{onMouseDown:q,ref:_,className:je("".concat(p,"-sticky-scroll-bar"),ae({},"".concat(p,"-sticky-scroll-bar-active"),$)),style:{width:"".concat(b,"px"),transform:"translate3d(".concat(P.scrollLeft,"px, 0, 0)")}})})};const ice=E.exports.forwardRef(rce);var xN=To()?window:null;function oce(e,t){var n=on(e)==="object"?e:{},r=n.offsetHeader,i=r===void 0?0:r,o=n.offsetSummary,s=o===void 0?0:o,a=n.offsetScroll,u=a===void 0?0:a,f=n.getContainer,p=f===void 0?function(){return xN}:f,g=p()||xN;return E.exports.useMemo(function(){var v=!!e;return{isSticky:v,stickyClassName:v?"".concat(t,"-sticky-holder"):"",offsetHeader:i,offsetSummary:s,offsetScroll:u,container:g}},[u,i,s,t,g])}var ace=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function sce(e,t){return E.exports.useMemo(function(){for(var n=[],r=0;r=0})},[o]),Y=o[o.length-1],te={fixed:Y?Y.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(D,"-cell-scrollbar")}}},Z=E.exports.useMemo(function(){return $?[].concat(Mt(i),[te]):i},[$,i]),X=E.exports.useMemo(function(){return $?[].concat(Mt(o),[te]):o},[$,o]),J=E.exports.useMemo(function(){var re=u.right,se=u.left;return me(me({},u),{},{left:f==="rtl"?[].concat(Mt(se.map(function(oe){return oe+$})),[0]):se,right:f==="rtl"?re:[].concat(Mt(re.map(function(oe){return oe+$})),[0]),isSticky:z})},[$,u,z]),ue=sce(s,a);return A("div",{style:me({overflow:"hidden"},z?{top:g,bottom:v}:{}),ref:U,className:je(n,ae({},b,!!b)),children:it("table",{style:{tableLayout:"fixed",visibility:r||ue?null:"hidden"},children:[(!r||!T||q)&&A(dV,{colWidths:ue?[].concat(Mt(ue),[$]):[],columCount:a+1,columns:X}),I(me(me({},P),{},{stickyOffsets:J,columns:Z,flattenColumns:X}))]})})});KE.displayName="FixedHolder";var lce=[],cce={},f0="rc-table-internal-hook",uce=E.exports.memo(function(e){var t=e.children;return t},function(e,t){return kd(e.props,t.props)?e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight:!1});function jd(e){var t,n=e.prefixCls,r=e.className,i=e.rowClassName,o=e.style,s=e.data,a=e.rowKey,u=e.scroll,f=e.tableLayout,p=e.direction,g=e.title,v=e.footer,b=e.summary,_=e.id,T=e.showHeader,I=e.components,P=e.emptyText,M=e.onRow,D=e.onHeaderRow,N=e.internalHooks,z=e.transformColumns,$=e.internalRefs,j=e.sticky,U=s||lce,q=!!U.length,Y=E.exports.useCallback(function(Vn,er){return Q8(I||{},Vn)||er},[I]),te=E.exports.useMemo(function(){return typeof a=="function"?a:function(Vn){var er=Vn&&Vn[a];return er}},[a]),Z=Hle(e),X=Z.expandIcon,J=Z.expandedRowKeys,ue=Z.defaultExpandedRowKeys,re=Z.defaultExpandAllRows,se=Z.expandedRowRender,oe=Z.columnTitle,he=Z.onExpand,Ce=Z.onExpandedRowsChange,Se=Z.expandRowByClick,be=Z.rowExpandable,Re=Z.expandIconColumnIndex,Ie=Z.expandedRowClassName,Me=Z.childrenColumnName,Ae=Z.indentSize,ze=X||tce,Ke=Me||"children",Ue=E.exports.useMemo(function(){return se?"row":e.expandable&&N===f0&&e.expandable.__PARENT_RENDER_ICON__||U.some(function(Vn){return Vn&&on(Vn)==="object"&&Vn[Ke]})?"nest":!1},[!!se,U]),pt=E.exports.useState(function(){return ue||(re?nce(U,te,Ke):[])}),gt=$e(pt,2),Ot=gt[0],qe=gt[1],Ct=E.exports.useMemo(function(){return new Set(J||Ot||[])},[J,Ot]),ot=E.exports.useCallback(function(Vn){var er=te(Vn,U.indexOf(Vn)),Fr,zi=Ct.has(er);zi?(Ct.delete(er),Fr=Mt(Ct)):Fr=[].concat(Mt(Ct),[er]),qe(Fr),he&&he(!zi,Vn),Ce&&Ce(Fr)},[te,Ct,U,he,Ce]),vt=E.exports.useState(0),yt=$e(vt,2),Tt=yt[0],et=yt[1],ct=qle(me(me(me({},e),Z),{},{expandable:!!se,columnTitle:oe,expandedKeys:Ct,getRowKey:te,onTriggerExpand:ot,expandIcon:ze,expandIconColumnIndex:Re,direction:p}),N===f0?z:null),at=$e(ct,2),He=at[0],ut=at[1],bt=E.exports.useMemo(function(){return{columns:He,flattenColumns:ut}},[He,ut]),Dt=E.exports.useRef(),Lt=E.exports.useRef(),Ht=E.exports.useRef(),Fe=E.exports.useRef(),Ye=E.exports.useRef(),Zt=E.exports.useState(!1),an=$e(Zt,2),Kt=an[0],Vt=an[1],It=E.exports.useState(!1),Xt=$e(It,2),pn=Xt[0],tt=Xt[1],At=uV(new Map),qt=$e(At,2),En=qt[0],yn=qt[1],St=t1(ut),Pn=St.map(function(Vn){return En.get(Vn)}),_n=E.exports.useMemo(function(){return Pn},[Pn.join("_")]),tn=Xle(_n,ut.length,p),Ft=u&&jE(u.y),dt=u&&jE(u.x)||Boolean(Z.fixed),mt=dt&&ut.some(function(Vn){var er=Vn.fixed;return er}),$t=E.exports.useRef(),Wt=oce(j,n),mn=Wt.isSticky,An=Wt.offsetHeader,Qn=Wt.offsetSummary,Jn=Wt.offsetScroll,ye=Wt.stickyClassName,W=Wt.container,Q=b==null?void 0:b(U),fe=(Ft||mn)&&E.exports.isValidElement(Q)&&Q.type===r1&&Q.props.fixed,ce,xe,ke;Ft&&(xe={overflowY:"scroll",maxHeight:u.y}),dt&&(ce={overflowX:"auto"},Ft||(xe={overflowY:"hidden"}),ke={width:(u==null?void 0:u.x)===!0?"auto":u==null?void 0:u.x,minWidth:"100%"});var we=E.exports.useCallback(function(Vn,er){fI(Dt.current)&&yn(function(Fr){if(Fr.get(Vn)!==er){var zi=new Map(Fr);return zi.set(Vn,er),zi}return Fr})},[]),Pe=Zle(null),Le=$e(Pe,2),Ze=Le[0],Xe=Le[1];function Ve(Vn,er){!er||(typeof er=="function"?er(Vn):er.scrollLeft!==Vn&&(er.scrollLeft=Vn))}var Bt=function(er){var Fr=er.currentTarget,zi=er.scrollLeft,As=p==="rtl",Ho=typeof zi=="number"?zi:Fr.scrollLeft,dl=Fr||cce;if(!Xe()||Xe()===dl){var cs;Ze(dl),Ve(Ho,Lt.current),Ve(Ho,Ht.current),Ve(Ho,Ye.current),Ve(Ho,(cs=$t.current)===null||cs===void 0?void 0:cs.setScrollLeft)}if(Fr){var Cr=Fr.scrollWidth,us=Fr.clientWidth;if(Cr===us){Vt(!1),tt(!1);return}As?(Vt(-Ho0)):(Vt(Ho>0),tt(Ho-1}var Dce=Oce,Ace=a1;function Nce(e,t){var n=this.__data__,r=Ace(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Lce=Nce,zce=xce,Fce=Tce,$ce=Mce,Bce=Dce,Vce=Lce;function Uh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ta))return!1;var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var g=-1,v=!0,b=n&sfe?new rfe:void 0;for(o.set(e,t),o.set(t,e);++g-1&&e%1==0&&e-1&&e%1==0&&e<=mhe}var _V=ghe,vhe=ov,yhe=_V,xhe=av,bhe="[object Arguments]",_he="[object Array]",whe="[object Boolean]",Che="[object Date]",She="[object Error]",Ehe="[object Function]",Phe="[object Map]",The="[object Number]",Ihe="[object Object]",khe="[object RegExp]",Mhe="[object Set]",Rhe="[object String]",Ohe="[object WeakMap]",Dhe="[object ArrayBuffer]",Ahe="[object DataView]",Nhe="[object Float32Array]",Lhe="[object Float64Array]",zhe="[object Int8Array]",Fhe="[object Int16Array]",$he="[object Int32Array]",Bhe="[object Uint8Array]",Vhe="[object Uint8ClampedArray]",Uhe="[object Uint16Array]",jhe="[object Uint32Array]",Jr={};Jr[Nhe]=Jr[Lhe]=Jr[zhe]=Jr[Fhe]=Jr[$he]=Jr[Bhe]=Jr[Vhe]=Jr[Uhe]=Jr[jhe]=!0;Jr[bhe]=Jr[_he]=Jr[Dhe]=Jr[whe]=Jr[Ahe]=Jr[Che]=Jr[She]=Jr[Ehe]=Jr[Phe]=Jr[The]=Jr[Ihe]=Jr[khe]=Jr[Mhe]=Jr[Rhe]=Jr[Ohe]=!1;function Hhe(e){return xhe(e)&&yhe(e.length)&&!!Jr[vhe(e)]}var Khe=Hhe;function Whe(e){return function(t){return e(t)}}var Ghe=Whe,WE={exports:{}};(function(e,t){var n=i8,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a})(WE,WE.exports);var qhe=Khe,Zhe=Ghe,IN=WE.exports,kN=IN&&IN.isTypedArray,Xhe=kN?Zhe(kN):qhe,wV=Xhe,Yhe=Qfe,Qhe=lhe,Jhe=RI,epe=Eb.exports,tpe=phe,npe=wV,rpe=Object.prototype,ipe=rpe.hasOwnProperty;function ope(e,t){var n=Jhe(e),r=!n&&Qhe(e),i=!n&&!r&&epe(e),o=!n&&!r&&!i&&npe(e),s=n||r||i||o,a=s?Yhe(e.length,String):[],u=a.length;for(var f in e)(t||ipe.call(e,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||tpe(f,u)))&&a.push(f);return a}var ape=ope,spe=Object.prototype;function lpe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||spe;return e===n}var cpe=lpe;function upe(e,t){return function(n){return e(t(n))}}var dpe=upe,fpe=dpe,hpe=fpe(Object.keys,Object),ppe=hpe,mpe=cpe,gpe=ppe,vpe=Object.prototype,ype=vpe.hasOwnProperty;function xpe(e){if(!mpe(e))return gpe(e);var t=[];for(var n in Object(e))ype.call(e,n)&&n!="constructor"&&t.push(n);return t}var bpe=xpe,_pe=gV,wpe=_V;function Cpe(e){return e!=null&&wpe(e.length)&&!_pe(e)}var Spe=Cpe,Epe=ape,Ppe=bpe,Tpe=Spe;function Ipe(e){return Tpe(e)?Epe(e):Ppe(e)}var kpe=Ipe,Mpe=Bfe,Rpe=Xfe,Ope=kpe;function Dpe(e){return Mpe(e,Ope,Rpe)}var Ape=Dpe,MN=Ape,Npe=1,Lpe=Object.prototype,zpe=Lpe.hasOwnProperty;function Fpe(e,t,n,r,i,o){var s=n&Npe,a=MN(e),u=a.length,f=MN(t),p=f.length;if(u!=p&&!s)return!1;for(var g=u;g--;){var v=a[g];if(!(s?v in t:zpe.call(t,v)))return!1}var b=o.get(e),_=o.get(t);if(b&&_)return b==t&&_==e;var T=!0;o.set(e,t),o.set(t,e);for(var I=s;++g0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(o,s){var a=new Map;o.forEach(function(f){a.set(f,!0)});var u=s.filter(function(f){return!a.has(f)});return u.length===1?u[0]:null}return n ").concat(t);return t}var IV=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var i=e.expandedKeys,o=e.selectedKeys,s=e.checkedKeys,a=e.loadedKeys,u=e.loadingKeys,f=e.halfCheckedKeys,p=e.keyEntities,g=e.disabled,v=e.dragging,b=e.dragOverNodeKey,_=e.dropPosition,T=e.motion,I=e.height,P=e.itemHeight,M=e.virtual,D=e.focusable,N=e.activeItem,z=e.focused,$=e.tabIndex,j=e.onKeyDown,U=e.onFocus,q=e.onBlur,Y=e.onActiveChange,te=e.onListChangeStart,Z=e.onListChangeEnd,X=kn(e,Sme),J=E.exports.useRef(null),ue=E.exports.useRef(null);E.exports.useImperativeHandle(t,function(){return{scrollTo:function(at){J.current.scrollTo(at)},getIndentWidth:function(){return ue.current.offsetWidth}}});var re=E.exports.useState(i),se=$e(re,2),oe=se[0],he=se[1],Ce=E.exports.useState(r),Se=$e(Ce,2),be=Se[0],Re=Se[1],Ie=E.exports.useState(r),Me=$e(Ie,2),Ae=Me[0],ze=Me[1],Ke=E.exports.useState([]),Ue=$e(Ke,2),pt=Ue[0],gt=Ue[1],Ot=E.exports.useState(null),qe=$e(Ot,2),Ct=qe[0],ot=qe[1],vt=E.exports.useRef(r);vt.current=r;function yt(){var ct=vt.current;Re(ct),ze(ct),gt([]),ot(null),Z()}E.exports.useEffect(function(){he(i);var ct=Cme(oe,i);if(ct.key!==null)if(ct.add){var at=be.findIndex(function(Ht){var Fe=Ht.key;return Fe===ct.key}),He=GN(HN(be,r,ct.key),M,I,P),ut=be.slice();ut.splice(at+1,0,WN),ze(ut),gt(He),ot("show")}else{var bt=r.findIndex(function(Ht){var Fe=Ht.key;return Fe===ct.key}),Dt=GN(HN(r,be,ct.key),M,I,P),Lt=r.slice();Lt.splice(bt+1,0,WN),ze(Lt),gt(Dt),ot("hide")}else be!==r&&(Re(r),ze(r))},[i,r]),E.exports.useEffect(function(){v||yt()},[v]);var Tt=T?Ae:r,et={expandedKeys:i,selectedKeys:o,loadedKeys:a,loadingKeys:u,checkedKeys:s,halfCheckedKeys:f,dragOverNodeKey:b,dropPosition:_,keyEntities:p};return it(nr,{children:[z&&N&&A("span",{style:KN,"aria-live":"assertive",children:Pme(N)}),A("div",{children:A("input",{style:KN,disabled:D===!1||g,tabIndex:D!==!1?$:null,onKeyDown:j,onFocus:U,onBlur:q,value:"",onChange:Eme,"aria-label":"for screen reader"})}),A("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0},children:A("div",{className:"".concat(n,"-indent"),children:A("div",{ref:ue,className:"".concat(n,"-indent-unit")})})}),A(mI,{...X,data:Tt,itemKey:qN,height:I,fullHeight:!1,virtual:M,itemHeight:P,prefixCls:"".concat(n,"-list"),ref:J,onVisibleChange:function(at,He){var ut=new Set(at),bt=He.filter(function(Dt){return!ut.has(Dt)});bt.some(function(Dt){return qN(Dt)===Rd})&&yt()},children:function(ct){var at=ct.pos,He=Je({},(EV(ct.data),ct.data)),ut=ct.title,bt=ct.key,Dt=ct.isStart,Lt=ct.isEnd,Ht=sv(bt,at);delete He.key,delete He.children;var Fe=Wm(Ht,et);return A(wme,{...He,...Fe,title:ut,active:!!N&&bt===N.key,pos:at,data:ct.data,isStart:Dt,isEnd:Lt,motion:T,motionNodes:bt===Rd?pt:null,motionType:Ct,onMotionStart:te,onMotionEnd:yt,treeNodeRequiredProps:et,onMouseMove:function(){Y(null)}})}})]})});IV.displayName="NodeList";function Tme(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return A("div",{style:i})}var Ime=10,u1=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,g=r.state,v=g.dragChildrenKeys,b=g.dropPosition,_=g.dropTargetKey,T=g.dropTargetPos,I=g.dropAllowed;if(!!I){var P=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),_!==null){var M=me(me({},Wm(_,r.getTreeNodeRequiredProps())),{},{active:((f=r.getActiveItem())===null||f===void 0?void 0:f.key)===_,data:r.state.keyEntities[_].node}),D=v.indexOf(_)!==-1;Lr(!D,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var N=AI(T),z={event:a,node:Di(M),dragNode:r.dragNode?Di(r.dragNode.props):null,dragNodesKeys:[r.dragNode.props.eventKey].concat(v),dropToGap:b!==0,dropPosition:b+Number(N[N.length-1])};p||P==null||P(z),r.dragNode=null}}},r.cleanDragState=function(){var a=r.state.draggingNodeKey;a!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null},r.triggerExpandActionExpand=function(a,u){var f=r.state,p=f.expandedKeys,g=f.flattenNodes,v=u.expanded,b=u.key,_=u.isLeaf;if(!(_||a.shiftKey||a.metaKey||a.ctrlKey)){var T=g.filter(function(P){return P.key===b})[0],I=Di(me(me({},Wm(b,r.getTreeNodeRequiredProps())),{},{data:T.data}));r.setExpandedKeys(v?Ks(p,b):Tl(p,b)),r.onNodeExpand(a,I)}},r.onNodeClick=function(a,u){var f=r.props,p=f.onClick,g=f.expandAction;g==="click"&&r.triggerExpandActionExpand(a,u),p==null||p(a,u)},r.onNodeDoubleClick=function(a,u){var f=r.props,p=f.onDoubleClick,g=f.expandAction;g==="doubleClick"&&r.triggerExpandActionExpand(a,u),p==null||p(a,u)},r.onNodeSelect=function(a,u){var f=r.state.selectedKeys,p=r.state,g=p.keyEntities,v=p.fieldNames,b=r.props,_=b.onSelect,T=b.multiple,I=u.selected,P=u[v.key],M=!I;M?T?f=Tl(f,P):f=[P]:f=Ks(f,P);var D=f.map(function(N){var z=g[N];return z?z.node:null}).filter(function(N){return N});r.setUncontrolledState({selectedKeys:f}),_==null||_(f,{event:"select",selected:M,node:u,selectedNodes:D,nativeEvent:a.nativeEvent})},r.onNodeCheck=function(a,u,f){var p=r.state,g=p.keyEntities,v=p.checkedKeys,b=p.halfCheckedKeys,_=r.props,T=_.checkStrictly,I=_.onCheck,P=u.key,M,D={event:"check",node:u,checked:f,nativeEvent:a.nativeEvent};if(T){var N=f?Tl(v,P):Ks(v,P),z=Ks(b,P);M={checked:N,halfChecked:z},D.checkedNodes=N.map(function(te){return g[te]}).filter(function(te){return te}).map(function(te){return te.node}),r.setUncontrolledState({checkedKeys:N})}else{var $=jl([].concat(Mt(v),[P]),!0,g),j=$.checkedKeys,U=$.halfCheckedKeys;if(!f){var q=new Set(j);q.delete(P);var Y=jl(Array.from(q),{checked:!1,halfCheckedKeys:U},g);j=Y.checkedKeys,U=Y.halfCheckedKeys}M=j,D.checkedNodes=[],D.checkedNodesPositions=[],D.halfCheckedKeys=U,j.forEach(function(te){var Z=g[te];if(!!Z){var X=Z.node,J=Z.pos;D.checkedNodes.push(X),D.checkedNodesPositions.push({node:X,pos:J})}}),r.setUncontrolledState({checkedKeys:j},!1,{halfCheckedKeys:U})}I==null||I(M,D)},r.onNodeLoad=function(a){var u=a.key,f=new Promise(function(p,g){r.setState(function(v){var b=v.loadedKeys,_=b===void 0?[]:b,T=v.loadingKeys,I=T===void 0?[]:T,P=r.props,M=P.loadData,D=P.onLoad;if(!M||_.indexOf(u)!==-1||I.indexOf(u)!==-1)return null;var N=M(a);return N.then(function(){var z=r.state.loadedKeys,$=Tl(z,u);D==null||D($,{event:"load",node:a}),r.setUncontrolledState({loadedKeys:$}),r.setState(function(j){return{loadingKeys:Ks(j.loadingKeys,u)}}),p()}).catch(function(z){if(r.setState(function(j){return{loadingKeys:Ks(j.loadingKeys,u)}}),r.loadingRetryTimes[u]=(r.loadingRetryTimes[u]||0)+1,r.loadingRetryTimes[u]>=Ime){var $=r.state.loadedKeys;Lr(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Tl($,u)}),p()}g(z)}),{loadingKeys:Tl(I,u)}})});return f.catch(function(){}),f},r.onNodeMouseEnter=function(a,u){var f=r.props.onMouseEnter;f==null||f({event:a,node:u})},r.onNodeMouseLeave=function(a,u){var f=r.props.onMouseLeave;f==null||f({event:a,node:u})},r.onNodeContextMenu=function(a,u){var f=r.props.onRightClick;f&&(a.preventDefault(),f({event:a,node:u}))},r.onFocus=function(){var a=r.props.onFocus;r.setState({focused:!0});for(var u=arguments.length,f=new Array(u),p=0;p1&&arguments[1]!==void 0?arguments[1]:!1,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var p=!1,g=!0,v={};Object.keys(a).forEach(function(b){if(b in r.props){g=!1;return}p=!0,v[b]=a[b]}),p&&(!u||g)&&r.setState(me(me({},v),f))}},r.scrollTo=function(a){r.listRef.current.scrollTo(a)},r}return Hr(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var i=this.props.activeKey;i!==void 0&&i!==this.state.activeKey&&(this.setState({activeKey:i}),i!==null&&this.scrollTo({key:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var i,o=this.state,s=o.focused,a=o.flattenNodes,u=o.keyEntities,f=o.draggingNodeKey,p=o.activeKey,g=o.dropLevelOffset,v=o.dropContainerKey,b=o.dropTargetKey,_=o.dropPosition,T=o.dragOverNodeKey,I=o.indent,P=this.props,M=P.prefixCls,D=P.className,N=P.style,z=P.showLine,$=P.focusable,j=P.tabIndex,U=j===void 0?0:j,q=P.selectable,Y=P.showIcon,te=P.icon,Z=P.switcherIcon,X=P.draggable,J=P.checkable,ue=P.checkStrictly,re=P.disabled,se=P.motion,oe=P.loadData,he=P.filterTreeNode,Ce=P.height,Se=P.itemHeight,be=P.virtual,Re=P.titleRender,Ie=P.dropIndicatorRender,Me=P.onContextMenu,Ae=P.onScroll,ze=P.direction,Ke=P.rootClassName,Ue=P.rootStyle,pt=Zl(this.props,{aria:!0,data:!0}),gt;return X&&(on(X)==="object"?gt=X:typeof X=="function"?gt={nodeDraggable:X}:gt={}),A(DI.Provider,{value:{prefixCls:M,selectable:q,showIcon:Y,icon:te,switcherIcon:Z,draggable:gt,draggingNodeKey:f,checkable:J,checkStrictly:ue,disabled:re,keyEntities:u,dropLevelOffset:g,dropContainerKey:v,dropTargetKey:b,dropPosition:_,dragOverNodeKey:T,indent:I,direction:ze,dropIndicatorRender:Ie,loadData:oe,filterTreeNode:he,titleRender:Re,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop},children:A("div",{role:"tree",className:je(M,D,Ke,(i={},ae(i,"".concat(M,"-show-line"),z),ae(i,"".concat(M,"-focused"),s),ae(i,"".concat(M,"-active-focused"),p!==null),i)),style:Ue,children:A(IV,{ref:this.listRef,prefixCls:M,style:N,data:a,disabled:re,selectable:q,checkable:!!J,motion:se,dragging:f!==null,height:Ce,itemHeight:Se,virtual:be,focusable:$,focused:s,tabIndex:U,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Me,onScroll:Ae,...this.getTreeNodeRequiredProps(),...pt})})})}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,a={prevProps:i};function u($){return!s&&$ in i||s&&s[$]!==i[$]}var f,p=o.fieldNames;if(u("fieldNames")&&(p=bb(i.fieldNames),a.fieldNames=p),u("treeData")?f=i.treeData:u("children")&&(Lr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),f=d8(i.children)),f){a.treeData=f;var g=J_(f,{fieldNames:p});a.keyEntities=me(ae({},Rd,TV),g.keyEntities)}var v=a.keyEntities||o.keyEntities;if(u("expandedKeys")||s&&u("autoExpandParent"))a.expandedKeys=i.autoExpandParent||!s&&i.defaultExpandParent?FE(i.expandedKeys,v):i.expandedKeys;else if(!s&&i.defaultExpandAll){var b=me({},v);delete b[Rd],a.expandedKeys=Object.keys(b).map(function($){return b[$].key})}else!s&&i.defaultExpandedKeys&&(a.expandedKeys=i.autoExpandParent||i.defaultExpandParent?FE(i.defaultExpandedKeys,v):i.defaultExpandedKeys);if(a.expandedKeys||delete a.expandedKeys,f||a.expandedKeys){var _=jC(f||o.treeData,a.expandedKeys||o.expandedKeys,p);a.flattenNodes=_}if(i.selectable&&(u("selectedKeys")?a.selectedKeys=VA(i.selectedKeys,i):!s&&i.defaultSelectedKeys&&(a.selectedKeys=VA(i.defaultSelectedKeys,i))),i.checkable){var T;if(u("checkedKeys")?T=UC(i.checkedKeys)||{}:!s&&i.defaultCheckedKeys?T=UC(i.defaultCheckedKeys)||{}:f&&(T=UC(i.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),T){var I=T,P=I.checkedKeys,M=P===void 0?[]:P,D=I.halfCheckedKeys,N=D===void 0?[]:D;if(!i.checkStrictly){var z=jl(M,!0,v);M=z.checkedKeys,N=z.halfCheckedKeys}a.checkedKeys=M,a.halfCheckedKeys=N}}return u("loadedKeys")&&(a.loadedKeys=i.loadedKeys),a}}]),n}(E.exports.Component);u1.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Tme,allowDrop:function(){return!0},expandAction:!1};u1.TreeNode=Md;var kme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};const Mme=kme;var kV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Mme})})};kV.displayName="HolderOutlined";const Rme=E.exports.forwardRef(kV);var ZN=4;function Ome(e){var t,n=e.dropPosition,r=e.dropLevelOffset,i=e.prefixCls,o=e.indent,s=e.direction,a=s===void 0?"ltr":s,u=a==="ltr"?"left":"right",f=a==="ltr"?"right":"left",p=(t={},ae(t,u,-r*o+ZN),ae(t,f,0),t);switch(n){case-1:p.top=-3;break;case 1:p.bottom=-3;break;default:p.bottom=-3,p[u]=o+ZN;break}return A("div",{style:p,className:"".concat(i,"-drop-indicator")})}var Dme={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};const Ame=Dme;var MV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Ame})})};MV.displayName="CaretDownFilled";const Nme=E.exports.forwardRef(MV);var Lme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const zme=Lme;var RV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:zme})})};RV.displayName="FileOutlined";const OV=E.exports.forwardRef(RV);var Fme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};const $me=Fme;var DV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:$me})})};DV.displayName="MinusSquareOutlined";const Bme=E.exports.forwardRef(DV);var Vme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};const Ume=Vme;var AV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Ume})})};AV.displayName="PlusSquareOutlined";const jme=E.exports.forwardRef(AV);function NV(e,t,n,r){var i=r.isLeaf,o=r.expanded,s=r.loading;if(s)return A(Id,{className:"".concat(e,"-switcher-loading-icon")});var a;if(n&&on(n)==="object"&&(a=n.showLeafIcon),i){if(!n)return null;if(typeof a!="boolean"&&!!a){var u=typeof a=="function"?a(r):a,f="".concat(e,"-switcher-line-custom-icon");return Ta(u)?Pi(u,{className:je(u.props.className||"",f)}):u}return a?A(OV,{className:"".concat(e,"-switcher-line-icon")}):A("span",{className:"".concat(e,"-switcher-leaf-line")})}var p="".concat(e,"-switcher-icon"),g=typeof t=="function"?t(r):t;return Ta(g)?Pi(g,{className:je(g.props.className||"",p)}):g||(n?o?A(Bme,{className:"".concat(e,"-switcher-line-icon")}):A(jme,{className:"".concat(e,"-switcher-line-icon")}):A(Nme,{className:p}))}var Hme=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=r.virtual,a=e.prefixCls,u=e.className,f=e.showIcon,p=f===void 0?!1:f,g=e.showLine,v=e.switcherIcon,b=e.blockNode,_=b===void 0?!1:b,T=e.children,I=e.checkable,P=I===void 0?!1:I,M=e.selectable,D=M===void 0?!0:M,N=e.draggable,z=e.motion,$=z===void 0?Je(Je({},U_),{motionAppear:!1}):z,j=i("tree",a),U=Je(Je({},e),{checkable:P,selectable:D,showIcon:p,motion:$,blockNode:_,showLine:Boolean(g),dropIndicatorRender:Ome}),q=E.exports.useMemo(function(){if(!N)return!1;var Y={};switch(on(N)){case"function":Y.nodeDraggable=N;break;case"object":Y=Je({},N);break}return Y.icon!==!1&&(Y.icon=Y.icon||A(Rme,{})),Y},[N]);return A(u1,{itemHeight:20,ref:t,virtual:s,...U,prefixCls:j,className:je((n={},ae(n,"".concat(j,"-icon-hide"),!p),ae(n,"".concat(j,"-block-node"),_),ae(n,"".concat(j,"-unselectable"),!D),ae(n,"".concat(j,"-rtl"),o==="rtl"),n),u),direction:o,checkable:P&&A("span",{className:"".concat(j,"-checkbox-inner")}),selectable:D,switcherIcon:function(te){return NV(j,v,g,te)},draggable:q,children:T})});const LV=Hme;var Kme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const Wme=Kme;var zV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Wme})})};zV.displayName="FolderOpenOutlined";const Gme=E.exports.forwardRef(zV);var qme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};const Zme=qme;var FV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Zme})})};FV.displayName="FolderOutlined";const Xme=E.exports.forwardRef(FV);var Rl;(function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"})(Rl||(Rl={}));function WI(e,t){function n(r){var i=r.key,o=r.children;t(i,r)!==!1&&WI(o||[],t)}e.forEach(n)}function Yme(e){var t=e.treeData,n=e.expandedKeys,r=e.startKey,i=e.endKey,o=[],s=Rl.None;if(r&&r===i)return[r];if(!r||!i)return[];function a(u){return u===r||u===i}return WI(t,function(u){if(s===Rl.End)return!1;if(a(u)){if(o.push(u),s===Rl.None)s=Rl.Start;else if(s===Rl.Start)return s=Rl.End,!1}else s===Rl.Start&&o.push(u);return n.includes(u)}),o}function eS(e,t){var n=Mt(t),r=[];return WI(e,function(i,o){var s=n.indexOf(i);return s!==-1&&(r.push(o),n.splice(s,1)),!!n.length}),r}var XN=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1},Zt=Ye.confirm,an=Ye.closeDropdown;Zt&>([]),an&&Z(!1),Ue(""),oe(z?($||[]).map(function(Kt){return String(Kt)}):[])},Ct=function(){var Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0},Zt=Ye.closeDropdown;Zt&&Z(!1),gt(se())},ot=function(Ye){Ye&&J!==void 0&&oe(J||[]),Z(Ye),!Ye&&!i.filterDropdown&&Ot()},vt=je(ae({},"".concat(o,"-menu-without-submenu"),!sge(i.filters||[]))),yt=function(Ye){if(Ye.target.checked){var Zt=rh(i==null?void 0:i.filters).map(function(an){return String(an)});oe(Zt)}else oe([])},Tt=function Fe(Ye){var Zt=Ye.filters;return(Zt||[]).map(function(an,Kt){var Vt=String(an.value),It={title:an.text,key:an.value!==void 0?Vt:Kt};return an.children&&(It.children=Fe({filters:an.children})),It})},et=function Fe(Ye){var Zt;return Je(Je({},Ye),{text:Ye.title,value:Ye.key,children:((Zt=Ye.children)===null||Zt===void 0?void 0:Zt.map(function(an){return Fe(an)}))||[]})},ct;if(typeof i.filterDropdown=="function")ct=i.filterDropdown({prefixCls:"".concat(o,"-custom"),setSelectedKeys:function(Ye){return he({selectedKeys:Ye})},selectedKeys:se(),confirm:Ct,clearFilters:qe,filters:i.filters,visible:X,close:function(){Z(!1)}});else if(i.filterDropdown)ct=i.filterDropdown;else{var at=se()||[],He=function(){return(i.filters||[]).length===0?A(Ys,{image:Ys.PRESENTED_IMAGE_SIMPLE,description:_.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):f==="tree"?it(nr,{children:[A(QN,{filterSearch:g,value:Ke,onChange:pt,tablePrefixCls:n,locale:_}),it("div",{className:"".concat(n,"-filter-dropdown-tree"),children:[a?A(xh,{checked:at.length===rh(i.filters).length,indeterminate:at.length>0&&at.length0?o:e}),v=Math.ceil((o||e)/g.pageSize);g.current>v&&(g.current=v||1);var b=function(I,P){p({current:I!=null?I:1,pageSize:P||g.pageSize})},_=function(I,P){var M;t&&((M=t.onChange)===null||M===void 0||M.call(t,I,P)),b(I,P),n(I,P||(g==null?void 0:g.pageSize))};return t===!1?[{},function(){}]:[Je(Je({},g),{onChange:_}),b]}var Ec={},eP="SELECT_ALL",tP="SELECT_INVERT",nP="SELECT_NONE",tL=[];function jV(e,t){var n=[];return(e||[]).forEach(function(r){n.push(r),r&&on(r)==="object"&&t in r&&(n=[].concat(Mt(n),Mt(jV(r[t],t))))}),n}function mge(e,t){var n=e||{},r=n.preserveSelectedRowKeys,i=n.selectedRowKeys,o=n.defaultSelectedRowKeys,s=n.getCheckboxProps,a=n.onChange,u=n.onSelect,f=n.onSelectAll,p=n.onSelectInvert,g=n.onSelectNone,v=n.onSelectMultiple,b=n.columnWidth,_=n.type,T=n.selections,I=n.fixed,P=n.renderCell,M=n.hideSelectAll,D=n.checkStrictly,N=D===void 0?!0:D,z=t.prefixCls,$=t.data,j=t.pageData,U=t.getRecordByKey,q=t.getRowKey,Y=t.expandType,te=t.childrenColumnName,Z=t.locale,X=t.getPopupContainer,J=Ei(i||o||tL,{value:i}),ue=$e(J,2),re=ue[0],se=ue[1],oe=E.exports.useRef(new Map),he=E.exports.useCallback(function(et){if(r){var ct=new Map;et.forEach(function(at){var He=U(at);!He&&oe.current.has(at)&&(He=oe.current.get(at)),ct.set(at,He)}),oe.current=ct}},[U,r]);E.exports.useEffect(function(){he(re)},[re]);var Ce=E.exports.useMemo(function(){return N?{keyEntities:null}:J_($,{externalGetKey:q,childrenPropName:te})},[$,q,N,te]),Se=Ce.keyEntities,be=E.exports.useMemo(function(){return jV(j,te)},[j,te]),Re=E.exports.useMemo(function(){var et=new Map;return be.forEach(function(ct,at){var He=q(ct,at),ut=(s?s(ct):null)||{};et.set(He,ut)}),et},[be,q,s]),Ie=E.exports.useCallback(function(et){var ct;return!!(!((ct=Re.get(q(et)))===null||ct===void 0)&&ct.disabled)},[Re,q]),Me=E.exports.useMemo(function(){if(N)return[re||[],[]];var et=jl(re,!0,Se,Ie),ct=et.checkedKeys,at=et.halfCheckedKeys;return[ct||[],at]},[re,N,Se,Ie]),Ae=$e(Me,2),ze=Ae[0],Ke=Ae[1],Ue=E.exports.useMemo(function(){var et=_==="radio"?ze.slice(0,1):ze;return new Set(et)},[ze,_]),pt=E.exports.useMemo(function(){return _==="radio"?new Set:new Set(Ke)},[Ke,_]),gt=E.exports.useState(null),Ot=$e(gt,2),qe=Ot[0],Ct=Ot[1];E.exports.useEffect(function(){e||se(tL)},[!!e]);var ot=E.exports.useCallback(function(et,ct){var at,He;he(et),r?(at=et,He=et.map(function(ut){return oe.current.get(ut)})):(at=[],He=[],et.forEach(function(ut){var bt=U(ut);bt!==void 0&&(at.push(ut),He.push(bt))})),se(at),a==null||a(at,He,{type:ct})},[se,U,a,r]),vt=E.exports.useCallback(function(et,ct,at,He){if(u){var ut=at.map(function(bt){return U(bt)});u(U(et),ct,ut,He)}ot(at,"single")},[u,U,ot]),yt=E.exports.useMemo(function(){if(!T||M)return null;var et=T===!0?[eP,tP,nP]:T;return et.map(function(ct){return ct===eP?{key:"all",text:Z.selectionAll,onSelect:function(){ot($.map(function(He,ut){return q(He,ut)}).filter(function(He){var ut=Re.get(He);return!(ut!=null&&ut.disabled)||Ue.has(He)}),"all")}}:ct===tP?{key:"invert",text:Z.selectInvert,onSelect:function(){var He=new Set(Ue);j.forEach(function(bt,Dt){var Lt=q(bt,Dt),Ht=Re.get(Lt);Ht!=null&&Ht.disabled||(He.has(Lt)?He.delete(Lt):He.add(Lt))});var ut=Array.from(He);p&&p(ut),ot(ut,"invert")}}:ct===nP?{key:"none",text:Z.selectNone,onSelect:function(){g==null||g(),ot(Array.from(Ue).filter(function(He){var ut=Re.get(He);return ut==null?void 0:ut.disabled}),"none")}}:ct}).map(function(ct){return Je(Je({},ct),{onSelect:function(){for(var He,ut,bt=arguments.length,Dt=new Array(bt),Lt=0;Lt2&&arguments[2]!==void 0?arguments[2]:!1,nt=Je(Je({},He),Ve);Et&&(He.resetPagination(),nt.pagination.current&&(nt.pagination.current=1),p&&p.onChange&&p.onChange(1,nt.pagination.pageSize)),Y&&Y.scrollToFirstRowOnChange!==!1&&yt.body.current&&GJ(0,{getContainer:function(){return yt.body.current}}),M==null||M(nt.pagination,nt.filters,nt.sorter,{currentDataSource:eL(iP(Ke,nt.sorterStates,ot),nt.filterStates),action:Bt})},bt=function(Ve,Bt){ut({sorter:Ve,sorterStates:Bt},"sort",!1)},Dt=Cge({prefixCls:gt,mergedColumns:oe,onSorterChange:bt,sortDirections:te||["ascend","descend"],tableLocale:ze,showSorterTooltip:J}),Lt=$e(Dt,4),Ht=Lt[0],Fe=Lt[1],Ye=Lt[2],Zt=Lt[3],an=E.exports.useMemo(function(){return iP(Ke,Fe,ot)},[Ke,Fe]);He.sorter=Zt(),He.sorterStates=Fe;var Kt=function(Ve,Bt){ut({filters:Ve,filterStates:Bt},"filter",!0)},Vt=cge({prefixCls:gt,locale:ze,dropdownPrefixCls:Ot,mergedColumns:oe,onFilterChange:Kt,getPopupContainer:D}),It=$e(Vt,3),Xt=It[0],pn=It[1],tt=It[2],At=eL(an,pn);He.filters=tt,He.filterStates=pn;var qt=E.exports.useMemo(function(){var Xe={};return Object.keys(tt).forEach(function(Ve){tt[Ve]!==null&&(Xe[Ve]=tt[Ve])}),Je(Je({},Ye),{filters:Xe})},[Ye,tt]),En=Sge(qt),yn=$e(En,1),St=yn[0],Pn=function(Ve,Bt){ut({pagination:Je(Je({},He.pagination),{current:Ve,pageSize:Bt})},"paginate")},_n=pge(At.length,p,Pn),tn=$e(_n,2),Ft=tn[0],dt=tn[1];He.pagination=p===!1?{}:fge(p,Ft),He.resetPagination=dt;var mt=E.exports.useMemo(function(){if(p===!1||!Ft.pageSize)return At;var Xe=Ft.current,Ve=Xe===void 0?1:Xe,Bt=Ft.total,Et=Ft.pageSize,nt=Et===void 0?UV:Et;return At.lengthnt?At.slice((Ve-1)*nt,Ve*nt):At:At.slice((Ve-1)*nt,Ve*nt)},[!!p,At,Ft&&Ft.current,Ft&&Ft.pageSize,Ft&&Ft.total]),$t=mge(g,{prefixCls:gt,data:At,pageData:mt,getRowKey:Tt,getRecordByKey:at,expandType:vt,childrenColumnName:ot,locale:ze,getPopupContainer:D}),Wt=$e($t,2),mn=Wt[0],An=Wt[1],Qn=function(Ve,Bt,Et){var nt;return typeof _=="function"?nt=je(_(Ve,Bt,Et)):nt=je(_),je(ae({},"".concat(gt,"-row-selected"),An.has(Tt(Ve,Bt))),nt)};qe.__PARENT_RENDER_ICON__=qe.expandIcon,qe.expandIcon=qe.expandIcon||z||hce(ze),vt==="nest"&&qe.expandIconColumnIndex===void 0?qe.expandIconColumnIndex=g?1:0:qe.expandIconColumnIndex>0&&g&&(qe.expandIconColumnIndex-=1),typeof qe.indentSize!="number"&&(qe.indentSize=typeof q=="number"?q:15);var Jn=E.exports.useCallback(function(Xe){return St(mn(Xt(Ht(Xe))))},[Ht,Xt,mn]),ye,W;if(p!==!1&&(Ft==null?void 0:Ft.total)){var Q;Ft.size?Q=Ft.size:Q=Ae==="small"||Ae==="middle"?"small":void 0;var fe=function(Ve){return A(xse,{...Ft,className:je("".concat(gt,"-pagination ").concat(gt,"-pagination-").concat(Ve),Ft.className),size:Q})},ce=Me==="rtl"?"left":"right",xe=Ft.position;if(xe!==null&&Array.isArray(xe)){var ke=xe.find(function(Xe){return Xe.includes("top")}),we=xe.find(function(Xe){return Xe.includes("bottom")}),Pe=xe.every(function(Xe){return"".concat(Xe)==="none"});!ke&&!we&&!Pe&&(W=fe(ce)),ke&&(ye=fe(ke.toLowerCase().replace("top",""))),we&&(W=fe(we.toLowerCase().replace("bottom","")))}else W=fe(ce)}var Le;typeof N=="boolean"?Le={spinning:N}:on(N)==="object"&&(Le=Je({spinning:!0},N));var Ze=je("".concat(gt,"-wrapper"),ae({},"".concat(gt,"-wrapper-rtl"),Me==="rtl"),i);return A("div",{ref:t,className:Ze,style:o,children:it(uv,{spinning:!1,...Le,children:[ye,A(jd,{...he,columns:oe,direction:Me,expandable:qe,prefixCls:gt,className:je((n={},ae(n,"".concat(gt,"-middle"),Ae==="middle"),ae(n,"".concat(gt,"-small"),Ae==="small"),ae(n,"".concat(gt,"-bordered"),a),ae(n,"".concat(gt,"-empty"),Ke.length===0),n)),data:mt,rowKey:Tt,rowClassName:Qn,emptyText:Z&&Z.emptyText||(Ie||yI)("Table"),internalHooks:f0,internalRefs:yt,transformColumns:Jn}),W]})})}var Tge=E.exports.forwardRef(Pge),ec=Tge;ec.SELECTION_COLUMN=Ec;ec.EXPAND_COLUMN=jd.EXPAND_COLUMN;ec.SELECTION_ALL=eP;ec.SELECTION_INVERT=tP;ec.SELECTION_NONE=nP;ec.Column=dce;ec.ColumnGroup=fce;ec.Summary=hV;const Ige=ec;var kge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const Mge=kge;var qV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Mge})})};qV.displayName="DeleteOutlined";const Rge=E.exports.forwardRef(qV);var ZV=E.exports.createContext(null),XV=E.exports.createContext(null);function Oge(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Dge(e){var t=e||{},n=t.label,r=t.value,i=t.children,o=r||"value";return{_title:n?[n]:["title","label"],value:o,key:o,children:i||"children"}}function oP(e){return!e||e.disabled||e.disableCheckbox||e.checkable===!1}function Age(e,t){var n=[];function r(i){i.forEach(function(o){var s=o[t.children];s&&(n.push(o[t.value]),r(s))})}return r(e),n}function oL(e){return e==null}var Nge={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Lge=function(t,n){var r=L$(),i=r.prefixCls,o=r.multiple,s=r.searchValue,a=r.toggleOpen,u=r.open,f=r.notFoundContent,p=E.exports.useContext(XV),g=p.virtual,v=p.listHeight,b=p.listItemHeight,_=p.treeData,T=p.fieldNames,I=p.onSelect,P=p.dropdownMatchSelectWidth,M=p.treeExpandAction,D=E.exports.useContext(ZV),N=D.checkable,z=D.checkedKeys,$=D.halfCheckedKeys,j=D.treeExpandedKeys,U=D.treeDefaultExpandAll,q=D.treeDefaultExpandedKeys,Y=D.onTreeExpand,te=D.treeIcon,Z=D.showTreeIcon,X=D.switcherIcon,J=D.treeLine,ue=D.treeNodeFilterProp,re=D.loadData,se=D.treeLoadedKeys,oe=D.treeMotion,he=D.onTreeLoad,Ce=D.keyEntities,Se=E.exports.useRef(),be=Xg(function(){return _},[u,_],function(bt,Dt){return Dt[0]&&bt[1]!==Dt[1]}),Re=E.exports.useMemo(function(){return N?{checked:z,halfChecked:$}:null},[N,z,$]);E.exports.useEffect(function(){if(u&&!o&&z.length){var bt;(bt=Se.current)===null||bt===void 0||bt.scrollTo({key:z[0]})}},[u]);var Ie=String(s).toLowerCase(),Me=function(Dt){return Ie?String(Dt[ue]).toLowerCase().includes(Ie):!1},Ae=E.exports.useState(q),ze=$e(Ae,2),Ke=ze[0],Ue=ze[1],pt=E.exports.useState(null),gt=$e(pt,2),Ot=gt[0],qe=gt[1],Ct=E.exports.useMemo(function(){return j?Mt(j):s?Ot:Ke},[Ke,Ot,j,s]);E.exports.useEffect(function(){s&&qe(Age(_,T))},[s]);var ot=function(Dt){Ue(Dt),qe(Dt),Y&&Y(Dt)},vt=function(Dt){Dt.preventDefault()},yt=function(Dt,Lt){var Ht=Lt.node;N&&oP(Ht)||(I(Ht.key,{selected:!z.includes(Ht.key)}),o||a(!1))},Tt=E.exports.useState(null),et=$e(Tt,2),ct=et[0],at=et[1],He=Ce[ct];if(E.exports.useImperativeHandle(n,function(){var bt;return{scrollTo:(bt=Se.current)===null||bt===void 0?void 0:bt.scrollTo,onKeyDown:function(Lt){var Ht,Fe=Lt.which;switch(Fe){case Pt.UP:case Pt.DOWN:case Pt.LEFT:case Pt.RIGHT:(Ht=Se.current)===null||Ht===void 0||Ht.onKeyDown(Lt);break;case Pt.ENTER:{if(He){var Ye=(He==null?void 0:He.node)||{},Zt=Ye.selectable,an=Ye.value;Zt!==!1&&yt(null,{node:{key:ct},selected:!z.includes(an)})}break}case Pt.ESC:a(!1)}},onKeyUp:function(){}}}),be.length===0)return A("div",{role:"listbox",className:"".concat(i,"-empty"),onMouseDown:vt,children:f});var ut={fieldNames:T};return se&&(ut.loadedKeys=se),Ct&&(ut.expandedKeys=Ct),it("div",{onMouseDown:vt,children:[He&&u&&A("span",{style:Nge,"aria-live":"assertive",children:He.node.value}),A(u1,{ref:Se,focusable:!1,prefixCls:"".concat(i,"-tree"),treeData:be,height:v,itemHeight:b,virtual:g!==!1&&P!==!1,multiple:o,icon:te,showIcon:Z,switcherIcon:X,showLine:J,loadData:s?null:re,motion:oe,activeKey:ct,checkable:N,checkStrictly:!0,checkedKeys:Re,selectedKeys:N?[]:z,defaultExpandAll:U,...ut,onActiveChange:at,onSelect:yt,onCheck:yt,onExpand:ot,onLoad:he,filterTreeNode:Me,expandAction:M})]})},YV=E.exports.forwardRef(Lge);YV.displayName="OptionList";var qI=function(){return null},QV="SHOW_ALL",ZI="SHOW_PARENT",d1="SHOW_CHILD";function aL(e,t,n,r){var i=new Set(e);return t===d1?e.filter(function(o){var s=n[o];return!(s&&s.children&&s.children.some(function(a){var u=a.node;return i.has(u[r.value])})&&s.children.every(function(a){var u=a.node;return oP(u)||i.has(u[r.value])}))}):t===ZI?e.filter(function(o){var s=n[o],a=s?s.parent:null;return!(a&&!oP(a.node)&&i.has(a.key))}):e}var zge=["children","value"];function JV(e){return Po(e).map(function(t){if(!E.exports.isValidElement(t)||!t.type)return null;var n=t,r=n.key,i=n.props,o=i.children,s=i.value,a=kn(i,zge),u=me({key:r,value:s},a),f=JV(o);return f.length&&(u.children=f),u}).filter(function(t){return t})}function aP(e){if(!e)return e;var t=me({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Lr(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function Fge(e,t,n,r,i,o){var s=null,a=null;function u(){function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return p.map(function(b,_){var T="".concat(g,"-").concat(_),I=b[o.value],P=n.includes(I),M=f(b[o.children]||[],T,P),D=A(qI,{...b,children:M.map(function(z){return z.node})});if(t===I&&(s=D),P){var N={pos:T,node:D,children:M};return v||a.push(N),N}return null}).filter(function(b){return b})}a||(a=[],f(r),a.sort(function(p,g){var v=p.node.props.value,b=g.node.props.value,_=n.indexOf(v),T=n.indexOf(b);return _-T}))}Object.defineProperty(e,"triggerNode",{get:function(){return Lr(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),u(),s}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return Lr(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),u(),i?a:a.map(function(p){var g=p.node;return g})}})}function $ge(e,t){var n=t.id,r=t.pId,i=t.rootPId,o={},s=[],a=e.map(function(u){var f=me({},u),p=f[n];return o[p]=f,f.key=f.key||p,f});return a.forEach(function(u){var f=u[r],p=o[f];p&&(p.children=p.children||[],p.children.push(u)),(f===i||!p&&i===null)&&s.push(u)}),s}function Bge(e,t,n){return E.exports.useMemo(function(){return e?n?$ge(e,me({id:"id",pId:"pId",rootPId:null},n!==!0?n:{})):e:JV(t)},[t,n,e])}const Vge=function(e){var t=E.exports.useRef({valueLabels:new Map});return E.exports.useMemo(function(){var n=t.current.valueLabels,r=new Map,i=e.map(function(o){var s,a=o.value,u=(s=o.label)!==null&&s!==void 0?s:n.get(a);return r.set(a,u),me(me({},o),{},{label:u})});return t.current.valueLabels=r,[i]},[e])};function sL(e){var t=E.exports.useRef();t.current=e;var n=E.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}const Uge=function(e,t){return E.exports.useMemo(function(){var n=J_(e,{fieldNames:t,initWrapper:function(i){return me(me({},i),{},{valueEntities:new Map})},processEntity:function(i,o){var s=i.node[t.value];o.valueEntities.set(s,i)}});return n},[e,t])},jge=function(e,t,n,r){return E.exports.useMemo(function(){var i=e.map(function(u){var f=u.value;return f}),o=t.map(function(u){var f=u.value;return f}),s=i.filter(function(u){return!r[u]});if(n){var a=jl(i,!0,r);i=a.checkedKeys,o=a.halfCheckedKeys}return[Array.from(new Set([].concat(Mt(s),Mt(i)))),o]},[e,t,n,r])},Hge=function(e,t,n){var r=n.treeNodeFilterProp,i=n.filterTreeNode,o=n.fieldNames,s=o.children;return E.exports.useMemo(function(){if(!t||i===!1)return e;var a;if(typeof i=="function")a=i;else{var u=t.toUpperCase();a=function(g,v){var b=v[r];return String(b).toUpperCase().includes(u)}}function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return p.map(function(v){var b=v[s],_=g||a(t,aP(v)),T=f(b||[],_);return _||T.length?me(me({},v),{},ae({isLeaf:void 0},s,T)):null}).filter(function(v){return v})}return f(e)},[e,t,s,r,i])};var Kge=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function Wge(e){return!e||on(e)!=="object"}var Gge=E.exports.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tree-select":r,o=e.value,s=e.defaultValue,a=e.onChange,u=e.onSelect,f=e.onDeselect,p=e.searchValue,g=e.inputValue,v=e.onSearch,b=e.autoClearSearchValue,_=b===void 0?!0:b,T=e.filterTreeNode,I=e.treeNodeFilterProp,P=I===void 0?"value":I,M=e.showCheckedStrategy,D=M===void 0?d1:M,N=e.treeNodeLabelProp,z=e.multiple,$=e.treeCheckable,j=e.treeCheckStrictly,U=e.labelInValue,q=e.fieldNames,Y=e.treeDataSimpleMode,te=e.treeData,Z=e.children,X=e.loadData,J=e.treeLoadedKeys,ue=e.onTreeLoad,re=e.treeDefaultExpandAll,se=e.treeExpandedKeys,oe=e.treeDefaultExpandedKeys,he=e.onTreeExpand,Ce=e.treeExpandAction,Se=e.virtual,be=e.listHeight,Re=be===void 0?200:be,Ie=e.listItemHeight,Me=Ie===void 0?20:Ie,Ae=e.onDropdownVisibleChange,ze=e.dropdownMatchSelectWidth,Ke=ze===void 0?!0:ze,Ue=e.treeLine,pt=e.treeIcon,gt=e.showTreeIcon,Ot=e.switcherIcon,qe=e.treeMotion,Ct=kn(e,Kge),ot=aB(n),vt=$&&!j,yt=$||j,Tt=j||U,et=yt||z,ct=Ei(s,{value:o}),at=$e(ct,2),He=at[0],ut=at[1],bt=E.exports.useMemo(function(){return Dge(q)},[JSON.stringify(q)]),Dt=Ei("",{value:p!==void 0?p:g,postState:function(xe){return xe||""}}),Lt=$e(Dt,2),Ht=Lt[0],Fe=Lt[1],Ye=function(xe){Fe(xe),v==null||v(xe)},Zt=Bge(te,Z,Y),an=Uge(Zt,bt),Kt=an.keyEntities,Vt=an.valueEntities,It=E.exports.useCallback(function(ce){var xe=[],ke=[];return ce.forEach(function(we){Vt.has(we)?ke.push(we):xe.push(we)}),{missingRawValues:xe,existRawValues:ke}},[Vt]),Xt=Hge(Zt,Ht,{fieldNames:bt,treeNodeFilterProp:P,filterTreeNode:T}),pn=E.exports.useCallback(function(ce){if(ce){if(N)return ce[N];for(var xe=bt._title,ke=0;ke"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=lL[t.format]||lL.default;window.clipboardData.setData(g,e)}else p.clipboardData.clearData(),p.clipboardData.setData(t.format,e);t.onCopy&&(p.preventDefault(),t.onCopy(p.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var f=document.execCommand("copy");if(!f)throw new Error("copy command was unsuccessful");u=!0}catch(p){n&&console.error("unable to copy using execCommand: ",p),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(g){n&&console.error("unable to copy using clipboardData: ",g),n&&console.error("falling back to prompt"),r=ave("message"in t?t.message:ove),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return u}var lve=sve,cve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};const uve=cve;var nU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:uve})})};nU.displayName="EnterOutlined";const dve=E.exports.forwardRef(nU);var fve=function(t){var n=t.prefixCls,r=t["aria-label"],i=t.className,o=t.style,s=t.direction,a=t.maxLength,u=t.autoSize,f=u===void 0?!0:u,p=t.value,g=t.onSave,v=t.onCancel,b=t.onEnd,_=t.component,T=t.enterIcon,I=T===void 0?A(dve,{}):T,P=E.exports.useRef(null),M=E.exports.useRef(!1),D=E.exports.useRef(),N=E.exports.useState(p),z=$e(N,2),$=z[0],j=z[1];E.exports.useEffect(function(){j(p)},[p]),E.exports.useEffect(function(){if(P.current&&P.current.resizableTextArea){var se=P.current.resizableTextArea.textArea;se.focus();var oe=se.value.length;se.setSelectionRange(oe,oe)}},[]);var U=function(oe){var he=oe.target;j(he.value.replace(/[\n\r]/g,""))},q=function(){M.current=!0},Y=function(){M.current=!1},te=function(oe){var he=oe.keyCode;M.current||(D.current=he)},Z=function(){g($.trim())},X=function(oe){var he=oe.keyCode,Ce=oe.ctrlKey,Se=oe.altKey,be=oe.metaKey,Re=oe.shiftKey;D.current===he&&!M.current&&!Ce&&!Se&&!be&&!Re&&(he===Pt.ENTER?(Z(),b==null||b()):he===Pt.ESC&&v())},J=function(){Z()},ue=_?"".concat(n,"-").concat(_):"",re=je(n,"".concat(n,"-edit-content"),ae({},"".concat(n,"-rtl"),s==="rtl"),i,ue);return it("div",{className:re,style:o,children:[A(D8,{ref:P,maxLength:a,value:$,onChange:U,onKeyDown:te,onKeyUp:X,onCompositionStart:q,onCompositionEnd:Y,onBlur:J,"aria-label":r,rows:1,autoSize:f}),I!==null?Pi(I,{className:"".concat(n,"-edit-content-confirm")}):null]})};const hve=fve;function nS(e,t){return E.exports.useMemo(function(){var n=!!e;return[n,Je(Je({},t),n&&on(e)==="object"?e:null)]},[e])}var pve=function(t,n){var r=E.exports.useRef(!1);E.exports.useEffect(function(){r.current?t():r.current=!0},n)};const mve=pve;var gve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);it){var f=t-n;return r.push(String(o).slice(0,f)),r}r.push(o),n=u}return e}var xve=0,vx=1,uL=2,rS=3,dL=4,bve=function(t){var n=t.enabledMeasure,r=t.children,i=t.text,o=t.width,s=t.fontSize,a=t.rows,u=t.onEllipsis,f=E.exports.useState([0,0,0]),p=$e(f,2),g=$e(p[0],3),v=g[0],b=g[1],_=g[2],T=p[1],I=E.exports.useState(xve),P=$e(I,2),M=P[0],D=P[1],N=E.exports.useState(0),z=$e(N,2),$=z[0],j=z[1],U=E.exports.useRef(null),q=E.exports.useRef(null),Y=E.exports.useMemo(function(){return Po(i)},[i]),te=E.exports.useMemo(function(){return yve(Y)},[Y]),Z=E.exports.useMemo(function(){return!n||M!==rS?r(Y,!1):r(cL(Y,b),b1&&dt,mn=function(nt){var zt;Lt(!0),(zt=St.onExpand)===null||zt===void 0||zt.call(St,nt)},An=E.exports.useState(0),Qn=$e(An,2),Jn=Qn[0],ye=Qn[1],W=E.exports.useState(0),Q=$e(W,2),fe=Q[0],ce=Q[1],xe=function(nt,zt){var Gt=nt.offsetWidth,wn;ye(Gt),ce(parseInt((wn=window.getComputedStyle)===null||wn===void 0?void 0:wn.call(window,zt).fontSize,10)||0)},ke=function(nt){var zt;Zt(nt),Ye!==nt&&((zt=St.onEllipsis)===null||zt===void 0||zt.call(St,nt))};E.exports.useEffect(function(){var Et=z.current;if(yn&&dt&&Et){var nt=Wt?Et.offsetHeight"u"||!Et||!dt||!Pn)){var nt=new IntersectionObserver(function(){At(!!Et.offsetParent)});return nt.observe(Et),function(){nt.disconnect()}}},[dt,Pn]);var we={};St.tooltip===!0?we={title:(n=Z.text)!==null&&n!==void 0?n:p}:E.exports.isValidElement(St.tooltip)?we={title:St.tooltip}:on(St.tooltip)==="object"?we=Je({title:(r=Z.text)!==null&&r!==void 0?r:p},St.tooltip):we={title:St.tooltip};var Pe=E.exports.useMemo(function(){var Et=function(zt){return["string","number"].includes(on(zt))};if(!(!yn||dt)){if(Et(Z.text))return Z.text;if(Et(p))return p;if(Et(T))return T;if(Et(we.title))return we.title}},[yn,dt,T,we.title,mt]);if(ue)return A(hve,{value:(i=Z.text)!==null&&i!==void 0?i:typeof p=="string"?p:"",onSave:Se,onCancel:be,onEnd:Z.onEnd,prefixCls:j,className:s,style:a,direction:D,component:_,maxLength:Z.maxLength,autoSize:Z.autoSize,enterIcon:Z.enterIcon});var Le=function(){var nt=St.expandable,zt=St.symbol;if(!nt)return null;var Gt;return zt?Gt=zt:Gt=N.expand,A("a",{className:"".concat(j,"-expand"),onClick:mn,"aria-label":N.expand,children:Gt},"expand")},Ze=function(){if(!!te){var nt=Z.icon,zt=Z.tooltip,Gt=Po(zt)[0]||N.edit,wn=typeof Gt=="string"?Gt:"";return oe.includes("icon")?A(ka,{title:zt===!1?"":Gt,children:A(fN,{ref:$,className:"".concat(j,"-edit"),onClick:Ce,"aria-label":wn,children:nt||A(nve,{role:"button"})})},"edit"):null}},Xe=function(){if(!!Me){var nt=Ae.tooltips,zt=Ae.icon,Gt=fL(nt),wn=fL(zt),dn=Ue?yx(Gt[1],N.copied):yx(Gt[0],N.copy),Cn=Ue?N.copied:N.copy,jn=typeof dn=="string"?dn:Cn;return A(ka,{title:dn,children:A(fN,{className:je("".concat(j,"-copy"),Ue&&"".concat(j,"-copy-success")),onClick:Ct,"aria-label":jn,children:Ue?yx(wn[1],A(xI,{}),!0):yx(wn[0],A(Jge,{}),!0)})},"copy")}},Ve=function(nt){return[nt&&Le(),Ze(),Xe()]},Bt=function(nt){return[nt&&A("span",{"aria-hidden":!0,children:Pve},"ellipsis"),St.suffix,Ve(nt)]};return A(Ql,{onResize:xe,disabled:!Pn||dt,children:function(Et){var nt;return A(Cve,{tooltipProps:we,enabledEllipsis:Pn,isEllipsis:mt,children:A(rU,{className:je((nt={},ae(nt,"".concat(j,"-").concat(u),u),ae(nt,"".concat(j,"-disabled"),f),ae(nt,"".concat(j,"-ellipsis"),yn),ae(nt,"".concat(j,"-single-line"),Pn&&tn===1),ae(nt,"".concat(j,"-ellipsis-single-line"),$t),ae(nt,"".concat(j,"-ellipsis-multiple-line"),Wt),nt),s),prefixCls:o,style:Je(Je({},a),{WebkitLineClamp:Wt?tn:void 0}),component:_,ref:Aa(Et,z,t),direction:D,onClick:oe.includes("text")?Ce:void 0,"aria-label":Pe==null?void 0:Pe.toString(),title:T,...U,children:A(_ve,{enabledMeasure:Pn&&!dt,text:p,rows:tn,width:Jn,fontSize:fe,onEllipsis:ke,children:function(zt,Gt){var wn=zt;zt.length&&Gt&&Pe&&(wn=A("span",{"aria-hidden":!0,children:wn},"show-content"));var dn=Eve(e,it(nr,{children:[wn,Bt(Gt)]}));return dn}})})})}})});const h1=Tve;var Ive=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i0&&(o.percent=o.loaded/o.total*100),e.onProgress(o)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(i){var o=e.data[i];if(Array.isArray(o)){o.forEach(function(s){n.append("".concat(i,"[]"),s)});return}n.append(i,o)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(o){e.onError(o)},t.onload=function(){return t.status<200||t.status>=300?e.onError(Vve(e,t),hL(t)):e.onSuccess(hL(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return r["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(i){r[i]!==null&&t.setRequestHeader(i,r[i])}),t.send(n),{abort:function(){t.abort()}}}var jve=+new Date,Hve=0;function iS(){return"rc-upload-".concat(jve,"-").concat(++Hve)}const oS=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(a.charAt(0)==="."){var u=r.toLowerCase(),f=a.toLowerCase(),p=[f];return(f===".jpg"||f===".jpeg")&&(p=[".jpg",".jpeg"]),p.some(function(g){return u.endsWith(g)})}return/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):i===a?!0:/^\w+$/.test(a)?(Lr(!1,"Upload takes an invalidate 'accept' type '".concat(a,"'.Skip for check.")),!0):!1})}return!0};function Kve(e,t){var n=e.createReader(),r=[];function i(){n.readEntries(function(o){var s=Array.prototype.slice.apply(o);r=r.concat(s);var a=!s.length;a?t(r):i()})}i()}var Wve=function(t,n,r){var i=function o(s,a){s.path=a||"",s.isFile?s.file(function(u){r(u)&&(s.fullPath&&!u.webkitRelativePath&&(Object.defineProperties(u,{webkitRelativePath:{writable:!0}}),u.webkitRelativePath=s.fullPath.replace(/^\//,""),Object.defineProperties(u,{webkitRelativePath:{writable:!1}})),n([u]))}):s.isDirectory&&Kve(s,function(u){u.forEach(function(f){o(f,"".concat(a).concat(s.name,"/"))})})};t.forEach(function(o){i(o.webkitGetAsEntry())})},Gve=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],qve=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:"",n=t.split("/"),r=n[n.length-1],i=r.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(i)||[""])[0]},lU=function(t){return t.indexOf("image/")===0},aye=function(t){if(t.type&&!t.thumbUrl)return lU(t.type);var n=t.thumbUrl||t.url||"",r=oye(n);return/^data:image\//.test(n)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r)?!0:!(/^data:/.test(n)||r)},wc=200;function sye(e){return new Promise(function(t){if(!e.type||!lU(e.type)){t("");return}var n=document.createElement("canvas");n.width=wc,n.height=wc,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(wc,"px; height: ").concat(wc,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),i=new Image;if(i.onload=function(){var s=i.width,a=i.height,u=wc,f=wc,p=0,g=0;s>a?(f=a*(wc/s),g=-(f-u)/2):(u=s*(wc/a),p=-(u-f)/2),r.drawImage(i,p,g,u,f);var v=n.toDataURL();document.body.removeChild(n),t(v)},i.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){var o=new FileReader;o.addEventListener("load",function(){o.result&&(i.src=o.result)}),o.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var lye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const cU=lye;var uU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:cU})})};uU.displayName="DownloadOutlined";const cye=E.exports.forwardRef(uU);var uye=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.className,o=e.style,s=e.locale,a=e.listType,u=e.file,f=e.items,p=e.progress,g=e.iconRender,v=e.actionIconRender,b=e.itemRender,_=e.isImgUrl,T=e.showPreviewIcon,I=e.showRemoveIcon,P=e.showDownloadIcon,M=e.previewIcon,D=e.removeIcon,N=e.downloadIcon,z=e.onPreview,$=e.onDownload,j=e.onClose,U,q,Y=u.status,te=E.exports.useState(Y),Z=$e(te,2),X=Z[0],J=Z[1];E.exports.useEffect(function(){Y!=="removed"&&J(Y)},[Y]);var ue=E.exports.useState(!1),re=$e(ue,2),se=re[0],oe=re[1],he=E.exports.useRef(null);E.exports.useEffect(function(){return he.current=setTimeout(function(){oe(!0)},300),function(){he.current&&clearTimeout(he.current)}},[]);var Ce="".concat(r,"-span"),Se=g(u),be=A("div",{className:"".concat(r,"-text-icon"),children:Se});if(a==="picture"||a==="picture-card")if(X==="uploading"||!u.thumbUrl&&!u.url){var Re,Ie=je((Re={},ae(Re,"".concat(r,"-list-item-thumbnail"),!0),ae(Re,"".concat(r,"-list-item-file"),X!=="uploading"),Re));be=A("div",{className:Ie,children:Se})}else{var Me,Ae=_!=null&&_(u)?A("img",{src:u.thumbUrl||u.url,alt:u.name,className:"".concat(r,"-list-item-image"),crossOrigin:u.crossOrigin}):Se,ze=je((Me={},ae(Me,"".concat(r,"-list-item-thumbnail"),!0),ae(Me,"".concat(r,"-list-item-file"),_&&!_(u)),Me));be=A("a",{className:ze,onClick:function(Ht){return z(u,Ht)},href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer",children:Ae})}var Ke=je((n={},ae(n,"".concat(r,"-list-item"),!0),ae(n,"".concat(r,"-list-item-").concat(X),!0),ae(n,"".concat(r,"-list-item-list-type-").concat(a),!0),n)),Ue=typeof u.linkProps=="string"?JSON.parse(u.linkProps):u.linkProps,pt=I?v((typeof D=="function"?D(u):D)||A(Rge,{}),function(){return j(u)},r,s.removeFile):null,gt=P&&X==="done"?v((typeof N=="function"?N(u):N)||A(cye,{}),function(){return $(u)},r,s.downloadFile):null,Ot=a!=="picture-card"&&it("span",{className:je("".concat(r,"-list-item-card-actions"),{picture:a==="picture"}),children:[gt,pt]},"download-delete"),qe=je("".concat(r,"-list-item-name")),Ct=u.url?[A("a",{target:"_blank",rel:"noopener noreferrer",className:qe,title:u.name,...Ue,href:u.url,onClick:function(Ht){return z(u,Ht)},children:u.name},"view"),Ot]:[A("span",{className:qe,onClick:function(Ht){return z(u,Ht)},title:u.name,children:u.name},"view"),Ot],ot={pointerEvents:"none",opacity:.5},vt=T?A("a",{href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:u.url||u.thumbUrl?void 0:ot,onClick:function(Ht){return z(u,Ht)},title:s.previewFile,children:typeof M=="function"?M(u):M||A(LI,{})}):null,yt=a==="picture-card"&&X!=="uploading"&&it("span",{className:"".concat(r,"-list-item-actions"),children:[vt,X==="done"&>,pt]}),Tt;u.response&&typeof u.response=="string"?Tt=u.response:Tt=((U=u.error)===null||U===void 0?void 0:U.statusText)||((q=u.error)===null||q===void 0?void 0:q.message)||s.uploadError;var et=it("span",{className:Ce,children:[be,Ct]}),ct=E.exports.useContext(zn),at=ct.getPrefixCls,He=at(),ut=it("div",{className:Ke,children:[A("div",{className:"".concat(r,"-list-item-info"),children:et}),yt,se&&A(oa,{motionName:"".concat(He,"-fade"),visible:X==="uploading",motionDeadline:2e3,children:function(Lt){var Ht=Lt.className,Fe="percent"in u?A(VI,{...p,type:"line",percent:u.percent}):null;return A("div",{className:je("".concat(r,"-list-item-progress"),Ht),children:Fe})}})]}),bt=je("".concat(r,"-list-").concat(a,"-container"),i),Dt=X==="error"?A(ka,{title:Tt,getPopupContainer:function(Ht){return Ht.parentNode},children:ut}):ut;return A("div",{className:bt,style:o,ref:t,children:b?b(Dt,u,f,{download:$.bind(null,u),preview:z.bind(null,u),remove:j.bind(null,u)}):Dt})});const dye=uye;var p1=Je({},U_);delete p1.onAppearEnd;delete p1.onEnterEnd;delete p1.onLeaveEnd;var fye=function(t,n){var r,i=t.listType,o=i===void 0?"text":i,s=t.previewFile,a=s===void 0?sye:s,u=t.onPreview,f=t.onDownload,p=t.onRemove,g=t.locale,v=t.iconRender,b=t.isImageUrl,_=b===void 0?aye:b,T=t.prefixCls,I=t.items,P=I===void 0?[]:I,M=t.showPreviewIcon,D=M===void 0?!0:M,N=t.showRemoveIcon,z=N===void 0?!0:N,$=t.showDownloadIcon,j=$===void 0?!1:$,U=t.removeIcon,q=t.previewIcon,Y=t.downloadIcon,te=t.progress,Z=te===void 0?{strokeWidth:2,showInfo:!1}:te,X=t.appendAction,J=t.appendActionVisible,ue=J===void 0?!0:J,re=t.itemRender,se=_I(),oe=E.exports.useState(!1),he=$e(oe,2),Ce=he[0],Se=he[1];E.exports.useEffect(function(){o!=="picture"&&o!=="picture-card"||(P||[]).forEach(function(ot){typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(ot.originFileObj instanceof File||ot.originFileObj instanceof Blob)||ot.thumbUrl!==void 0||(ot.thumbUrl="",a&&a(ot.originFileObj).then(function(vt){ot.thumbUrl=vt||"",se()}))})},[o,P,a]),E.exports.useEffect(function(){Se(!0)},[]);var be=function(vt,yt){if(!!u)return yt==null||yt.preventDefault(),u(vt)},Re=function(vt){typeof f=="function"?f(vt):vt.url&&window.open(vt.url)},Ie=function(vt){p==null||p(vt)},Me=function(vt){if(v)return v(vt,o);var yt=vt.status==="uploading",Tt=_&&_(vt)?A(rye,{}):A(Yve,{}),et=yt?A(Id,{}):A(eye,{});return o==="picture"?et=yt?A(Id,{}):Tt:o==="picture-card"&&(et=yt?g.uploading:Tt),et},Ae=function(vt,yt,Tt,et){var ct={type:"text",size:"small",title:et,onClick:function(ut){yt(),Ta(vt)&&vt.props.onClick&&vt.props.onClick(ut)},className:"".concat(Tt,"-list-item-card-actions-btn")};if(Ta(vt)){var at=Pi(vt,Je(Je({},vt.props),{onClick:function(){}}));return A(Yr,{...ct,icon:at})}return A(Yr,{...ct,children:A("span",{children:vt})})};E.exports.useImperativeHandle(n,function(){return{handlePreview:be,handleDownload:Re}});var ze=E.exports.useContext(zn),Ke=ze.getPrefixCls,Ue=ze.direction,pt=Ke("upload",T),gt=je((r={},ae(r,"".concat(pt,"-list"),!0),ae(r,"".concat(pt,"-list-").concat(o),!0),ae(r,"".concat(pt,"-list-rtl"),Ue==="rtl"),r)),Ot=Mt(P.map(function(ot){return{key:ot.uid,file:ot}})),qe=o==="picture-card"?"animate-inline":"animate",Ct={motionDeadline:2e3,motionName:"".concat(pt,"-").concat(qe),keys:Ot,motionAppear:Ce};return o!=="picture-card"&&(Ct=Je(Je({},p1),Ct)),it("div",{className:gt,children:[A(J6,{...Ct,component:!1,children:function(ot){var vt=ot.key,yt=ot.file,Tt=ot.className,et=ot.style;return A(dye,{locale:g,prefixCls:pt,className:Tt,style:et,file:yt,items:P,progress:Z,listType:o,isImgUrl:_,showPreviewIcon:D,showRemoveIcon:z,showDownloadIcon:j,removeIcon:U,previewIcon:q,downloadIcon:Y,iconRender:Me,actionIconRender:Ae,itemRender:re,onPreview:be,onDownload:Re,onClose:Ie},vt)}}),X&&A(oa,{...Ct,visible:ue,forceRender:!0,children:function(ot){var vt=ot.className,yt=ot.style;return Pi(X,function(Tt){return{className:je(Tt.className,vt),style:Je(Je(Je({},yt),{pointerEvents:vt?"none":void 0}),Tt.style)}})}})]})},hye=E.exports.forwardRef(fye);const pye=hye;var mye=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(p){try{f(r.next(p))}catch(g){s(g)}}function u(p){try{f(r.throw(p))}catch(g){s(g)}}function f(p){p.done?o(p.value):i(p.value).then(a,u)}f((r=r.apply(e,t||[])).next())})},Em="__LIST_IGNORE_".concat(Date.now(),"__"),gye=function(t,n){var r,i=t.fileList,o=t.defaultFileList,s=t.onRemove,a=t.showUploadList,u=a===void 0?!0:a,f=t.listType,p=f===void 0?"text":f,g=t.onPreview,v=t.onDownload,b=t.onChange,_=t.onDrop,T=t.previewFile,I=t.disabled,P=t.locale,M=t.iconRender,D=t.isImageUrl,N=t.progress,z=t.prefixCls,$=t.className,j=t.type,U=j===void 0?"select":j,q=t.children,Y=t.style,te=t.itemRender,Z=t.maxCount,X=t.data,J=X===void 0?{}:X,ue=t.multiple,re=ue===void 0?!1:ue,se=t.action,oe=se===void 0?"":se,he=t.accept,Ce=he===void 0?"":he,Se=t.supportServerRender,be=Se===void 0?!0:Se,Re=E.exports.useContext(fu),Ie=I!=null?I:Re,Me=Ei(o||[],{value:i,postState:function(It){return It!=null?It:[]}}),Ae=$e(Me,2),ze=Ae[0],Ke=Ae[1],Ue=E.exports.useState("drop"),pt=$e(Ue,2),gt=pt[0],Ot=pt[1],qe=E.exports.useRef(null);E.exports.useMemo(function(){var Vt=Date.now();(i||[]).forEach(function(It,Xt){!It.uid&&!Object.isFrozen(It)&&(It.uid="__AUTO__".concat(Vt,"_").concat(Xt,"__"))})},[i]);var Ct=function(It,Xt,pn){var tt=Mt(Xt);Z===1?tt=tt.slice(-1):Z&&(tt=tt.slice(0,Z)),al.exports.flushSync(function(){Ke(tt)});var At={file:It,fileList:tt};pn&&(At.event=pn),b==null||b(At)},ot=function(It,Xt){return mye(void 0,void 0,void 0,Hi().mark(function pn(){var tt,At,qt,En;return Hi().wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(tt=t.beforeUpload,At=t.transformFile,qt=It,!tt){St.next=13;break}return St.next=5,tt(It,Xt);case 5:if(En=St.sent,En!==!1){St.next=8;break}return St.abrupt("return",!1);case 8:if(delete It[Em],En!==Em){St.next=12;break}return Object.defineProperty(It,Em,{value:!0,configurable:!0}),St.abrupt("return",!1);case 12:on(En)==="object"&&En&&(qt=En);case 13:if(!At){St.next=17;break}return St.next=16,At(qt);case 16:qt=St.sent;case 17:return St.abrupt("return",qt);case 18:case"end":return St.stop()}},pn)}))},vt=function(It){var Xt=It.filter(function(At){return!At.file[Em]});if(!!Xt.length){var pn=Xt.map(function(At){return xx(At.file)}),tt=Mt(ze);pn.forEach(function(At){tt=bx(At,tt)}),pn.forEach(function(At,qt){var En=At;if(Xt[qt].parsedFile)At.status="uploading";else{var yn=At.originFileObj,St;try{St=new File([yn],yn.name,{type:yn.type})}catch{St=new Blob([yn],{type:yn.type}),St.name=yn.name,St.lastModifiedDate=new Date,St.lastModified=new Date().getTime()}St.uid=At.uid,En=St}Ct(En,tt)})}},yt=function(It,Xt,pn){try{typeof It=="string"&&(It=JSON.parse(It))}catch{}if(!!sS(Xt,ze)){var tt=xx(Xt);tt.status="done",tt.percent=100,tt.response=It,tt.xhr=pn;var At=bx(tt,ze);Ct(tt,At)}},Tt=function(It,Xt){if(!!sS(Xt,ze)){var pn=xx(Xt);pn.status="uploading",pn.percent=It.percent;var tt=bx(pn,ze);Ct(pn,tt,It)}},et=function(It,Xt,pn){if(!!sS(pn,ze)){var tt=xx(pn);tt.error=It,tt.response=Xt,tt.status="error";var At=bx(tt,ze);Ct(tt,At)}},ct=function(It){var Xt;Promise.resolve(typeof s=="function"?s(It):s).then(function(pn){var tt;if(pn!==!1){var At=iye(It,ze);At&&(Xt=Je(Je({},It),{status:"removed"}),ze==null||ze.forEach(function(qt){var En=Xt.uid!==void 0?"uid":"name";qt[En]===Xt[En]&&!Object.isFrozen(qt)&&(qt.status="removed")}),(tt=qe.current)===null||tt===void 0||tt.abort(Xt),Ct(Xt,At))}})},at=function(It){Ot(It.type),It.type==="drop"&&(_==null||_(It))};E.exports.useImperativeHandle(n,function(){return{onBatchStart:vt,onSuccess:yt,onProgress:Tt,onError:et,fileList:ze,upload:qe.current}});var He=E.exports.useContext(zn),ut=He.getPrefixCls,bt=He.direction,Dt=ut("upload",z),Lt=Je(Je({onBatchStart:vt,onError:et,onProgress:Tt,onSuccess:yt},t),{data:J,multiple:re,action:oe,accept:Ce,supportServerRender:be,prefixCls:Dt,disabled:Ie,beforeUpload:ot,onChange:void 0});delete Lt.className,delete Lt.style,(!q||Ie)&&delete Lt.id;var Ht=function(It,Xt){return u?A(Lh,{componentName:"Upload",defaultLocale:Ms.Upload,children:function(pn){var tt=typeof u=="boolean"?{}:u,At=tt.showRemoveIcon,qt=tt.showPreviewIcon,En=tt.showDownloadIcon,yn=tt.removeIcon,St=tt.previewIcon,Pn=tt.downloadIcon;return A(pye,{prefixCls:Dt,listType:p,items:ze,previewFile:T,onPreview:g,onDownload:v,onRemove:ct,showRemoveIcon:!Ie&&At,showPreviewIcon:qt,showDownloadIcon:En,removeIcon:yn,previewIcon:St,downloadIcon:Pn,iconRender:M,locale:Je(Je({},pn),P),isImageUrl:D,progress:N,appendAction:It,appendActionVisible:Xt,itemRender:te})}}):It};if(U==="drag"){var Fe,Ye=je(Dt,(Fe={},ae(Fe,"".concat(Dt,"-drag"),!0),ae(Fe,"".concat(Dt,"-drag-uploading"),ze.some(function(Vt){return Vt.status==="uploading"})),ae(Fe,"".concat(Dt,"-drag-hover"),gt==="dragover"),ae(Fe,"".concat(Dt,"-disabled"),Ie),ae(Fe,"".concat(Dt,"-rtl"),bt==="rtl"),Fe),$);return it("span",{children:[A("div",{className:Ye,onDrop:at,onDragOver:at,onDragLeave:at,style:Y,children:A(sP,{...Lt,ref:qe,className:"".concat(Dt,"-btn"),children:A("div",{className:"".concat(Dt,"-drag-container"),children:q})})}),Ht()]})}var Zt=je(Dt,(r={},ae(r,"".concat(Dt,"-select"),!0),ae(r,"".concat(Dt,"-select-").concat(p),!0),ae(r,"".concat(Dt,"-disabled"),Ie),ae(r,"".concat(Dt,"-rtl"),bt==="rtl"),r)),an=function(It){return A("div",{className:Zt,style:It,children:A(sP,{...Lt,ref:qe})})},Kt=an(q?void 0:{display:"none"});return p==="picture-card"?A("span",{className:je("".concat(Dt,"-picture-card-wrapper"),$),children:Ht(Kt,!!q)}):it("span",{className:$,children:[Kt,Ht()]})},vye=E.exports.forwardRef(gye);const dU=vye;var yye=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iA("div",{className:Td("mb-1",t),children:A(Pye,{type:r,className:n,children:e})}),mL=e=>{let t;const n=new Set,r=(u,f)=>{const p=typeof u=="function"?u(t):u;if(!Object.is(p,t)){const g=t;t=(f!=null?f:typeof p!="object")?p:Object.assign({},t,p),n.forEach(v=>v(t,g))}},i=()=>t,a={setState:r,getState:i,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{var u;((u={VITE_API_URL:"https://geoenergy.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:u.MODE)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,a),a},Tye=e=>e?mL(e):mL;var pU={exports:{}},mU={},YI={exports:{}},gU={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -770,7 +770,7 @@ html body { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var _h=E.exports;function Cye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sye=typeof Object.is=="function"?Object.is:Cye,Eye=_h.useState,Pye=_h.useEffect,Tye=_h.useLayoutEffect,Iye=_h.useDebugValue;function kye(e,t){var n=t(),r=Eye({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Tye(function(){i.value=n,i.getSnapshot=t,lS(i)&&o({inst:i})},[e,n,t]),Pye(function(){return lS(i)&&o({inst:i}),e(function(){lS(i)&&o({inst:i})})},[e]),Iye(n),n}function lS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sye(e,n)}catch{return!0}}function Mye(e,t){return t()}var Rye=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Mye:kye;pU.useSyncExternalStore=_h.useSyncExternalStore!==void 0?_h.useSyncExternalStore:Rye;(function(e){e.exports=pU})(YI);/** + */var _h=E.exports;function Iye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kye=typeof Object.is=="function"?Object.is:Iye,Mye=_h.useState,Rye=_h.useEffect,Oye=_h.useLayoutEffect,Dye=_h.useDebugValue;function Aye(e,t){var n=t(),r=Mye({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Oye(function(){i.value=n,i.getSnapshot=t,lS(i)&&o({inst:i})},[e,n,t]),Rye(function(){return lS(i)&&o({inst:i}),e(function(){lS(i)&&o({inst:i})})},[e]),Dye(n),n}function lS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kye(e,n)}catch{return!0}}function Nye(e,t){return t()}var Lye=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Nye:Aye;gU.useSyncExternalStore=_h.useSyncExternalStore!==void 0?_h.useSyncExternalStore:Lye;(function(e){e.exports=gU})(YI);/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -778,9 +778,9 @@ html body { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var m1=E.exports,Oye=YI.exports;function Dye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Aye=typeof Object.is=="function"?Object.is:Dye,Nye=Oye.useSyncExternalStore,Lye=m1.useRef,zye=m1.useEffect,Fye=m1.useMemo,$ye=m1.useDebugValue;hU.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Lye(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Fye(function(){function u(b){if(!f){if(f=!0,p=b,b=r(b),i!==void 0&&s.hasValue){var _=s.value;if(i(_,b))return g=_}return g=b}if(_=g,Aye(p,b))return _;var T=r(b);return i!==void 0&&i(_,T)?_:(p=b,g=T)}var f=!1,p,g,v=n===void 0?null:n;return[function(){return u(t())},v===null?void 0:function(){return u(v())}]},[t,n,r,i]);var a=Nye(e,o[0],o[1]);return zye(function(){s.hasValue=!0,s.value=a},[a]),$ye(a),a};(function(e){e.exports=hU})(fU);const Bye=VP(fU.exports),{useSyncExternalStoreWithSelector:Vye}=Bye;function Uye(e,t=e.getState,n){const r=Vye(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return E.exports.useDebugValue(r),r}const mL=e=>{var t;((t={VITE_API_URL:"https://geoenergy.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?wye(e):e,r=(i,o)=>Uye(n,i,o);return Object.assign(r,n),r},hu=e=>e?mL(e):mL;function Ya(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:QI(e)?2:JI(e)?3:0}function lP(e,t){return qh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function jye(e,t){return qh(e)===2?e.get(t):e[t]}function mU(e,t,n){var r=qh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Hye(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function QI(e){return Xye&&e instanceof Map}function JI(e){return Yye&&e instanceof Set}function Ji(e){return e.o||e.t}function ek(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Jye(e);delete t[Pr];for(var n=ik(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Kye),Object.freeze(e),t&&Ch(e,function(n,r){return tk(r,!0)},!0)),e}function Kye(){Ya(2)}function nk(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rl(e){var t=uP[e];return t||Ya(18,e),t}function Wye(e,t){uP[e]||(uP[e]=t)}function Tb(){return Tg}function cS(e,t){t&&(rl("Patches"),e.u=[],e.s=[],e.v=t)}function Ib(e){cP(e),e.p.forEach(Gye),e.p=null}function cP(e){e===Tg&&(Tg=e.l)}function gL(e){return Tg={p:[],l:Tg,h:e,m:!0,_:0}}function Gye(e){var t=e[Pr];t.i===0||t.i===1?t.j():t.O=!0}function uS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||rl("ES5").S(t,e,r),r?(n[Pr].P&&(Ib(t),Ya(4)),Xl(e)&&(e=kb(t,e),t.l||Mb(t,e)),t.u&&rl("Patches").M(n[Pr].t,e,t.u,t.s)):e=kb(t,n,[]),Ib(t),t.u&&t.v(t.u,t.s),e!==gU?e:void 0}function kb(e,t,n){if(nk(t))return t;var r=t[Pr];if(!r)return Ch(t,function(a,u){return vL(e,r,t,a,u,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Mb(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=ek(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),Ch(o,function(a,u){return vL(e,r,i,a,u,n,s)}),Mb(e,i,!1),n&&e.u&&rl("Patches").N(r,n,e.u,e.s)}return r.o}function vL(e,t,n,r,i,o,s){if(wh(i)){var a=kb(e,i,o&&t&&t.i!==3&&!lP(t.R,r)?o.concat(r):void 0);if(mU(n,r,a),!wh(a))return;e.m=!1}else s&&n.add(i);if(Xl(i)&&!nk(i)){if(!e.h.D&&e._<1)return;kb(e,i),t&&t.A.l||Mb(e,i)}}function Mb(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&tk(t,n)}function dS(e,t){var n=e[Pr];return(n?Ji(n):e)[t]}function yL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Al(e){e.P||(e.P=!0,e.l&&Al(e.l))}function fS(e){e.o||(e.o=ek(e.t))}function Pg(e,t,n){var r=QI(t)?rl("MapSet").F(t,n):JI(t)?rl("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Tb(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},u=a,f=dP;s&&(u=[a],f=Pm);var p=Proxy.revocable(u,f),g=p.revoke,v=p.proxy;return a.k=v,a.j=g,v}(t,n):rl("ES5").J(t,n);return(n?n.A:Tb()).p.push(r),r}function qye(e){return wh(e)||Ya(22,e),function t(n){if(!Xl(n))return n;var r,i=n[Pr],o=qh(n);if(i){if(!i.P&&(i.i<4||!rl("ES5").K(i)))return i.t;i.I=!0,r=xL(n,o),i.I=!1}else r=xL(n,o);return Ch(r,function(s,a){i&&jye(i.t,s)===a||mU(r,s,t(a))}),o===3?new Set(r):r}(e)}function xL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ek(e)}function Zye(){function e(a,u){function f(){this.constructor=a}i(a,u),a.prototype=(f.prototype=u.prototype,new f)}function t(a){a.o||(a.R=new Map,a.o=new Map(a.t))}function n(a){a.o||(a.o=new Set,a.t.forEach(function(u){if(Xl(u)){var f=Pg(a.A.h,u,a);a.p.set(u,f),a.o.add(f)}else a.o.add(u)}))}function r(a){a.O&&Ya(3,JSON.stringify(Ji(a)))}var i=function(a,u){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)p.hasOwnProperty(g)&&(f[g]=p[g])})(a,u)},o=function(){function a(f,p){return this[Pr]={i:2,l:p,A:p?p.A:Tb(),P:!1,I:!1,o:void 0,R:void 0,t:f,k:this,C:!1,O:!1},this}e(a,Map);var u=a.prototype;return Object.defineProperty(u,"size",{get:function(){return Ji(this[Pr]).size}}),u.has=function(f){return Ji(this[Pr]).has(f)},u.set=function(f,p){var g=this[Pr];return r(g),Ji(g).has(f)&&Ji(g).get(f)===p||(t(g),Al(g),g.R.set(f,!0),g.o.set(f,p),g.R.set(f,!0)),this},u.delete=function(f){if(!this.has(f))return!1;var p=this[Pr];return r(p),t(p),Al(p),p.t.has(f)?p.R.set(f,!1):p.R.delete(f),p.o.delete(f),!0},u.clear=function(){var f=this[Pr];r(f),Ji(f).size&&(t(f),Al(f),f.R=new Map,Ch(f.t,function(p){f.R.set(p,!1)}),f.o.clear())},u.forEach=function(f,p){var g=this;Ji(this[Pr]).forEach(function(v,b){f.call(p,g.get(b),b,g)})},u.get=function(f){var p=this[Pr];r(p);var g=Ji(p).get(f);if(p.I||!Xl(g)||g!==p.t.get(f))return g;var v=Pg(p.A.h,g,p);return t(p),p.o.set(f,v),v},u.keys=function(){return Ji(this[Pr]).keys()},u.values=function(){var f,p=this,g=this.keys();return(f={})[_x]=function(){return p.values()},f.next=function(){var v=g.next();return v.done?v:{done:!1,value:p.get(v.value)}},f},u.entries=function(){var f,p=this,g=this.keys();return(f={})[_x]=function(){return p.entries()},f.next=function(){var v=g.next();if(v.done)return v;var b=p.get(v.value);return{done:!1,value:[v.value,b]}},f},u[_x]=function(){return this.entries()},a}(),s=function(){function a(f,p){return this[Pr]={i:3,l:p,A:p?p.A:Tb(),P:!1,I:!1,o:void 0,t:f,k:this,p:new Map,O:!1,C:!1},this}e(a,Set);var u=a.prototype;return Object.defineProperty(u,"size",{get:function(){return Ji(this[Pr]).size}}),u.has=function(f){var p=this[Pr];return r(p),p.o?!!p.o.has(f)||!(!p.p.has(f)||!p.o.has(p.p.get(f))):p.t.has(f)},u.add=function(f){var p=this[Pr];return r(p),this.has(f)||(n(p),Al(p),p.o.add(f)),this},u.delete=function(f){if(!this.has(f))return!1;var p=this[Pr];return r(p),n(p),Al(p),p.o.delete(f)||!!p.p.has(f)&&p.o.delete(p.p.get(f))},u.clear=function(){var f=this[Pr];r(f),Ji(f).size&&(n(f),Al(f),f.o.clear())},u.values=function(){var f=this[Pr];return r(f),n(f),f.o.values()},u.entries=function(){var f=this[Pr];return r(f),n(f),f.o.entries()},u.keys=function(){return this.values()},u[_x]=function(){return this.values()},u.forEach=function(f,p){for(var g=this.values(),v=g.next();!v.done;)f.call(p,v.value,v.value,this),v=g.next()},a}();Wye("MapSet",{F:function(a,u){return new o(a,u)},T:function(a,u){return new s(a,u)}})}var bL,Tg,rk=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Xye=typeof Map<"u",Yye=typeof Set<"u",_L=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",gU=rk?Symbol.for("immer-nothing"):((bL={})["immer-nothing"]=!0,bL),wL=rk?Symbol.for("immer-draftable"):"__$immer_draftable",Pr=rk?Symbol.for("immer-state"):"__$immer_state",_x=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",Qye=""+Object.prototype.constructor,ik=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Jye=Object.getOwnPropertyDescriptors||function(e){var t={};return ik(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},uP={},dP={get:function(e,t){if(t===Pr)return e;var n=Ji(e);if(!lP(n,t))return function(i,o,s){var a,u=yL(o,s);return u?"value"in u?u.value:(a=u.get)===null||a===void 0?void 0:a.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Xl(r)?r:r===dS(e.t,t)?(fS(e),e.o[t]=Pg(e.A.h,r,e)):r},has:function(e,t){return t in Ji(e)},ownKeys:function(e){return Reflect.ownKeys(Ji(e))},set:function(e,t,n){var r=yL(Ji(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=dS(Ji(e),t),o=i==null?void 0:i[Pr];if(o&&o.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Hye(n,i)&&(n!==void 0||lP(e.t,t)))return!0;fS(e),Al(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return dS(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,fS(e),Al(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Ji(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ya(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ya(12)}},Pm={};Ch(dP,function(e,t){Pm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Pm.deleteProperty=function(e,t){return Pm.set.call(this,e,t,void 0)},Pm.set=function(e,t,n){return dP.set.call(this,e[0],t,n,e[0])};var exe=function(){function e(n){var r=this;this.g=_L,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var u=r;return function(T){var I=this;T===void 0&&(T=a);for(var P=arguments.length,M=Array(P>1?P-1:0),D=1;D1?p-1:0),v=1;v=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=rl("Patches").$;return wh(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Ma=new exe,txe=Ma.produce;Ma.produceWithPatches.bind(Ma);Ma.setAutoFreeze.bind(Ma);Ma.setUseProxies.bind(Ma);Ma.applyPatches.bind(Ma);Ma.createDraft.bind(Ma);Ma.finishDraft.bind(Ma);const nxe=e=>(t,n,r)=>(r.setState=(i,o,...s)=>{const a=typeof i=="function"?txe(i):i;return t(a,o,...s)},e(r.setState,n,r)),pu=nxe,rxe=e=>({selectedSourceConfig:{sourceId:null,dispatcherNumber:null},setSelectedSourceConfig:({pointId:t,sourceId:n,dispatcherNumber:r})=>e(i=>{i.selectedSourceConfig={pointId:t,sourceId:n,dispatcherNumber:r||null}})}),Hd=hu(pu(rxe)),{Text:ixe}=Bve,ul=({text:e,className:t,classNameText:n,type:r="secondary"})=>A("div",{className:Td("mb-1",t),children:A(ixe,{type:r,className:n,children:e})});class gv{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.push(t),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(n=>n!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Ig=typeof window>"u"||"Deno"in window;function Ga(){}function oxe(e,t){return typeof e=="function"?e(t):e}function fP(e){return typeof e=="number"&&e>=0&&e!==1/0}function vU(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Tm(e,t,n){return g1(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Ic(e,t,n){return g1(e)?[{...t,queryKey:e},n]:[e||{},t]}function CL(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(g1(s)){if(r){if(t.queryHash!==ok(s,t.options))return!1}else if(!Rb(t.queryKey,s))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||o&&!o(t))}function SL(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(g1(o)){if(!t.options.mutationKey)return!1;if(n){if(hd(t.options.mutationKey)!==hd(o))return!1}else if(!Rb(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function ok(e,t){return((t==null?void 0:t.queryKeyHashFn)||hd)(e)}function hd(e){return JSON.stringify(e,(t,n)=>hP(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Rb(e,t){return yU(e,t)}function yU(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!yU(e[n],t[n])):!1}function xU(e,t){if(e===t)return e;const n=PL(e)&&PL(t);if(n||hP(e)&&hP(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let u=0;u"u")return!0;const n=t.prototype;return!(!TL(n)||!n.hasOwnProperty("isPrototypeOf"))}function TL(e){return Object.prototype.toString.call(e)==="[object Object]"}function g1(e){return Array.isArray(e)}function bU(e){return new Promise(t=>{setTimeout(t,e)})}function IL(e){bU(0).then(e)}function axe(){if(typeof AbortController=="function")return new AbortController}function pP(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?xU(e,t):t}class sxe extends gv{constructor(){super(),this.setup=t=>{if(!Ig&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused=t,t&&this.onFocus()}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ob=new sxe;class lxe extends gv{constructor(){super(),this.setup=t=>{if(!Ig&&window.addEventListener){const n=()=>t();return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online=t,t&&this.onOnline()}onOnline(){this.listeners.forEach(t=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Db=new lxe;function cxe(e){return Math.min(1e3*2**e,3e4)}function v1(e){return(e!=null?e:"online")==="online"?Db.isOnline():!0}class _U{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function p0(e){return e instanceof _U}function wU(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((I,P)=>{o=I,s=P}),u=I=>{r||(b(new _U(I)),e.abort==null||e.abort())},f=()=>{t=!0},p=()=>{t=!1},g=()=>!Ob.isFocused()||e.networkMode!=="always"&&!Db.isOnline(),v=I=>{r||(r=!0,e.onSuccess==null||e.onSuccess(I),i==null||i(),o(I))},b=I=>{r||(r=!0,e.onError==null||e.onError(I),i==null||i(),s(I))},_=()=>new Promise(I=>{i=P=>{const M=r||!g();return M&&I(P),M},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),T=()=>{if(r)return;let I;try{I=e.fn()}catch(P){I=Promise.reject(P)}Promise.resolve(I).then(v).catch(P=>{var M,D;if(r)return;const N=(M=e.retry)!=null?M:3,z=(D=e.retryDelay)!=null?D:cxe,$=typeof z=="function"?z(n,P):z,j=N===!0||typeof N=="number"&&n{if(g())return _()}).then(()=>{t?b(P):T()})})};return v1(e.networkMode)?T():_().then(T),{promise:a,cancel:u,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:f,continueRetry:p}}const ak=console;function uxe(){let e=[],t=0,n=p=>{p()},r=p=>{p()};const i=p=>{let g;t++;try{g=p()}finally{t--,t||a()}return g},o=p=>{t?e.push(p):IL(()=>{n(p)})},s=p=>(...g)=>{o(()=>{p(...g)})},a=()=>{const p=e;e=[],p.length&&IL(()=>{r(()=>{p.forEach(g=>{n(g)})})})};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:p=>{n=p},setBatchNotifyFunction:p=>{r=p}}}const Ai=uxe();class CU{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fP(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Ig?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class dxe extends CU{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||ak,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||fxe(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=pP(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Ga).catch(Ga):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!vU(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.indexOf(t)!==-1&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(_=>_.options.queryFn);b&&this.setOptions(b.options)}Array.isArray(this.options.queryKey);const s=axe(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};u(a);const f=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),p={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:f};if(u(p),(r=this.options.behavior)==null||r.onFetch(p),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=p.fetchOptions)==null?void 0:i.meta)){var g;this.dispatch({type:"fetch",meta:(g=p.fetchOptions)==null?void 0:g.meta})}const v=b=>{if(p0(b)&&b.silent||this.dispatch({type:"error",error:b}),!p0(b)){var _,T;(_=(T=this.cache.config).onError)==null||_.call(T,b,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=wU({fn:p.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:b=>{var _,T;if(typeof b>"u"){v(new Error("undefined"));return}this.setData(b),(_=(T=this.cache.config).onSuccess)==null||_.call(T,b,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:v,onFail:(b,_)=>{this.dispatch({type:"failed",failureCount:b,error:_})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,o;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:v1(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return p0(s)&&s.revert&&this.revertState?{...this.revertState}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ai.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function fxe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class hxe extends gv{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const o=n.queryKey,s=(i=n.queryHash)!=null?i:ok(o,n);let a=this.get(s);return a||(a=new dxe({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ai.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Ic(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>CL(r,i))}findAll(t,n){const[r]=Ic(t,n);return Object.keys(r).length>0?this.queries.filter(i=>CL(r,i)):this.queries}notify(t){Ai.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ai.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ai.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class pxe extends CU{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||ak,this.observers=[],this.state=t.state||mxe(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var D;return this.retryer=wU({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(N,z)=>{this.dispatch({type:"failed",failureCount:N,error:z})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(D=this.options.retry)!=null?D:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,o,s,a,u;if(!n){var f,p,g,v;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(p=this.mutationCache.config).onMutate)==null?void 0:f.call(p,this.state.variables,this));const N=await((g=(v=this.options).onMutate)==null?void 0:g.call(v,this.state.variables));N!==this.state.context&&this.dispatch({type:"loading",context:N,variables:this.state.variables})}const D=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,D,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,D,this.state.variables,this.state.context)),await((a=(u=this.options).onSettled)==null?void 0:a.call(u,D,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:D}),D}catch(D){try{var b,_,T,I,P,M;throw await((b=(_=this.mutationCache.config).onError)==null?void 0:b.call(_,D,this.state.variables,this.state.context,this)),await((T=(I=this.options).onError)==null?void 0:T.call(I,D,this.state.variables,this.state.context)),await((P=(M=this.options).onSettled)==null?void 0:P.call(M,void 0,D,this.state.variables,this.state.context)),D}finally{this.dispatch({type:"error",error:D})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!v1(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ai.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function mxe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class gxe extends gv{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new pxe({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Ai.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>SL(t,n))}findAll(t){return this.mutations.filter(n=>SL(t,n))}notify(t){Ai.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return Ai.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(Ga)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function vxe(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,f=u==null?void 0:u.pageParam,p=(u==null?void 0:u.direction)==="forward",g=(u==null?void 0:u.direction)==="backward",v=((o=e.state.data)==null?void 0:o.pages)||[],b=((s=e.state.data)==null?void 0:s.pageParams)||[];let _=b,T=!1;const I=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var j;if((j=e.signal)!=null&&j.aborted)T=!0;else{var U;(U=e.signal)==null||U.addEventListener("abort",()=>{T=!0})}return e.signal}})},P=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),M=($,j,U,q)=>(_=q?[j,..._]:[..._,j],q?[U,...$]:[...$,U]),D=($,j,U,q)=>{if(T)return Promise.reject("Cancelled");if(typeof U>"u"&&!j&&$.length)return Promise.resolve($);const Y={queryKey:e.queryKey,pageParam:U,meta:e.options.meta};I(Y);const te=P(Y);return Promise.resolve(te).then(X=>M($,U,X,q))};let N;if(!v.length)N=D([]);else if(p){const $=typeof f<"u",j=$?f:kL(e.options,v);N=D(v,$,j)}else if(g){const $=typeof f<"u",j=$?f:yxe(e.options,v);N=D(v,$,j,!0)}else{_=[];const $=typeof e.options.getNextPageParam>"u";N=(a&&v[0]?a(v[0],0,v):!0)?D([],$,b[0]):Promise.resolve(M([],b[0],v[0]));for(let U=1;U{if(a&&v[U]?a(v[U],U,v):!0){const te=$?b[U]:kL(e.options,q);return D(q,$,te)}return Promise.resolve(M(q,b[U],v[U]))})}return N.then($=>({pages:$,pageParams:_}))}}}}function kL(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function yxe(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class xxe{constructor(t={}){this.queryCache=t.queryCache||new hxe,this.mutationCache=t.mutationCache||new gxe,this.logger=t.logger||ak,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ob.subscribe(()=>{Ob.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Db.subscribe(()=>{Db.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Ic(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=Tm(t,n,r),o=this.getQueryData(i.queryKey);return o?Promise.resolve(o):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),o=i==null?void 0:i.state.data,s=oxe(n,o);if(typeof s>"u")return;const a=Tm(t),u=this.defaultQueryOptions(a);return this.queryCache.build(this,u).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return Ai.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Ic(t,n),i=this.queryCache;Ai.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(t,n,r){const[i,o]=Ic(t,n,r),s=this.queryCache,a={type:"active",...i};return Ai.batch(()=>(s.findAll(i).forEach(u=>{u.reset()}),this.refetchQueries(a,o)))}cancelQueries(t,n,r){const[i,o={}]=Ic(t,n,r);typeof o.revert>"u"&&(o.revert=!0);const s=Ai.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(o)));return Promise.all(s).then(Ga).catch(Ga)}invalidateQueries(t,n,r){const[i,o]=Ic(t,n,r);return Ai.batch(()=>{var s,a;if(this.queryCache.findAll(i).forEach(f=>{f.invalidate()}),i.refetchType==="none")return Promise.resolve();const u={...i,type:(s=(a=i.refetchType)!=null?a:i.type)!=null?s:"active"};return this.refetchQueries(u,o)})}refetchQueries(t,n,r){const[i,o]=Ic(t,n,r),s=Ai.batch(()=>this.queryCache.findAll(i).filter(u=>!u.isDisabled()).map(u=>{var f;return u.fetch(void 0,{...o,cancelRefetch:(f=o==null?void 0:o.cancelRefetch)!=null?f:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(s).then(Ga);return o!=null&&o.throwOnError||(a=a.catch(Ga)),a}fetchQuery(t,n,r){const i=Tm(t,n,r),o=this.defaultQueryOptions(i);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Ga).catch(Ga)}fetchInfiniteQuery(t,n,r){const i=Tm(t,n,r);return i.behavior=vxe(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Ga).catch(Ga)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>hd(t)===hd(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Rb(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>hd(t)===hd(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Rb(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=ok(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class bxe extends gv{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),ML(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return mP(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mP(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),EL(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const o=this.hasListeners();o&&RL(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ga)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Ig||this.currentResult.isStale||!fP(this.options.staleTime))return;const n=vU(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Ig||this.options.enabled===!1||!fP(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ob.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,u=t!==r,f=u?t.state:this.currentQueryInitialState,p=u?this.currentResult:this.previousQueryResult,{state:g}=t;let{dataUpdatedAt:v,error:b,errorUpdatedAt:_,fetchStatus:T,status:I}=g,P=!1,M=!1,D;if(n._optimisticResults){const U=this.hasListeners(),q=!U&&ML(t,n),Y=U&&RL(t,r,n,i);(q||Y)&&(T=v1(t.options.networkMode)?"fetching":"paused",v||(I="loading")),n._optimisticResults==="isRestoring"&&(T="idle")}if(n.keepPreviousData&&!g.dataUpdatedAt&&p!=null&&p.isSuccess&&I!=="error")D=p.data,v=p.dataUpdatedAt,I=p.status,P=!0;else if(n.select&&typeof g.data<"u")if(o&&g.data===(s==null?void 0:s.data)&&n.select===this.selectFn)D=this.selectResult;else try{this.selectFn=n.select,D=n.select(g.data),D=pP(o==null?void 0:o.data,D,n),this.selectResult=D,this.selectError=null}catch(U){this.selectError=U}else D=g.data;if(typeof n.placeholderData<"u"&&typeof D>"u"&&I==="loading"){let U;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))U=o.data;else if(U=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof U<"u")try{U=n.select(U),this.selectError=null}catch(q){this.selectError=q}typeof U<"u"&&(I="success",D=pP(o==null?void 0:o.data,U,n),M=!0)}this.selectError&&(b=this.selectError,D=this.selectResult,_=Date.now(),I="error");const N=T==="fetching",z=I==="loading",$=I==="error";return{status:I,fetchStatus:T,isLoading:z,isSuccess:I==="success",isError:$,isInitialLoading:z&&N,data:D,dataUpdatedAt:v,error:b,errorUpdatedAt:_,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:N,isRefetching:N&&!z,isLoadingError:$&&g.dataUpdatedAt===0,isPaused:T==="paused",isPlaceholderData:M,isPreviousData:P,isRefetchError:$&&g.dataUpdatedAt!==0,isStale:sk(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,EL(r,n))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options;if(s==="all"||!s&&!this.trackedProps.size)return!0;const a=new Set(s!=null?s:this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(u=>{const f=u;return this.currentResult[f]!==n[f]&&a.has(f)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!p0(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){Ai.batch(()=>{if(t.onSuccess){var n,r,i,o;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(t.onError){var s,a,u,f;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(u=(f=this.options).onSettled)==null||u.call(f,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(p=>{p(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function _xe(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ML(e,t){return _xe(e,t)||e.state.dataUpdatedAt>0&&mP(e,t,t.refetchOnMount)}function mP(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&sk(e,t)}return!1}function RL(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&sk(e,n)}function sk(e,t){return e.isStaleByTime(t.staleTime)}const wxe=YI.exports.useSyncExternalStore,OL=E.exports.createContext(void 0),SU=E.exports.createContext(!1);function EU(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=OL),window.ReactQueryClientContext):OL)}const PU=({context:e}={})=>{const t=E.exports.useContext(EU(e,E.exports.useContext(SU)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Cxe=({client:e,children:t,context:n,contextSharing:r=!1})=>{E.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=EU(n,r);return A(SU.Provider,{value:!n&&r,children:A(i.Provider,{value:e,children:t})})},TU=E.exports.createContext(!1),Sxe=()=>E.exports.useContext(TU);TU.Provider;function Exe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Pxe=E.exports.createContext(Exe()),Txe=()=>E.exports.useContext(Pxe);function Ixe(e,t){return typeof e=="function"?e(...t):!!e}const kxe=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Mxe=e=>{E.exports.useEffect(()=>{e.clearReset()},[e])},Rxe=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Ixe(n,[e.error,r]),Oxe=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Dxe=(e,t)=>e.isLoading&&e.isFetching&&!t,Axe=(e,t,n)=>(e==null?void 0:e.suspense)&&Dxe(t,n),Nxe=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function Lxe(e,t){const n=PU({context:e.context}),r=Sxe(),i=Txe(),o=n.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=Ai.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=Ai.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=Ai.batchCalls(o.onSettled)),Oxe(o),kxe(o,i),Mxe(i);const[s]=E.exports.useState(()=>new t(n,o)),a=s.getOptimisticResult(o);if(wxe(E.exports.useCallback(u=>r?()=>{}:s.subscribe(Ai.batchCalls(u)),[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),E.exports.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),Axe(o,a,r))throw Nxe(o,s,i);if(Rxe({result:a,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw a.error;return o.notifyOnChangeProps?a:s.trackResult(a)}function tc(e,t,n){const r=Tm(e,t,n);return Lxe(r,bxe)}function IU(e,t){return function(){return e.apply(t,arguments)}}const{toString:kU}=Object.prototype,{getPrototypeOf:lk}=Object,ck=(e=>t=>{const n=kU.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nc=e=>(e=e.toLowerCase(),t=>ck(t)===e),y1=e=>t=>typeof t===e,{isArray:Zh}=Array,kg=y1("undefined");function zxe(e){return e!==null&&!kg(e)&&e.constructor!==null&&!kg(e.constructor)&&ou(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const MU=nc("ArrayBuffer");function Fxe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&MU(e.buffer),t}const $xe=y1("string"),ou=y1("function"),RU=y1("number"),uk=e=>e!==null&&typeof e=="object",Bxe=e=>e===!0||e===!1,m0=e=>{if(ck(e)!=="object")return!1;const t=lk(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Vxe=nc("Date"),Uxe=nc("File"),jxe=nc("Blob"),Hxe=nc("FileList"),Kxe=e=>uk(e)&&ou(e.pipe),Wxe=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||kU.call(e)===t||ou(e.toString)&&e.toString()===t)},Gxe=nc("URLSearchParams"),qxe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vv(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Zh(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const DU=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),AU=e=>!kg(e)&&e!==DU;function gP(){const{caseless:e}=AU(this)&&this||{},t={},n=(r,i)=>{const o=e&&OU(t,i)||i;m0(t[o])&&m0(r)?t[o]=gP(t[o],r):m0(r)?t[o]=gP({},r):Zh(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(vv(t,(i,o)=>{n&&ou(i)?e[o]=IU(i,n):e[o]=i},{allOwnKeys:r}),e),Xxe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yxe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Qxe=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&lk(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Jxe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},e0e=e=>{if(!e)return null;if(Zh(e))return e;let t=e.length;if(!RU(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},t0e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&lk(Uint8Array)),n0e=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},r0e=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},i0e=nc("HTMLFormElement"),o0e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),DL=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),a0e=nc("RegExp"),NU=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};vv(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},s0e=e=>{NU(e,(t,n)=>{if(ou(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(!!ou(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},l0e=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Zh(e)?r(e):r(String(e).split(t)),n},c0e=()=>{},u0e=(e,t)=>(e=+e,Number.isFinite(e)?e:t),hS="abcdefghijklmnopqrstuvwxyz",AL="0123456789",LU={DIGIT:AL,ALPHA:hS,ALPHA_DIGIT:hS+hS.toUpperCase()+AL},d0e=(e=16,t=LU.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function f0e(e){return!!(e&&ou(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const h0e=e=>{const t=new Array(10),n=(r,i)=>{if(uk(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Zh(r)?[]:{};return vv(r,(s,a)=>{const u=n(s,i+1);!kg(u)&&(o[a]=u)}),t[i]=void 0,o}}return r};return n(e,0)},Nt={isArray:Zh,isArrayBuffer:MU,isBuffer:zxe,isFormData:Wxe,isArrayBufferView:Fxe,isString:$xe,isNumber:RU,isBoolean:Bxe,isObject:uk,isPlainObject:m0,isUndefined:kg,isDate:Vxe,isFile:Uxe,isBlob:jxe,isRegExp:a0e,isFunction:ou,isStream:Kxe,isURLSearchParams:Gxe,isTypedArray:t0e,isFileList:Hxe,forEach:vv,merge:gP,extend:Zxe,trim:qxe,stripBOM:Xxe,inherits:Yxe,toFlatObject:Qxe,kindOf:ck,kindOfTest:nc,endsWith:Jxe,toArray:e0e,forEachEntry:n0e,matchAll:r0e,isHTMLForm:i0e,hasOwnProperty:DL,hasOwnProp:DL,reduceDescriptors:NU,freezeMethods:s0e,toObjectSet:l0e,toCamelCase:o0e,noop:c0e,toFiniteNumber:u0e,findKey:OU,global:DU,isContextDefined:AU,ALPHABET:LU,generateString:d0e,isSpecCompliantForm:f0e,toJSONObject:h0e};function vr(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}Nt.inherits(vr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Nt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const zU=vr.prototype,FU={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{FU[e]={value:e}});Object.defineProperties(vr,FU);Object.defineProperty(zU,"isAxiosError",{value:!0});vr.from=(e,t,n,r,i,o)=>{const s=Object.create(zU);return Nt.toFlatObject(e,s,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),vr.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const p0e=null;function vP(e){return Nt.isPlainObject(e)||Nt.isArray(e)}function $U(e){return Nt.endsWith(e,"[]")?e.slice(0,-2):e}function NL(e,t,n){return e?e.concat(t).map(function(i,o){return i=$U(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function m0e(e){return Nt.isArray(e)&&!e.some(vP)}const g0e=Nt.toFlatObject(Nt,{},null,function(t){return/^is[A-Z]/.test(t)});function x1(e,t,n){if(!Nt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Nt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,I){return!Nt.isUndefined(I[T])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Nt.isSpecCompliantForm(t);if(!Nt.isFunction(i))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(Nt.isDate(_))return _.toISOString();if(!u&&Nt.isBlob(_))throw new vr("Blob is not supported. Use a Buffer instead.");return Nt.isArrayBuffer(_)||Nt.isTypedArray(_)?u&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,T,I){let P=_;if(_&&!I&&typeof _=="object"){if(Nt.endsWith(T,"{}"))T=r?T:T.slice(0,-2),_=JSON.stringify(_);else if(Nt.isArray(_)&&m0e(_)||(Nt.isFileList(_)||Nt.endsWith(T,"[]"))&&(P=Nt.toArray(_)))return T=$U(T),P.forEach(function(D,N){!(Nt.isUndefined(D)||D===null)&&t.append(s===!0?NL([T],N,o):s===null?T:T+"[]",f(D))}),!1}return vP(_)?!0:(t.append(NL(I,T,o),f(_)),!1)}const g=[],v=Object.assign(g0e,{defaultVisitor:p,convertValue:f,isVisitable:vP});function b(_,T){if(!Nt.isUndefined(_)){if(g.indexOf(_)!==-1)throw Error("Circular reference detected in "+T.join("."));g.push(_),Nt.forEach(_,function(P,M){(!(Nt.isUndefined(P)||P===null)&&i.call(t,P,Nt.isString(M)?M.trim():M,T,v))===!0&&b(P,T?T.concat(M):[M])}),g.pop()}}if(!Nt.isObject(e))throw new TypeError("data must be an object");return b(e),t}function LL(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function dk(e,t){this._pairs=[],e&&x1(e,this,t)}const BU=dk.prototype;BU.append=function(t,n){this._pairs.push([t,n])};BU.toString=function(t){const n=t?function(r){return t.call(this,r,LL)}:LL;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function v0e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function VU(e,t,n){if(!t)return e;const r=n&&n.encode||v0e,i=n&&n.serialize;let o;if(i?o=i(t,n):o=Nt.isURLSearchParams(t)?t.toString():new dk(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class y0e{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Nt.forEach(this.handlers,function(r){r!==null&&t(r)})}}const zL=y0e,UU={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},x0e=typeof URLSearchParams<"u"?URLSearchParams:dk,b0e=typeof FormData<"u"?FormData:null,_0e=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),w0e=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Js={isBrowser:!0,classes:{URLSearchParams:x0e,FormData:b0e,Blob},isStandardBrowserEnv:_0e,isStandardBrowserWebWorkerEnv:w0e,protocols:["http","https","file","blob","url","data"]};function C0e(e,t){return x1(e,new Js.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Js.isNode&&Nt.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function S0e(e){return Nt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function E0e(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&Nt.isArray(i)?i.length:s,u?(Nt.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!Nt.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&Nt.isArray(i[s])&&(i[s]=E0e(i[s])),!a)}if(Nt.isFormData(e)&&Nt.isFunction(e.entries)){const n={};return Nt.forEachEntry(e,(r,i)=>{t(S0e(r),i,n,0)}),n}return null}const P0e={"Content-Type":void 0};function T0e(e,t,n){if(Nt.isString(e))try{return(t||JSON.parse)(e),Nt.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const b1={transitional:UU,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=Nt.isObject(t);if(o&&Nt.isHTMLForm(t)&&(t=new FormData(t)),Nt.isFormData(t))return i&&i?JSON.stringify(jU(t)):t;if(Nt.isArrayBuffer(t)||Nt.isBuffer(t)||Nt.isStream(t)||Nt.isFile(t)||Nt.isBlob(t))return t;if(Nt.isArrayBufferView(t))return t.buffer;if(Nt.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return C0e(t,this.formSerializer).toString();if((a=Nt.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return x1(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),T0e(t)):t}],transformResponse:[function(t){const n=this.transitional||b1.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&Nt.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?vr.from(a,vr.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Js.classes.FormData,Blob:Js.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Nt.forEach(["delete","get","head"],function(t){b1.headers[t]={}});Nt.forEach(["post","put","patch"],function(t){b1.headers[t]=Nt.merge(P0e)});const fk=b1,I0e=Nt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),k0e=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&I0e[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},FL=Symbol("internals");function cm(e){return e&&String(e).trim().toLowerCase()}function g0(e){return e===!1||e==null?e:Nt.isArray(e)?e.map(g0):String(e)}function M0e(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function R0e(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function pS(e,t,n,r,i){if(Nt.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Nt.isString(t)){if(Nt.isString(r))return t.indexOf(r)!==-1;if(Nt.isRegExp(r))return r.test(t)}}function O0e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function D0e(e,t){const n=Nt.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class _1{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,u,f){const p=cm(u);if(!p)throw new Error("header name must be a non-empty string");const g=Nt.findKey(i,p);(!g||i[g]===void 0||f===!0||f===void 0&&i[g]!==!1)&&(i[g||u]=g0(a))}const s=(a,u)=>Nt.forEach(a,(f,p)=>o(f,p,u));return Nt.isPlainObject(t)||t instanceof this.constructor?s(t,n):Nt.isString(t)&&(t=t.trim())&&!R0e(t)?s(k0e(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=cm(t),t){const r=Nt.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return M0e(i);if(Nt.isFunction(n))return n.call(this,i,r);if(Nt.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=cm(t),t){const r=Nt.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=cm(s),s){const a=Nt.findKey(r,s);a&&(!n||pS(r,r[a],a,n))&&(delete r[a],i=!0)}}return Nt.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||pS(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return Nt.forEach(this,(i,o)=>{const s=Nt.findKey(r,o);if(s){n[s]=g0(i),delete n[o];return}const a=t?O0e(o):String(o).trim();a!==o&&delete n[o],n[a]=g0(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Nt.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Nt.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[FL]=this[FL]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=cm(s);r[a]||(D0e(i,s),r[a]=!0)}return Nt.isArray(t)?t.forEach(o):o(t),this}}_1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Nt.freezeMethods(_1.prototype);Nt.freezeMethods(_1);const Hl=_1;function mS(e,t){const n=this||fk,r=t||n,i=Hl.from(r.headers);let o=r.data;return Nt.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function HU(e){return!!(e&&e.__CANCEL__)}function yv(e,t,n){vr.call(this,e==null?"canceled":e,vr.ERR_CANCELED,t,n),this.name="CanceledError"}Nt.inherits(yv,vr,{__CANCEL__:!0});function A0e(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new vr("Request failed with status code "+n.status,[vr.ERR_BAD_REQUEST,vr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const N0e=Js.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,s,a){const u=[];u.push(n+"="+encodeURIComponent(r)),Nt.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),Nt.isString(o)&&u.push("path="+o),Nt.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function L0e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function z0e(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function KU(e,t){return e&&!L0e(t)?z0e(e,t):t}const F0e=Js.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=Nt.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function $0e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function B0e(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(u){const f=Date.now(),p=r[o];s||(s=f),n[i]=u,r[i]=f;let g=o,v=0;for(;g!==i;)v+=n[g++],g=g%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-s{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,u=r(a),f=o<=s;n=o;const p={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&f?(s-o)/u:void 0,event:i};p[t?"download":"upload"]=!0,e(p)}}const V0e=typeof XMLHttpRequest<"u",U0e=V0e&&function(e){return new Promise(function(n,r){let i=e.data;const o=Hl.from(e.headers).normalize(),s=e.responseType;let a;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}Nt.isFormData(i)&&(Js.isStandardBrowserEnv||Js.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let f=new XMLHttpRequest;if(e.auth){const b=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(b+":"+_))}const p=KU(e.baseURL,e.url);f.open(e.method.toUpperCase(),VU(p,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function g(){if(!f)return;const b=Hl.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};A0e(function(P){n(P),u()},function(P){r(P),u()},T),f=null}if("onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(g)},f.onabort=function(){!f||(r(new vr("Request aborted",vr.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new vr("Network Error",vr.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const T=e.transitional||UU;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),r(new vr(_,T.clarifyTimeoutError?vr.ETIMEDOUT:vr.ECONNABORTED,e,f)),f=null},Js.isStandardBrowserEnv){const b=(e.withCredentials||F0e(p))&&e.xsrfCookieName&&N0e.read(e.xsrfCookieName);b&&o.set(e.xsrfHeaderName,b)}i===void 0&&o.setContentType(null),"setRequestHeader"in f&&Nt.forEach(o.toJSON(),function(_,T){f.setRequestHeader(T,_)}),Nt.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),s&&s!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",$L(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",$L(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=b=>{!f||(r(!b||b.type?new yv(null,e,f):b),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const v=$0e(p);if(v&&Js.protocols.indexOf(v)===-1){r(new vr("Unsupported protocol "+v+":",vr.ERR_BAD_REQUEST,e));return}f.send(i||null)})},v0={http:p0e,xhr:U0e};Nt.forEach(v0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const j0e={getAdapter:e=>{e=Nt.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;ie instanceof Hl?e.toJSON():e;function Sh(e,t){t=t||{};const n={};function r(f,p,g){return Nt.isPlainObject(f)&&Nt.isPlainObject(p)?Nt.merge.call({caseless:g},f,p):Nt.isPlainObject(p)?Nt.merge({},p):Nt.isArray(p)?p.slice():p}function i(f,p,g){if(Nt.isUndefined(p)){if(!Nt.isUndefined(f))return r(void 0,f,g)}else return r(f,p,g)}function o(f,p){if(!Nt.isUndefined(p))return r(void 0,p)}function s(f,p){if(Nt.isUndefined(p)){if(!Nt.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function a(f,p,g){if(g in t)return r(f,p);if(g in e)return r(void 0,f)}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(f,p)=>i(VL(f),VL(p),!0)};return Nt.forEach(Object.keys(e).concat(Object.keys(t)),function(p){const g=u[p]||i,v=g(e[p],t[p],p);Nt.isUndefined(v)&&g!==a||(n[p]=v)}),n}const WU="1.3.3",hk={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hk[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const UL={};hk.transitional=function(t,n,r){function i(o,s){return"[Axios v"+WU+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new vr(i(s," has been removed"+(n?" in "+n:"")),vr.ERR_DEPRECATED);return n&&!UL[s]&&(UL[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function H0e(e,t,n){if(typeof e!="object")throw new vr("options must be an object",vr.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],u=a===void 0||s(a,o,e);if(u!==!0)throw new vr("option "+o+" must be "+u,vr.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new vr("Unknown option "+o,vr.ERR_BAD_OPTION)}}const yP={assertOptions:H0e,validators:hk},Cc=yP.validators;class Ab{constructor(t){this.defaults=t,this.interceptors={request:new zL,response:new zL}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Sh(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&yP.assertOptions(r,{silentJSONParsing:Cc.transitional(Cc.boolean),forcedJSONParsing:Cc.transitional(Cc.boolean),clarifyTimeoutError:Cc.transitional(Cc.boolean)},!1),i!==void 0&&yP.assertOptions(i,{encode:Cc.function,serialize:Cc.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=o&&Nt.merge(o.common,o[n.method]),s&&Nt.forEach(["delete","get","head","post","put","patch","common"],_=>{delete o[_]}),n.headers=Hl.concat(s,o);const a=[];let u=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(n)===!1||(u=u&&T.synchronous,a.unshift(T.fulfilled,T.rejected))});const f=[];this.interceptors.response.forEach(function(T){f.push(T.fulfilled,T.rejected)});let p,g=0,v;if(!u){const _=[BL.bind(this),void 0];for(_.unshift.apply(_,a),_.push.apply(_,f),v=_.length,p=Promise.resolve(n);g{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new yv(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new pk(function(i){t=i}),cancel:t}}}const K0e=pk;function W0e(e){return function(n){return e.apply(null,n)}}function G0e(e){return Nt.isObject(e)&&e.isAxiosError===!0}const xP={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xP).forEach(([e,t])=>{xP[t]=e});const q0e=xP;function GU(e){const t=new y0(e),n=IU(y0.prototype.request,t);return Nt.extend(n,y0.prototype,t,{allOwnKeys:!0}),Nt.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return GU(Sh(e,i))},n}const Wi=GU(fk);Wi.Axios=y0;Wi.CanceledError=yv;Wi.CancelToken=K0e;Wi.isCancel=HU;Wi.VERSION=WU;Wi.toFormData=x1;Wi.AxiosError=vr;Wi.Cancel=Wi.CanceledError;Wi.all=function(t){return Promise.all(t)};Wi.spread=W0e;Wi.isAxiosError=G0e;Wi.mergeConfig=Sh;Wi.AxiosHeaders=Hl;Wi.formToJSON=e=>jU(Nt.isHTMLForm(e)?new FormData(e):e);Wi.HttpStatusCode=q0e;Wi.default=Wi;const Z0e=Wi,Nb="https://geoenergy.spatialsystems.ru",as=Z0e.create({baseURL:Nb}),qU=(e,t)=>{const n=e||new URLSearchParams;return t&&(t.type==="ao"&&n.append("district[]",t.id),t.type==="rayon"&&n.append("rayon",t.id)),n},X0e=async(e,t,n)=>{const r=qU(e,t),{data:i}=await as.get(`/api/data/?${r.toString()}`,{signal:n});return i},Y0e=async(e,t)=>{const n=qU(e,t),{data:r}=await as.get(`/api/data/to_csv/?${n.toString()}`,{responseType:"arraybuffer"});return r},Q0e=async e=>{const{data:t}=await as.get(`/default_data/templates/${e}.xlsx`,{responseType:"arraybuffer"});return t},J0e=async(e,t,n=!1)=>{const r=new FormData;r.append("file",e),r.append("model",t),r.append("refill",n);const{data:i}=await as.post("/api/import_file/",r);return i},ebe=async()=>{const{data:e}=await as.get("/api/data/start_ds_miracle");return e};function tbe(e){let t;try{t=e()}catch{return}return{getItem:r=>{var i;const o=a=>a===null?null:JSON.parse(a),s=(i=t.getItem(r))!=null?i:null;return s instanceof Promise?s.then(o):o(s)},setItem:(r,i)=>t.setItem(r,JSON.stringify(i)),removeItem:r=>t.removeItem(r)}}const Mg=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Mg(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Mg(r)(n)}}}},nbe=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:I=>I,version:0,merge:(I,P)=>({...P,...I}),...t},s=!1;const a=new Set,u=new Set;let f;try{f=o.getStorage()}catch{}if(!f)return e((...I)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...I)},r,i);const p=Mg(o.serialize),g=()=>{const I=o.partialize({...r()});let P;const M=p({state:I,version:o.version}).then(D=>f.setItem(o.name,D)).catch(D=>{P=D});if(P)throw P;return M},v=i.setState;i.setState=(I,P)=>{v(I,P),g()};const b=e((...I)=>{n(...I),g()},r,i);let _;const T=()=>{var I;if(!f)return;s=!1,a.forEach(M=>M(r()));const P=((I=o.onRehydrateStorage)==null?void 0:I.call(o,r()))||void 0;return Mg(f.getItem.bind(f))(o.name).then(M=>{if(M)return o.deserialize(M)}).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==o.version){if(o.migrate)return o.migrate(M.state,M.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return M.state}).then(M=>{var D;return _=o.merge(M,(D=r())!=null?D:b),n(_,!0),g()}).then(()=>{P==null||P(_,void 0),s=!0,u.forEach(M=>M(_))}).catch(M=>{P==null||P(void 0,M)})};return i.persist={setOptions:I=>{o={...o,...I},I.getStorage&&(f=I.getStorage())},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>T(),hasHydrated:()=>s,onHydrate:I=>(a.add(I),()=>{a.delete(I)}),onFinishHydration:I=>(u.add(I),()=>{u.delete(I)})},T(),_||b},rbe=(e,t)=>(n,r,i)=>{let o={storage:tbe(()=>localStorage),partialize:T=>T,version:0,merge:(T,I)=>({...I,...T}),...t},s=!1;const a=new Set,u=new Set;let f=o.storage;if(!f)return e((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...T)},r,i);const p=()=>{const T=o.partialize({...r()});return f.setItem(o.name,{state:T,version:o.version})},g=i.setState;i.setState=(T,I)=>{g(T,I),p()};const v=e((...T)=>{n(...T),p()},r,i);let b;const _=()=>{var T;if(!f)return;s=!1,a.forEach(P=>P(r()));const I=((T=o.onRehydrateStorage)==null?void 0:T.call(o,r()))||void 0;return Mg(f.getItem.bind(f))(o.name).then(P=>{if(P)if(typeof P.version=="number"&&P.version!==o.version){if(o.migrate)return o.migrate(P.state,P.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return P.state}).then(P=>{var M;return b=o.merge(P,(M=r())!=null?M:v),n(b,!0),p()}).then(()=>{I==null||I(b,void 0),s=!0,u.forEach(P=>P(b))}).catch(P=>{I==null||I(void 0,P)})};return i.persist={setOptions:T=>{o={...o,...T},T.storage&&(f=T.storage)},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:T=>(a.add(T),()=>{a.delete(T)}),onFinishHydration:T=>(u.add(T),()=>{u.delete(T)})},_(),b||v},ibe=(e,t)=>{var n;return"getStorage"in t||"serialize"in t||"deserialize"in t?(((n={VITE_API_URL:"https://geoenergy.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:n.MODE)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),nbe(e,t)):rbe(e,t)},mk=ibe,obe=e=>({value:0,range:[-25,18],setValue:t=>{e(n=>{n.value=t})},clear:()=>e(t=>{t.value=0})}),ss=hu(mk(pu(obe),{name:"weather-filter"})),gk=e=>tc(["dzkh-filter-range",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await as.get(`/api/data/filters_ranges/?field=${e}`);return{data:t,isLoading:n||r}},{select:({data:t,isLoading:n})=>{let r;return!t||!t[e]?r=[0,0]:r=[t[e].min,t[e].max],{range:r,isLoading:n}}}),vk=e=>tc(["dzkh-filter-values",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await as.get(`/api/data/filters_ranges/?field=${e}`);return{data:t,isLoading:n||r}},{select:({data:t,isLoading:n})=>t?[...t[e]]:[]}),abe=e=>tc(["dzkh-shap",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await as.get(`/api/data/${e}/data_shap/`);return{data:t,isLoading:n||r}},{select:t=>t.data.shap}),sbe=e=>{const{value:t}=ss();return e?tc(["dzkh-crush",e],async()=>{const{data:n,isInitialLoading:r,isFetching:i}=await as.get(`/api/data/${e}/crush_summary/?current_temp=${t}`);return{data:n,isLoading:r||i}},{select:n=>n.data}):{data:null}};function ZU(e,t){const n=window.document.createElement("a");n.href=window.URL.createObjectURL(new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}const td=e=>e==null||e==="",jL=({id:e,modalOpen:t,setModalOpen:n})=>{const{data:r,isLoading:i}=sbe(e);return it("div",{className:"flex flex-col gap-1",children:[A(ad,{className:Td("font-bold"),children:"In the failure area there are:"}),!td(r==null?void 0:r.potreb_count)&&!td(r==null?void 0:r.potreb_soc_count)&&it(ad,{children:[(r==null?void 0:r.potreb_count)+(r==null?void 0:r.potreb_soc_count)," consumers (of which ",r==null?void 0:r.potreb_soc_count," are social facilities)"]}),!td(r==null?void 0:r.total_area)&&it(ad,{children:["Total consumer area - ",Math.ceil(r==null?void 0:r.total_area)," sq. meters"]}),!td(r==null?void 0:r.number_of_apartments)&&it(ad,{children:[r==null?void 0:r.number_of_apartments," apartments"]}),!td(r==null?void 0:r.data_min_cooling_time)&&!td(r==null?void 0:r.min_cooling_time)&&it(ad,{children:["The fastest cooling building is at address ",r==null?void 0:r.data_min_cooling_time.building_address," (",r==null?void 0:r.min_cooling_time," hours)"]})]})};var XU={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},HL=Un.createContext&&Un.createContext(XU),Yc=globalThis&&globalThis.__assign||function(){return Yc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{selectedSourceConfig:e,setSelectedSourceConfig:t}=Hd(),[n,r]=E.exports.useState(!1);if(!e.pointId)return"";const{pointId:i}=e,o=()=>t({sourceId:null,dispatcherNumber:null});return it(nr,{children:[it("div",{className:"absolute bottom-[20px] left-[20px] text-grey z-10 bg-white-background rounded-xl p-3 text-center",children:[A(ul,{text:`Results of TP failure simulation ${e==null?void 0:e.sourceId}`}),it("div",{className:"flex justify-center flex-row gap-2",children:[A(Yr,{type:"primary",onClick:o,children:"Cancel"}),!!i&&A(EB,{content:A(jL,{id:i}),children:A(Yr,{className:"flex justify-center items-center",type:"primary",onClick:()=>r(!0),children:A(dbe,{className:"w-4 h-4"})})})]})]}),!!i&&A(jL,{id:i,modalOpen:n,setModalOpen:r})]})};var hbe=E.exports.createContext({});const QU=hbe;var wx=2,KL=.16,pbe=.05,mbe=.05,gbe=.15,JU=5,e7=4,vbe=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function WL(e){var t=e.r,n=e.g,r=e.b,i=ob(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function Cx(e){var t=e.r,n=e.g,r=e.b;return"#".concat(ab(t,n,r,!1))}function ybe(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function GL(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-wx*t:Math.round(e.h)+wx*t:r=n?Math.round(e.h)+wx*t:Math.round(e.h)-wx*t,r<0?r+=360:r>=360&&(r-=360),r}function qL(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-KL*t:t===e7?r=e.s+KL:r=e.s+pbe*t,r>1&&(r=1),n&&t===JU&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function ZL(e,t,n){var r;return n?r=e.v+mbe*t:r=e.v-gbe*t,r>1&&(r=1),Number(r.toFixed(2))}function bP(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Es(e),i=JU;i>0;i-=1){var o=WL(r),s=Cx(Es({h:GL(o,i,!0),s:qL(o,i,!0),v:ZL(o,i,!0)}));n.push(s)}n.push(Cx(r));for(var a=1;a<=e7;a+=1){var u=WL(r),f=Cx(Es({h:GL(u,a),s:qL(u,a),v:ZL(u,a)}));n.push(f)}return t.theme==="dark"?vbe.map(function(p){var g=p.index,v=p.opacity,b=Cx(ybe(Es(t.backgroundColor||"#141414"),Es(n[g]),v*100));return b}):n}var vS={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},yS={},xS={};Object.keys(vS).forEach(function(e){yS[e]=bP(vS[e]),yS[e].primary=yS[e][5],xS[e]=bP(vS[e],{theme:"dark",backgroundColor:"#141414"}),xS[e].primary=xS[e][5]});function xbe(e,t){Lr(e,"[@ant-design/icons] ".concat(t))}function XL(e){return on(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(on(e.icon)==="object"||typeof e.icon=="function")}function YL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function _P(e,t,n){return n?Un.createElement(e.tag,me(me({key:t},YL(e.attrs)),n),(e.children||[]).map(function(r,i){return _P(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Un.createElement(e.tag,me({key:t},YL(e.attrs)),(e.children||[]).map(function(r,i){return _P(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function t7(e){return bP(e)[0]}function n7(e){return e?Array.isArray(e)?e:[e]:[]}var bbe=` + */var m1=E.exports,zye=YI.exports;function Fye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $ye=typeof Object.is=="function"?Object.is:Fye,Bye=zye.useSyncExternalStore,Vye=m1.useRef,Uye=m1.useEffect,jye=m1.useMemo,Hye=m1.useDebugValue;mU.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Vye(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=jye(function(){function u(b){if(!f){if(f=!0,p=b,b=r(b),i!==void 0&&s.hasValue){var _=s.value;if(i(_,b))return g=_}return g=b}if(_=g,$ye(p,b))return _;var T=r(b);return i!==void 0&&i(_,T)?_:(p=b,g=T)}var f=!1,p,g,v=n===void 0?null:n;return[function(){return u(t())},v===null?void 0:function(){return u(v())}]},[t,n,r,i]);var a=Bye(e,o[0],o[1]);return Uye(function(){s.hasValue=!0,s.value=a},[a]),Hye(a),a};(function(e){e.exports=mU})(pU);const Kye=VP(pU.exports),{useSyncExternalStoreWithSelector:Wye}=Kye;function Gye(e,t=e.getState,n){const r=Wye(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return E.exports.useDebugValue(r),r}const gL=e=>{var t;((t={VITE_API_URL:"https://geoenergy.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?Tye(e):e,r=(i,o)=>Gye(n,i,o);return Object.assign(r,n),r},hu=e=>e?gL(e):gL;function Ya(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:QI(e)?2:JI(e)?3:0}function lP(e,t){return qh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qye(e,t){return qh(e)===2?e.get(t):e[t]}function vU(e,t,n){var r=qh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Zye(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function QI(e){return txe&&e instanceof Map}function JI(e){return nxe&&e instanceof Set}function Ji(e){return e.o||e.t}function ek(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ixe(e);delete t[Pr];for(var n=ik(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Xye),Object.freeze(e),t&&Ch(e,function(n,r){return tk(r,!0)},!0)),e}function Xye(){Ya(2)}function nk(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rl(e){var t=uP[e];return t||Ya(18,e),t}function Yye(e,t){uP[e]||(uP[e]=t)}function Tb(){return Tg}function cS(e,t){t&&(rl("Patches"),e.u=[],e.s=[],e.v=t)}function Ib(e){cP(e),e.p.forEach(Qye),e.p=null}function cP(e){e===Tg&&(Tg=e.l)}function vL(e){return Tg={p:[],l:Tg,h:e,m:!0,_:0}}function Qye(e){var t=e[Pr];t.i===0||t.i===1?t.j():t.O=!0}function uS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||rl("ES5").S(t,e,r),r?(n[Pr].P&&(Ib(t),Ya(4)),Xl(e)&&(e=kb(t,e),t.l||Mb(t,e)),t.u&&rl("Patches").M(n[Pr].t,e,t.u,t.s)):e=kb(t,n,[]),Ib(t),t.u&&t.v(t.u,t.s),e!==yU?e:void 0}function kb(e,t,n){if(nk(t))return t;var r=t[Pr];if(!r)return Ch(t,function(a,u){return yL(e,r,t,a,u,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Mb(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=ek(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),Ch(o,function(a,u){return yL(e,r,i,a,u,n,s)}),Mb(e,i,!1),n&&e.u&&rl("Patches").N(r,n,e.u,e.s)}return r.o}function yL(e,t,n,r,i,o,s){if(wh(i)){var a=kb(e,i,o&&t&&t.i!==3&&!lP(t.R,r)?o.concat(r):void 0);if(vU(n,r,a),!wh(a))return;e.m=!1}else s&&n.add(i);if(Xl(i)&&!nk(i)){if(!e.h.D&&e._<1)return;kb(e,i),t&&t.A.l||Mb(e,i)}}function Mb(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&tk(t,n)}function dS(e,t){var n=e[Pr];return(n?Ji(n):e)[t]}function xL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Al(e){e.P||(e.P=!0,e.l&&Al(e.l))}function fS(e){e.o||(e.o=ek(e.t))}function Pg(e,t,n){var r=QI(t)?rl("MapSet").F(t,n):JI(t)?rl("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Tb(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},u=a,f=dP;s&&(u=[a],f=Pm);var p=Proxy.revocable(u,f),g=p.revoke,v=p.proxy;return a.k=v,a.j=g,v}(t,n):rl("ES5").J(t,n);return(n?n.A:Tb()).p.push(r),r}function Jye(e){return wh(e)||Ya(22,e),function t(n){if(!Xl(n))return n;var r,i=n[Pr],o=qh(n);if(i){if(!i.P&&(i.i<4||!rl("ES5").K(i)))return i.t;i.I=!0,r=bL(n,o),i.I=!1}else r=bL(n,o);return Ch(r,function(s,a){i&&qye(i.t,s)===a||vU(r,s,t(a))}),o===3?new Set(r):r}(e)}function bL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ek(e)}function exe(){function e(a,u){function f(){this.constructor=a}i(a,u),a.prototype=(f.prototype=u.prototype,new f)}function t(a){a.o||(a.R=new Map,a.o=new Map(a.t))}function n(a){a.o||(a.o=new Set,a.t.forEach(function(u){if(Xl(u)){var f=Pg(a.A.h,u,a);a.p.set(u,f),a.o.add(f)}else a.o.add(u)}))}function r(a){a.O&&Ya(3,JSON.stringify(Ji(a)))}var i=function(a,u){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)p.hasOwnProperty(g)&&(f[g]=p[g])})(a,u)},o=function(){function a(f,p){return this[Pr]={i:2,l:p,A:p?p.A:Tb(),P:!1,I:!1,o:void 0,R:void 0,t:f,k:this,C:!1,O:!1},this}e(a,Map);var u=a.prototype;return Object.defineProperty(u,"size",{get:function(){return Ji(this[Pr]).size}}),u.has=function(f){return Ji(this[Pr]).has(f)},u.set=function(f,p){var g=this[Pr];return r(g),Ji(g).has(f)&&Ji(g).get(f)===p||(t(g),Al(g),g.R.set(f,!0),g.o.set(f,p),g.R.set(f,!0)),this},u.delete=function(f){if(!this.has(f))return!1;var p=this[Pr];return r(p),t(p),Al(p),p.t.has(f)?p.R.set(f,!1):p.R.delete(f),p.o.delete(f),!0},u.clear=function(){var f=this[Pr];r(f),Ji(f).size&&(t(f),Al(f),f.R=new Map,Ch(f.t,function(p){f.R.set(p,!1)}),f.o.clear())},u.forEach=function(f,p){var g=this;Ji(this[Pr]).forEach(function(v,b){f.call(p,g.get(b),b,g)})},u.get=function(f){var p=this[Pr];r(p);var g=Ji(p).get(f);if(p.I||!Xl(g)||g!==p.t.get(f))return g;var v=Pg(p.A.h,g,p);return t(p),p.o.set(f,v),v},u.keys=function(){return Ji(this[Pr]).keys()},u.values=function(){var f,p=this,g=this.keys();return(f={})[_x]=function(){return p.values()},f.next=function(){var v=g.next();return v.done?v:{done:!1,value:p.get(v.value)}},f},u.entries=function(){var f,p=this,g=this.keys();return(f={})[_x]=function(){return p.entries()},f.next=function(){var v=g.next();if(v.done)return v;var b=p.get(v.value);return{done:!1,value:[v.value,b]}},f},u[_x]=function(){return this.entries()},a}(),s=function(){function a(f,p){return this[Pr]={i:3,l:p,A:p?p.A:Tb(),P:!1,I:!1,o:void 0,t:f,k:this,p:new Map,O:!1,C:!1},this}e(a,Set);var u=a.prototype;return Object.defineProperty(u,"size",{get:function(){return Ji(this[Pr]).size}}),u.has=function(f){var p=this[Pr];return r(p),p.o?!!p.o.has(f)||!(!p.p.has(f)||!p.o.has(p.p.get(f))):p.t.has(f)},u.add=function(f){var p=this[Pr];return r(p),this.has(f)||(n(p),Al(p),p.o.add(f)),this},u.delete=function(f){if(!this.has(f))return!1;var p=this[Pr];return r(p),n(p),Al(p),p.o.delete(f)||!!p.p.has(f)&&p.o.delete(p.p.get(f))},u.clear=function(){var f=this[Pr];r(f),Ji(f).size&&(n(f),Al(f),f.o.clear())},u.values=function(){var f=this[Pr];return r(f),n(f),f.o.values()},u.entries=function(){var f=this[Pr];return r(f),n(f),f.o.entries()},u.keys=function(){return this.values()},u[_x]=function(){return this.values()},u.forEach=function(f,p){for(var g=this.values(),v=g.next();!v.done;)f.call(p,v.value,v.value,this),v=g.next()},a}();Yye("MapSet",{F:function(a,u){return new o(a,u)},T:function(a,u){return new s(a,u)}})}var _L,Tg,rk=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",txe=typeof Map<"u",nxe=typeof Set<"u",wL=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",yU=rk?Symbol.for("immer-nothing"):((_L={})["immer-nothing"]=!0,_L),CL=rk?Symbol.for("immer-draftable"):"__$immer_draftable",Pr=rk?Symbol.for("immer-state"):"__$immer_state",_x=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",rxe=""+Object.prototype.constructor,ik=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ixe=Object.getOwnPropertyDescriptors||function(e){var t={};return ik(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},uP={},dP={get:function(e,t){if(t===Pr)return e;var n=Ji(e);if(!lP(n,t))return function(i,o,s){var a,u=xL(o,s);return u?"value"in u?u.value:(a=u.get)===null||a===void 0?void 0:a.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Xl(r)?r:r===dS(e.t,t)?(fS(e),e.o[t]=Pg(e.A.h,r,e)):r},has:function(e,t){return t in Ji(e)},ownKeys:function(e){return Reflect.ownKeys(Ji(e))},set:function(e,t,n){var r=xL(Ji(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=dS(Ji(e),t),o=i==null?void 0:i[Pr];if(o&&o.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Zye(n,i)&&(n!==void 0||lP(e.t,t)))return!0;fS(e),Al(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return dS(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,fS(e),Al(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Ji(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ya(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ya(12)}},Pm={};Ch(dP,function(e,t){Pm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Pm.deleteProperty=function(e,t){return Pm.set.call(this,e,t,void 0)},Pm.set=function(e,t,n){return dP.set.call(this,e[0],t,n,e[0])};var oxe=function(){function e(n){var r=this;this.g=wL,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var u=r;return function(T){var I=this;T===void 0&&(T=a);for(var P=arguments.length,M=Array(P>1?P-1:0),D=1;D1?p-1:0),v=1;v=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=rl("Patches").$;return wh(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Ma=new oxe,axe=Ma.produce;Ma.produceWithPatches.bind(Ma);Ma.setAutoFreeze.bind(Ma);Ma.setUseProxies.bind(Ma);Ma.applyPatches.bind(Ma);Ma.createDraft.bind(Ma);Ma.finishDraft.bind(Ma);const sxe=e=>(t,n,r)=>(r.setState=(i,o,...s)=>{const a=typeof i=="function"?axe(i):i;return t(a,o,...s)},e(r.setState,n,r)),pu=sxe,lxe=e=>({selectedSourceConfig:{sourceId:null,dispatcherNumber:null},setSelectedSourceConfig:({pointId:t,sourceId:n,dispatcherNumber:r})=>e(i=>{i.selectedSourceConfig={pointId:t,sourceId:n,dispatcherNumber:r||null}})}),Hd=hu(pu(lxe));class gv{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.push(t),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(n=>n!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Ig=typeof window>"u"||"Deno"in window;function Ga(){}function cxe(e,t){return typeof e=="function"?e(t):e}function fP(e){return typeof e=="number"&&e>=0&&e!==1/0}function xU(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Tm(e,t,n){return g1(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Ic(e,t,n){return g1(e)?[{...t,queryKey:e},n]:[e||{},t]}function SL(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(g1(s)){if(r){if(t.queryHash!==ok(s,t.options))return!1}else if(!Rb(t.queryKey,s))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||o&&!o(t))}function EL(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(g1(o)){if(!t.options.mutationKey)return!1;if(n){if(hd(t.options.mutationKey)!==hd(o))return!1}else if(!Rb(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function ok(e,t){return((t==null?void 0:t.queryKeyHashFn)||hd)(e)}function hd(e){return JSON.stringify(e,(t,n)=>hP(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Rb(e,t){return bU(e,t)}function bU(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!bU(e[n],t[n])):!1}function _U(e,t){if(e===t)return e;const n=TL(e)&&TL(t);if(n||hP(e)&&hP(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let u=0;u"u")return!0;const n=t.prototype;return!(!IL(n)||!n.hasOwnProperty("isPrototypeOf"))}function IL(e){return Object.prototype.toString.call(e)==="[object Object]"}function g1(e){return Array.isArray(e)}function wU(e){return new Promise(t=>{setTimeout(t,e)})}function kL(e){wU(0).then(e)}function uxe(){if(typeof AbortController=="function")return new AbortController}function pP(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?_U(e,t):t}class dxe extends gv{constructor(){super(),this.setup=t=>{if(!Ig&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused=t,t&&this.onFocus()}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ob=new dxe;class fxe extends gv{constructor(){super(),this.setup=t=>{if(!Ig&&window.addEventListener){const n=()=>t();return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online=t,t&&this.onOnline()}onOnline(){this.listeners.forEach(t=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Db=new fxe;function hxe(e){return Math.min(1e3*2**e,3e4)}function v1(e){return(e!=null?e:"online")==="online"?Db.isOnline():!0}class CU{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function p0(e){return e instanceof CU}function SU(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((I,P)=>{o=I,s=P}),u=I=>{r||(b(new CU(I)),e.abort==null||e.abort())},f=()=>{t=!0},p=()=>{t=!1},g=()=>!Ob.isFocused()||e.networkMode!=="always"&&!Db.isOnline(),v=I=>{r||(r=!0,e.onSuccess==null||e.onSuccess(I),i==null||i(),o(I))},b=I=>{r||(r=!0,e.onError==null||e.onError(I),i==null||i(),s(I))},_=()=>new Promise(I=>{i=P=>{const M=r||!g();return M&&I(P),M},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),T=()=>{if(r)return;let I;try{I=e.fn()}catch(P){I=Promise.reject(P)}Promise.resolve(I).then(v).catch(P=>{var M,D;if(r)return;const N=(M=e.retry)!=null?M:3,z=(D=e.retryDelay)!=null?D:hxe,$=typeof z=="function"?z(n,P):z,j=N===!0||typeof N=="number"&&n{if(g())return _()}).then(()=>{t?b(P):T()})})};return v1(e.networkMode)?T():_().then(T),{promise:a,cancel:u,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:f,continueRetry:p}}const ak=console;function pxe(){let e=[],t=0,n=p=>{p()},r=p=>{p()};const i=p=>{let g;t++;try{g=p()}finally{t--,t||a()}return g},o=p=>{t?e.push(p):kL(()=>{n(p)})},s=p=>(...g)=>{o(()=>{p(...g)})},a=()=>{const p=e;e=[],p.length&&kL(()=>{r(()=>{p.forEach(g=>{n(g)})})})};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:p=>{n=p},setBatchNotifyFunction:p=>{r=p}}}const Ai=pxe();class EU{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fP(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Ig?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class mxe extends EU{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||ak,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||gxe(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=pP(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Ga).catch(Ga):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!xU(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.indexOf(t)!==-1&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(_=>_.options.queryFn);b&&this.setOptions(b.options)}Array.isArray(this.options.queryKey);const s=uxe(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};u(a);const f=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),p={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:f};if(u(p),(r=this.options.behavior)==null||r.onFetch(p),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=p.fetchOptions)==null?void 0:i.meta)){var g;this.dispatch({type:"fetch",meta:(g=p.fetchOptions)==null?void 0:g.meta})}const v=b=>{if(p0(b)&&b.silent||this.dispatch({type:"error",error:b}),!p0(b)){var _,T;(_=(T=this.cache.config).onError)==null||_.call(T,b,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=SU({fn:p.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:b=>{var _,T;if(typeof b>"u"){v(new Error("undefined"));return}this.setData(b),(_=(T=this.cache.config).onSuccess)==null||_.call(T,b,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:v,onFail:(b,_)=>{this.dispatch({type:"failed",failureCount:b,error:_})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,o;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:v1(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return p0(s)&&s.revert&&this.revertState?{...this.revertState}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ai.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function gxe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class vxe extends gv{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const o=n.queryKey,s=(i=n.queryHash)!=null?i:ok(o,n);let a=this.get(s);return a||(a=new mxe({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ai.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Ic(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>SL(r,i))}findAll(t,n){const[r]=Ic(t,n);return Object.keys(r).length>0?this.queries.filter(i=>SL(r,i)):this.queries}notify(t){Ai.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ai.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ai.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class yxe extends EU{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||ak,this.observers=[],this.state=t.state||xxe(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var D;return this.retryer=SU({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(N,z)=>{this.dispatch({type:"failed",failureCount:N,error:z})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(D=this.options.retry)!=null?D:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,o,s,a,u;if(!n){var f,p,g,v;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(p=this.mutationCache.config).onMutate)==null?void 0:f.call(p,this.state.variables,this));const N=await((g=(v=this.options).onMutate)==null?void 0:g.call(v,this.state.variables));N!==this.state.context&&this.dispatch({type:"loading",context:N,variables:this.state.variables})}const D=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,D,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,D,this.state.variables,this.state.context)),await((a=(u=this.options).onSettled)==null?void 0:a.call(u,D,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:D}),D}catch(D){try{var b,_,T,I,P,M;throw await((b=(_=this.mutationCache.config).onError)==null?void 0:b.call(_,D,this.state.variables,this.state.context,this)),await((T=(I=this.options).onError)==null?void 0:T.call(I,D,this.state.variables,this.state.context)),await((P=(M=this.options).onSettled)==null?void 0:P.call(M,void 0,D,this.state.variables,this.state.context)),D}finally{this.dispatch({type:"error",error:D})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!v1(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ai.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function xxe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class bxe extends gv{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new yxe({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Ai.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>EL(t,n))}findAll(t){return this.mutations.filter(n=>EL(t,n))}notify(t){Ai.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return Ai.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(Ga)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function _xe(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,f=u==null?void 0:u.pageParam,p=(u==null?void 0:u.direction)==="forward",g=(u==null?void 0:u.direction)==="backward",v=((o=e.state.data)==null?void 0:o.pages)||[],b=((s=e.state.data)==null?void 0:s.pageParams)||[];let _=b,T=!1;const I=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var j;if((j=e.signal)!=null&&j.aborted)T=!0;else{var U;(U=e.signal)==null||U.addEventListener("abort",()=>{T=!0})}return e.signal}})},P=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),M=($,j,U,q)=>(_=q?[j,..._]:[..._,j],q?[U,...$]:[...$,U]),D=($,j,U,q)=>{if(T)return Promise.reject("Cancelled");if(typeof U>"u"&&!j&&$.length)return Promise.resolve($);const Y={queryKey:e.queryKey,pageParam:U,meta:e.options.meta};I(Y);const te=P(Y);return Promise.resolve(te).then(X=>M($,U,X,q))};let N;if(!v.length)N=D([]);else if(p){const $=typeof f<"u",j=$?f:ML(e.options,v);N=D(v,$,j)}else if(g){const $=typeof f<"u",j=$?f:wxe(e.options,v);N=D(v,$,j,!0)}else{_=[];const $=typeof e.options.getNextPageParam>"u";N=(a&&v[0]?a(v[0],0,v):!0)?D([],$,b[0]):Promise.resolve(M([],b[0],v[0]));for(let U=1;U{if(a&&v[U]?a(v[U],U,v):!0){const te=$?b[U]:ML(e.options,q);return D(q,$,te)}return Promise.resolve(M(q,b[U],v[U]))})}return N.then($=>({pages:$,pageParams:_}))}}}}function ML(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function wxe(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Cxe{constructor(t={}){this.queryCache=t.queryCache||new vxe,this.mutationCache=t.mutationCache||new bxe,this.logger=t.logger||ak,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ob.subscribe(()=>{Ob.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Db.subscribe(()=>{Db.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Ic(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=Tm(t,n,r),o=this.getQueryData(i.queryKey);return o?Promise.resolve(o):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),o=i==null?void 0:i.state.data,s=cxe(n,o);if(typeof s>"u")return;const a=Tm(t),u=this.defaultQueryOptions(a);return this.queryCache.build(this,u).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return Ai.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Ic(t,n),i=this.queryCache;Ai.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(t,n,r){const[i,o]=Ic(t,n,r),s=this.queryCache,a={type:"active",...i};return Ai.batch(()=>(s.findAll(i).forEach(u=>{u.reset()}),this.refetchQueries(a,o)))}cancelQueries(t,n,r){const[i,o={}]=Ic(t,n,r);typeof o.revert>"u"&&(o.revert=!0);const s=Ai.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(o)));return Promise.all(s).then(Ga).catch(Ga)}invalidateQueries(t,n,r){const[i,o]=Ic(t,n,r);return Ai.batch(()=>{var s,a;if(this.queryCache.findAll(i).forEach(f=>{f.invalidate()}),i.refetchType==="none")return Promise.resolve();const u={...i,type:(s=(a=i.refetchType)!=null?a:i.type)!=null?s:"active"};return this.refetchQueries(u,o)})}refetchQueries(t,n,r){const[i,o]=Ic(t,n,r),s=Ai.batch(()=>this.queryCache.findAll(i).filter(u=>!u.isDisabled()).map(u=>{var f;return u.fetch(void 0,{...o,cancelRefetch:(f=o==null?void 0:o.cancelRefetch)!=null?f:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(s).then(Ga);return o!=null&&o.throwOnError||(a=a.catch(Ga)),a}fetchQuery(t,n,r){const i=Tm(t,n,r),o=this.defaultQueryOptions(i);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Ga).catch(Ga)}fetchInfiniteQuery(t,n,r){const i=Tm(t,n,r);return i.behavior=_xe(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Ga).catch(Ga)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>hd(t)===hd(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Rb(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>hd(t)===hd(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Rb(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=ok(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class Sxe extends gv{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),RL(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return mP(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mP(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),PL(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const o=this.hasListeners();o&&OL(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ga)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Ig||this.currentResult.isStale||!fP(this.options.staleTime))return;const n=xU(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Ig||this.options.enabled===!1||!fP(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ob.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,u=t!==r,f=u?t.state:this.currentQueryInitialState,p=u?this.currentResult:this.previousQueryResult,{state:g}=t;let{dataUpdatedAt:v,error:b,errorUpdatedAt:_,fetchStatus:T,status:I}=g,P=!1,M=!1,D;if(n._optimisticResults){const U=this.hasListeners(),q=!U&&RL(t,n),Y=U&&OL(t,r,n,i);(q||Y)&&(T=v1(t.options.networkMode)?"fetching":"paused",v||(I="loading")),n._optimisticResults==="isRestoring"&&(T="idle")}if(n.keepPreviousData&&!g.dataUpdatedAt&&p!=null&&p.isSuccess&&I!=="error")D=p.data,v=p.dataUpdatedAt,I=p.status,P=!0;else if(n.select&&typeof g.data<"u")if(o&&g.data===(s==null?void 0:s.data)&&n.select===this.selectFn)D=this.selectResult;else try{this.selectFn=n.select,D=n.select(g.data),D=pP(o==null?void 0:o.data,D,n),this.selectResult=D,this.selectError=null}catch(U){this.selectError=U}else D=g.data;if(typeof n.placeholderData<"u"&&typeof D>"u"&&I==="loading"){let U;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))U=o.data;else if(U=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof U<"u")try{U=n.select(U),this.selectError=null}catch(q){this.selectError=q}typeof U<"u"&&(I="success",D=pP(o==null?void 0:o.data,U,n),M=!0)}this.selectError&&(b=this.selectError,D=this.selectResult,_=Date.now(),I="error");const N=T==="fetching",z=I==="loading",$=I==="error";return{status:I,fetchStatus:T,isLoading:z,isSuccess:I==="success",isError:$,isInitialLoading:z&&N,data:D,dataUpdatedAt:v,error:b,errorUpdatedAt:_,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:N,isRefetching:N&&!z,isLoadingError:$&&g.dataUpdatedAt===0,isPaused:T==="paused",isPlaceholderData:M,isPreviousData:P,isRefetchError:$&&g.dataUpdatedAt!==0,isStale:sk(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,PL(r,n))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options;if(s==="all"||!s&&!this.trackedProps.size)return!0;const a=new Set(s!=null?s:this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(u=>{const f=u;return this.currentResult[f]!==n[f]&&a.has(f)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!p0(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){Ai.batch(()=>{if(t.onSuccess){var n,r,i,o;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(t.onError){var s,a,u,f;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(u=(f=this.options).onSettled)==null||u.call(f,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(p=>{p(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Exe(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function RL(e,t){return Exe(e,t)||e.state.dataUpdatedAt>0&&mP(e,t,t.refetchOnMount)}function mP(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&sk(e,t)}return!1}function OL(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&sk(e,n)}function sk(e,t){return e.isStaleByTime(t.staleTime)}const Pxe=YI.exports.useSyncExternalStore,DL=E.exports.createContext(void 0),PU=E.exports.createContext(!1);function TU(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=DL),window.ReactQueryClientContext):DL)}const IU=({context:e}={})=>{const t=E.exports.useContext(TU(e,E.exports.useContext(PU)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Txe=({client:e,children:t,context:n,contextSharing:r=!1})=>{E.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=TU(n,r);return A(PU.Provider,{value:!n&&r,children:A(i.Provider,{value:e,children:t})})},kU=E.exports.createContext(!1),Ixe=()=>E.exports.useContext(kU);kU.Provider;function kxe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Mxe=E.exports.createContext(kxe()),Rxe=()=>E.exports.useContext(Mxe);function Oxe(e,t){return typeof e=="function"?e(...t):!!e}const Dxe=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Axe=e=>{E.exports.useEffect(()=>{e.clearReset()},[e])},Nxe=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Oxe(n,[e.error,r]),Lxe=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},zxe=(e,t)=>e.isLoading&&e.isFetching&&!t,Fxe=(e,t,n)=>(e==null?void 0:e.suspense)&&zxe(t,n),$xe=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function Bxe(e,t){const n=IU({context:e.context}),r=Ixe(),i=Rxe(),o=n.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=Ai.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=Ai.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=Ai.batchCalls(o.onSettled)),Lxe(o),Dxe(o,i),Axe(i);const[s]=E.exports.useState(()=>new t(n,o)),a=s.getOptimisticResult(o);if(Pxe(E.exports.useCallback(u=>r?()=>{}:s.subscribe(Ai.batchCalls(u)),[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),E.exports.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),Fxe(o,a,r))throw $xe(o,s,i);if(Nxe({result:a,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw a.error;return o.notifyOnChangeProps?a:s.trackResult(a)}function tc(e,t,n){const r=Tm(e,t,n);return Bxe(r,Sxe)}function MU(e,t){return function(){return e.apply(t,arguments)}}const{toString:RU}=Object.prototype,{getPrototypeOf:lk}=Object,ck=(e=>t=>{const n=RU.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nc=e=>(e=e.toLowerCase(),t=>ck(t)===e),y1=e=>t=>typeof t===e,{isArray:Zh}=Array,kg=y1("undefined");function Vxe(e){return e!==null&&!kg(e)&&e.constructor!==null&&!kg(e.constructor)&&ou(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const OU=nc("ArrayBuffer");function Uxe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&OU(e.buffer),t}const jxe=y1("string"),ou=y1("function"),DU=y1("number"),uk=e=>e!==null&&typeof e=="object",Hxe=e=>e===!0||e===!1,m0=e=>{if(ck(e)!=="object")return!1;const t=lk(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kxe=nc("Date"),Wxe=nc("File"),Gxe=nc("Blob"),qxe=nc("FileList"),Zxe=e=>uk(e)&&ou(e.pipe),Xxe=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||RU.call(e)===t||ou(e.toString)&&e.toString()===t)},Yxe=nc("URLSearchParams"),Qxe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vv(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Zh(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const NU=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),LU=e=>!kg(e)&&e!==NU;function gP(){const{caseless:e}=LU(this)&&this||{},t={},n=(r,i)=>{const o=e&&AU(t,i)||i;m0(t[o])&&m0(r)?t[o]=gP(t[o],r):m0(r)?t[o]=gP({},r):Zh(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(vv(t,(i,o)=>{n&&ou(i)?e[o]=MU(i,n):e[o]=i},{allOwnKeys:r}),e),e0e=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),t0e=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},n0e=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&lk(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},r0e=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},i0e=e=>{if(!e)return null;if(Zh(e))return e;let t=e.length;if(!DU(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},o0e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&lk(Uint8Array)),a0e=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},s0e=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},l0e=nc("HTMLFormElement"),c0e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),AL=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),u0e=nc("RegExp"),zU=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};vv(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},d0e=e=>{zU(e,(t,n)=>{if(ou(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(!!ou(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},f0e=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Zh(e)?r(e):r(String(e).split(t)),n},h0e=()=>{},p0e=(e,t)=>(e=+e,Number.isFinite(e)?e:t),hS="abcdefghijklmnopqrstuvwxyz",NL="0123456789",FU={DIGIT:NL,ALPHA:hS,ALPHA_DIGIT:hS+hS.toUpperCase()+NL},m0e=(e=16,t=FU.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function g0e(e){return!!(e&&ou(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const v0e=e=>{const t=new Array(10),n=(r,i)=>{if(uk(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Zh(r)?[]:{};return vv(r,(s,a)=>{const u=n(s,i+1);!kg(u)&&(o[a]=u)}),t[i]=void 0,o}}return r};return n(e,0)},Nt={isArray:Zh,isArrayBuffer:OU,isBuffer:Vxe,isFormData:Xxe,isArrayBufferView:Uxe,isString:jxe,isNumber:DU,isBoolean:Hxe,isObject:uk,isPlainObject:m0,isUndefined:kg,isDate:Kxe,isFile:Wxe,isBlob:Gxe,isRegExp:u0e,isFunction:ou,isStream:Zxe,isURLSearchParams:Yxe,isTypedArray:o0e,isFileList:qxe,forEach:vv,merge:gP,extend:Jxe,trim:Qxe,stripBOM:e0e,inherits:t0e,toFlatObject:n0e,kindOf:ck,kindOfTest:nc,endsWith:r0e,toArray:i0e,forEachEntry:a0e,matchAll:s0e,isHTMLForm:l0e,hasOwnProperty:AL,hasOwnProp:AL,reduceDescriptors:zU,freezeMethods:d0e,toObjectSet:f0e,toCamelCase:c0e,noop:h0e,toFiniteNumber:p0e,findKey:AU,global:NU,isContextDefined:LU,ALPHABET:FU,generateString:m0e,isSpecCompliantForm:g0e,toJSONObject:v0e};function vr(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}Nt.inherits(vr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Nt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const $U=vr.prototype,BU={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{BU[e]={value:e}});Object.defineProperties(vr,BU);Object.defineProperty($U,"isAxiosError",{value:!0});vr.from=(e,t,n,r,i,o)=>{const s=Object.create($U);return Nt.toFlatObject(e,s,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),vr.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const y0e=null;function vP(e){return Nt.isPlainObject(e)||Nt.isArray(e)}function VU(e){return Nt.endsWith(e,"[]")?e.slice(0,-2):e}function LL(e,t,n){return e?e.concat(t).map(function(i,o){return i=VU(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function x0e(e){return Nt.isArray(e)&&!e.some(vP)}const b0e=Nt.toFlatObject(Nt,{},null,function(t){return/^is[A-Z]/.test(t)});function x1(e,t,n){if(!Nt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Nt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,I){return!Nt.isUndefined(I[T])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Nt.isSpecCompliantForm(t);if(!Nt.isFunction(i))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(Nt.isDate(_))return _.toISOString();if(!u&&Nt.isBlob(_))throw new vr("Blob is not supported. Use a Buffer instead.");return Nt.isArrayBuffer(_)||Nt.isTypedArray(_)?u&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,T,I){let P=_;if(_&&!I&&typeof _=="object"){if(Nt.endsWith(T,"{}"))T=r?T:T.slice(0,-2),_=JSON.stringify(_);else if(Nt.isArray(_)&&x0e(_)||(Nt.isFileList(_)||Nt.endsWith(T,"[]"))&&(P=Nt.toArray(_)))return T=VU(T),P.forEach(function(D,N){!(Nt.isUndefined(D)||D===null)&&t.append(s===!0?LL([T],N,o):s===null?T:T+"[]",f(D))}),!1}return vP(_)?!0:(t.append(LL(I,T,o),f(_)),!1)}const g=[],v=Object.assign(b0e,{defaultVisitor:p,convertValue:f,isVisitable:vP});function b(_,T){if(!Nt.isUndefined(_)){if(g.indexOf(_)!==-1)throw Error("Circular reference detected in "+T.join("."));g.push(_),Nt.forEach(_,function(P,M){(!(Nt.isUndefined(P)||P===null)&&i.call(t,P,Nt.isString(M)?M.trim():M,T,v))===!0&&b(P,T?T.concat(M):[M])}),g.pop()}}if(!Nt.isObject(e))throw new TypeError("data must be an object");return b(e),t}function zL(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function dk(e,t){this._pairs=[],e&&x1(e,this,t)}const UU=dk.prototype;UU.append=function(t,n){this._pairs.push([t,n])};UU.toString=function(t){const n=t?function(r){return t.call(this,r,zL)}:zL;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function _0e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function jU(e,t,n){if(!t)return e;const r=n&&n.encode||_0e,i=n&&n.serialize;let o;if(i?o=i(t,n):o=Nt.isURLSearchParams(t)?t.toString():new dk(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class w0e{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Nt.forEach(this.handlers,function(r){r!==null&&t(r)})}}const FL=w0e,HU={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},C0e=typeof URLSearchParams<"u"?URLSearchParams:dk,S0e=typeof FormData<"u"?FormData:null,E0e=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),P0e=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Js={isBrowser:!0,classes:{URLSearchParams:C0e,FormData:S0e,Blob},isStandardBrowserEnv:E0e,isStandardBrowserWebWorkerEnv:P0e,protocols:["http","https","file","blob","url","data"]};function T0e(e,t){return x1(e,new Js.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Js.isNode&&Nt.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function I0e(e){return Nt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function k0e(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&Nt.isArray(i)?i.length:s,u?(Nt.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!Nt.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&Nt.isArray(i[s])&&(i[s]=k0e(i[s])),!a)}if(Nt.isFormData(e)&&Nt.isFunction(e.entries)){const n={};return Nt.forEachEntry(e,(r,i)=>{t(I0e(r),i,n,0)}),n}return null}const M0e={"Content-Type":void 0};function R0e(e,t,n){if(Nt.isString(e))try{return(t||JSON.parse)(e),Nt.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const b1={transitional:HU,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=Nt.isObject(t);if(o&&Nt.isHTMLForm(t)&&(t=new FormData(t)),Nt.isFormData(t))return i&&i?JSON.stringify(KU(t)):t;if(Nt.isArrayBuffer(t)||Nt.isBuffer(t)||Nt.isStream(t)||Nt.isFile(t)||Nt.isBlob(t))return t;if(Nt.isArrayBufferView(t))return t.buffer;if(Nt.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return T0e(t,this.formSerializer).toString();if((a=Nt.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return x1(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),R0e(t)):t}],transformResponse:[function(t){const n=this.transitional||b1.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&Nt.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?vr.from(a,vr.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Js.classes.FormData,Blob:Js.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Nt.forEach(["delete","get","head"],function(t){b1.headers[t]={}});Nt.forEach(["post","put","patch"],function(t){b1.headers[t]=Nt.merge(M0e)});const fk=b1,O0e=Nt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),D0e=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&O0e[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$L=Symbol("internals");function cm(e){return e&&String(e).trim().toLowerCase()}function g0(e){return e===!1||e==null?e:Nt.isArray(e)?e.map(g0):String(e)}function A0e(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function N0e(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function pS(e,t,n,r,i){if(Nt.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Nt.isString(t)){if(Nt.isString(r))return t.indexOf(r)!==-1;if(Nt.isRegExp(r))return r.test(t)}}function L0e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function z0e(e,t){const n=Nt.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class _1{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,u,f){const p=cm(u);if(!p)throw new Error("header name must be a non-empty string");const g=Nt.findKey(i,p);(!g||i[g]===void 0||f===!0||f===void 0&&i[g]!==!1)&&(i[g||u]=g0(a))}const s=(a,u)=>Nt.forEach(a,(f,p)=>o(f,p,u));return Nt.isPlainObject(t)||t instanceof this.constructor?s(t,n):Nt.isString(t)&&(t=t.trim())&&!N0e(t)?s(D0e(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=cm(t),t){const r=Nt.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return A0e(i);if(Nt.isFunction(n))return n.call(this,i,r);if(Nt.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=cm(t),t){const r=Nt.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=cm(s),s){const a=Nt.findKey(r,s);a&&(!n||pS(r,r[a],a,n))&&(delete r[a],i=!0)}}return Nt.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||pS(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return Nt.forEach(this,(i,o)=>{const s=Nt.findKey(r,o);if(s){n[s]=g0(i),delete n[o];return}const a=t?L0e(o):String(o).trim();a!==o&&delete n[o],n[a]=g0(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Nt.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Nt.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[$L]=this[$L]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=cm(s);r[a]||(z0e(i,s),r[a]=!0)}return Nt.isArray(t)?t.forEach(o):o(t),this}}_1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Nt.freezeMethods(_1.prototype);Nt.freezeMethods(_1);const Hl=_1;function mS(e,t){const n=this||fk,r=t||n,i=Hl.from(r.headers);let o=r.data;return Nt.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function WU(e){return!!(e&&e.__CANCEL__)}function yv(e,t,n){vr.call(this,e==null?"canceled":e,vr.ERR_CANCELED,t,n),this.name="CanceledError"}Nt.inherits(yv,vr,{__CANCEL__:!0});function F0e(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new vr("Request failed with status code "+n.status,[vr.ERR_BAD_REQUEST,vr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const $0e=Js.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,s,a){const u=[];u.push(n+"="+encodeURIComponent(r)),Nt.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),Nt.isString(o)&&u.push("path="+o),Nt.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function B0e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function V0e(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function GU(e,t){return e&&!B0e(t)?V0e(e,t):t}const U0e=Js.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=Nt.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function j0e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function H0e(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(u){const f=Date.now(),p=r[o];s||(s=f),n[i]=u,r[i]=f;let g=o,v=0;for(;g!==i;)v+=n[g++],g=g%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-s{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,u=r(a),f=o<=s;n=o;const p={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&f?(s-o)/u:void 0,event:i};p[t?"download":"upload"]=!0,e(p)}}const K0e=typeof XMLHttpRequest<"u",W0e=K0e&&function(e){return new Promise(function(n,r){let i=e.data;const o=Hl.from(e.headers).normalize(),s=e.responseType;let a;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}Nt.isFormData(i)&&(Js.isStandardBrowserEnv||Js.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let f=new XMLHttpRequest;if(e.auth){const b=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(b+":"+_))}const p=GU(e.baseURL,e.url);f.open(e.method.toUpperCase(),jU(p,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function g(){if(!f)return;const b=Hl.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};F0e(function(P){n(P),u()},function(P){r(P),u()},T),f=null}if("onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(g)},f.onabort=function(){!f||(r(new vr("Request aborted",vr.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new vr("Network Error",vr.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const T=e.transitional||HU;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),r(new vr(_,T.clarifyTimeoutError?vr.ETIMEDOUT:vr.ECONNABORTED,e,f)),f=null},Js.isStandardBrowserEnv){const b=(e.withCredentials||U0e(p))&&e.xsrfCookieName&&$0e.read(e.xsrfCookieName);b&&o.set(e.xsrfHeaderName,b)}i===void 0&&o.setContentType(null),"setRequestHeader"in f&&Nt.forEach(o.toJSON(),function(_,T){f.setRequestHeader(T,_)}),Nt.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),s&&s!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",BL(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",BL(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=b=>{!f||(r(!b||b.type?new yv(null,e,f):b),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const v=j0e(p);if(v&&Js.protocols.indexOf(v)===-1){r(new vr("Unsupported protocol "+v+":",vr.ERR_BAD_REQUEST,e));return}f.send(i||null)})},v0={http:y0e,xhr:W0e};Nt.forEach(v0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const G0e={getAdapter:e=>{e=Nt.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;ie instanceof Hl?e.toJSON():e;function Sh(e,t){t=t||{};const n={};function r(f,p,g){return Nt.isPlainObject(f)&&Nt.isPlainObject(p)?Nt.merge.call({caseless:g},f,p):Nt.isPlainObject(p)?Nt.merge({},p):Nt.isArray(p)?p.slice():p}function i(f,p,g){if(Nt.isUndefined(p)){if(!Nt.isUndefined(f))return r(void 0,f,g)}else return r(f,p,g)}function o(f,p){if(!Nt.isUndefined(p))return r(void 0,p)}function s(f,p){if(Nt.isUndefined(p)){if(!Nt.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function a(f,p,g){if(g in t)return r(f,p);if(g in e)return r(void 0,f)}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(f,p)=>i(UL(f),UL(p),!0)};return Nt.forEach(Object.keys(e).concat(Object.keys(t)),function(p){const g=u[p]||i,v=g(e[p],t[p],p);Nt.isUndefined(v)&&g!==a||(n[p]=v)}),n}const qU="1.3.3",hk={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hk[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const jL={};hk.transitional=function(t,n,r){function i(o,s){return"[Axios v"+qU+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new vr(i(s," has been removed"+(n?" in "+n:"")),vr.ERR_DEPRECATED);return n&&!jL[s]&&(jL[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function q0e(e,t,n){if(typeof e!="object")throw new vr("options must be an object",vr.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],u=a===void 0||s(a,o,e);if(u!==!0)throw new vr("option "+o+" must be "+u,vr.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new vr("Unknown option "+o,vr.ERR_BAD_OPTION)}}const yP={assertOptions:q0e,validators:hk},Cc=yP.validators;class Ab{constructor(t){this.defaults=t,this.interceptors={request:new FL,response:new FL}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Sh(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&yP.assertOptions(r,{silentJSONParsing:Cc.transitional(Cc.boolean),forcedJSONParsing:Cc.transitional(Cc.boolean),clarifyTimeoutError:Cc.transitional(Cc.boolean)},!1),i!==void 0&&yP.assertOptions(i,{encode:Cc.function,serialize:Cc.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=o&&Nt.merge(o.common,o[n.method]),s&&Nt.forEach(["delete","get","head","post","put","patch","common"],_=>{delete o[_]}),n.headers=Hl.concat(s,o);const a=[];let u=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(n)===!1||(u=u&&T.synchronous,a.unshift(T.fulfilled,T.rejected))});const f=[];this.interceptors.response.forEach(function(T){f.push(T.fulfilled,T.rejected)});let p,g=0,v;if(!u){const _=[VL.bind(this),void 0];for(_.unshift.apply(_,a),_.push.apply(_,f),v=_.length,p=Promise.resolve(n);g{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new yv(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new pk(function(i){t=i}),cancel:t}}}const Z0e=pk;function X0e(e){return function(n){return e.apply(null,n)}}function Y0e(e){return Nt.isObject(e)&&e.isAxiosError===!0}const xP={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xP).forEach(([e,t])=>{xP[t]=e});const Q0e=xP;function ZU(e){const t=new y0(e),n=MU(y0.prototype.request,t);return Nt.extend(n,y0.prototype,t,{allOwnKeys:!0}),Nt.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ZU(Sh(e,i))},n}const Wi=ZU(fk);Wi.Axios=y0;Wi.CanceledError=yv;Wi.CancelToken=Z0e;Wi.isCancel=WU;Wi.VERSION=qU;Wi.toFormData=x1;Wi.AxiosError=vr;Wi.Cancel=Wi.CanceledError;Wi.all=function(t){return Promise.all(t)};Wi.spread=X0e;Wi.isAxiosError=Y0e;Wi.mergeConfig=Sh;Wi.AxiosHeaders=Hl;Wi.formToJSON=e=>KU(Nt.isHTMLForm(e)?new FormData(e):e);Wi.HttpStatusCode=Q0e;Wi.default=Wi;const J0e=Wi,Nb="https://geoenergy.spatialsystems.ru",as=J0e.create({baseURL:Nb}),XU=(e,t)=>{const n=e||new URLSearchParams;return t&&(t.type==="ao"&&n.append("district[]",t.id),t.type==="rayon"&&n.append("rayon",t.id)),n},ebe=async(e,t,n)=>{const r=XU(e,t),{data:i}=await as.get(`/api/data/?${r.toString()}`,{signal:n});return i},tbe=async(e,t)=>{const n=XU(e,t),{data:r}=await as.get(`/api/data/to_csv/?${n.toString()}`,{responseType:"arraybuffer"});return r},nbe=async e=>{const{data:t}=await as.get(`/default_data/templates/${e}.xlsx`,{responseType:"arraybuffer"});return t},rbe=async(e,t,n=!1)=>{const r=new FormData;r.append("file",e),r.append("model",t),r.append("refill",n);const{data:i}=await as.post("/api/import_file/",r);return i},ibe=async()=>{const{data:e}=await as.get("/api/data/start_ds_miracle");return e};function obe(e){let t;try{t=e()}catch{return}return{getItem:r=>{var i;const o=a=>a===null?null:JSON.parse(a),s=(i=t.getItem(r))!=null?i:null;return s instanceof Promise?s.then(o):o(s)},setItem:(r,i)=>t.setItem(r,JSON.stringify(i)),removeItem:r=>t.removeItem(r)}}const Mg=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Mg(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Mg(r)(n)}}}},abe=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:I=>I,version:0,merge:(I,P)=>({...P,...I}),...t},s=!1;const a=new Set,u=new Set;let f;try{f=o.getStorage()}catch{}if(!f)return e((...I)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...I)},r,i);const p=Mg(o.serialize),g=()=>{const I=o.partialize({...r()});let P;const M=p({state:I,version:o.version}).then(D=>f.setItem(o.name,D)).catch(D=>{P=D});if(P)throw P;return M},v=i.setState;i.setState=(I,P)=>{v(I,P),g()};const b=e((...I)=>{n(...I),g()},r,i);let _;const T=()=>{var I;if(!f)return;s=!1,a.forEach(M=>M(r()));const P=((I=o.onRehydrateStorage)==null?void 0:I.call(o,r()))||void 0;return Mg(f.getItem.bind(f))(o.name).then(M=>{if(M)return o.deserialize(M)}).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==o.version){if(o.migrate)return o.migrate(M.state,M.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return M.state}).then(M=>{var D;return _=o.merge(M,(D=r())!=null?D:b),n(_,!0),g()}).then(()=>{P==null||P(_,void 0),s=!0,u.forEach(M=>M(_))}).catch(M=>{P==null||P(void 0,M)})};return i.persist={setOptions:I=>{o={...o,...I},I.getStorage&&(f=I.getStorage())},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>T(),hasHydrated:()=>s,onHydrate:I=>(a.add(I),()=>{a.delete(I)}),onFinishHydration:I=>(u.add(I),()=>{u.delete(I)})},T(),_||b},sbe=(e,t)=>(n,r,i)=>{let o={storage:obe(()=>localStorage),partialize:T=>T,version:0,merge:(T,I)=>({...I,...T}),...t},s=!1;const a=new Set,u=new Set;let f=o.storage;if(!f)return e((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...T)},r,i);const p=()=>{const T=o.partialize({...r()});return f.setItem(o.name,{state:T,version:o.version})},g=i.setState;i.setState=(T,I)=>{g(T,I),p()};const v=e((...T)=>{n(...T),p()},r,i);let b;const _=()=>{var T;if(!f)return;s=!1,a.forEach(P=>P(r()));const I=((T=o.onRehydrateStorage)==null?void 0:T.call(o,r()))||void 0;return Mg(f.getItem.bind(f))(o.name).then(P=>{if(P)if(typeof P.version=="number"&&P.version!==o.version){if(o.migrate)return o.migrate(P.state,P.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return P.state}).then(P=>{var M;return b=o.merge(P,(M=r())!=null?M:v),n(b,!0),p()}).then(()=>{I==null||I(b,void 0),s=!0,u.forEach(P=>P(b))}).catch(P=>{I==null||I(void 0,P)})};return i.persist={setOptions:T=>{o={...o,...T},T.storage&&(f=T.storage)},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:T=>(a.add(T),()=>{a.delete(T)}),onFinishHydration:T=>(u.add(T),()=>{u.delete(T)})},_(),b||v},lbe=(e,t)=>{var n;return"getStorage"in t||"serialize"in t||"deserialize"in t?(((n={VITE_API_URL:"https://geoenergy.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:n.MODE)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),abe(e,t)):sbe(e,t)},mk=lbe,cbe=e=>({value:0,range:[-25,18],setValue:t=>{e(n=>{n.value=t})},clear:()=>e(t=>{t.value=0})}),ss=hu(mk(pu(cbe),{name:"weather-filter"})),gk=e=>tc(["dzkh-filter-range",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await as.get(`/api/data/filters_ranges/?field=${e}`);return{data:t,isLoading:n||r}},{select:({data:t,isLoading:n})=>{let r;return!t||!t[e]?r=[0,0]:r=[t[e].min,t[e].max],{range:r,isLoading:n}}}),vk=e=>tc(["dzkh-filter-values",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await as.get(`/api/data/filters_ranges/?field=${e}`);return{data:t,isLoading:n||r}},{select:({data:t,isLoading:n})=>t?[...t[e]]:[]}),ube=e=>tc(["dzkh-shap",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await as.get(`/api/data/${e}/data_shap/`);return{data:t,isLoading:n||r}},{select:t=>t.data.shap}),dbe=e=>{const{value:t}=ss();return e?tc(["dzkh-crush",e],async()=>{const{data:n,isInitialLoading:r,isFetching:i}=await as.get(`/api/data/${e}/crush_summary/?current_temp=${t}`);return{data:n,isLoading:r||i}},{select:n=>n.data}):{data:null}};function YU(e,t){const n=window.document.createElement("a");n.href=window.URL.createObjectURL(new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}const td=e=>e==null||e==="",HL=({id:e,modalOpen:t,setModalOpen:n})=>{const{data:r,isLoading:i}=dbe(e);return it("div",{className:"flex flex-col gap-1",children:[A(ad,{className:Td("font-bold"),children:"In the failure area there are:"}),!td(r==null?void 0:r.potreb_count)&&!td(r==null?void 0:r.potreb_soc_count)&&it(ad,{children:[(r==null?void 0:r.potreb_count)+(r==null?void 0:r.potreb_soc_count)," consumers (of which ",r==null?void 0:r.potreb_soc_count," are social facilities)"]}),!td(r==null?void 0:r.total_area)&&it(ad,{children:["Total consumer area - ",Math.ceil(r==null?void 0:r.total_area)," sq. meters"]}),!td(r==null?void 0:r.number_of_apartments)&&it(ad,{children:[r==null?void 0:r.number_of_apartments," apartments"]}),!td(r==null?void 0:r.data_min_cooling_time)&&!td(r==null?void 0:r.min_cooling_time)&&it(ad,{children:["The fastest cooling building is at address ",r==null?void 0:r.data_min_cooling_time.building_address," (",r==null?void 0:r.min_cooling_time," hours)"]})]})},fbe=()=>{const{selectedSourceConfig:e,setSelectedSourceConfig:t}=Hd(),[n,r]=E.exports.useState(!1);if(!e.pointId)return"";const{pointId:i}=e,o=()=>t({sourceId:null,dispatcherNumber:null});return it(nr,{children:[it("div",{className:"absolute bottom-[20px] left-[20px] text-grey z-10 bg-white-background rounded-xl p-3 text-center",children:[A(ul,{text:`Results of Energy source\xA0failure simulation ${e==null?void 0:e.sourceId}`}),it("div",{className:"flex justify-center flex-row gap-2",children:[A(Yr,{type:"primary",onClick:o,children:"Cancel"}),!!i&&A(EB,{content:A(HL,{id:i}),children:A(Yr,{className:"flex justify-center items-center",type:"primary",onClick:()=>r(!0),children:A(Eye,{className:"w-4 h-4"})})})]})]}),!!i&&A(HL,{id:i,modalOpen:n,setModalOpen:r})]})};var hbe=E.exports.createContext({});const QU=hbe;var wx=2,KL=.16,pbe=.05,mbe=.05,gbe=.15,JU=5,e7=4,vbe=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function WL(e){var t=e.r,n=e.g,r=e.b,i=ob(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function Cx(e){var t=e.r,n=e.g,r=e.b;return"#".concat(ab(t,n,r,!1))}function ybe(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function GL(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-wx*t:Math.round(e.h)+wx*t:r=n?Math.round(e.h)+wx*t:Math.round(e.h)-wx*t,r<0?r+=360:r>=360&&(r-=360),r}function qL(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-KL*t:t===e7?r=e.s+KL:r=e.s+pbe*t,r>1&&(r=1),n&&t===JU&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function ZL(e,t,n){var r;return n?r=e.v+mbe*t:r=e.v-gbe*t,r>1&&(r=1),Number(r.toFixed(2))}function bP(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Es(e),i=JU;i>0;i-=1){var o=WL(r),s=Cx(Es({h:GL(o,i,!0),s:qL(o,i,!0),v:ZL(o,i,!0)}));n.push(s)}n.push(Cx(r));for(var a=1;a<=e7;a+=1){var u=WL(r),f=Cx(Es({h:GL(u,a),s:qL(u,a),v:ZL(u,a)}));n.push(f)}return t.theme==="dark"?vbe.map(function(p){var g=p.index,v=p.opacity,b=Cx(ybe(Es(t.backgroundColor||"#141414"),Es(n[g]),v*100));return b}):n}var vS={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},yS={},xS={};Object.keys(vS).forEach(function(e){yS[e]=bP(vS[e]),yS[e].primary=yS[e][5],xS[e]=bP(vS[e],{theme:"dark",backgroundColor:"#141414"}),xS[e].primary=xS[e][5]});function xbe(e,t){Lr(e,"[@ant-design/icons] ".concat(t))}function XL(e){return on(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(on(e.icon)==="object"||typeof e.icon=="function")}function YL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function _P(e,t,n){return n?Un.createElement(e.tag,me(me({key:t},YL(e.attrs)),n),(e.children||[]).map(function(r,i){return _P(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Un.createElement(e.tag,me({key:t},YL(e.attrs)),(e.children||[]).map(function(r,i){return _P(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function t7(e){return bP(e)[0]}function n7(e){return e?Array.isArray(e)?e:[e]:[]}var bbe=` .anticon { display: inline-block; color: inherit; @@ -834,7 +834,7 @@ html body { transform: rotate(360deg); } } -`,_be=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bbe,n=E.exports.useContext(QU),r=n.csp,i=n.prefixCls,o=t;i&&(o=o.replace(/anticon/g,i)),E.exports.useEffect(function(){Jg(o,"@ant-design-icons",{prepend:!0,csp:r})},[])},wbe=["icon","className","onClick","style","primaryColor","secondaryColor"],Zm={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Cbe(e){var t=e.primaryColor,n=e.secondaryColor;Zm.primaryColor=t,Zm.secondaryColor=n||t7(t),Zm.calculated=!!n}function Sbe(){return me({},Zm)}var w1=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,s=t.primaryColor,a=t.secondaryColor,u=kn(t,wbe),f=Zm;if(s&&(f={primaryColor:s,secondaryColor:a||t7(s)}),_be(),xbe(XL(n),"icon should be icon definiton, but got ".concat(n)),!XL(n))return null;var p=n;return p&&typeof p.icon=="function"&&(p=me(me({},p),{},{icon:p.icon(f.primaryColor,f.secondaryColor)})),_P(p.icon,"svg-".concat(p.name),me({className:r,onClick:i,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u))};w1.displayName="IconReact";w1.getTwoToneColors=Sbe;w1.setTwoToneColors=Cbe;const yk=w1;function r7(e){var t=n7(e),n=$e(t,2),r=n[0],i=n[1];return yk.setTwoToneColors({primaryColor:r,secondaryColor:i})}function Ebe(){var e=yk.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Pbe=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];r7("#1890ff");var C1=E.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,o=e.spin,s=e.rotate,a=e.tabIndex,u=e.onClick,f=e.twoToneColor,p=kn(e,Pbe),g=E.exports.useContext(QU),v=g.prefixCls,b=v===void 0?"anticon":v,_=g.rootClassName,T=je(_,b,(n={},ae(n,"".concat(b,"-").concat(i.name),!!i.name),ae(n,"".concat(b,"-spin"),!!o||i.name==="loading"),n),r),I=a;I===void 0&&u&&(I=-1);var P=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,M=n7(f),D=$e(M,2),N=D[0],z=D[1];return A("span",{...me(me({role:"img","aria-label":i.name},p),{},{ref:t,tabIndex:I,onClick:u,className:T}),children:A(yk,{icon:i,primaryColor:N,secondaryColor:z,style:P})})});C1.displayName="AntdIcon";C1.getTwoToneColor=Ebe;C1.setTwoToneColor=r7;const Xh=C1;var i7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:cU})})};i7.displayName="DownloadOutlined";const Tbe=E.exports.forwardRef(i7);var Ibe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const kbe=Ibe;var o7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:kbe})})};o7.displayName="FullscreenExitOutlined";const Mbe=E.exports.forwardRef(o7);var Rbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const Obe=Rbe;var a7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:Obe})})};a7.displayName="FullscreenOutlined";const Dbe=E.exports.forwardRef(a7);var s7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:F6})})};s7.displayName="LoadingOutlined";const Abe=E.exports.forwardRef(s7);var Nbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Lbe=Nbe;var l7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:Lbe})})};l7.displayName="SettingOutlined";const zbe=E.exports.forwardRef(l7);var Fbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};const $be=Fbe;var c7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:$be})})};c7.displayName="UploadOutlined";const u7=E.exports.forwardRef(c7),Bbe=({onClick:e})=>A("div",{className:"absolute top-[20px] left-[20px]",children:A(ka,{title:"Data import",placement:"right",children:A(Yr,{type:"primary",icon:A(u7,{}),onClick:e})})}),Vbe=A(Abe,{style:{fontSize:14},spin:!0}),d7=e=>A(uv,{indicator:Vbe,size:"small",...e}),f7=({taskId:e,onSuccess:t})=>tc(["tasks",e],async()=>{const{data:n}=await as.get(`/api/task/${e}/`);return n},{enabled:e!==null,refetchInterval:1e3,onSuccess:t}),um=({text:e,dataType:t,onSuccess:n,onError:r})=>{const[i,o]=E.exports.useState(!1),[s,a]=E.exports.useState(null),[u,f]=E.exports.useState(!1),[p,g]=E.exports.useState(!1),{data:v,isInitialLoading:b,isFetching:_}=f7({taskId:s,onSuccess:D=>{D.description==="\u0418\u043C\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"&&(a(null),f(!0),n(t))}}),T=b||_;return it("div",{children:[it("div",{className:"space-x-3",children:[A(ka,{title:"Overwrite data",children:A(xh,{checked:i,onChange:D=>o(D.target.checked)})}),A(_ye,{name:"file",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",customRequest:async D=>{const{file:N}=D;try{g(!0);const z=await J0e(N,t,i);z.task_id&&a(z.task_id)}catch(z){r(t),console.error(z)}finally{g(!1)}},itemRender:()=>null,children:A(Yr,{icon:A(u7,{}),children:e})}),A(Yr,{className:"p-0 text-xs text-grey underline h-auto",type:"text",onClick:async()=>{const D=await Q0e(t);await ZU(`${t}_template.xlsx`,D)},children:"Download template"})]}),(()=>{if(!p&&!v&&!u)return null;const N=()=>p?0:u?100:v.progress,z=()=>p?"Data import":u?"Data import completed":v.description;return it("div",{children:[!u&&A(d7,{className:"mr-2"}),A(VI,{percent:N(),status:T?"active":null,size:"small",className:"w-[300px]"}),A(ul,{text:z(),className:"text-xs"})]})})()]})},Ube=({onClose:e})=>{const[t,n]=E.exports.useState(!1),[r,i]=E.exports.useState(!1),[o,s]=E.exports.useState({odpu:null,asupr:null,moek_scheme:null,events:null,houses:null}),[a,u]=E.exports.useState(null),[f,p]=E.exports.useState(!1),{data:g,isInitialLoading:v,isFetching:b}=f7({taskId:a,onSuccess:N=>{N.description==="\u041F\u0420\u041E\u0426\u0415\u0421\u0421\u0418\u041D\u0413 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"&&(u(null),p(!0),e())}}),_=v||b,T=N=>s(z=>({...z,[N]:!0})),I=N=>s(z=>({...z,[N]:!1})),P=Object.values(o).some(N=>N===null||N===!1);return A(X8,{open:!0,title:"Data import",width:400,footer:null,onCancel:e,children:it("div",{className:"text-center space-y-3",children:[A(D$,{message:"Please note that import time can be significant (up to 10 minutes) depending on the size of the input data.",type:"warning",className:"mb-5",showIcon:!0,closable:!0}),A(um,{dataType:"odpu",text:"Select ODPU file",onSuccess:T,onError:I}),A(um,{dataType:"asupr",text:"Select ASUPR file",onSuccess:T,onError:I}),A(um,{dataType:"moek_scheme",text:"Select MOEK file",onSuccess:T,onError:I}),A(um,{dataType:"events",text:"Select events file",onSuccess:T,onError:I}),A(um,{dataType:"houses",text:"Select houses file",onSuccess:T,onError:I}),A(Yr,{className:"mt-5",type:"primary",onClick:async()=>{n(!0);try{const N=await ebe();N.task_id&&u(N.task_id)}catch(N){console.error(N),i(!0)}finally{n(!1)}},loading:t,disabled:P||_,children:"Start data analysis"},"start-upload"),(()=>{if(!t&&!g&&!f)return null;const z=()=>t?0:f?100:g.progress,$=()=>t?"\u041D\u0430\u0447\u0430\u043B\u043E \u0430\u043D\u0430\u043B\u0438\u0437\u0430":f?"Data analysis completed":g.description;return it("div",{children:[!f&&A(d7,{className:"mr-2"}),A(VI,{percent:z(),status:_?"active":null,size:"small",className:"w-[300px]"}),A(ul,{text:$(),className:"text-xs"})]})})(),r&&A("p",{className:"text-red-600",children:"An error occurred"})]})})},jbe=e=>({updateCounter:-1,toggleUpdateCounter:()=>{e(t=>{t.updateCounter=t.updateCounter===-1?1:-1})}}),h7=hu(pu(jbe)),Ci={consumer:"potreb",source:"tp",dispatcher:"ods"},Hbe={[Ci.consumer]:!0,[Ci.source]:!0,[Ci.dispatcher]:!0},Kbe=e=>({isVisible:Hbe,toggleVisibility:t=>e(n=>{n.isVisible[t]=!n.isVisible[t]}),showLayers:t=>e(n=>{t.forEach(r=>{n.isVisible[r]=!0})}),setLayersVisibility:t=>e(n=>{t.forEach(i=>{n.isVisible[i]=!0}),Object.keys(n.isVisible).filter(i=>!t.includes(i)).forEach(i=>{n.isVisible[i]=!1})})}),S1=hu(mk(pu(Kbe),{name:"dzkh/layers-visibility"})),Wbe={ao:"ao_id",rayon:"rayon_id"},xk=e=>E.exports.useMemo(()=>e?["==",["get",Wbe[e.type]],e.id]:null,[e]),Gbe=6,Lb={stops:[[.05,"#fff700"],[.2,"#ffda00"],[.35,"#ffbc00"],[.5,"#ff9d00"],[.65,"#ff7a00"],[.8,"#ff5200"],[.95,"#ff0000"]]},qbe={stops:[[2.8,"#ff0000"],[3.7,"#ff5200"],[4.6,"#ff7a00"],[5.5,"#ff9d00"],[6.4,"#ffbc00"],[7.3,"#ffda00"],[8.2,"#fff700"]]},p7={stops:[[.05,"#fd99ff"],[.2,"#da7ee1"],[.35,"#b964c3"],[.5,"#984ba6"],[.65,"#793389"],[.8,"#5a1a6e"],[.95,"#3d0053"]]},QL={type:"circle",paint:{"circle-stroke-width":.1,"circle-stroke-color":"#262626","circle-opacity":.8}},zb=(e="grey",t=Gbe)=>({...QL,paint:{...QL.paint,"circle-color":e,"circle-radius":["interpolate",["linear"],["zoom"],3,0,10,1,13,t]}}),JL=e=>({type:"symbol",layout:{"icon-image":["coalesce",["image",e],["image","defaultIcon"]],"icon-size":["interpolate",["linear"],["zoom"],3,0,9,.1,13,.5]}}),bS={...zb(),paint:{...zb().paint}},_S={...zb("grey",10),paint:{...zb("grey",10).paint}},m7="#676767",e3={id:"ao",type:"line",source:"ao","source-layer":"public.service_ao",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":m7,"line-width":1.5,"line-opacity":.8}},t3={id:"rayon",type:"line",source:"rayon","source-layer":"public.service_rayon",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":m7,"line-width":.5,"line-opacity":.8}},Zbe={id:"selected-region",type:"line",source:"selected-region",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#CC2222","line-width":4}},wS={region:null,prob1__gt:0,prob1__lt:5e3,prob2__gt:0,prob2__lt:5e3,prob3__gt:0,prob3__lt:5e3,prob4__gt:0,prob4__lt:5e3,prob5__gt:0,prob5__lt:5e3,prob6__gt:0,prob6__lt:5e3,cooling_time__gt:0,cooling_time__lt:5e3,priority__gt:0,priority__lt:5e3},Xbe={prob1:[0,5e3],prob2:[0,5e3],prob3:[0,5e3],prob4:[0,5e3],prob5:[0,5e3],prob6:[0,5e3],cooling_time:[0,5e3],priority:[0,5e3]},Ybe=e=>({filters:wS,consumer_filter:null,consumer_ranges:null,source_filter:null,consumer_type:null,energy_class:null,wall_material:null,ranges:Xbe,setConsumerFilter:(t,n)=>e(r=>{if(!t){r.consumer_filter=null;return}const i=n||r.ranges[t];r.consumer_filter={key:t,gt:i[0],lt:i[1]}}),setSourceFilter:(t,n)=>e(r=>{if(!t){r.source_filter=null;return}const i=n||r.ranges[t];r.source_filter={key:t,gt:i[0],lt:i[1]}}),setRegion:t=>e(n=>{n.filters.region=t}),setConsumerType:t=>e(n=>{n.consumer_type=t}),setEnergyClass:t=>e(n=>{n.energy_class=t}),setWallMaterial:t=>e(n=>{n.wall_material=t}),setFilterWithKey:(t,n)=>e(r=>{r.filters[`${n}__gt`]=t[0],r.filters[`${n}__lt`]=t[1]}),setRanges:t=>e(n=>{n.ranges=t}),clear:t=>e(n=>{if(n.consumer_filter=null,n.source_filter=null,n.energy_class=null,n.consumer_type=null,n.wall_material=null,!t)return n.filters=wS,n;n.filters={...wS,prediction:t.prediction}})}),qi=hu(mk(pu(Ybe),{name:"dzkh/filters"})),Qbe=[{value:"category1",title:"Forecasting",selectable:!1,children:[{value:"prob1",title:"No heating in the building"},{value:"prob2",title:"Leaking pipes in the entrance"},{value:"prob3",title:"Apartment temperature below standard"},{value:"prob4",title:"Common area temperature below standard"},{value:"prob5",title:"Leak in the heating system"}]},{value:"category2",title:"Response",selectable:!1,children:[{value:"cooling_time",title:"Cooling time, h"},{value:"priority",title:"Building priority"}]}],Jbe=()=>{const e={};let t=0;for(let n=-25;n<25;n++)e[n]=t,t++;return e},Vi=Jbe(),e_e=()=>{const{consumer_filter:e,consumer_type:t,energy_class:n,wall_material:r}=qi(),{value:i}=ss(),o=Vi[i];return[...(()=>{const a=[];if(e){const u=`${e.key}_${o}`;a.push([">=",["get",u],e.gt],["<=",["get",u],e.lt])}return t&&a.push(["==",["get","potreb_type"],t.value]),n&&a.push(["==",["get","fi_energy_class"],n.value]),r&&a.push(["==",["get","wall_materials"],r.value]),a})()]},t_e=["==",["get","point_type"],Ci.consumer],n_e=()=>{const{isVisible:e}=S1(),{filters:{region:t},consumer_filter:n}=qi(),r=xk(t),i=e_e(),{selectedSourceConfig:o}=Hd(),{value:s}=ss(),a=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),u=E.exports.useMemo(()=>{if(a)return`${a}_${Vi[s]}`},[a,s]),{data:f,isLoading:p}=gk(u),g=E.exports.useMemo(()=>(f==null?void 0:f.range)||[0,0],[f==null?void 0:f.range]),v=()=>{const P=["all",t_e,...i];return r&&P.push(r),o.sourceId&&P.push(["==",["get","tp_number"],o.sourceId]),P},b=n!=null&&n.key?`${n.key}_${Vi[s]}`:null,_=E.exports.useMemo(()=>n&&n.key.includes("cooling"),[n]),T=E.exports.useMemo(()=>{const P=g[0],D=(g[1]-P)/8;return _?[].concat(Lb.stops).reverse().map((N,z)=>[P+z*D,N[1]]):Lb.stops.map((N,z)=>[P+z*D,N[1]])},[g]),I=b?{...bS.paint,"circle-color":{property:b,stops:T}}:bS.paint;return A(nr,{children:A(ph,{...bS,id:Ci.consumer,source:"points","source-layer":"public.data",layout:{visibility:e[Ci.consumer]?"visible":"none"},filter:v(),paint:I})})},r_e=["==",["get","point_type"],Ci.dispatcher],i_e=()=>{const{isVisible:e}=S1(),{filters:{region:t}}=qi(),n=xk(t),{selectedSourceConfig:r}=Hd(),i=()=>{const o=["all",r_e];return n&&o.push(n),r.sourceId&&o.push(["==",["get","ods_number"],r.dispatcherNumber]),o};return A(nr,{children:A(ph,{type:JL("dispatcherIcon").type,id:Ci.dispatcher,source:"points","source-layer":"public.data",layout:{...JL("dispatcherIcon").layout,visibility:e[Ci.dispatcher]?"visible":"none"},filter:i()})})},o_e=()=>{const{source_filter:e}=qi(),{value:t}=ss(),n=Vi[t];return[...(()=>{if(e){const i=`${e.key}_${n}`;return[[">=",["get",i],e.gt],["<=",["get",i],e.lt]]}return[]})()]},a_e=["==",["get","point_type"],Ci.source],s_e=()=>{const{isVisible:e}=S1(),{filters:{region:t},source_filter:n}=qi(),r=xk(t),i=o_e(),{selectedSourceConfig:o}=Hd(),{value:s}=ss(),a=()=>{const p=["all",a_e,...i];return r&&p.push(r),o.sourceId&&p.push(["==",["get","tp_number"],o.sourceId]),p},u=n!=null&&n.key?`${n.key}_${Vi[s]}`:null,f=u?{..._S.paint,"circle-color":{property:u,stops:p7.stops}}:_S.paint;return A(nr,{children:A(ph,{..._S,id:Ci.source,source:"points","source-layer":"public.data",layout:{visibility:e[Ci.source]?"visible":"none"},filter:a(),paint:f})})},l_e=()=>{const{updateCounter:e}=h7();return A(nr,{children:it(eb,{id:"points",type:"vector",tiles:[`${Nb}/martin/public.data/{z}/{x}/{y}.pbf`],children:[A(s_e,{}),A(n_e,{}),A(i_e,{})]},`points-${e}`)})},c_e=({data:e})=>A(eb,{id:"selected-region",type:"geojson",data:e,children:A(ph,{...Zbe})}),u_e=()=>{const{filters:{region:e}}=qi();return e!=null&&e.geometry?A(c_e,{data:e.geometry}):null},d_e=()=>it(nr,{children:[A(eb,{id:"ao",type:"vector",tiles:[`${Nb}/martin/public.service_ao/{z}/{x}/{y}.pbf`],children:A(ph,{...e3,layout:{...e3.layout}})}),A(eb,{id:"rayon",type:"vector",tiles:[`${Nb}/martin/public.service_rayon/{z}/{x}/{y}.pbf`],children:A(ph,{...t3,layout:{...t3.layout}})}),A(u_e,{}),A(l_e,{})]}),g7="/assets/circle.48dd350a.svg",CS=({color:e,imageSrc:t,name:n,border:r})=>it("div",{className:"flex gap-2 items-center",children:[t&&A(Tae,{src:t,width:18,height:18,className:"flex items-center",preview:!1}),e&&!t&&A("span",{className:"w-4 h-[100%] flex items-center justify-center",children:A("span",{className:`rounded-xl w-3 h-3 inline-block ${r&&"border-black border-[1px] border-solid"}`,style:{backgroundColor:e}})}),A("span",{className:"text-xs text-grey",children:n})]}),n3=({colors:e,name:t,desc:n})=>it("div",{children:[A("span",{className:"text-xs text-grey",children:t}),A("div",{className:"w-[200px]",children:A("div",{className:"w-full h-[10px] rounded-xl",style:{background:`linear-gradient(to right, ${e.join(",")})`}})}),it("span",{className:"text-xs text-grey italic",children:[n," \u2192"]})]});Lb.stops.map(e=>e[1]);const f_e=p7.stops.map(e=>e[1]);function h_e(){const{toggleVisibility:e,isVisible:t}=S1(),{consumer_filter:n,source_filter:r}=qi(),i=E.exports.useMemo(()=>n&&n.key.includes("cooling"),[n]),o=E.exports.useMemo(()=>i?qbe.stops.map(s=>s[1]):Lb.stops.map(s=>s[1]),[i]);return A("div",{className:"absolute bottom-[20px] right-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:A("div",{children:it("div",{className:"space-y-2 flex flex-col",children:[A(Gm,{className:"!ml-0",onChange:()=>e(Ci.consumer),checked:t[Ci.consumer],children:n?A(n3,{colors:o,name:"Consumer",desc:n.key.includes("prob")?"failure likelihood":n.key.includes("cooling_time")?"cooling time, h":"building priority"}):A(CS,{name:"Consumer"})}),A(Gm,{className:"!ml-0",onChange:()=>e(Ci.source),checked:t[Ci.source],children:r?A(n3,{colors:f_e,name:"Source",desc:"failure likelihood"}):A(CS,{name:"Source"})}),A(Gm,{className:"!ml-0 flex items-center",onChange:()=>e(Ci.dispatcher),checked:t[Ci.dispatcher],children:A(CS,{name:"Dispatch center",imageSrc:g7})})]})})})}const Nl=({value:e})=>A("span",{className:"text-grey text-xs bg-white-background-light",children:e}),r3=(e,t)=>{if(Array.isArray(t)){const[n,r]=t;return{...e,[n]:A(Nl,{value:n}),[r]:A(Nl,{value:r})}}else return{...e,[t]:A(Nl,{value:t})}},bk=({title:e,value:t,onChange:n,onAfterChange:r,min:i=0,max:o=100,range:s=!1,step:a=1,disabled:u=!1,onMouseEnter:f,onMouseLeave:p,showZeroMark:g=!1})=>{const v={[i]:A(Nl,{value:i}),[o]:A(Nl,{value:o})},[b,_]=E.exports.useState(t),[T,I]=E.exports.useState(r3(v,t));E.exports.useEffect(()=>{_(t),I(r3(v,t))},[t]);const P=N=>{if(Array.isArray(N)){const[z,$]=N;I({...v,[z]:A(Nl,{value:z}),[$]:A(Nl,{value:$})})}else I({...v,[N]:A(Nl,{value:N})});r==null||r(N)},M=N=>{_(N),n==null||n(N)},D=g?{...T,0:A(Nl,{value:0})}:T;return it("div",{onMouseEnter:f,onMouseLeave:p,children:[A(ul,{text:e}),A(Sle,{range:s,value:b,marks:D,onChange:M,onAfterChange:P,min:i,max:o,step:a,disabled:u})]})},p_e=({disabled:e,fullRange:t,isLoading:n})=>{const{value:r,setValue:i,range:o}=ss();return n?A("div",{className:"flex justify-center items-center",children:A(uv,{})}):A("div",{className:"absolute w-[200px] top-[20px] right-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:A(bk,{title:"Outdoor air temperature",value:r,onAfterChange:i,min:o[0],max:o[1]})})},i3=[{name:"dispatcherIcon",url:g7}];function m_e(e,t,n){n===void 0&&(n={});var r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function g_e(e,t,n){n===void 0&&(n={});for(var r=0,i=e;rn[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]e.reduce((t,n)=>(t[n.name]=n,t[n.name].type="ao",n.rayons&&n.rayons.forEach(r=>{t[r.name]=r,t[r.name].type="rayon"}),t),{}),_k=()=>tc(["regions"],async()=>{const{data:e}=await as.get("/api/ao_rayons/");return e},{select:e=>({raw:e,normalized:v_e(e)}),refetchOnWindowFocus:!1,refetchOnMount:!1}),y_e=({disabled:e,value:t,onChange:n})=>{const{map:r}=B5(),{data:i,isInitialLoading:o}=_k();return it("div",{children:[A(ul,{text:"District / area"}),A(f1,{showSearch:!0,style:{width:"100%"},value:t,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"Select district or area",allowClear:!0,treeDefaultExpandAll:!1,onChange:u=>{if(!u)return;const f=i.normalized[u],p=xv.exports(f.polygon),g=g_e(p.coordinates[0]),v=wP(g);n({id:f.name,geometry:g,type:f.type}),r.fitBounds([[v[0],v[1]],[v[2],v[3]]],{padding:20})},loading:o,treeNodeFilterProp:"title",onClear:()=>n(null),notFoundContent:A(Ys,{image:Ys.PRESENTED_IMAGE_SIMPLE,description:"Not found"}),disabled:e,children:i==null?void 0:i.raw.map(u=>{var f;return A(s3,{value:u.name,title:u.name,children:(f=u.rayons)==null?void 0:f.map(p=>A(s3,{value:p.name,title:p.name},p.name))},u.name)})})]})},x_e=({disabled:e})=>{const{consumer_filter:t,setConsumerFilter:n}=qi();return it("div",{children:[A(ul,{text:"Consumer parameter"}),A(f1,{mode:"tags",style:{width:"100%"},placeholder:"Select parameter",onChange:r=>n(r),treeData:Qbe,allowClear:!0,value:t==null?void 0:t.key,disabled:e,treeDefaultExpandAll:!0})]})},b_e=({disabled:e,isLoading:t})=>{const{consumer_filter:n,setConsumerFilter:r}=qi(),i=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),o=E.exports.useMemo(()=>{if(!i)return[0,0];const v=n.gt,b=n.lt;return[v,b]},[n,i]),{value:s}=ss(),a=E.exports.useMemo(()=>{if(i)return`${i}_${Vi[s]}`},[i,s]),{data:u,isLoading:f}=gk(a),p=E.exports.useMemo(()=>(u==null?void 0:u.range)||[0,0],[u==null?void 0:u.range]),g=v=>r(i,v);return t||f?A("div",{className:"flex justify-center items-center",children:A(uv,{})}):A(nr,{children:n&&p&&A(bk,{title:i.includes("prob")?"Failure likelihood":i.includes("cooling_time")?"Cooling time, h":"Building priority",value:[o[0],o[1]],onAfterChange:g,min:p[0],max:p[1],range:!0,step:.01,disabled:e})})},__e=[{value:"prob6",label:"TP failure"}],w_e=({disabled:e})=>{const{source_filter:t,setSourceFilter:n}=qi();return it("div",{children:[A(ul,{text:"Source parameter"}),A(f1,{mode:"tags",style:{width:"100%"},placeholder:"Select parameter",onChange:r=>n(r),treeData:__e,allowClear:!0,value:t==null?void 0:t.key,disabled:e,treeDefaultExpandAll:!0})]})},C_e=({disabled:e,isLoading:t})=>{const{source_filter:n,setSourceFilter:r}=qi(),i=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),o=E.exports.useMemo(()=>{if(!i)return[0,0];const v=n.gt,b=n.lt;return[v,b]},[n,i]),{value:s}=ss(),a=E.exports.useMemo(()=>{if(i)return`${i}_${Vi[s]}`},[i,s]),{data:u,isLoading:f}=gk(a),p=E.exports.useMemo(()=>(u==null?void 0:u.range)||[0,0],[u==null?void 0:u.range]),g=v=>r(i,v);return t?A("div",{className:"flex justify-center items-center",children:A(uv,{})}):A(nr,{children:n&&p&&A(bk,{title:"Filter by parameter",value:[o[0],o[1]],onAfterChange:g,min:p[0],max:p[1],range:!0,step:.01,disabled:e})})},S_e="potreb_type",E_e={living_house:"Residential building",soc_object:"Social facility"},P_e=({disabled:e})=>{const{consumer_type:t,setConsumerType:n}=qi(),{data:r,isLoading:i}=vk(S_e),o=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:E_e[s]})):[],[r]);return it("div",{children:[A(ul,{text:"Consumer type"}),A(Vd,{style:{width:"100%"},placeholder:"Select type",onChange:(s,a)=>n(a),options:o,allowClear:!0,value:t,disabled:e})]})},T_e="fi_energy_class",I_e=({disabled:e})=>{const{energy_class:t,setEnergyClass:n}=qi(),{data:r,isLoading:i}=vk(T_e),o=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:s})):[],[r]);return it("div",{children:[A(ul,{text:"Energy efficiency class"}),A(Vd,{style:{width:"100%"},placeholder:"Select type",onChange:(s,a)=>n(a),options:o,allowClear:!0,value:t,disabled:e})]})},k_e="wall_materials",M_e=({disabled:e})=>{const{wall_material:t,setWallMaterial:n}=qi(),{data:r,isLoading:i}=vk(k_e),o=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:s})):[],[r]);return it("div",{children:[A(ul,{text:"Wall material"}),A(Vd,{style:{width:"100%"},placeholder:"Select type",onChange:(s,a)=>n(a),options:o,allowClear:!0,value:t,disabled:e})]})},R_e=()=>{const{clear:e,consumer_filter:t,source_filter:n}=qi();return it("div",{className:"flex flex-col flex-1",children:[it("div",{className:"space-y-5",children:[A(x_e,{}),A(b_e,{}),A(w_e,{}),A(C_e,{}),A(P_e,{}),A(I_e,{}),A(M_e,{})]}),(t||n)&&A("div",{className:"flex items-center justify-end pt-4",children:A("div",{className:"flex gap-2",children:A(Yr,{onClick:()=>e(),type:"secondary",children:"Reset filters"})})})]})},O_e="/assets/dzkh_logo.bd091fb4.png",D_e="/assets/dit_logo.d7458a9f.png",A_e=E.exports.forwardRef(({isCollapsed:e},t)=>{var i;const{filters:n,setRegion:r}=qi();return A("div",{className:Td("h-screen p-3 overflow-y-auto shrink-0 border-solid border-border border-0 border-r-[1px] flex flex-col transition-all",e?"basis-0 px-0 -translate-x-[320px]":"basis-[320px]"),ref:t,children:A("div",{className:"flex flex-col flex-1",children:it("div",{className:"space-y-5",children:[it("div",{className:"flex flex-row gap-1 justify-between items-center",children:[A("img",{width:"48%",height:50,src:O_e,alt:"logo"}),A("img",{width:"48%",height:50,src:D_e,alt:"logo"})]}),A(y_e,{value:(i=n.region)==null?void 0:i.id,onChange:r}),A(R_e,{})]})})})});const N_e=e=>({clickedPointConfig:null,setClickedPointConfig:(t,n=!1)=>{e(r=>{if(t===null)return r.clickedPointConfig=null,r;r.clickedPointConfig={id:t,shouldSelect:n}})}}),bv=hu(pu(N_e));let l3=e=>typeof e=="object"&&e!=null&&e.nodeType===1,c3=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",SS=(e,t)=>{if(e.clientHeight{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeightot||o>e&&s=t&&a>=n?o-e-r:s>t&&an?s-t+i:0,L_e=e=>{let t=e.parentElement;return t==null?e.getRootNode().host||null:t},u3=(e,t)=>{var n,r,i,o;if(typeof document>"u")return[];let{scrollMode:s,block:a,inline:u,boundary:f,skipOverflowHiddenElements:p}=t,g=typeof f=="function"?f:Z=>Z!==f;if(!l3(e))throw new TypeError("Invalid target");let v=document.scrollingElement||document.documentElement,b=[],_=e;for(;l3(_)&&g(_);){if(_=L_e(_),_===v){b.push(_);break}_!=null&&_===document.body&&SS(_)&&!SS(document.documentElement)||_!=null&&SS(_,p)&&b.push(_)}let T=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,I=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:P,scrollY:M}=window,{height:D,width:N,top:z,right:$,bottom:j,left:U}=e.getBoundingClientRect(),q=a==="start"||a==="nearest"?z:a==="end"?j:z+D/2,Y=u==="center"?U+N/2:u==="end"?$:U,te=[];for(let Z=0;Z=0&&U>=0&&j<=I&&$<=T&&z>=re&&j<=oe&&U>=he&&$<=se)return te;let Ce=getComputedStyle(X),Se=parseInt(Ce.borderLeftWidth,10),be=parseInt(Ce.borderTopWidth,10),Re=parseInt(Ce.borderRightWidth,10),Ie=parseInt(Ce.borderBottomWidth,10),Me=0,Ae=0,ze="offsetWidth"in X?X.offsetWidth-X.clientWidth-Se-Re:0,Ke="offsetHeight"in X?X.offsetHeight-X.clientHeight-be-Ie:0,Ue="offsetWidth"in X?X.offsetWidth===0?0:ue/X.offsetWidth:0,pt="offsetHeight"in X?X.offsetHeight===0?0:J/X.offsetHeight:0;if(v===X)Me=a==="start"?q:a==="end"?q-I:a==="nearest"?Sx(M,M+I,I,be,Ie,M+q,M+q+D,D):q-I/2,Ae=u==="start"?Y:u==="center"?Y-T/2:u==="end"?Y-T:Sx(P,P+T,T,Se,Re,P+Y,P+Y+N,N),Me=Math.max(0,Me+M),Ae=Math.max(0,Ae+P);else{Me=a==="start"?q-re-be:a==="end"?q-oe+Ie+Ke:a==="nearest"?Sx(re,oe,J,be,Ie+Ke,q,q+D,D):q-(re+J/2)+Ke/2,Ae=u==="start"?Y-he-Se:u==="center"?Y-(he+ue/2)+ze/2:u==="end"?Y-se+Re+ze:Sx(he,se,ue,Se,Re+ze,Y,Y+N,N);let{scrollLeft:gt,scrollTop:Ot}=X;Me=Math.max(0,Math.min(Ot+Me/pt,X.scrollHeight-J/pt+Ke)),Ae=Math.max(0,Math.min(gt+Ae/Ue,X.scrollWidth-ue/Ue+ze)),q+=Ot-Me,Y+=gt-Ae}te.push({el:X,top:Me,left:Ae})}return te},z_e=e=>typeof e=="object"&&typeof e.behavior=="function",F_e=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function $_e(e,t){if(!e.isConnected||!e.ownerDocument.documentElement.contains(e))return;if(z_e(t))return t.behavior(u3(e,t));let n=typeof t=="boolean"||t==null?void 0:t.behavior;for(let{el:r,top:i,left:o}of u3(e,F_e(t)))r.scroll({top:i,left:o,behavior:n})}const B_e=e=>{ZU("data.csv",e)},V_e=({provider:e})=>{const[t,n]=E.exports.useState(!1);return e(t,()=>n(!1)),A(ka,{title:"Download data",children:A(Yr,{onClick:i=>{i.stopPropagation(),n(!0)},loading:t,disabled:t,children:A(Tbe,{})})})},U_e={isOpened:!1,fullScreen:!1},j_e=e=>({tableState:U_e,toggleOpened:t=>{e(n=>{n.tableState.isOpened=t[0]==="opened"})},toggleFullScreen:()=>{e(t=>{t.tableState.fullScreen=!t.tableState.fullScreen})},openTable:()=>{e(t=>{t.tableState.isOpened=!0})}}),E1=hu(pu(j_e));function CP(e,t){return CP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},CP(e,t)}function b7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,CP(e,t)}function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Xo(1));return n(_7)(e,t)}if(typeof e!="function")throw new Error(Xo(2));var i=e,o=t,s=[],a=s,u=!1;function f(){a===s&&(a=s.slice())}function p(){if(u)throw new Error(Xo(3));return o}function g(T){if(typeof T!="function")throw new Error(Xo(4));if(u)throw new Error(Xo(5));var I=!0;return f(),a.push(T),function(){if(!!I){if(u)throw new Error(Xo(6));I=!1,f();var M=a.indexOf(T);a.splice(M,1),s=null}}}function v(T){if(!G_e(T))throw new Error(Xo(7));if(typeof T.type>"u")throw new Error(Xo(8));if(u)throw new Error(Xo(9));try{u=!0,o=i(o,T)}finally{u=!1}for(var I=s=a,P=0;P=0)&&(n[i]=e[i]);return n}var wk=w_.exports,e1e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},t1e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n1e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},T7={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ck={};Ck[wk.ForwardRef]=n1e;Ck[wk.Memo]=T7;function y3(e){return wk.isMemo(e)?T7:Ck[e.$$typeof]||e1e}var r1e=Object.defineProperty,i1e=Object.getOwnPropertyNames,x3=Object.getOwnPropertySymbols,o1e=Object.getOwnPropertyDescriptor,a1e=Object.getPrototypeOf,b3=Object.prototype;function I7(e,t,n){if(typeof t!="string"){if(b3){var r=a1e(t);r&&r!==b3&&I7(e,r,n)}var i=i1e(t);x3&&(i=i.concat(x3(t)));for(var o=y3(e),s=y3(t),a=0;a0&&arguments[0]!==void 0?arguments[0]:bbe,n=E.exports.useContext(QU),r=n.csp,i=n.prefixCls,o=t;i&&(o=o.replace(/anticon/g,i)),E.exports.useEffect(function(){Jg(o,"@ant-design-icons",{prepend:!0,csp:r})},[])},wbe=["icon","className","onClick","style","primaryColor","secondaryColor"],Zm={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Cbe(e){var t=e.primaryColor,n=e.secondaryColor;Zm.primaryColor=t,Zm.secondaryColor=n||t7(t),Zm.calculated=!!n}function Sbe(){return me({},Zm)}var w1=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,s=t.primaryColor,a=t.secondaryColor,u=kn(t,wbe),f=Zm;if(s&&(f={primaryColor:s,secondaryColor:a||t7(s)}),_be(),xbe(XL(n),"icon should be icon definiton, but got ".concat(n)),!XL(n))return null;var p=n;return p&&typeof p.icon=="function"&&(p=me(me({},p),{},{icon:p.icon(f.primaryColor,f.secondaryColor)})),_P(p.icon,"svg-".concat(p.name),me({className:r,onClick:i,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u))};w1.displayName="IconReact";w1.getTwoToneColors=Sbe;w1.setTwoToneColors=Cbe;const yk=w1;function r7(e){var t=n7(e),n=$e(t,2),r=n[0],i=n[1];return yk.setTwoToneColors({primaryColor:r,secondaryColor:i})}function Ebe(){var e=yk.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Pbe=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];r7("#1890ff");var C1=E.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,o=e.spin,s=e.rotate,a=e.tabIndex,u=e.onClick,f=e.twoToneColor,p=kn(e,Pbe),g=E.exports.useContext(QU),v=g.prefixCls,b=v===void 0?"anticon":v,_=g.rootClassName,T=je(_,b,(n={},ae(n,"".concat(b,"-").concat(i.name),!!i.name),ae(n,"".concat(b,"-spin"),!!o||i.name==="loading"),n),r),I=a;I===void 0&&u&&(I=-1);var P=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,M=n7(f),D=$e(M,2),N=D[0],z=D[1];return A("span",{...me(me({role:"img","aria-label":i.name},p),{},{ref:t,tabIndex:I,onClick:u,className:T}),children:A(yk,{icon:i,primaryColor:N,secondaryColor:z,style:P})})});C1.displayName="AntdIcon";C1.getTwoToneColor=Ebe;C1.setTwoToneColor=r7;const Xh=C1;var i7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:cU})})};i7.displayName="DownloadOutlined";const Tbe=E.exports.forwardRef(i7);var Ibe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const kbe=Ibe;var o7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:kbe})})};o7.displayName="FullscreenExitOutlined";const Mbe=E.exports.forwardRef(o7);var Rbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const Obe=Rbe;var a7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:Obe})})};a7.displayName="FullscreenOutlined";const Dbe=E.exports.forwardRef(a7);var s7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:F6})})};s7.displayName="LoadingOutlined";const Abe=E.exports.forwardRef(s7);var Nbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Lbe=Nbe;var l7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:Lbe})})};l7.displayName="SettingOutlined";const zbe=E.exports.forwardRef(l7);var Fbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};const $be=Fbe;var c7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:$be})})};c7.displayName="UploadOutlined";const u7=E.exports.forwardRef(c7),Bbe=({onClick:e})=>A("div",{className:"absolute top-[20px] left-[20px]",children:A(ka,{title:"Data import",placement:"right",children:A(Yr,{type:"primary",icon:A(u7,{}),onClick:e})})}),Vbe=A(Abe,{style:{fontSize:14},spin:!0}),d7=e=>A(uv,{indicator:Vbe,size:"small",...e}),f7=({taskId:e,onSuccess:t})=>tc(["tasks",e],async()=>{const{data:n}=await as.get(`/api/task/${e}/`);return n},{enabled:e!==null,refetchInterval:1e3,onSuccess:t}),um=({text:e,dataType:t,onSuccess:n,onError:r})=>{const[i,o]=E.exports.useState(!1),[s,a]=E.exports.useState(null),[u,f]=E.exports.useState(!1),[p,g]=E.exports.useState(!1),{data:v,isInitialLoading:b,isFetching:_}=f7({taskId:s,onSuccess:D=>{D.description==="\u0418\u043C\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"&&(a(null),f(!0),n(t))}}),T=b||_;return it("div",{children:[it("div",{className:"space-x-3",children:[A(ka,{title:"Overwrite data",children:A(xh,{checked:i,onChange:D=>o(D.target.checked)})}),A(_ye,{name:"file",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",customRequest:async D=>{const{file:N}=D;try{g(!0);const z=await rbe(N,t,i);z.task_id&&a(z.task_id)}catch(z){r(t),console.error(z)}finally{g(!1)}},itemRender:()=>null,children:A(Yr,{icon:A(u7,{}),children:e})}),A(Yr,{className:"p-0 text-xs text-grey underline h-auto",type:"text",onClick:async()=>{const D=await nbe(t);await YU(`${t}_template.xlsx`,D)},children:"Download template"})]}),(()=>{if(!p&&!v&&!u)return null;const N=()=>p?0:u?100:v.progress,z=()=>p?"Data import":u?"Data import completed":v.description;return it("div",{children:[!u&&A(d7,{className:"mr-2"}),A(VI,{percent:N(),status:T?"active":null,size:"small",className:"w-[300px]"}),A(ul,{text:z(),className:"text-xs"})]})})()]})},Ube=({onClose:e})=>{const[t,n]=E.exports.useState(!1),[r,i]=E.exports.useState(!1),[o,s]=E.exports.useState({odpu:null,asupr:null,moek_scheme:null,events:null,houses:null}),[a,u]=E.exports.useState(null),[f,p]=E.exports.useState(!1),{data:g,isInitialLoading:v,isFetching:b}=f7({taskId:a,onSuccess:N=>{N.description==="\u041F\u0420\u041E\u0426\u0415\u0421\u0421\u0418\u041D\u0413 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"&&(u(null),p(!0),e())}}),_=v||b,T=N=>s(z=>({...z,[N]:!0})),I=N=>s(z=>({...z,[N]:!1})),P=Object.values(o).some(N=>N===null||N===!1);return A(X8,{open:!0,title:"Data import",width:400,footer:null,onCancel:e,children:it("div",{className:"text-center space-y-3",children:[A(D$,{message:"Please note that import time can be significant (up to 10 minutes) depending on the size of the input data.",type:"warning",className:"mb-5",showIcon:!0,closable:!0}),A(um,{dataType:"odpu",text:"Select ODPU file",onSuccess:T,onError:I}),A(um,{dataType:"asupr",text:"Select ASUPR file",onSuccess:T,onError:I}),A(um,{dataType:"moek_scheme",text:"Select MOEK file",onSuccess:T,onError:I}),A(um,{dataType:"events",text:"Select events file",onSuccess:T,onError:I}),A(um,{dataType:"houses",text:"Select houses file",onSuccess:T,onError:I}),A(Yr,{className:"mt-5",type:"primary",onClick:async()=>{n(!0);try{const N=await ibe();N.task_id&&u(N.task_id)}catch(N){console.error(N),i(!0)}finally{n(!1)}},loading:t,disabled:P||_,children:"Start data analysis"},"start-upload"),(()=>{if(!t&&!g&&!f)return null;const z=()=>t?0:f?100:g.progress,$=()=>t?"\u041D\u0430\u0447\u0430\u043B\u043E \u0430\u043D\u0430\u043B\u0438\u0437\u0430":f?"Data analysis completed":g.description;return it("div",{children:[!f&&A(d7,{className:"mr-2"}),A(VI,{percent:z(),status:_?"active":null,size:"small",className:"w-[300px]"}),A(ul,{text:$(),className:"text-xs"})]})})(),r&&A("p",{className:"text-red-600",children:"An error occurred"})]})})},jbe=e=>({updateCounter:-1,toggleUpdateCounter:()=>{e(t=>{t.updateCounter=t.updateCounter===-1?1:-1})}}),h7=hu(pu(jbe)),Ci={consumer:"potreb",source:"tp",dispatcher:"ods"},Hbe={[Ci.consumer]:!0,[Ci.source]:!0,[Ci.dispatcher]:!0},Kbe=e=>({isVisible:Hbe,toggleVisibility:t=>e(n=>{n.isVisible[t]=!n.isVisible[t]}),showLayers:t=>e(n=>{t.forEach(r=>{n.isVisible[r]=!0})}),setLayersVisibility:t=>e(n=>{t.forEach(i=>{n.isVisible[i]=!0}),Object.keys(n.isVisible).filter(i=>!t.includes(i)).forEach(i=>{n.isVisible[i]=!1})})}),S1=hu(mk(pu(Kbe),{name:"dzkh/layers-visibility"})),Wbe={ao:"ao_id",rayon:"rayon_id"},xk=e=>E.exports.useMemo(()=>e?["==",["get",Wbe[e.type]],e.id]:null,[e]),Gbe=6,Lb={stops:[[.05,"#fff700"],[.2,"#ffda00"],[.35,"#ffbc00"],[.5,"#ff9d00"],[.65,"#ff7a00"],[.8,"#ff5200"],[.95,"#ff0000"]]},qbe={stops:[[2.8,"#ff0000"],[3.7,"#ff5200"],[4.6,"#ff7a00"],[5.5,"#ff9d00"],[6.4,"#ffbc00"],[7.3,"#ffda00"],[8.2,"#fff700"]]},p7={stops:[[.05,"#fd99ff"],[.2,"#da7ee1"],[.35,"#b964c3"],[.5,"#984ba6"],[.65,"#793389"],[.8,"#5a1a6e"],[.95,"#3d0053"]]},QL={type:"circle",paint:{"circle-stroke-width":.1,"circle-stroke-color":"#262626","circle-opacity":.8}},zb=(e="grey",t=Gbe)=>({...QL,paint:{...QL.paint,"circle-color":e,"circle-radius":["interpolate",["linear"],["zoom"],3,0,10,1,13,t]}}),JL=e=>({type:"symbol",layout:{"icon-image":["coalesce",["image",e],["image","defaultIcon"]],"icon-size":["interpolate",["linear"],["zoom"],3,0,9,.1,13,.5]}}),bS={...zb(),paint:{...zb().paint}},_S={...zb("grey",10),paint:{...zb("grey",10).paint}},m7="#676767",e3={id:"ao",type:"line",source:"ao","source-layer":"public.service_ao",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":m7,"line-width":1.5,"line-opacity":.8}},t3={id:"rayon",type:"line",source:"rayon","source-layer":"public.service_rayon",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":m7,"line-width":.5,"line-opacity":.8}},Zbe={id:"selected-region",type:"line",source:"selected-region",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#CC2222","line-width":4}},wS={region:null,prob1__gt:0,prob1__lt:5e3,prob2__gt:0,prob2__lt:5e3,prob3__gt:0,prob3__lt:5e3,prob4__gt:0,prob4__lt:5e3,prob5__gt:0,prob5__lt:5e3,prob6__gt:0,prob6__lt:5e3,cooling_time__gt:0,cooling_time__lt:5e3,priority__gt:0,priority__lt:5e3},Xbe={prob1:[0,5e3],prob2:[0,5e3],prob3:[0,5e3],prob4:[0,5e3],prob5:[0,5e3],prob6:[0,5e3],cooling_time:[0,5e3],priority:[0,5e3]},Ybe=e=>({filters:wS,consumer_filter:null,consumer_ranges:null,source_filter:null,consumer_type:null,energy_class:null,wall_material:null,ranges:Xbe,setConsumerFilter:(t,n)=>e(r=>{if(!t){r.consumer_filter=null;return}const i=n||r.ranges[t];r.consumer_filter={key:t,gt:i[0],lt:i[1]}}),setSourceFilter:(t,n)=>e(r=>{if(!t){r.source_filter=null;return}const i=n||r.ranges[t];r.source_filter={key:t,gt:i[0],lt:i[1]}}),setRegion:t=>e(n=>{n.filters.region=t}),setConsumerType:t=>e(n=>{n.consumer_type=t}),setEnergyClass:t=>e(n=>{n.energy_class=t}),setWallMaterial:t=>e(n=>{n.wall_material=t}),setFilterWithKey:(t,n)=>e(r=>{r.filters[`${n}__gt`]=t[0],r.filters[`${n}__lt`]=t[1]}),setRanges:t=>e(n=>{n.ranges=t}),clear:t=>e(n=>{if(n.consumer_filter=null,n.source_filter=null,n.energy_class=null,n.consumer_type=null,n.wall_material=null,!t)return n.filters=wS,n;n.filters={...wS,prediction:t.prediction}})}),qi=hu(mk(pu(Ybe),{name:"dzkh/filters"})),Qbe=[{value:"category1",title:"\xA0Emergency forecasting",selectable:!1,children:[{value:"prob1",title:"No heating in the building"},{value:"prob2",title:"Leaking pipes in the entrance"},{value:"prob3",title:"Apartment temperature below standard"},{value:"prob4",title:"Common area temperature below standard"},{value:"prob5",title:"Leak in the heating system"}]},{value:"category2",title:"Emergency response",selectable:!1,children:[{value:"cooling_time",title:"Cooling time, h"},{value:"priority",title:"Building priority"}]}],Jbe=()=>{const e={};let t=0;for(let n=-25;n<25;n++)e[n]=t,t++;return e},Vi=Jbe(),e_e=()=>{const{consumer_filter:e,consumer_type:t,energy_class:n,wall_material:r}=qi(),{value:i}=ss(),o=Vi[i];return[...(()=>{const a=[];if(e){const u=`${e.key}_${o}`;a.push([">=",["get",u],e.gt],["<=",["get",u],e.lt])}return t&&a.push(["==",["get","potreb_type"],t.value]),n&&a.push(["==",["get","fi_energy_class"],n.value]),r&&a.push(["==",["get","wall_materials"],r.value]),a})()]},t_e=["==",["get","point_type"],Ci.consumer],n_e=()=>{const{isVisible:e}=S1(),{filters:{region:t},consumer_filter:n}=qi(),r=xk(t),i=e_e(),{selectedSourceConfig:o}=Hd(),{value:s}=ss(),a=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),u=E.exports.useMemo(()=>{if(a)return`${a}_${Vi[s]}`},[a,s]),{data:f,isLoading:p}=gk(u),g=E.exports.useMemo(()=>(f==null?void 0:f.range)||[0,0],[f==null?void 0:f.range]),v=()=>{const P=["all",t_e,...i];return r&&P.push(r),o.sourceId&&P.push(["==",["get","tp_number"],o.sourceId]),P},b=n!=null&&n.key?`${n.key}_${Vi[s]}`:null,_=E.exports.useMemo(()=>n&&n.key.includes("cooling"),[n]),T=E.exports.useMemo(()=>{const P=g[0],D=(g[1]-P)/8;return _?[].concat(Lb.stops).reverse().map((N,z)=>[P+z*D,N[1]]):Lb.stops.map((N,z)=>[P+z*D,N[1]])},[g]),I=b?{...bS.paint,"circle-color":{property:b,stops:T}}:bS.paint;return A(nr,{children:A(ph,{...bS,id:Ci.consumer,source:"points","source-layer":"public.data",layout:{visibility:e[Ci.consumer]?"visible":"none"},filter:v(),paint:I})})},r_e=["==",["get","point_type"],Ci.dispatcher],i_e=()=>{const{isVisible:e}=S1(),{filters:{region:t}}=qi(),n=xk(t),{selectedSourceConfig:r}=Hd(),i=()=>{const o=["all",r_e];return n&&o.push(n),r.sourceId&&o.push(["==",["get","ods_number"],r.dispatcherNumber]),o};return A(nr,{children:A(ph,{type:JL("dispatcherIcon").type,id:Ci.dispatcher,source:"points","source-layer":"public.data",layout:{...JL("dispatcherIcon").layout,visibility:e[Ci.dispatcher]?"visible":"none"},filter:i()})})},o_e=()=>{const{source_filter:e}=qi(),{value:t}=ss(),n=Vi[t];return[...(()=>{if(e){const i=`${e.key}_${n}`;return[[">=",["get",i],e.gt],["<=",["get",i],e.lt]]}return[]})()]},a_e=["==",["get","point_type"],Ci.source],s_e=()=>{const{isVisible:e}=S1(),{filters:{region:t},source_filter:n}=qi(),r=xk(t),i=o_e(),{selectedSourceConfig:o}=Hd(),{value:s}=ss(),a=()=>{const p=["all",a_e,...i];return r&&p.push(r),o.sourceId&&p.push(["==",["get","tp_number"],o.sourceId]),p},u=n!=null&&n.key?`${n.key}_${Vi[s]}`:null,f=u?{..._S.paint,"circle-color":{property:u,stops:p7.stops}}:_S.paint;return A(nr,{children:A(ph,{..._S,id:Ci.source,source:"points","source-layer":"public.data",layout:{visibility:e[Ci.source]?"visible":"none"},filter:a(),paint:f})})},l_e=()=>{const{updateCounter:e}=h7();return A(nr,{children:it(eb,{id:"points",type:"vector",tiles:[`${Nb}/martin/public.data/{z}/{x}/{y}.pbf`],children:[A(s_e,{}),A(n_e,{}),A(i_e,{})]},`points-${e}`)})},c_e=({data:e})=>A(eb,{id:"selected-region",type:"geojson",data:e,children:A(ph,{...Zbe})}),u_e=()=>{const{filters:{region:e}}=qi();return e!=null&&e.geometry?A(c_e,{data:e.geometry}):null},d_e=()=>it(nr,{children:[A(eb,{id:"ao",type:"vector",tiles:[`${Nb}/martin/public.service_ao/{z}/{x}/{y}.pbf`],children:A(ph,{...e3,layout:{...e3.layout}})}),A(eb,{id:"rayon",type:"vector",tiles:[`${Nb}/martin/public.service_rayon/{z}/{x}/{y}.pbf`],children:A(ph,{...t3,layout:{...t3.layout}})}),A(u_e,{}),A(l_e,{})]}),g7="/assets/circle.48dd350a.svg",CS=({color:e,imageSrc:t,name:n,border:r})=>it("div",{className:"flex gap-2 items-center",children:[t&&A(Tae,{src:t,width:18,height:18,className:"flex items-center",preview:!1}),e&&!t&&A("span",{className:"w-4 h-[100%] flex items-center justify-center",children:A("span",{className:`rounded-xl w-3 h-3 inline-block ${r&&"border-black border-[1px] border-solid"}`,style:{backgroundColor:e}})}),A("span",{className:"text-xs text-grey",children:n})]}),n3=({colors:e,name:t,desc:n})=>it("div",{children:[A("span",{className:"text-xs text-grey",children:t}),A("div",{className:"w-[200px]",children:A("div",{className:"w-full h-[10px] rounded-xl",style:{background:`linear-gradient(to right, ${e.join(",")})`}})}),it("span",{className:"text-xs text-grey italic",children:[n," \u2192"]})]});Lb.stops.map(e=>e[1]);const f_e=p7.stops.map(e=>e[1]);function h_e(){const{toggleVisibility:e,isVisible:t}=S1(),{consumer_filter:n,source_filter:r}=qi(),i=E.exports.useMemo(()=>n&&n.key.includes("cooling"),[n]),o=E.exports.useMemo(()=>i?qbe.stops.map(s=>s[1]):Lb.stops.map(s=>s[1]),[i]);return A("div",{className:"absolute bottom-[20px] right-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:A("div",{children:it("div",{className:"space-y-2 flex flex-col",children:[A(Gm,{className:"!ml-0",onChange:()=>e(Ci.consumer),checked:t[Ci.consumer],children:n?A(n3,{colors:o,name:"Consumer",desc:n.key.includes("prob")?"failure likelihood":n.key.includes("cooling_time")?"cooling time, h":"building priority"}):A(CS,{name:"Consumer"})}),A(Gm,{className:"!ml-0",onChange:()=>e(Ci.source),checked:t[Ci.source],children:r?A(n3,{colors:f_e,name:"Source",desc:"failure likelihood"}):A(CS,{name:"Source"})}),A(Gm,{className:"!ml-0 flex items-center",onChange:()=>e(Ci.dispatcher),checked:t[Ci.dispatcher],children:A(CS,{name:"Dispatch center",imageSrc:g7})})]})})})}const Nl=({value:e})=>A("span",{className:"text-grey text-xs bg-white-background-light",children:e}),r3=(e,t)=>{if(Array.isArray(t)){const[n,r]=t;return{...e,[n]:A(Nl,{value:n}),[r]:A(Nl,{value:r})}}else return{...e,[t]:A(Nl,{value:t})}},bk=({title:e,value:t,onChange:n,onAfterChange:r,min:i=0,max:o=100,range:s=!1,step:a=1,disabled:u=!1,onMouseEnter:f,onMouseLeave:p,showZeroMark:g=!1})=>{const v={[i]:A(Nl,{value:i}),[o]:A(Nl,{value:o})},[b,_]=E.exports.useState(t),[T,I]=E.exports.useState(r3(v,t));E.exports.useEffect(()=>{_(t),I(r3(v,t))},[t]);const P=N=>{if(Array.isArray(N)){const[z,$]=N;I({...v,[z]:A(Nl,{value:z}),[$]:A(Nl,{value:$})})}else I({...v,[N]:A(Nl,{value:N})});r==null||r(N)},M=N=>{_(N),n==null||n(N)},D=g?{...T,0:A(Nl,{value:0})}:T;return it("div",{onMouseEnter:f,onMouseLeave:p,children:[A(ul,{text:e}),A(Sle,{range:s,value:b,marks:D,onChange:M,onAfterChange:P,min:i,max:o,step:a,disabled:u})]})},p_e=({disabled:e,fullRange:t,isLoading:n})=>{const{value:r,setValue:i,range:o}=ss();return n?A("div",{className:"flex justify-center items-center",children:A(uv,{})}):A("div",{className:"absolute w-[200px] top-[20px] right-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:A(bk,{title:"Outdoor air temperature",value:r,onAfterChange:i,min:o[0],max:o[1]})})},i3=[{name:"dispatcherIcon",url:g7}];function m_e(e,t,n){n===void 0&&(n={});var r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function g_e(e,t,n){n===void 0&&(n={});for(var r=0,i=e;rn[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]e.reduce((t,n)=>(t[n.name]=n,t[n.name].type="ao",n.rayons&&n.rayons.forEach(r=>{t[r.name]=r,t[r.name].type="rayon"}),t),{}),_k=()=>tc(["regions"],async()=>{const{data:e}=await as.get("/api/ao_rayons/");return e},{select:e=>({raw:e,normalized:v_e(e)}),refetchOnWindowFocus:!1,refetchOnMount:!1}),y_e=({disabled:e,value:t,onChange:n})=>{const{map:r}=B5(),{data:i,isInitialLoading:o}=_k();return it("div",{children:[A(ul,{text:"District / area"}),A(f1,{showSearch:!0,style:{width:"100%"},value:t,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"Select district or area",allowClear:!0,treeDefaultExpandAll:!1,onChange:u=>{if(!u)return;const f=i.normalized[u],p=xv.exports(f.polygon),g=g_e(p.coordinates[0]),v=wP(g);n({id:f.name,geometry:g,type:f.type}),r.fitBounds([[v[0],v[1]],[v[2],v[3]]],{padding:20})},loading:o,treeNodeFilterProp:"title",onClear:()=>n(null),notFoundContent:A(Ys,{image:Ys.PRESENTED_IMAGE_SIMPLE,description:"Not found"}),disabled:e,children:i==null?void 0:i.raw.map(u=>{var f;return A(s3,{value:u.name,title:u.name,children:(f=u.rayons)==null?void 0:f.map(p=>A(s3,{value:p.name,title:p.name},p.name))},u.name)})})]})},x_e=({disabled:e})=>{const{consumer_filter:t,setConsumerFilter:n}=qi();return it("div",{children:[A(ul,{text:"Energy consumer parameter"}),A(f1,{mode:"tags",style:{width:"100%"},placeholder:"Select parameter",onChange:r=>n(r),treeData:Qbe,allowClear:!0,value:t==null?void 0:t.key,disabled:e,treeDefaultExpandAll:!0})]})},b_e=({disabled:e,isLoading:t})=>{const{consumer_filter:n,setConsumerFilter:r}=qi(),i=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),o=E.exports.useMemo(()=>{if(!i)return[0,0];const v=n.gt,b=n.lt;return[v,b]},[n,i]),{value:s}=ss(),a=E.exports.useMemo(()=>{if(i)return`${i}_${Vi[s]}`},[i,s]),{data:u,isLoading:f}=gk(a),p=E.exports.useMemo(()=>(u==null?void 0:u.range)||[0,0],[u==null?void 0:u.range]),g=v=>r(i,v);return t||f?A("div",{className:"flex justify-center items-center",children:A(uv,{})}):A(nr,{children:n&&p&&A(bk,{title:i.includes("prob")?"Failure likelihood":i.includes("cooling_time")?"Cooling time, h":"Building priority",value:[o[0],o[1]],onAfterChange:g,min:p[0],max:p[1],range:!0,step:.01,disabled:e})})},__e=[{value:"prob6",label:"Energy source\xA0failure"}],w_e=({disabled:e})=>{const{source_filter:t,setSourceFilter:n}=qi();return it("div",{children:[A(ul,{text:"Energy source parameter"}),A(f1,{mode:"tags",style:{width:"100%"},placeholder:"Select parameter",onChange:r=>n(r),treeData:__e,allowClear:!0,value:t==null?void 0:t.key,disabled:e,treeDefaultExpandAll:!0})]})},C_e=({disabled:e,isLoading:t})=>{const{source_filter:n,setSourceFilter:r}=qi(),i=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),o=E.exports.useMemo(()=>{if(!i)return[0,0];const v=n.gt,b=n.lt;return[v,b]},[n,i]),{value:s}=ss(),a=E.exports.useMemo(()=>{if(i)return`${i}_${Vi[s]}`},[i,s]),{data:u,isLoading:f}=gk(a),p=E.exports.useMemo(()=>(u==null?void 0:u.range)||[0,0],[u==null?void 0:u.range]),g=v=>r(i,v);return t?A("div",{className:"flex justify-center items-center",children:A(uv,{})}):A(nr,{children:n&&p&&A(bk,{title:"Filter by parameter",value:[o[0],o[1]],onAfterChange:g,min:p[0],max:p[1],range:!0,step:.01,disabled:e})})},S_e="potreb_type",E_e={living_house:"Residential building",soc_object:"Social facility"},P_e=({disabled:e})=>{const{consumer_type:t,setConsumerType:n}=qi(),{data:r,isLoading:i}=vk(S_e),o=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:E_e[s]})):[],[r]);return it("div",{children:[A(ul,{text:"Consumer type"}),A(Vd,{style:{width:"100%"},placeholder:"Select type",onChange:(s,a)=>n(a),options:o,allowClear:!0,value:t,disabled:e})]})},T_e="fi_energy_class",I_e=({disabled:e})=>{const{energy_class:t,setEnergyClass:n}=qi(),{data:r,isLoading:i}=vk(T_e),o=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:s})):[],[r]);return it("div",{children:[A(ul,{text:"Energy efficiency class"}),A(Vd,{style:{width:"100%"},placeholder:"Select type",onChange:(s,a)=>n(a),options:o,allowClear:!0,value:t,disabled:e})]})},k_e="wall_materials",M_e=({disabled:e})=>{const{wall_material:t,setWallMaterial:n}=qi(),{data:r,isLoading:i}=vk(k_e),o=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:s})):[],[r]);return it("div",{children:[A(ul,{text:"Wall material"}),A(Vd,{style:{width:"100%"},placeholder:"Select type",onChange:(s,a)=>n(a),options:o,allowClear:!0,value:t,disabled:e})]})},R_e=()=>{const{clear:e,consumer_filter:t,source_filter:n}=qi();return it("div",{className:"flex flex-col flex-1",children:[it("div",{className:"space-y-5",children:[A(x_e,{}),A(b_e,{}),A(w_e,{}),A(C_e,{}),A(P_e,{}),A(I_e,{}),A(M_e,{})]}),(t||n)&&A("div",{className:"flex items-center justify-end pt-4",children:A("div",{className:"flex gap-2",children:A(Yr,{onClick:()=>e(),type:"secondary",children:"Reset filters"})})})]})},O_e="/assets/dzkh_logo.bd091fb4.png",D_e="/assets/dit_logo.d7458a9f.png",A_e=E.exports.forwardRef(({isCollapsed:e},t)=>{var i;const{filters:n,setRegion:r}=qi();return A("div",{className:Td("h-screen p-3 overflow-y-auto shrink-0 border-solid border-border border-0 border-r-[1px] flex flex-col transition-all",e?"basis-0 px-0 -translate-x-[320px]":"basis-[320px]"),ref:t,children:A("div",{className:"flex flex-col flex-1",children:it("div",{className:"space-y-5",children:[it("div",{className:"flex flex-row gap-1 justify-between items-center",children:[A("img",{width:"48%",height:50,src:O_e,alt:"logo"}),A("img",{width:"48%",height:50,src:D_e,alt:"logo"})]}),A(y_e,{value:(i=n.region)==null?void 0:i.id,onChange:r}),A(R_e,{})]})})})});const N_e=e=>({clickedPointConfig:null,setClickedPointConfig:(t,n=!1)=>{e(r=>{if(t===null)return r.clickedPointConfig=null,r;r.clickedPointConfig={id:t,shouldSelect:n}})}}),bv=hu(pu(N_e));let l3=e=>typeof e=="object"&&e!=null&&e.nodeType===1,c3=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",SS=(e,t)=>{if(e.clientHeight{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeightot||o>e&&s=t&&a>=n?o-e-r:s>t&&an?s-t+i:0,L_e=e=>{let t=e.parentElement;return t==null?e.getRootNode().host||null:t},u3=(e,t)=>{var n,r,i,o;if(typeof document>"u")return[];let{scrollMode:s,block:a,inline:u,boundary:f,skipOverflowHiddenElements:p}=t,g=typeof f=="function"?f:Z=>Z!==f;if(!l3(e))throw new TypeError("Invalid target");let v=document.scrollingElement||document.documentElement,b=[],_=e;for(;l3(_)&&g(_);){if(_=L_e(_),_===v){b.push(_);break}_!=null&&_===document.body&&SS(_)&&!SS(document.documentElement)||_!=null&&SS(_,p)&&b.push(_)}let T=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,I=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:P,scrollY:M}=window,{height:D,width:N,top:z,right:$,bottom:j,left:U}=e.getBoundingClientRect(),q=a==="start"||a==="nearest"?z:a==="end"?j:z+D/2,Y=u==="center"?U+N/2:u==="end"?$:U,te=[];for(let Z=0;Z=0&&U>=0&&j<=I&&$<=T&&z>=re&&j<=oe&&U>=he&&$<=se)return te;let Ce=getComputedStyle(X),Se=parseInt(Ce.borderLeftWidth,10),be=parseInt(Ce.borderTopWidth,10),Re=parseInt(Ce.borderRightWidth,10),Ie=parseInt(Ce.borderBottomWidth,10),Me=0,Ae=0,ze="offsetWidth"in X?X.offsetWidth-X.clientWidth-Se-Re:0,Ke="offsetHeight"in X?X.offsetHeight-X.clientHeight-be-Ie:0,Ue="offsetWidth"in X?X.offsetWidth===0?0:ue/X.offsetWidth:0,pt="offsetHeight"in X?X.offsetHeight===0?0:J/X.offsetHeight:0;if(v===X)Me=a==="start"?q:a==="end"?q-I:a==="nearest"?Sx(M,M+I,I,be,Ie,M+q,M+q+D,D):q-I/2,Ae=u==="start"?Y:u==="center"?Y-T/2:u==="end"?Y-T:Sx(P,P+T,T,Se,Re,P+Y,P+Y+N,N),Me=Math.max(0,Me+M),Ae=Math.max(0,Ae+P);else{Me=a==="start"?q-re-be:a==="end"?q-oe+Ie+Ke:a==="nearest"?Sx(re,oe,J,be,Ie+Ke,q,q+D,D):q-(re+J/2)+Ke/2,Ae=u==="start"?Y-he-Se:u==="center"?Y-(he+ue/2)+ze/2:u==="end"?Y-se+Re+ze:Sx(he,se,ue,Se,Re+ze,Y,Y+N,N);let{scrollLeft:gt,scrollTop:Ot}=X;Me=Math.max(0,Math.min(Ot+Me/pt,X.scrollHeight-J/pt+Ke)),Ae=Math.max(0,Math.min(gt+Ae/Ue,X.scrollWidth-ue/Ue+ze)),q+=Ot-Me,Y+=gt-Ae}te.push({el:X,top:Me,left:Ae})}return te},z_e=e=>typeof e=="object"&&typeof e.behavior=="function",F_e=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function $_e(e,t){if(!e.isConnected||!e.ownerDocument.documentElement.contains(e))return;if(z_e(t))return t.behavior(u3(e,t));let n=typeof t=="boolean"||t==null?void 0:t.behavior;for(let{el:r,top:i,left:o}of u3(e,F_e(t)))r.scroll({top:i,left:o,behavior:n})}const B_e=e=>{YU("data.csv",e)},V_e=({provider:e})=>{const[t,n]=E.exports.useState(!1);return e(t,()=>n(!1)),A(ka,{title:"Download data",children:A(Yr,{onClick:i=>{i.stopPropagation(),n(!0)},loading:t,disabled:t,children:A(Tbe,{})})})},U_e={isOpened:!1,fullScreen:!1},j_e=e=>({tableState:U_e,toggleOpened:t=>{e(n=>{n.tableState.isOpened=t[0]==="opened"})},toggleFullScreen:()=>{e(t=>{t.tableState.fullScreen=!t.tableState.fullScreen})},openTable:()=>{e(t=>{t.tableState.isOpened=!0})}}),E1=hu(pu(j_e));function CP(e,t){return CP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},CP(e,t)}function b7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,CP(e,t)}function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Xo(1));return n(_7)(e,t)}if(typeof e!="function")throw new Error(Xo(2));var i=e,o=t,s=[],a=s,u=!1;function f(){a===s&&(a=s.slice())}function p(){if(u)throw new Error(Xo(3));return o}function g(T){if(typeof T!="function")throw new Error(Xo(4));if(u)throw new Error(Xo(5));var I=!0;return f(),a.push(T),function(){if(!!I){if(u)throw new Error(Xo(6));I=!1,f();var M=a.indexOf(T);a.splice(M,1),s=null}}}function v(T){if(!G_e(T))throw new Error(Xo(7));if(typeof T.type>"u")throw new Error(Xo(8));if(u)throw new Error(Xo(9));try{u=!0,o=i(o,T)}finally{u=!1}for(var I=s=a,P=0;P=0)&&(n[i]=e[i]);return n}var wk=w_.exports,e1e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},t1e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n1e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},T7={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ck={};Ck[wk.ForwardRef]=n1e;Ck[wk.Memo]=T7;function y3(e){return wk.isMemo(e)?T7:Ck[e.$$typeof]||e1e}var r1e=Object.defineProperty,i1e=Object.getOwnPropertyNames,x3=Object.getOwnPropertySymbols,o1e=Object.getOwnPropertyDescriptor,a1e=Object.getPrototypeOf,b3=Object.prototype;function I7(e,t,n){if(typeof t!="string"){if(b3){var r=a1e(t);r&&r!==b3&&I7(e,r,n)}var i=i1e(t);x3&&(i=i.concat(x3(t)));for(var o=y3(e),s=y3(t),a=0;a"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=mu(t,function(r){return"on"+r in document});return n||e}(),Pj=0,W3=5;function YSe(e,t){return Math.abs(t.x-e.x)>=W3||Math.abs(t.y-e.y)>=W3}var G3={type:"IDLE"};function QSe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var a=s.button,u=s.clientX,f=s.clientY;if(a===Pj){var p={x:u,y:f},g=r();if(g.type==="DRAGGING"){s.preventDefault(),g.actions.move(p);return}g.type!=="PENDING"&&rn(!1);var v=g.point;if(!!YSe(v,p)){s.preventDefault();var b=g.actions.fluidLift(p);i({type:"DRAGGING",actions:b})}}}},{eventName:"mouseup",fn:function(s){var a=r();if(a.type!=="DRAGGING"){t();return}s.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var a=r();if(a.type==="PENDING"){t();return}if(s.keyCode===Wk){s.preventDefault(),t();return}Ej(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var a=r();if(a.type==="IDLE"&&rn(!1),a.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:A1,fn:t}]}function JSe(e){var t=E.exports.useRef(G3),n=E.exports.useRef(Qc),r=yr(function(){return{eventName:"mousedown",fn:function(g){if(!g.defaultPrevented&&g.button===Pj&&!(g.ctrlKey||g.metaKey||g.shiftKey||g.altKey)){var v=e.findClosestDraggableId(g);if(!!v){var b=e.tryGetLock(v,s,{sourceEvent:g});if(!!b){g.preventDefault();var _={x:g.clientX,y:g.clientY};n.current(),f(b,_)}}}}}},[e]),i=yr(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(!!v){var b=e.findOptionsForDraggable(v);!b||b.shouldRespectForcePress||!e.canGetLock(v)||g.preventDefault()}}}}},[e]),o=Dn(function(){var g={passive:!1,capture:!0};n.current=Ja(window,[i,r],g)},[i,r]),s=Dn(function(){var p=t.current;p.type!=="IDLE"&&(t.current=G3,n.current(),o())},[o]),a=Dn(function(){var p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),u=Dn(function(){var g={capture:!0,passive:!1},v=QSe({cancel:a,completed:s,getPhase:function(){return t.current},setPhase:function(_){t.current=_}});n.current=Ja(window,v,g)},[a,s]),f=Dn(function(g,v){t.current.type!=="IDLE"&&rn(!1),t.current={type:"PENDING",point:v,actions:g},u()},[u]);Ea(function(){return o(),function(){n.current()}},[o])}var Tf;function e2e(){}var t2e=(Tf={},Tf[jSe]=!0,Tf[USe]=!0,Tf[KSe]=!0,Tf[HSe]=!0,Tf);function n2e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===Wk){o.preventDefault(),n();return}if(o.keyCode===Sj){o.preventDefault(),r();return}if(o.keyCode===ZSe){o.preventDefault(),e.moveDown();return}if(o.keyCode===GSe){o.preventDefault(),e.moveUp();return}if(o.keyCode===qSe){o.preventDefault(),e.moveRight();return}if(o.keyCode===WSe){o.preventDefault(),e.moveLeft();return}if(t2e[o.keyCode]){o.preventDefault();return}Ej(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:A1,fn:n}]}function r2e(e){var t=E.exports.useRef(e2e),n=yr(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==Sj)return;var s=e.findClosestDraggableId(o);if(!s)return;var a=e.tryGetLock(s,p,{sourceEvent:o});if(!a)return;o.preventDefault();var u=!0,f=a.snapLift();t.current();function p(){u||rn(!1),u=!1,t.current(),r()}t.current=Ja(window,n2e(f,p),{capture:!0,passive:!1})}}},[e]),r=Dn(function(){var o={passive:!1,capture:!0};t.current=Ja(window,[n],o)},[n]);Ea(function(){return r(),function(){t.current()}},[r])}var NS={type:"IDLE"},i2e=120,o2e=.15;function a2e(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===Wk&&i.preventDefault(),t()}},{eventName:A1,fn:t}]}function s2e(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var a=o.touches[0],u=a.clientX,f=a.clientY,p={x:u,y:f};o.preventDefault(),s.actions.move(p)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&rn(!1);var a=o.touches[0];if(!!a){var u=a.force>=o2e;if(!!u){var f=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){f&&t();return}if(f){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:A1,fn:t}]}function l2e(e){var t=E.exports.useRef(NS),n=E.exports.useRef(Qc),r=Dn(function(){return t.current},[]),i=Dn(function(b){t.current=b},[]),o=yr(function(){return{eventName:"touchstart",fn:function(b){if(!b.defaultPrevented){var _=e.findClosestDraggableId(b);if(!!_){var T=e.tryGetLock(_,a,{sourceEvent:b});if(!!T){var I=b.touches[0],P=I.clientX,M=I.clientY,D={x:P,y:M};n.current(),g(T,D)}}}}}},[e]),s=Dn(function(){var b={capture:!0,passive:!1};n.current=Ja(window,[o],b)},[o]),a=Dn(function(){var v=t.current;v.type!=="IDLE"&&(v.type==="PENDING"&&clearTimeout(v.longPressTimerId),i(NS),n.current(),s())},[s,i]),u=Dn(function(){var v=t.current;a(),v.type==="DRAGGING"&&v.actions.cancel({shouldBlockNextClick:!0}),v.type==="PENDING"&&v.actions.abort()},[a]),f=Dn(function(){var b={capture:!0,passive:!1},_={cancel:u,completed:a,getPhase:r},T=Ja(window,s2e(_),b),I=Ja(window,a2e(_),b);n.current=function(){T(),I()}},[u,r,a]),p=Dn(function(){var b=r();b.type!=="PENDING"&&rn(!1);var _=b.actions.fluidLift(b.point);i({type:"DRAGGING",actions:_,hasMoved:!1})},[r,i]),g=Dn(function(b,_){r().type!=="IDLE"&&rn(!1);var T=setTimeout(p,i2e);i({type:"PENDING",point:_,actions:b,longPressTimerId:T}),f()},[f,r,i,p]);Ea(function(){return s(),function(){n.current();var _=r();_.type==="PENDING"&&(clearTimeout(_.longPressTimerId),i(NS))}},[r,s,i]),Ea(function(){var b=Ja(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return b},[])}var c2e={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Tj(e,t){if(t==null)return!1;var n=Boolean(c2e[t.tagName.toLowerCase()]);if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Tj(e,t.parentElement)}function u2e(e,t){var n=t.target;return O1(n)?Tj(e,n):!1}var d2e=function(e){return Ps(e.getBoundingClientRect()).center};function f2e(e){return e instanceof wj(e).Element}var h2e=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=mu(t,function(r){return r in Element.prototype});return n||e}();function Ij(e,t){return e==null?null:e[h2e](t)?e:Ij(e.parentElement,t)}function p2e(e,t){return e.closest?e.closest(t):Ij(e,t)}function m2e(e){return"["+Ih.contextId+'="'+e+'"]'}function g2e(e,t){var n=t.target;if(!f2e(n))return null;var r=m2e(e),i=p2e(n,r);return!i||!O1(i)?null:i}function v2e(e,t){var n=g2e(e,t);return n?n.getAttribute(Ih.draggableId):null}function y2e(e,t){var n="["+IP.contextId+'="'+e+'"]',r=H7(document.querySelectorAll(n)),i=mu(r,function(o){return o.getAttribute(IP.id)===t});return!i||!O1(i)?null:i}function x2e(e){e.preventDefault()}function Tx(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function kj(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!yj(n.getState(),i))}function b2e(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,a=e.sourceEvent,u=kj({lockAPI:t,store:r,registry:i,draggableId:o});if(!u)return null;var f=i.draggable.getById(o),p=y2e(n,f.descriptor.id);if(!p||a&&!f.options.canDragInteractiveElements&&u2e(p,a))return null;var g=t.claim(s||Qc),v="PRE_DRAG";function b(){return f.options.shouldRespectForcePress}function _(){return t.isActive(g)}function T($,j){Tx({expected:$,phase:v,isLockActive:_,shouldWarn:!0})&&r.dispatch(j())}var I=T.bind(null,"DRAGGING");function P($){function j(){t.release(),v="COMPLETED"}v!=="PRE_DRAG"&&(j(),v!=="PRE_DRAG"&&rn(!1)),r.dispatch(hCe($.liftActionArgs)),v="DRAGGING";function U(q,Y){if(Y===void 0&&(Y={shouldBlockNextClick:!1}),$.cleanup(),Y.shouldBlockNextClick){var te=Ja(window,[{eventName:"click",fn:x2e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(te)}j(),r.dispatch(dj({reason:q}))}return qn({isActive:function(){return Tx({expected:"DRAGGING",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:b,drop:function(Y){return U("DROP",Y)},cancel:function(Y){return U("CANCEL",Y)}},$.actions)}function M($){var j=Og(function(q){I(function(){return uj({client:q})})}),U=P({liftActionArgs:{id:o,clientSelection:$,movementMode:"FLUID"},cleanup:function(){return j.cancel()},actions:{move:j}});return qn({},U,{move:j})}function D(){var $={moveUp:function(){return I(wCe)},moveRight:function(){return I(SCe)},moveDown:function(){return I(CCe)},moveLeft:function(){return I(ECe)}};return P({liftActionArgs:{id:o,clientSelection:d2e(p),movementMode:"SNAP"},cleanup:Qc,actions:$})}function N(){var $=Tx({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!0});$&&t.release()}var z={isActive:function(){return Tx({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:b,fluidLift:M,snapLift:D,abort:N};return z}var _2e=[JSe,r2e,l2e];function w2e(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?_2e:[],i||[]),a=E.exports.useState(function(){return $Se()})[0],u=Dn(function(M,D){M.isDragging&&!D.isDragging&&a.tryAbandon()},[a]);Ea(function(){var M=n.getState(),D=n.subscribe(function(){var N=n.getState();u(M,N),M=N});return D},[a,n,u]),Ea(function(){return a.tryAbandon},[a.tryAbandon]);for(var f=Dn(function(P){return kj({lockAPI:a,registry:r,store:n,draggableId:P})},[a,r,n]),p=Dn(function(P,M,D){return b2e({lockAPI:a,registry:r,contextId:t,store:n,draggableId:P,forceSensorStop:M,sourceEvent:D&&D.sourceEvent?D.sourceEvent:null})},[t,a,r,n]),g=Dn(function(P){return v2e(t,P)},[t]),v=Dn(function(P){var M=r.draggable.findById(P);return M?M.options:null},[r.draggable]),b=Dn(function(){!a.isClaimed()||(a.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Lk()))},[a,n]),_=Dn(a.isClaimed,[a]),T=yr(function(){return{canGetLock:f,tryGetLock:p,findClosestDraggableId:g,findOptionsForDraggable:v,tryReleaseLock:b,isLockClaimed:_}},[f,p,g,v,b,_]),I=0;I{const[t,n]=E.exports.useState(e.order);E.exports.useEffect(()=>{n(e.order)},[e]);const r=s=>{if(!s.destination)return;var a=[...t];const[u]=a.splice(s.source.index,1);a.splice(s.destination.index,0,u),n(a),e.setOrder(a)},i=s=>{const a=t.map((u,f)=>s===f?{...u,show:!u.show}:u);n(a),e.setOrder(a)},o=()=>A("div",{onClick:s=>s.stopPropagation(),className:"z-10 bg-white-background rounded-xl p-3 space-y-3",style:{maxHeight:"80vh",overflowY:"scroll",margin:"24px 0 24px"},children:A(T2e,{onDragEnd:r,children:A(Nj,{droppableId:"tableOrder",children:s=>it("div",{className:"flex flex-col",...s.droppableProps,ref:s.innerRef,children:[t.map((a,u)=>{const f=a.position;if(!!e.defaultColumns[f])return A(uEe,{draggableId:`list-${f}`,index:u,children:p=>it("div",{className:"flex flex-row gap-2 p-1.5 hover:bg-gray-300 rounded-md",ref:p.innerRef,...p.draggableProps,...p.dragHandleProps,children:[A(xh,{onChange:()=>i(u),checked:a.show}),A("p",{className:"m-0",children:e.defaultColumns[f].name||e.defaultColumns[f].title})]})},`list-${f}`)}),s.placeholder]})})})});return A(X_,{trigger:"click",dropdownRender:()=>o(),children:A(Yr,{onClick:s=>s.stopPropagation(),children:A(zbe,{})})})},vEe=()=>{const{tableState:{fullScreen:e},toggleFullScreen:t}=E1(),[n,r]=E.exports.useState(!1);return E.exports.useEffect(()=>{const a=setTimeout(()=>r(!1),1500);return()=>clearTimeout(a)},[n]),A(ka,{title:e?"Collapse":"Expand to full screen",placement:"topRight",open:n,children:A(Yr,{onClick:a=>{a.stopPropagation(),t()},onMouseEnter:()=>{r(!0)},onMouseLeave:()=>{r(!1)},children:e?A(Mbe,{}):A(Dbe,{})})})},Lj=({leftColumn:e,rightColumn:t,exportProvider:n,classes:r,orderColumns:i})=>it("div",{className:"flex items-center w-full justify-between",children:[it("div",{className:r==null?void 0:r.leftColumn,children:[A("span",{className:"py-[5px]",children:"Attribute table"}),e]}),it("div",{className:r==null?void 0:r.rightColumn,children:[t,it("div",{className:"flex items-center gap-x-1",children:[A(gEe,{orderColumns:i}),n&&A(V_e,{provider:n}),A(vEe,{})]})]})]}),yEe=e=>({popup:null,setPopup:t=>{e(n=>{if(!t)return n.popup=null,n;n.popup=t})}}),N1=hu(pu(yEe)),xEe=Un.memo(({data:e,pageSize:t,isClickedPointLoading:n,page:r,onPageChange:i,columns:o,header:s,fullWidth:a,loading:u,onChange:f})=>{const{clickedPointConfig:p,setClickedPointConfig:g}=bv(),{map:v}=B5(),{tableState:b,toggleOpened:_}=E1(),{setPopup:T}=N1(),I={y:b.fullScreen?"calc(100vh - 136px)":"200px",x:"max-content"};return E.exports.useEffect(()=>{if(p===null||n)return;const P=document.querySelector(".scroll-row");P&&$_e(P,{behavior:"smooth"})},[p,e]),A(HA,{bordered:!1,onChange:_,activeKey:b.isOpened?"opened":null,children:A(HA.Panel,{header:s||A(Lj,{}),collapsible:b.fullScreen?"disabled":void 0,children:A(Ige,{size:"small",className:Td("table__wrapper",b.fullScreen&&"table__wrapper__fullScreen"),locale:{emptyText:A(Ys,{description:"No data"})},pagination:{pageSize:t,current:r,onChange:i,total:e==null?void 0:e.count,showSizeChanger:!1,position:"bottomCenter"},showHeader:(e==null?void 0:e.results)&&e.results.length>0,dataSource:e==null?void 0:e.results,columns:o,onChange:f,rowKey:"id",scroll:I,sticky:!0,onRow:P=>({onClick:()=>{const M=xv.exports(P.geometry);v.flyTo({center:[M.coordinates[0],M.coordinates[1]],zoom:13,essential:!0}),T({features:[{properties:P}],coordinates:M.coordinates}),g(P.id,rowSelection==null?void 0:rowSelection.selectedRowKeys.includes(P.id))}}),rowClassName:P=>Td("cursor-pointer",P.id===(p==null?void 0:p.id)&&"scroll-row"),"data-fullwidth":a,loading:u})},"opened")})}),Gb=30,bEe=(e,t)=>{const{clickedPointConfig:n}=bv(),{data:r,isInitialLoading:i,isFetching:o}=tc(["clicked-point",n==null?void 0:n.id],async()=>{const s=new URLSearchParams({"location_ids[]":[n.id]}),{data:a}=await as.get(`/api/placement_points?${s.toString()}`);return a},{enabled:e,onSuccess:t});return{data:r,isLoading:i||o}},_Ee=(e,t)=>{const[n,r]=E.exports.useState(),[i,o]=E.exports.useState(!1),s=E.exports.useRef(),{data:a,isLoading:u}=bEe(i,()=>o(!1)),{clickedPointConfig:f}=bv(),p=PU();return E.exports.useEffect(()=>{!e||r(e)},[e]),E.exports.useEffect(()=>{!e||f===null||e.results.find(v=>v.id===f.id)||o(!0)},[e,f]),E.exports.useEffect(()=>{var g;!((g=a==null?void 0:a.results)!=null&&g[0])||(s.current=a.results[0].id,t(Gb+1),r({count:(e==null?void 0:e.count)+1,results:[a.results[0],...e.results]}))},[a,e]),E.exports.useEffect(()=>{if(f===null){const g=["clicked-point",s.current];p.removeQueries({queryKey:g}),t(Gb),r(e)}},[f,e]),{data:n,isClickedPointLoading:u}},wEe=(e,t,n,r,i)=>{const{filters:o,consumer_filter:s,source_filter:a,consumer_type:u,wall_material:f,energy_class:p}=qi(),{value:g}=ss(),{selectedSourceConfig:v}=Hd(),b=Vi[g],{updateCounter:_}=h7(),{region:T}=o,I=()=>{const $=i&&(i.includes("prob")||i.includes("cooling_time")||i.includes("priority"))?`${i}_${b}`:i,j=new URLSearchParams({page:e,page_size:n});$&&j.append("ordering",$);const U=[];if(s&&a){const q=s.key+"_"+b,Y=a.key+"_"+b,te=`${q}__gte=${s.gt}&${q}__lte=${s.lt}`,Z=`${Y}__gte=${a.gt}&${Y}__lt=${a.lt}`;U.push(`(${Z})|(${te})`)}return v&&(v.sourceId&&U.push(`(tp_number=${v.sourceId})`),v.dispatcherNumber&&U.push(`(ods_number=${v.dispatcherNumber})`)),U.length!==0&&j.append("filters",U.join("&")),s&&!a&&(j.append(s.key+"_"+b+"__gt",s.gt),j.append(s.key+"_"+b+"__lt",s.lt)),a&&!s&&(j.append(a.key+"_"+b+"__gt",a.gt),j.append(a.key+"_"+b+"__lt",a.lt)),j},{data:P,isInitialLoading:M,isFetching:D}=tc(["table",e,o,i,_,s,a,v],async({signal:$})=>{const j=I();return await X0e(j,T,$)},{onError:$=>{$.response.data.detail==="\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"&&t()},refetchOnWindowFocus:!1}),{data:N,isClickedPointLoading:z}=_Ee(P,r);return{data:N,pageSize:n,isClickedPointLoading:z,isDataLoading:M||D}},CEe=(e,t)=>{const{filters:n,consumer_filter:r,source_filter:i,consumer_type:o,wall_material:s,energy_class:a}=qi(),{value:u}=ss(),{selectedSourceConfig:f}=Hd(),p=Vi[u],{region:g}=n,v=()=>{const b=new URLSearchParams,_=[];if(r&&i){const T=r.key+"_"+p,I=i.key+"_"+p,P=`${T}__gte=${r.gt}&${T}__lte=${r.lt}`,M=`${I}__gte=${i.gt}&${I}__lt=${i.lt}`;_.push(`(${M})|(${P})`)}return f&&(f.sourceId&&_.push(`(tp_number=${f.sourceId})`),f.dispatcherNumber&&_.push(`(ods_number=${f.dispatcherNumber})`)),_.length!==0&&b.append("filters",_.join("&")),r&&!i&&(b.append(r.key+"_"+p+"__gt",r.gt),b.append(r.key+"_"+p+"__lt",r.lt)),i&&!r&&(b.append(i.key+"_"+p+"__gt",i.gt),b.append(i.key+"_"+p+"__lt",i.lt)),b};return tc(["export-initial",n],async()=>await Y0e(v(),g),{enabled:e,onSuccess:B_e,onSettled:t,retry:!1})},J3=(e,t)=>{const[n,r]=E.exports.useState(()=>{let i;try{i=JSON.parse(localStorage.getItem(e)||String(t))}catch{i=t}return i});return E.exports.useEffect(()=>{localStorage.setItem(e,JSON.stringify(n))},[n,e]),[n,r]},SEe=e=>{const{data:t}=_k(),{tableState:{fullScreen:n}}=E1(),{value:r}=ss(),[i,o]=J3(`${e}Sort`,null),s=E.exports.useMemo(()=>[{title:"Address",dataIndex:"building_address",key:"building_address",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"TP number",dataIndex:"tp_number",key:"tp_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Dispatcher center number",dataIndex:"ods_number",key:"ods_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Dispatcher phone",dataIndex:"phone_number",key:"phone_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"No heating in the building",dataIndex:`prob1_${Vi[r]}`,key:"prob1",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Leaking pipes in the entrance",dataIndex:`prob2_${Vi[r]}`,key:"prob2",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Apartment temperature below standard",dataIndex:`prob3_${Vi[r]}`,key:"prob3",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Common area temperature below standard",dataIndex:`prob4_${Vi[r]}`,key:"prob4",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Leak in the heating system",dataIndex:`prob5_${Vi[r]}`,key:"prob5",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"TP failure",dataIndex:`prob6_${Vi[r]}`,key:"prob6",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Cooling time, h",dataIndex:`cooling_time_${Vi[r]}`,key:"cooling_time",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Building priority",dataIndex:`priority_${Vi[r]}`,key:"priority",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Wall material",dataIndex:"wall_materials",key:"wall_materials",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Energy efficiency class",dataIndex:"fi_energy_class",key:"fi_energy_class",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1}].filter(Boolean),[t==null?void 0:t.normalized,n,r]),[a,u]=J3(`${e}Order`,s.map((p,g)=>({key:p.key,position:g,show:!0})));return E.exports.useEffect(()=>{const g=s.filter(v=>!a.find(b=>b.key===v.key)).map((v,b)=>({key:v.key,position:s.length-b-1,show:!0}));u([...a,...g])},[s]),{columns:E.exports.useMemo(()=>a.flatMap(p=>p.show?s[p.position]:[]).map(p=>i&&i.includes(p==null?void 0:p.key)?{...p,defaultSortOrder:i.includes("-")?"descend":"ascend"}:p).filter(Boolean),[s,a,i]),orderColumns:{defaultColumns:s,order:a,setOrder:u},sort:i,setSort:o}},EEe="dzkhTable",PEe=({fullWidth:e})=>{const{setClickedPointConfig:t}=bv(),[n,r]=E.exports.useState(1),[i,o]=E.exports.useState(Gb),{columns:s,orderColumns:a,sort:u,setSort:f}=SEe(EEe),{setPopup:p}=N1(),g=(P,M)=>{P==="ascend"&&f(M),P==="descend"&&f(`-${M}`),P||f(null)},{data:v,isClickedPointLoading:b,isDataLoading:_}=wEe(n,()=>r(1),i,o,u),T=()=>o(Gb),I=E.exports.useCallback(P=>{T(),t(null),p(null),r(P)},[]);return A(xEe,{data:v,onPageChange:I,page:n,pageSize:i,isClickedPointLoading:b,columns:s,fullWidth:e,onChange:(P,M,D)=>{g(D.order,D.columnKey)},header:A(Lj,{exportProvider:CEe,orderColumns:a}),loading:_})},TEe=({fullWidth:e})=>A(PEe,{fullWidth:e}),IEe=({lat:e,lng:t,onClose:n,children:r})=>A(yZ,{longitude:t,latitude:e,onClose:n,closeOnClick:!1,style:{minWidth:"330px"},children:r}),FS=[{name:"Address",field:"building_address"},{name:"TP number",field:"tp_number"},{name:"Dispatcher center number",field:"ods_number"},{name:"Dispatcher phone",field:"phone_number"}],kEe=[{field:"prob1",name:"No heating in the building"},{field:"prob2",name:"Leaking pipes in the entrance"},{field:"prob3",name:"Apartment temperature below standard"},{field:"prob4",name:"Common area temperature below standard"},{field:"prob5",name:"Leak in the heating system"},{field:"cooling_time",name:"Cooling time (hours)"},{field:"priority",name:"Building priority"}],MEe=({feature:e})=>{const{data:t}=_k(),{setSelectedSourceConfig:n}=Hd(),{value:r}=ss(),i=e.properties.point_type==="tp",o=e.properties.point_type==="ods",s=()=>{if(o)return FS;if(i)return[...FS,{field:`prob6_${Vi[r]}`,name:"TP failure"}];const f=kEe.map(p=>({...p,field:`${p.field}_${Vi[r]}`}));return[...FS,...f]},a=({field:f,render:p,empty:g,type:v,fallbackField:b})=>{let _=e.properties[f];return v==="region"?(_=_||e[b],_=p(_,t==null?void 0:t.normalized)):(_=p?p(_):_,_=td(_)&&g?g:_),_},u=()=>n({pointId:e.properties.id,sourceId:e.properties.tp_number,dispatcherNumber:e.properties.ods_number});return it("div",{children:[s().map(f=>it(ad,{className:"p-1",children:[A(_b,{className:"font-semibold",span:12,children:f.name}),A(_b,{span:12,className:"text-right",children:a(f)})]},f.field)),i?A("div",{className:"mt-3 text-center",children:A(Yr,{type:"primary",onClick:u,children:"Simulate failure"})}):null]})};/*! + `}},s=[r,n,i,o];return{always:fm(s,"always"),resting:fm(s,"resting"),dragging:fm(s,"dragging"),dropAnimating:fm(s,"dropAnimating"),userCancel:fm(s,"userCancel")}},Ea=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.exports.useLayoutEffect:E.exports.useEffect,AS=function(){var t=document.querySelector("head");return t||rn(!1),t},K3=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function TSe(e,t){var n=yr(function(){return PSe(e)},[e]),r=E.exports.useRef(null),i=E.exports.useRef(null),o=Dn(ro(function(g){var v=i.current;v||rn(!1),v.textContent=g}),[]),s=Dn(function(g){var v=r.current;v||rn(!1),v.textContent=g},[]);Ea(function(){!r.current&&!i.current||rn(!1);var g=K3(t),v=K3(t);return r.current=g,i.current=v,g.setAttribute(Th+"-always",e),v.setAttribute(Th+"-dynamic",e),AS().appendChild(g),AS().appendChild(v),s(n.always),o(n.resting),function(){var b=function(T){var I=T.current;I||rn(!1),AS().removeChild(I),T.current=null};b(r),b(i)}},[t,s,o,n.always,n.resting,e]);var a=Dn(function(){return o(n.dragging)},[o,n.dragging]),u=Dn(function(g){if(g==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),f=Dn(function(){!i.current||o(n.resting)},[o,n.resting]),p=yr(function(){return{dragging:a,dropping:u,resting:f}},[a,u,f]);return p}var wj=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function O1(e){return e instanceof wj(e).HTMLElement}function ISe(e,t){var n="["+Ih.contextId+'="'+e+'"]',r=H7(document.querySelectorAll(n));if(!r.length)return null;var i=mu(r,function(o){return o.getAttribute(Ih.draggableId)===t});return!i||!O1(i)?null:i}function kSe(e){var t=E.exports.useRef({}),n=E.exports.useRef(null),r=E.exports.useRef(null),i=E.exports.useRef(!1),o=Dn(function(v,b){var _={id:v,focus:b};return t.current[v]=_,function(){var I=t.current,P=I[v];P!==_&&delete I[v]}},[]),s=Dn(function(v){var b=ISe(e,v);b&&b!==document.activeElement&&b.focus()},[e]),a=Dn(function(v,b){n.current===v&&(n.current=b)},[]),u=Dn(function(){r.current||!i.current||(r.current=requestAnimationFrame(function(){r.current=null;var v=n.current;v&&s(v)}))},[s]),f=Dn(function(v){n.current=null;var b=document.activeElement;!b||b.getAttribute(Ih.draggableId)===v&&(n.current=v)},[]);Ea(function(){return i.current=!0,function(){i.current=!1;var v=r.current;v&&cancelAnimationFrame(v)}},[]);var p=yr(function(){return{register:o,tryRecordFocus:f,tryRestoreFocusRecorded:u,tryShiftRecord:a}},[o,f,u,a]);return p}function MSe(){var e={draggables:{},droppables:{}},t=[];function n(g){return t.push(g),function(){var b=t.indexOf(g);b!==-1&&t.splice(b,1)}}function r(g){t.length&&t.forEach(function(v){return v(g)})}function i(g){return e.draggables[g]||null}function o(g){var v=i(g);return v||rn(!1),v}var s={register:function(v){e.draggables[v.descriptor.id]=v,r({type:"ADDITION",value:v})},update:function(v,b){var _=e.draggables[b.descriptor.id];!_||_.uniqueId===v.uniqueId&&(delete e.draggables[b.descriptor.id],e.draggables[v.descriptor.id]=v)},unregister:function(v){var b=v.descriptor.id,_=i(b);!_||v.uniqueId===_.uniqueId&&(delete e.draggables[b],r({type:"REMOVAL",value:v}))},getById:o,findById:i,exists:function(v){return Boolean(i(v))},getAllByType:function(v){return jb(e.draggables).filter(function(b){return b.descriptor.type===v})}};function a(g){return e.droppables[g]||null}function u(g){var v=a(g);return v||rn(!1),v}var f={register:function(v){e.droppables[v.descriptor.id]=v},unregister:function(v){var b=a(v.descriptor.id);!b||v.uniqueId===b.uniqueId&&delete e.droppables[v.descriptor.id]},getById:u,findById:a,exists:function(v){return Boolean(a(v))},getAllByType:function(v){return jb(e.droppables).filter(function(b){return b.descriptor.type===v})}};function p(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:f,subscribe:n,clean:p}}function RSe(){var e=yr(MSe,[]);return E.exports.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Hk=Un.createContext(null),Kb=function(){var e=document.body;return e||rn(!1),e},OSe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},DSe=function(t){return"rbd-announcement-"+t};function ASe(e){var t=yr(function(){return DSe(e)},[e]),n=E.exports.useRef(null);E.exports.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),qn(o.style,OSe),Kb().appendChild(o),function(){setTimeout(function(){var u=Kb();u.contains(o)&&u.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=Dn(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var NSe=0,LSe={separator:"::"};function Kk(e,t){return t===void 0&&(t=LSe),yr(function(){return""+e+t.separator+NSe++},[t.separator,e])}function zSe(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function FSe(e){var t=e.contextId,n=e.text,r=Kk("hidden-text",{separator:"-"}),i=yr(function(){return zSe({contextId:t,uniqueId:r})},[r,t]);return E.exports.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",Kb().appendChild(s),function(){var u=Kb();u.contains(s)&&u.removeChild(s)}},[i,n]),i}var D1=Un.createContext(null);function Cj(e){var t=E.exports.useRef(e);return E.exports.useEffect(function(){t.current=e}),t}function $Se(){var e=null;function t(){return Boolean(e)}function n(s){return s===e}function r(s){e&&rn(!1);var a={abandon:s};return e=a,a}function i(){e||rn(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var BSe=9,VSe=13,Wk=27,Sj=32,USe=33,jSe=34,HSe=35,KSe=36,WSe=37,GSe=38,qSe=39,ZSe=40,Px,XSe=(Px={},Px[VSe]=!0,Px[BSe]=!0,Px),Ej=function(e){XSe[e.keyCode]&&e.preventDefault()},A1=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=mu(t,function(r){return"on"+r in document});return n||e}(),Pj=0,W3=5;function YSe(e,t){return Math.abs(t.x-e.x)>=W3||Math.abs(t.y-e.y)>=W3}var G3={type:"IDLE"};function QSe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var a=s.button,u=s.clientX,f=s.clientY;if(a===Pj){var p={x:u,y:f},g=r();if(g.type==="DRAGGING"){s.preventDefault(),g.actions.move(p);return}g.type!=="PENDING"&&rn(!1);var v=g.point;if(!!YSe(v,p)){s.preventDefault();var b=g.actions.fluidLift(p);i({type:"DRAGGING",actions:b})}}}},{eventName:"mouseup",fn:function(s){var a=r();if(a.type!=="DRAGGING"){t();return}s.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var a=r();if(a.type==="PENDING"){t();return}if(s.keyCode===Wk){s.preventDefault(),t();return}Ej(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var a=r();if(a.type==="IDLE"&&rn(!1),a.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:A1,fn:t}]}function JSe(e){var t=E.exports.useRef(G3),n=E.exports.useRef(Qc),r=yr(function(){return{eventName:"mousedown",fn:function(g){if(!g.defaultPrevented&&g.button===Pj&&!(g.ctrlKey||g.metaKey||g.shiftKey||g.altKey)){var v=e.findClosestDraggableId(g);if(!!v){var b=e.tryGetLock(v,s,{sourceEvent:g});if(!!b){g.preventDefault();var _={x:g.clientX,y:g.clientY};n.current(),f(b,_)}}}}}},[e]),i=yr(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(!!v){var b=e.findOptionsForDraggable(v);!b||b.shouldRespectForcePress||!e.canGetLock(v)||g.preventDefault()}}}}},[e]),o=Dn(function(){var g={passive:!1,capture:!0};n.current=Ja(window,[i,r],g)},[i,r]),s=Dn(function(){var p=t.current;p.type!=="IDLE"&&(t.current=G3,n.current(),o())},[o]),a=Dn(function(){var p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),u=Dn(function(){var g={capture:!0,passive:!1},v=QSe({cancel:a,completed:s,getPhase:function(){return t.current},setPhase:function(_){t.current=_}});n.current=Ja(window,v,g)},[a,s]),f=Dn(function(g,v){t.current.type!=="IDLE"&&rn(!1),t.current={type:"PENDING",point:v,actions:g},u()},[u]);Ea(function(){return o(),function(){n.current()}},[o])}var Tf;function e2e(){}var t2e=(Tf={},Tf[jSe]=!0,Tf[USe]=!0,Tf[KSe]=!0,Tf[HSe]=!0,Tf);function n2e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===Wk){o.preventDefault(),n();return}if(o.keyCode===Sj){o.preventDefault(),r();return}if(o.keyCode===ZSe){o.preventDefault(),e.moveDown();return}if(o.keyCode===GSe){o.preventDefault(),e.moveUp();return}if(o.keyCode===qSe){o.preventDefault(),e.moveRight();return}if(o.keyCode===WSe){o.preventDefault(),e.moveLeft();return}if(t2e[o.keyCode]){o.preventDefault();return}Ej(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:A1,fn:n}]}function r2e(e){var t=E.exports.useRef(e2e),n=yr(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==Sj)return;var s=e.findClosestDraggableId(o);if(!s)return;var a=e.tryGetLock(s,p,{sourceEvent:o});if(!a)return;o.preventDefault();var u=!0,f=a.snapLift();t.current();function p(){u||rn(!1),u=!1,t.current(),r()}t.current=Ja(window,n2e(f,p),{capture:!0,passive:!1})}}},[e]),r=Dn(function(){var o={passive:!1,capture:!0};t.current=Ja(window,[n],o)},[n]);Ea(function(){return r(),function(){t.current()}},[r])}var NS={type:"IDLE"},i2e=120,o2e=.15;function a2e(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===Wk&&i.preventDefault(),t()}},{eventName:A1,fn:t}]}function s2e(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var a=o.touches[0],u=a.clientX,f=a.clientY,p={x:u,y:f};o.preventDefault(),s.actions.move(p)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&rn(!1);var a=o.touches[0];if(!!a){var u=a.force>=o2e;if(!!u){var f=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){f&&t();return}if(f){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:A1,fn:t}]}function l2e(e){var t=E.exports.useRef(NS),n=E.exports.useRef(Qc),r=Dn(function(){return t.current},[]),i=Dn(function(b){t.current=b},[]),o=yr(function(){return{eventName:"touchstart",fn:function(b){if(!b.defaultPrevented){var _=e.findClosestDraggableId(b);if(!!_){var T=e.tryGetLock(_,a,{sourceEvent:b});if(!!T){var I=b.touches[0],P=I.clientX,M=I.clientY,D={x:P,y:M};n.current(),g(T,D)}}}}}},[e]),s=Dn(function(){var b={capture:!0,passive:!1};n.current=Ja(window,[o],b)},[o]),a=Dn(function(){var v=t.current;v.type!=="IDLE"&&(v.type==="PENDING"&&clearTimeout(v.longPressTimerId),i(NS),n.current(),s())},[s,i]),u=Dn(function(){var v=t.current;a(),v.type==="DRAGGING"&&v.actions.cancel({shouldBlockNextClick:!0}),v.type==="PENDING"&&v.actions.abort()},[a]),f=Dn(function(){var b={capture:!0,passive:!1},_={cancel:u,completed:a,getPhase:r},T=Ja(window,s2e(_),b),I=Ja(window,a2e(_),b);n.current=function(){T(),I()}},[u,r,a]),p=Dn(function(){var b=r();b.type!=="PENDING"&&rn(!1);var _=b.actions.fluidLift(b.point);i({type:"DRAGGING",actions:_,hasMoved:!1})},[r,i]),g=Dn(function(b,_){r().type!=="IDLE"&&rn(!1);var T=setTimeout(p,i2e);i({type:"PENDING",point:_,actions:b,longPressTimerId:T}),f()},[f,r,i,p]);Ea(function(){return s(),function(){n.current();var _=r();_.type==="PENDING"&&(clearTimeout(_.longPressTimerId),i(NS))}},[r,s,i]),Ea(function(){var b=Ja(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return b},[])}var c2e={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Tj(e,t){if(t==null)return!1;var n=Boolean(c2e[t.tagName.toLowerCase()]);if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Tj(e,t.parentElement)}function u2e(e,t){var n=t.target;return O1(n)?Tj(e,n):!1}var d2e=function(e){return Ps(e.getBoundingClientRect()).center};function f2e(e){return e instanceof wj(e).Element}var h2e=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=mu(t,function(r){return r in Element.prototype});return n||e}();function Ij(e,t){return e==null?null:e[h2e](t)?e:Ij(e.parentElement,t)}function p2e(e,t){return e.closest?e.closest(t):Ij(e,t)}function m2e(e){return"["+Ih.contextId+'="'+e+'"]'}function g2e(e,t){var n=t.target;if(!f2e(n))return null;var r=m2e(e),i=p2e(n,r);return!i||!O1(i)?null:i}function v2e(e,t){var n=g2e(e,t);return n?n.getAttribute(Ih.draggableId):null}function y2e(e,t){var n="["+IP.contextId+'="'+e+'"]',r=H7(document.querySelectorAll(n)),i=mu(r,function(o){return o.getAttribute(IP.id)===t});return!i||!O1(i)?null:i}function x2e(e){e.preventDefault()}function Tx(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function kj(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!yj(n.getState(),i))}function b2e(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,a=e.sourceEvent,u=kj({lockAPI:t,store:r,registry:i,draggableId:o});if(!u)return null;var f=i.draggable.getById(o),p=y2e(n,f.descriptor.id);if(!p||a&&!f.options.canDragInteractiveElements&&u2e(p,a))return null;var g=t.claim(s||Qc),v="PRE_DRAG";function b(){return f.options.shouldRespectForcePress}function _(){return t.isActive(g)}function T($,j){Tx({expected:$,phase:v,isLockActive:_,shouldWarn:!0})&&r.dispatch(j())}var I=T.bind(null,"DRAGGING");function P($){function j(){t.release(),v="COMPLETED"}v!=="PRE_DRAG"&&(j(),v!=="PRE_DRAG"&&rn(!1)),r.dispatch(hCe($.liftActionArgs)),v="DRAGGING";function U(q,Y){if(Y===void 0&&(Y={shouldBlockNextClick:!1}),$.cleanup(),Y.shouldBlockNextClick){var te=Ja(window,[{eventName:"click",fn:x2e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(te)}j(),r.dispatch(dj({reason:q}))}return qn({isActive:function(){return Tx({expected:"DRAGGING",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:b,drop:function(Y){return U("DROP",Y)},cancel:function(Y){return U("CANCEL",Y)}},$.actions)}function M($){var j=Og(function(q){I(function(){return uj({client:q})})}),U=P({liftActionArgs:{id:o,clientSelection:$,movementMode:"FLUID"},cleanup:function(){return j.cancel()},actions:{move:j}});return qn({},U,{move:j})}function D(){var $={moveUp:function(){return I(wCe)},moveRight:function(){return I(SCe)},moveDown:function(){return I(CCe)},moveLeft:function(){return I(ECe)}};return P({liftActionArgs:{id:o,clientSelection:d2e(p),movementMode:"SNAP"},cleanup:Qc,actions:$})}function N(){var $=Tx({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!0});$&&t.release()}var z={isActive:function(){return Tx({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:b,fluidLift:M,snapLift:D,abort:N};return z}var _2e=[JSe,r2e,l2e];function w2e(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?_2e:[],i||[]),a=E.exports.useState(function(){return $Se()})[0],u=Dn(function(M,D){M.isDragging&&!D.isDragging&&a.tryAbandon()},[a]);Ea(function(){var M=n.getState(),D=n.subscribe(function(){var N=n.getState();u(M,N),M=N});return D},[a,n,u]),Ea(function(){return a.tryAbandon},[a.tryAbandon]);for(var f=Dn(function(P){return kj({lockAPI:a,registry:r,store:n,draggableId:P})},[a,r,n]),p=Dn(function(P,M,D){return b2e({lockAPI:a,registry:r,contextId:t,store:n,draggableId:P,forceSensorStop:M,sourceEvent:D&&D.sourceEvent?D.sourceEvent:null})},[t,a,r,n]),g=Dn(function(P){return v2e(t,P)},[t]),v=Dn(function(P){var M=r.draggable.findById(P);return M?M.options:null},[r.draggable]),b=Dn(function(){!a.isClaimed()||(a.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Lk()))},[a,n]),_=Dn(a.isClaimed,[a]),T=yr(function(){return{canGetLock:f,tryGetLock:p,findClosestDraggableId:g,findOptionsForDraggable:v,tryReleaseLock:b,isLockClaimed:_}},[f,p,g,v,b,_]),I=0;I{const[t,n]=E.exports.useState(e.order);E.exports.useEffect(()=>{n(e.order)},[e]);const r=s=>{if(!s.destination)return;var a=[...t];const[u]=a.splice(s.source.index,1);a.splice(s.destination.index,0,u),n(a),e.setOrder(a)},i=s=>{const a=t.map((u,f)=>s===f?{...u,show:!u.show}:u);n(a),e.setOrder(a)},o=()=>A("div",{onClick:s=>s.stopPropagation(),className:"z-10 bg-white-background rounded-xl p-3 space-y-3",style:{maxHeight:"80vh",overflowY:"scroll",margin:"24px 0 24px"},children:A(T2e,{onDragEnd:r,children:A(Nj,{droppableId:"tableOrder",children:s=>it("div",{className:"flex flex-col",...s.droppableProps,ref:s.innerRef,children:[t.map((a,u)=>{const f=a.position;if(!!e.defaultColumns[f])return A(uEe,{draggableId:`list-${f}`,index:u,children:p=>it("div",{className:"flex flex-row gap-2 p-1.5 hover:bg-gray-300 rounded-md",ref:p.innerRef,...p.draggableProps,...p.dragHandleProps,children:[A(xh,{onChange:()=>i(u),checked:a.show}),A("p",{className:"m-0",children:e.defaultColumns[f].name||e.defaultColumns[f].title})]})},`list-${f}`)}),s.placeholder]})})})});return A(X_,{trigger:"click",dropdownRender:()=>o(),children:A(Yr,{onClick:s=>s.stopPropagation(),children:A(zbe,{})})})},vEe=()=>{const{tableState:{fullScreen:e},toggleFullScreen:t}=E1(),[n,r]=E.exports.useState(!1);return E.exports.useEffect(()=>{const a=setTimeout(()=>r(!1),1500);return()=>clearTimeout(a)},[n]),A(ka,{title:e?"Collapse":"Expand to full screen",placement:"topRight",open:n,children:A(Yr,{onClick:a=>{a.stopPropagation(),t()},onMouseEnter:()=>{r(!0)},onMouseLeave:()=>{r(!1)},children:e?A(Mbe,{}):A(Dbe,{})})})},Lj=({leftColumn:e,rightColumn:t,exportProvider:n,classes:r,orderColumns:i})=>it("div",{className:"flex items-center w-full justify-between",children:[it("div",{className:r==null?void 0:r.leftColumn,children:[A("span",{className:"py-[5px]",children:"Attribute table"}),e]}),it("div",{className:r==null?void 0:r.rightColumn,children:[t,it("div",{className:"flex items-center gap-x-1",children:[A(gEe,{orderColumns:i}),n&&A(V_e,{provider:n}),A(vEe,{})]})]})]}),yEe=e=>({popup:null,setPopup:t=>{e(n=>{if(!t)return n.popup=null,n;n.popup=t})}}),N1=hu(pu(yEe)),xEe=Un.memo(({data:e,pageSize:t,isClickedPointLoading:n,page:r,onPageChange:i,columns:o,header:s,fullWidth:a,loading:u,onChange:f})=>{const{clickedPointConfig:p,setClickedPointConfig:g}=bv(),{map:v}=B5(),{tableState:b,toggleOpened:_}=E1(),{setPopup:T}=N1(),I={y:b.fullScreen?"calc(100vh - 136px)":"200px",x:"max-content"};return E.exports.useEffect(()=>{if(p===null||n)return;const P=document.querySelector(".scroll-row");P&&$_e(P,{behavior:"smooth"})},[p,e]),A(HA,{bordered:!1,onChange:_,activeKey:b.isOpened?"opened":null,children:A(HA.Panel,{header:s||A(Lj,{}),collapsible:b.fullScreen?"disabled":void 0,children:A(Ige,{size:"small",className:Td("table__wrapper",b.fullScreen&&"table__wrapper__fullScreen"),locale:{emptyText:A(Ys,{description:"No data"})},pagination:{pageSize:t,current:r,onChange:i,total:e==null?void 0:e.count,showSizeChanger:!1,position:"bottomCenter"},showHeader:(e==null?void 0:e.results)&&e.results.length>0,dataSource:e==null?void 0:e.results,columns:o,onChange:f,rowKey:"id",scroll:I,sticky:!0,onRow:P=>({onClick:()=>{const M=xv.exports(P.geometry);v.flyTo({center:[M.coordinates[0],M.coordinates[1]],zoom:13,essential:!0}),T({features:[{properties:P}],coordinates:M.coordinates}),g(P.id,rowSelection==null?void 0:rowSelection.selectedRowKeys.includes(P.id))}}),rowClassName:P=>Td("cursor-pointer",P.id===(p==null?void 0:p.id)&&"scroll-row"),"data-fullwidth":a,loading:u})},"opened")})}),Gb=30,bEe=(e,t)=>{const{clickedPointConfig:n}=bv(),{data:r,isInitialLoading:i,isFetching:o}=tc(["clicked-point",n==null?void 0:n.id],async()=>{const s=new URLSearchParams({"location_ids[]":[n.id]}),{data:a}=await as.get(`/api/placement_points?${s.toString()}`);return a},{enabled:e,onSuccess:t});return{data:r,isLoading:i||o}},_Ee=(e,t)=>{const[n,r]=E.exports.useState(),[i,o]=E.exports.useState(!1),s=E.exports.useRef(),{data:a,isLoading:u}=bEe(i,()=>o(!1)),{clickedPointConfig:f}=bv(),p=IU();return E.exports.useEffect(()=>{!e||r(e)},[e]),E.exports.useEffect(()=>{!e||f===null||e.results.find(v=>v.id===f.id)||o(!0)},[e,f]),E.exports.useEffect(()=>{var g;!((g=a==null?void 0:a.results)!=null&&g[0])||(s.current=a.results[0].id,t(Gb+1),r({count:(e==null?void 0:e.count)+1,results:[a.results[0],...e.results]}))},[a,e]),E.exports.useEffect(()=>{if(f===null){const g=["clicked-point",s.current];p.removeQueries({queryKey:g}),t(Gb),r(e)}},[f,e]),{data:n,isClickedPointLoading:u}},wEe=(e,t,n,r,i)=>{const{filters:o,consumer_filter:s,source_filter:a,consumer_type:u,wall_material:f,energy_class:p}=qi(),{value:g}=ss(),{selectedSourceConfig:v}=Hd(),b=Vi[g],{updateCounter:_}=h7(),{region:T}=o,I=()=>{const $=i&&(i.includes("prob")||i.includes("cooling_time")||i.includes("priority"))?`${i}_${b}`:i,j=new URLSearchParams({page:e,page_size:n});$&&j.append("ordering",$);const U=[];if(s&&a){const q=s.key+"_"+b,Y=a.key+"_"+b,te=`${q}__gte=${s.gt}&${q}__lte=${s.lt}`,Z=`${Y}__gte=${a.gt}&${Y}__lt=${a.lt}`;U.push(`(${Z})|(${te})`)}return v&&(v.sourceId&&U.push(`(tp_number=${v.sourceId})`),v.dispatcherNumber&&U.push(`(ods_number=${v.dispatcherNumber})`)),U.length!==0&&j.append("filters",U.join("&")),s&&!a&&(j.append(s.key+"_"+b+"__gt",s.gt),j.append(s.key+"_"+b+"__lt",s.lt)),a&&!s&&(j.append(a.key+"_"+b+"__gt",a.gt),j.append(a.key+"_"+b+"__lt",a.lt)),j},{data:P,isInitialLoading:M,isFetching:D}=tc(["table",e,o,i,_,s,a,v],async({signal:$})=>{const j=I();return await ebe(j,T,$)},{onError:$=>{$.response.data.detail==="\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"&&t()},refetchOnWindowFocus:!1}),{data:N,isClickedPointLoading:z}=_Ee(P,r);return{data:N,pageSize:n,isClickedPointLoading:z,isDataLoading:M||D}},CEe=(e,t)=>{const{filters:n,consumer_filter:r,source_filter:i,consumer_type:o,wall_material:s,energy_class:a}=qi(),{value:u}=ss(),{selectedSourceConfig:f}=Hd(),p=Vi[u],{region:g}=n,v=()=>{const b=new URLSearchParams,_=[];if(r&&i){const T=r.key+"_"+p,I=i.key+"_"+p,P=`${T}__gte=${r.gt}&${T}__lte=${r.lt}`,M=`${I}__gte=${i.gt}&${I}__lt=${i.lt}`;_.push(`(${M})|(${P})`)}return f&&(f.sourceId&&_.push(`(tp_number=${f.sourceId})`),f.dispatcherNumber&&_.push(`(ods_number=${f.dispatcherNumber})`)),_.length!==0&&b.append("filters",_.join("&")),r&&!i&&(b.append(r.key+"_"+p+"__gt",r.gt),b.append(r.key+"_"+p+"__lt",r.lt)),i&&!r&&(b.append(i.key+"_"+p+"__gt",i.gt),b.append(i.key+"_"+p+"__lt",i.lt)),b};return tc(["export-initial",n],async()=>await tbe(v(),g),{enabled:e,onSuccess:B_e,onSettled:t,retry:!1})},J3=(e,t)=>{const[n,r]=E.exports.useState(()=>{let i;try{i=JSON.parse(localStorage.getItem(e)||String(t))}catch{i=t}return i});return E.exports.useEffect(()=>{localStorage.setItem(e,JSON.stringify(n))},[n,e]),[n,r]},SEe=e=>{const{data:t}=_k(),{tableState:{fullScreen:n}}=E1(),{value:r}=ss(),[i,o]=J3(`${e}Sort`,null),s=E.exports.useMemo(()=>[{title:"Address",dataIndex:"building_address",key:"building_address",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"TP number",dataIndex:"tp_number",key:"tp_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Dispatcher center number",dataIndex:"ods_number",key:"ods_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Dispatcher phone",dataIndex:"phone_number",key:"phone_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"No heating in the building",dataIndex:`prob1_${Vi[r]}`,key:"prob1",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Leaking pipes in the entrance",dataIndex:`prob2_${Vi[r]}`,key:"prob2",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Apartment temperature below standard",dataIndex:`prob3_${Vi[r]}`,key:"prob3",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Common area temperature below standard",dataIndex:`prob4_${Vi[r]}`,key:"prob4",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Leak in the heating system",dataIndex:`prob5_${Vi[r]}`,key:"prob5",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Energy source\xA0failure",dataIndex:`prob6_${Vi[r]}`,key:"prob6",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Cooling time, h",dataIndex:`cooling_time_${Vi[r]}`,key:"cooling_time",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Building priority",dataIndex:`priority_${Vi[r]}`,key:"priority",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Wall material",dataIndex:"wall_materials",key:"wall_materials",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Energy efficiency class",dataIndex:"fi_energy_class",key:"fi_energy_class",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1}].filter(Boolean),[t==null?void 0:t.normalized,n,r]),[a,u]=J3(`${e}Order`,s.map((p,g)=>({key:p.key,position:g,show:!0})));return E.exports.useEffect(()=>{const g=s.filter(v=>!a.find(b=>b.key===v.key)).map((v,b)=>({key:v.key,position:s.length-b-1,show:!0}));u([...a,...g])},[s]),{columns:E.exports.useMemo(()=>a.flatMap(p=>p.show?s[p.position]:[]).map(p=>i&&i.includes(p==null?void 0:p.key)?{...p,defaultSortOrder:i.includes("-")?"descend":"ascend"}:p).filter(Boolean),[s,a,i]),orderColumns:{defaultColumns:s,order:a,setOrder:u},sort:i,setSort:o}},EEe="dzkhTable",PEe=({fullWidth:e})=>{const{setClickedPointConfig:t}=bv(),[n,r]=E.exports.useState(1),[i,o]=E.exports.useState(Gb),{columns:s,orderColumns:a,sort:u,setSort:f}=SEe(EEe),{setPopup:p}=N1(),g=(P,M)=>{P==="ascend"&&f(M),P==="descend"&&f(`-${M}`),P||f(null)},{data:v,isClickedPointLoading:b,isDataLoading:_}=wEe(n,()=>r(1),i,o,u),T=()=>o(Gb),I=E.exports.useCallback(P=>{T(),t(null),p(null),r(P)},[]);return A(xEe,{data:v,onPageChange:I,page:n,pageSize:i,isClickedPointLoading:b,columns:s,fullWidth:e,onChange:(P,M,D)=>{g(D.order,D.columnKey)},header:A(Lj,{exportProvider:CEe,orderColumns:a}),loading:_})},TEe=({fullWidth:e})=>A(PEe,{fullWidth:e}),IEe=({lat:e,lng:t,onClose:n,children:r})=>A(yZ,{longitude:t,latitude:e,onClose:n,closeOnClick:!1,style:{minWidth:"330px"},children:r}),FS=[{name:"Address",field:"building_address"},{name:"TP number",field:"tp_number"},{name:"Dispatcher center number",field:"ods_number"},{name:"Dispatcher phone",field:"phone_number"}],kEe=[{field:"prob1",name:"No heating in the building"},{field:"prob2",name:"Leaking pipes in the entrance"},{field:"prob3",name:"Apartment temperature below standard"},{field:"prob4",name:"Common area temperature below standard"},{field:"prob5",name:"Leak in the heating system"},{field:"cooling_time",name:"Cooling time (hours)"},{field:"priority",name:"Building priority"}],MEe=({feature:e})=>{const{data:t}=_k(),{setSelectedSourceConfig:n}=Hd(),{value:r}=ss(),i=e.properties.point_type==="tp",o=e.properties.point_type==="ods",s=()=>{if(o)return FS;if(i)return[...FS,{field:`prob6_${Vi[r]}`,name:"Energy source\xA0failure"}];const f=kEe.map(p=>({...p,field:`${p.field}_${Vi[r]}`}));return[...FS,...f]},a=({field:f,render:p,empty:g,type:v,fallbackField:b})=>{let _=e.properties[f];return v==="region"?(_=_||e[b],_=p(_,t==null?void 0:t.normalized)):(_=p?p(_):_,_=td(_)&&g?g:_),_},u=()=>n({pointId:e.properties.id,sourceId:e.properties.tp_number,dispatcherNumber:e.properties.ods_number});return it("div",{children:[s().map(f=>it(ad,{className:"p-1",children:[A(_b,{className:"font-semibold",span:12,children:f.name}),A(_b,{span:12,className:"text-right",children:a(f)})]},f.field)),i?A("div",{className:"mt-3 text-center",children:A(Yr,{type:"primary",onClick:u,children:"Simulate failure"})}):null]})};/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela @@ -911,4 +911,4 @@ html body { * Released under the MIT License */class _Te{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],s=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Kj.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,u;for(;s>=0;--s)u=o[s],u._active?(u._total>r.duration&&(r.duration=u._total),u.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);!n||(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Il=new _Te;const w4="transparent",wTe={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=f4(e||w4),i=r.valid&&f4(t||w4);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class CTe{constructor(t,n,r,i){const o=n[r];i=Dx([t.to,i,o,t.from]);const s=Dx([t.from,o,i]);this._active=!0,this._fn=t.fn||wTe[t.type||typeof s],this._easing=eg[t.easing]||eg.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Dx([t.to,n,i,t.from]),this._from=Dx([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let u;if(this._active=o!==a&&(s||n1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[i]=this._fn(o,a,u)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!_r(o))return;const s={};for(const a of n)s[a]=o[a];(ai(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=ETe(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&STe(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let u;for(u=s.length-1;u>=0;--u){const f=s[u];if(f.charAt(0)==="$")continue;if(f==="options"){i.push(...this._animateOptions(t,n));continue}const p=n[f];let g=o[f];const v=r.get(f);if(g)if(v&&g.active()){g.update(v,p,a);continue}else g.cancel();if(!v||!v.duration){t[f]=p;continue}o[f]=g=new CTe(v,t,f,p),i.push(g)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Il.add(this._chart,r),!0}}function STe(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function T4(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,u=o.axis,f=s.axis,p=kTe(o,s,r),g=t.length;let v;for(let b=0;bn[r].axis===t).shift()}function OTe(e,t){return gu(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function DTe(e,t,n){return gu(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function pm(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(!!r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const jS=e=>e==="reset"||e==="none",I4=(e,t)=>t?e:Object.assign({},e),ATe=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:s9(n,!0),values:null};class oh{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=E4(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&pm(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(g,v,b,_)=>g==="x"?v:g==="r"?_:b,o=n.xAxisID=sr(r.xAxisID,US(t,"x")),s=n.yAxisID=sr(r.yAxisID,US(t,"y")),a=n.rAxisID=sr(r.rAxisID,US(t,"r")),u=n.indexAxis,f=n.iAxisID=i(u,o,s,a),p=n.vAxisID=i(u,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(f),n.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&c4(this._data,this),t._stacked&&pm(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(_r(n))this._data=ITe(n);else if(r!==n){if(r){c4(r,this);const i=this._cachedMeta;pm(i),i._parsed=[]}n&&Object.isExtensible(n)&&mPe(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=E4(n.vScale,n),n.stack!==r.stack&&(i=!0,pm(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&T4(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let u=t===0&&n===i.length?!0:r._sorted,f=t>0&&r._parsed[t-1],p,g,v;if(this._parsing===!1)r._parsed=i,r._sorted=!0,v=i;else{ai(i[t])?v=this.parseArrayData(r,i,t,n):_r(i[t])?v=this.parseObjectData(r,i,t,n):v=this.parsePrimitiveData(r,i,t,n);const b=()=>g[a]===null||f&&g[a]T||g=0;--v)if(!_()){this.updateRangeFromParsed(f,t,b,u);break}}return f}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),T=f.resolveNamedOptions(v,b,_,g);return T.$shared&&(T.$shared=u,o[s]=Object.freeze(I4(T,u))),T}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let u;if(i.options.animation!==!1){const p=this.chart.config,g=p.datasetAnimationScopeKeys(this._type,n),v=p.getOptionScopes(this.getDataset(),g);u=p.createResolver(v,this.getContext(t,r,n))}const f=new a9(i,u&&u.animations);return u&&u._cacheable&&(o[s]=Object.freeze(f)),f}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||jS(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){jS(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!jS(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,u,f]of this._syncList)this[a](u,f);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o{for(f.length+=n,a=f.length-1;a>=s;a--)f[a]=f[a-n]};for(u(o),a=t;ai-o))}return e._cache.$bar}function LTe(e){const t=e.iScale,n=NTe(t,e.type);let r=t._length,i,o,s,a;const u=()=>{s===32767||s===-32768||($g(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i0?i[e-1]:null,a=eMath.abs(a)&&(u=a,f=s),t[n.axis]=f,t._custom={barStart:u,barEnd:f,start:i,end:o,min:s,max:a}}function l9(e,t,n,r){return ai(e)?$Te(e,t,n,r):t[n.axis]=n.parse(e,r),t}function k4(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,u=[];let f,p,g,v;for(f=n,p=n+r;f=n?1:-1)}function VTe(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.baseu.controller.options.grouped),o=r.options.stacked,s=[],a=u=>{const f=u.controller.getParsed(n),p=f&&f[u.vScale.axis];if(Mr(p)||isNaN(p))return!0};for(const u of i)if(!(n!==void 0&&a(u))&&((o===!1||s.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&s.push(u.stack),u.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o0&&this.getParsed(n-1);for(let z=0;z=M){j.skip=!0;continue}const U=this.getParsed(z),q=Mr(U[b]),Y=j[v]=s.getPixelForValue(U[v],z),te=j[b]=o||q?a.getBasePixel():a.getPixelForValue(u?this.applyStack(a,U,u):U[b],z);j.skip=isNaN(Y)||isNaN(te)||q,j.stop=z>0&&Math.abs(U[v]-N[v])>I,T&&(j.parsed=U,j.raw=f.data[z]),g&&(j.options=p||this.resolveDataElementOptions(z,$.active?"active":i)),P||this.updateElement($,z,j,i),N=U}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Ln(_0,"id","line"),Ln(_0,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Ln(_0,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function Gu(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class cM{constructor(t){Ln(this,"options");this.options=t||{}}static override(t){Object.assign(cM.prototype,t)}init(){}formats(){return Gu()}parse(){return Gu()}format(){return Gu()}add(){return Gu()}diff(){return Gu()}startOf(){return Gu()}endOf(){return Gu()}}var KTe={_date:cM};function WTe(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const u=a._reversePixels?hPe:md;if(r){if(i._sharedOptions){const f=o[0],p=typeof f.getRange=="function"&&f.getRange(t);if(p){const g=u(o,t,n-p),v=u(o,t,n+p);return{lo:g.lo,hi:v.hi}}}}else return u(o,t,n)}return{lo:0,hi:o.length-1}}function Dv(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,u=o.length;a{u[s](t[n],i)&&(o.push({element:u,datasetIndex:f,index:p}),a=a||u.inRange(t.x,t.y,i))}),r&&!a?[]:o}var XTe={evaluateInteractionItems:Dv,modes:{index(e,t,n,r){const i=rd(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?KS(e,i,o,r,s):WS(e,i,o,!1,r,s),u=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(f=>{const p=a[0].index,g=f.data[p];g&&!g.skip&&u.push({element:g,datasetIndex:f.index,index:p})}),u):[]},dataset(e,t,n,r){const i=rd(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?KS(e,i,o,r,s):WS(e,i,o,!1,r,s);if(a.length>0){const u=a[0].datasetIndex,f=e.getDatasetMeta(u).data;a=[];for(let p=0;pn.pos===t)}function D4(e,t){return e.filter(n=>c9.indexOf(n.pos)===-1&&n.box.axis===t)}function gm(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function YTe(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;nf.box.fullSize),!0),r=gm(mm(t,"left"),!0),i=gm(mm(t,"right")),o=gm(mm(t,"top"),!0),s=gm(mm(t,"bottom")),a=D4(t,"x"),u=D4(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(u).concat(s).concat(a),chartArea:mm(t,"chartArea"),vertical:r.concat(i).concat(u),horizontal:o.concat(s).concat(a)}}function A4(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function u9(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function tIe(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!_r(i)){n.size&&(e[i]-=n.size);const g=r[n.stack]||{size:0,count:1};g.size=Math.max(g.size,n.horizontal?o.height:o.width),n.size=g.size/g.count,e[i]+=n.size}o.getPadding&&u9(s,o.getPadding());const a=Math.max(0,t.outerWidth-A4(s,e,"left","right")),u=Math.max(0,t.outerHeight-A4(s,e,"top","bottom")),f=a!==e.w,p=u!==e.h;return e.w=a,e.h=u,n.horizontal?{same:f,other:p}:{same:p,other:f}}function nIe(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function rIe(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function km(e,t,n,r){const i=[];let o,s,a,u,f,p;for(o=0,s=e.length,f=0;o{typeof T.beforeLayout=="function"&&T.beforeLayout()});const p=u.reduce((T,I)=>I.box.options&&I.box.options.display===!1?T:T+1,0)||1,g=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/p,hBoxMaxHeight:s/2}),v=Object.assign({},i);u9(v,Io(r));const b=Object.assign({maxPadding:v,w:o,h:s,x:i.left,y:i.top},i),_=JTe(u.concat(f),g);km(a.fullSize,b,g,_),km(u,b,g,_),km(f,b,g,_)&&km(u,b,g,_),nIe(b),N4(a.leftAndTop,b,g,_),b.x+=b.w,b.y+=b.h,N4(a.rightAndBottom,b,g,_),e.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},kr(a.chartArea,T=>{const I=T.box;Object.assign(I,e.chartArea),I.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}};class d9{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class iIe extends d9{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const w0="$chartjs",oIe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},L4=e=>e===null||e==="";function aIe(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[w0]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",L4(i)){const o=y4(e,"width");o!==void 0&&(e.width=o)}if(L4(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=y4(e,"height");o!==void 0&&(e.height=o)}return e}const f9=lTe?{passive:!0}:!1;function sIe(e,t,n){e.addEventListener(t,n,f9)}function lIe(e,t,n){e.canvas.removeEventListener(t,n,f9)}function cIe(e,t){const n=oIe[e.type]||e.type,{x:r,y:i}=rd(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Jb(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function uIe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Jb(a.addedNodes,r),s=s&&!Jb(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function dIe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Jb(a.removedNodes,r),s=s&&!Jb(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ug=new Map;let z4=0;function h9(){const e=window.devicePixelRatio;e!==z4&&(z4=e,Ug.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function fIe(e,t){Ug.size||window.addEventListener("resize",h9),Ug.set(e,t)}function hIe(e){Ug.delete(e),Ug.size||window.removeEventListener("resize",h9)}function pIe(e,t,n){const r=e.canvas,i=r&&lM(r);if(!i)return;const o=Wj((a,u)=>{const f=i.clientWidth;n(a,u),f{const u=a[0],f=u.contentRect.width,p=u.contentRect.height;f===0&&p===0||o(f,p)});return s.observe(i),fIe(e,o),s}function GS(e,t,n){n&&n.disconnect(),t==="resize"&&hIe(e)}function mIe(e,t,n){const r=e.canvas,i=Wj(o=>{e.ctx!==null&&n(cIe(o,e))},e);return sIe(r,t,i),i}class gIe extends d9{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(aIe(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[w0])return!1;const r=n[w0].initial;["height","width"].forEach(o=>{const s=r[o];Mr(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[w0],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:uIe,detach:dIe,resize:pIe}[n]||mIe;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:GS,detach:GS,resize:GS}[n]||lIe)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return sTe(t,n,r,i)}isAttached(t){const n=lM(t);return!!(n&&n.isConnected)}}function vIe(e){return!n9()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?iIe:gIe}class ol{constructor(){Ln(this,"x");Ln(this,"y");Ln(this,"active",!1);Ln(this,"options");Ln(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Bg(this.x)&&Bg(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}}Ln(ol,"defaults",{}),Ln(ol,"defaultRoutes");function yIe(e,t){const n=e.options.ticks,r=xIe(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?_Ie(t):[],s=o.length,a=o[0],u=o[s-1],f=[];if(s>i)return wIe(t,f,o,s/i),f;const p=bIe(o,t,i);if(s>0){let g,v;const b=s>1?Math.round((u-a)/(s-1)):null;for(zx(t,f,p,Mr(b)?0:a-b,a),g=0,v=s-1;gi)return u}return Math.max(i,1)}function _Ie(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,F4=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,$4=(e,t)=>Math.min(t||e,e);function B4(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;os+a)))return u}function PIe(e,t){kr(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:ga(n,ga(r,n)),max:ga(r,ga(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Zr(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=$Pe(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=a=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const p=this._getLabelSizes(),g=p.widest.width,v=p.highest.height,b=wa(this.chart.width-g,0,this.maxWidth);a=t.offset?this.maxWidth/r:b/(r-1),g+6>a&&(a=b/(r-(t.offset?.5:1)),u=this.maxHeight-vm(t.grid)-n.padding-V4(t.title,this.chart.options.font),f=Math.sqrt(g*g+v*v),s=Qk(Math.min(Math.asin(wa((p.highest.height+6)/a,-1,1)),Math.asin(wa(u/f,-1,1))-Math.asin(wa(v/f,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Zr(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Zr(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const u=V4(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=vm(o)+u):(t.height=this.maxHeight,t.width=vm(o)+u),r.display&&this.ticks.length){const{first:f,last:p,widest:g,highest:v}=this._getLabelSizes(),b=r.padding*2,_=Bc(this.labelRotation),T=Math.cos(_),I=Math.sin(_);if(a){const P=r.mirror?0:I*g.width+T*v.height;t.height=Math.min(this.maxHeight,t.height+P+b)}else{const P=r.mirror?0:T*g.width+I*v.height;t.width=Math.min(this.maxWidth,t.width+P+b)}this._calculatePadding(f,p,I,T)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,u=this.labelRotation!==0,f=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,g=this.right-this.getPixelForTick(this.ticks.length-1);let v=0,b=0;u?f?(v=i*t.width,b=r*n.height):(v=r*t.height,b=i*n.width):o==="start"?b=n.width:o==="end"?v=t.width:o!=="inner"&&(v=t.width/2,b=n.width/2),this.paddingLeft=Math.max((v-p+s)*this.width/(this.width-p),0),this.paddingRight=Math.max((b-g+s)*this.width/(this.width-g),0)}else{let p=n.height/2,g=t.height/2;o==="start"?(p=0,g=t.height):o==="end"&&(p=n.height,g=0),this.paddingTop=p+s,this.paddingBottom=g+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Zr(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:s[q]||0,height:a[q]||0});return{first:U(0),last:U(n-1),widest:U($),highest:U(j),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return fPe(this._alignToPixels?Wu(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*i?a/r:u/i:u*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,u=o.offset,f=this.isHorizontal(),g=this.ticks.length+(u?1:0),v=vm(o),b=[],_=a.setContext(this.getContext()),T=_.display?_.width:0,I=T/2,P=function(re){return Wu(r,re,T)};let M,D,N,z,$,j,U,q,Y,te,Z,X;if(s==="top")M=P(this.bottom),j=this.bottom-v,q=M-I,te=P(t.top)+I,X=t.bottom;else if(s==="bottom")M=P(this.top),te=t.top,X=P(t.bottom)-I,j=M+I,q=this.top+v;else if(s==="left")M=P(this.right),$=this.right-v,U=M-I,Y=P(t.left)+I,Z=t.right;else if(s==="right")M=P(this.left),Y=t.left,Z=P(t.right)-I,$=M+I,U=this.left+v;else if(n==="x"){if(s==="center")M=P((t.top+t.bottom)/2+.5);else if(_r(s)){const re=Object.keys(s)[0],se=s[re];M=P(this.chart.scales[re].getPixelForValue(se))}te=t.top,X=t.bottom,j=M+I,q=j+v}else if(n==="y"){if(s==="center")M=P((t.left+t.right)/2);else if(_r(s)){const re=Object.keys(s)[0],se=s[re];M=P(this.chart.scales[re].getPixelForValue(se))}$=M-I,U=$-v,Y=t.left,Z=t.right}const J=sr(i.ticks.maxTicksLimit,g),ue=Math.max(1,Math.ceil(g/J));for(D=0;Do.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(u,f,p)=>{!p.width||!p.color||(r.save(),r.lineWidth=p.width,r.strokeStyle=p.color,r.setLineDash(p.borderDash||[]),r.lineDashOffset=p.borderDashOffset,r.beginPath(),r.moveTo(u.x,u.y),r.lineTo(f.x,f.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),u=s.join(".");vi.route(o,i,u,a)})}function DIe(e){return"id"in e&&"defaults"in e}class AIe{constructor(){this.controllers=new Fx(oh,"datasets",!0),this.elements=new Fx(ol,"elements"),this.plugins=new Fx(Object,"plugins"),this.scales=new Fx(Kd,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):kr(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=Yk(t);Zr(r["before"+i],[],r),n[t](r),Zr(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(a=>!s.some(u=>a.plugin.id===u.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function LIe(e){const t={},n=[],r=Object.keys(qs.plugins.items);for(let o=0;o1&&U4(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function j4(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function jIe(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return j4(e,"x",n[0])||j4(e,"y",n[0])}return{}}function HIe(e,t){const n=Dd[e.type]||{scales:{}},r=t.scales||{},i=AP(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!_r(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const u=NP(s,a,jIe(s,e),vi.scales[a.type]),f=VIe(u,i),p=n.scales||{};o[s]=Qm(Object.create(null),[{axis:u},a,p[u],p[f]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,u=s.indexAxis||AP(a,t),p=(Dd[a]||{}).scales||{};Object.keys(p).forEach(g=>{const v=BIe(g,u),b=s[v+"AxisID"]||v;o[b]=o[b]||Object.create(null),Qm(o[b],[{axis:v},r[b],p[g]])})}),Object.keys(o).forEach(s=>{const a=o[s];Qm(a,[vi.scales[a.type],vi.scale])}),o}function p9(e){const t=e.options||(e.options={});t.plugins=sr(t.plugins,{}),t.scales=HIe(e,t)}function m9(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function KIe(e){return e=e||{},e.data=m9(e.data),p9(e),e}const H4=new Map,g9=new Set;function $x(e,t){let n=H4.get(e);return n||(n=t(),H4.set(e,n),g9.add(n)),n}const ym=(e,t,n)=>{const r=kh(t,n);r!==void 0&&e.add(r)};class WIe{constructor(t){this._config=KIe(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=m9(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),p9(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return $x(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return $x(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return $x(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return $x(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const u=new Set;n.forEach(p=>{t&&(u.add(t),p.forEach(g=>ym(u,t,g))),p.forEach(g=>ym(u,i,g)),p.forEach(g=>ym(u,Dd[o]||{},g)),p.forEach(g=>ym(u,vi,g)),p.forEach(g=>ym(u,OP,g))});const f=Array.from(u);return f.length===0&&f.push(Object.create(null)),g9.has(n)&&s.set(n,f),f}chartOptionScopes(){const{options:t,type:n}=this;return[t,Dd[n]||{},vi.datasets[n]||{},{type:n},vi,OP]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=K4(this._resolverCache,t,i);let u=s;if(qIe(s,n)){o.$shared=!1,r=su(r)?r():r;const f=this.createResolver(t,r,a);u=Mh(s,r,f)}for(const f of n)o[f]=u[f];return o}createResolver(t,n,r=[""],i){const{resolver:o}=K4(this._resolverCache,t,r);return _r(n)?Mh(o,n,void 0,i):o}}function K4(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:oM(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const GIe=e=>_r(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||su(e[n]),!1);function qIe(e,t){const{isScriptable:n,isIndexable:r}=Yj(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(su(a)||GIe(a))||s&&ai(a))return!0}return!1}var ZIe="4.4.0";const XIe=["top","bottom","left","right","chartArea"];function W4(e,t){return e==="top"||e==="bottom"||XIe.indexOf(e)===-1&&t==="x"}function G4(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function q4(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Zr(n&&n.onComplete,[e],t)}function YIe(e){const t=e.chart,n=t.options.animation;Zr(n&&n.onProgress,[e],t)}function v9(e){return n9()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const C0={},Z4=e=>{const t=v9(e);return Object.values(C0).filter(n=>n.canvas===t).pop()};function QIe(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function JIe(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Bx(e,t,n){return e.options.clip?e[n]:t[n]}function eke(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Bx(n,t,"left"),right:Bx(n,t,"right"),top:Bx(r,t,"top"),bottom:Bx(r,t,"bottom")}:t}class Zs{static register(...t){qs.add(...t),X4()}static unregister(...t){qs.remove(...t),X4()}constructor(t,n){const r=this.config=new WIe(n),i=v9(t),o=Z4(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||vIe(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),u=a&&a.canvas,f=u&&u.height,p=u&&u.width;if(this.id=JEe(),this.ctx=a,this.canvas=u,this.width=p,this.height=f,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new NIe,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=gPe(g=>this.update(g),s.resizeDelay||0),this._dataChanges=[],C0[this.id]=this,!a||!u){console.error("Failed to create chart: can't acquire context from the given item");return}Il.listen(this,"complete",q4),Il.listen(this,"progress",YIe),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Mr(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return qs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():v4(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return p4(this.canvas,this.ctx),this}stop(){return Il.stop(this),this}resize(t,n){Il.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,v4(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Zr(r.onResize,[this,s],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};kr(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],u=NP(s,a),f=u==="r",p=u==="x";return{options:a,dposition:f?"chartArea":p?"bottom":"left",dtype:f?"radialLinear":p?"category":"linear"}}))),kr(o,s=>{const a=s.options,u=a.id,f=NP(u,a),p=sr(a.type,s.dtype);(a.position===void 0||W4(a.position,f)!==W4(s.dposition))&&(a.position=s.dposition),i[u]=!0;let g=null;if(u in r&&r[u].type===p)g=r[u];else{const v=qs.getScale(p);g=new v({id:u,type:p,ctx:this.ctx,chart:this}),r[g.id]=g}g.init(a,t)}),kr(i,(s,a)=>{s||delete r[a]}),kr(r,s=>{es.configure(this,s,s.options),es.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let f=0,p=this.data.datasets.length;f{f.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(G4("z","_idx"));const{_active:a,_lastEvent:u}=this;u?this._eventHandler(u,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){kr(this.scales,t=>{es.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!o4(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;QIe(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;es.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],kr(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=eke(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&rM(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&iM(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Bl(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=XTe.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=gu(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);$g(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Il.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};kr(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(u,f)=>{n.addEventListener(this,u,f),t[u]=f},i=(u,f)=>{t[u]&&(n.removeEventListener(this,u,f),delete t[u])},o=(u,f)=>{this.canvas&&this.resize(u,f)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){kr(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},kr(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,u;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,u=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!qb(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(u,f)=>u.filter(p=>!f.some(g=>p.datasetIndex===g.datasetIndex&&p.index===g.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),u=oPe(t),f=JIe(t,this._lastEvent,r,u);r&&(this._lastEvent=null,Zr(o.onHover,[t,a,this],this),u&&Zr(o.onClick,[t,a,this],this));const p=!qb(a,i);return(p||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=f,p}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}}Ln(Zs,"defaults",vi),Ln(Zs,"instances",C0),Ln(Zs,"overrides",Dd),Ln(Zs,"registry",qs),Ln(Zs,"version",ZIe),Ln(Zs,"getChart",Z4);function X4(){return kr(Zs.instances,e=>e._plugins.invalidate())}function y9(e,t,n=t){e.lineCap=sr(n.borderCapStyle,t.borderCapStyle),e.setLineDash(sr(n.borderDash,t.borderDash)),e.lineDashOffset=sr(n.borderDashOffset,t.borderDashOffset),e.lineJoin=sr(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=sr(n.borderWidth,t.borderWidth),e.strokeStyle=sr(n.borderColor,t.borderColor)}function tke(e,t,n){e.lineTo(n.x,n.y)}function nke(e){return e.stepped?MPe:e.tension||e.cubicInterpolationMode==="monotone"?RPe:tke}function x9(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,u=Math.max(i,s),f=Math.min(o,a),p=ia&&o>a;return{count:r,start:u,loop:t.loop,ilen:f(s+(f?a-N:N))%o,D=()=>{T!==I&&(e.lineTo(p,I),e.lineTo(p,T),e.lineTo(p,P))};for(u&&(b=i[M(0)],e.moveTo(b.x,b.y)),v=0;v<=a;++v){if(b=i[M(v)],b.skip)continue;const N=b.x,z=b.y,$=N|0;$===_?(zI&&(I=z),p=(g*p+N)/++g):(D(),e.lineTo(N,z),_=$,g=0,T=I=z),P=z}D()}function LP(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?ike:rke}function oke(e){return e.stepped?cTe:e.tension||e.cubicInterpolationMode==="monotone"?uTe:id}function ake(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),y9(e,t.options),e.stroke(i)}function ske(e,t,n,r){const{segments:i,options:o}=t,s=LP(t);for(const a of i)y9(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const lke=typeof Path2D=="function";function cke(e,t,n,r){lke&&!t.options.segment?ake(e,t,n,r):ske(e,t,n,r)}class Mm extends ol{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;tTe(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=yTe(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=mTe(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],u=oke(r);let f,p;for(f=0,p=s.length;ft!=="borderDash"&&t!=="fill"});function Y4(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o){let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},mke=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class J4 extends ol{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Zr(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=ji(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:u}=Q4(r,o);let f,p;n.font=i.string,this.isHorizontal()?(f=this.maxWidth,p=this._fitRows(s,o,a,u)+10):(p=this.maxHeight,f=this._fitCols(s,i,a,u)+10),this.width=Math.min(f,t.maxWidth||this.maxWidth),this.height=Math.min(p,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],f=this.lineWidths=[0],p=i+a;let g=t;o.textAlign="left",o.textBaseline="middle";let v=-1,b=-p;return this.legendItems.forEach((_,T)=>{const I=r+n/2+o.measureText(_.text).width;(T===0||f[f.length-1]+I+2*a>s)&&(g+=p,f[f.length-(T>0?0:1)]=0,b+=p,v++),u[T]={left:0,top:b,row:v,width:I,height:i},f[f.length-1]+=I+a}),g}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],f=this.columnSizes=[],p=s-t;let g=a,v=0,b=0,_=0,T=0;return this.legendItems.forEach((I,P)=>{const{itemWidth:M,itemHeight:D}=gke(r,n,o,I,i);P>0&&b+D+2*a>p&&(g+=v+a,f.push({width:v,height:b}),_+=v+a,T++,v=b=0),u[P]={left:_,top:b,col:T,width:M,height:D},v=Math.max(v,M),b+=D+a}),g+=v,f.push({width:v,height:b}),g}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=ih(o,this.left,this.width);if(this.isHorizontal()){let a=0,u=Co(r,this.left+i,this.right-this.lineWidths[a]);for(const f of n)a!==f.row&&(a=f.row,u=Co(r,this.left+i,this.right-this.lineWidths[a])),f.top+=this.top+t+i,f.left=s.leftForLtr(s.x(u),f.width),u+=f.width+i}else{let a=0,u=Co(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const f of n)f.col!==a&&(a=f.col,u=Co(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),f.top=u,f.left+=this.left+i,f.left=s.leftForLtr(s.x(f.left),f.width),u+=f.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;rM(t,this),this._draw(),iM(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=vi.color,u=ih(t.rtl,this.left,this.width),f=ji(s.font),{padding:p}=s,g=f.size,v=g/2;let b;this.drawTitle(),i.textAlign=u.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=f.string;const{boxWidth:_,boxHeight:T,itemHeight:I}=Q4(s,g),P=function($,j,U){if(isNaN(_)||_<=0||isNaN(T)||T<0)return;i.save();const q=sr(U.lineWidth,1);if(i.fillStyle=sr(U.fillStyle,a),i.lineCap=sr(U.lineCap,"butt"),i.lineDashOffset=sr(U.lineDashOffset,0),i.lineJoin=sr(U.lineJoin,"miter"),i.lineWidth=q,i.strokeStyle=sr(U.strokeStyle,a),i.setLineDash(sr(U.lineDash,[])),s.usePointStyle){const Y={radius:T*Math.SQRT2/2,pointStyle:U.pointStyle,rotation:U.rotation,borderWidth:q},te=u.xPlus($,_/2),Z=j+v;qj(i,Y,te,Z,s.pointStyleWidth&&_)}else{const Y=j+Math.max((g-T)/2,0),te=u.leftForLtr($,_),Z=bd(U.borderRadius);i.beginPath(),Object.values(Z).some(X=>X!==0)?Vg(i,{x:te,y:Y,w:_,h:T,radius:Z}):i.rect(te,Y,_,T),i.fill(),q!==0&&i.stroke()}i.restore()},M=function($,j,U){Ad(i,U.text,$,j+I/2,f,{strikethrough:U.hidden,textAlign:u.textAlign(U.textAlign)})},D=this.isHorizontal(),N=this._computeTitleHeight();D?b={x:Co(o,this.left+p,this.right-r[0]),y:this.top+p+N,line:0}:b={x:this.left+p,y:Co(o,this.top+N+p,this.bottom-n[0].height),line:0},r9(this.ctx,t.textDirection);const z=I+p;this.legendItems.forEach(($,j)=>{i.strokeStyle=$.fontColor,i.fillStyle=$.fontColor;const U=i.measureText($.text).width,q=u.textAlign($.textAlign||($.textAlign=s.textAlign)),Y=_+v+U;let te=b.x,Z=b.y;u.setWidth(this.width),D?j>0&&te+Y+p>this.right&&(Z=b.y+=z,b.line++,te=b.x=Co(o,this.left+p,this.right-r[b.line])):j>0&&Z+z>this.bottom&&(te=b.x=te+n[b.line].width+p,b.line++,Z=b.y=Co(o,this.top+N+p,this.bottom-n[b.line].height));const X=u.x(te);if(P(X,Z,$),te=vPe(q,te+_+v,D?te+Y:this.right,t.rtl),M(u.x(te),Z,$),D)b.x+=Y+p;else if(typeof $.text!="string"){const J=f.lineHeight;b.y+=_9($,J)+p}else b.y+=z}),i9(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ji(n.font),i=Io(n.padding);if(!n.display)return;const o=ih(t.rtl,this.left,this.width),s=this.ctx,a=n.position,u=r.size/2,f=i.top+u;let p,g=this.left,v=this.width;if(this.isHorizontal())v=Math.max(...this.lineWidths),p=this.top+f,g=Co(t.align,g,this.right-v);else{const _=this.columnSizes.reduce((T,I)=>Math.max(T,I.height),0);p=f+Co(t.align,this.top,this.bottom-_-t.labels.padding-this._computeTitleHeight())}const b=Co(a,g,g+v);s.textAlign=o.textAlign(eM(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Ad(s,n.text,b,p,r)}_computeTitleHeight(){const t=this.options.title,n=ji(t.font),r=Io(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(pd(t,this.left,this.right)&&pd(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function yke(e,t,n){let r=e;return typeof t.text!="string"&&(r=_9(t,n)),r}function _9(e,t){const n=e.text?e.text.length:0;return t*n}function xke(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var bke={id:"legend",_element:J4,start(e,t,n){const r=e.legend=new J4({ctx:e.ctx,options:n,chart:e});es.configure(e,r,n),es.addBox(e,r)},stop(e){es.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;es.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(u=>{const f=u.controller.getStyle(n?0:void 0),p=Io(f.borderWidth);return{text:t[u.index].label,fillStyle:f.backgroundColor,fontColor:o,hidden:!u.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:f.borderColor,pointStyle:r||f.pointStyle,rotation:f.rotation,textAlign:i||f.textAlign,borderRadius:s&&(a||f.borderRadius),datasetIndex:u.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class w9 extends ol{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=ai(r.text)?r.text.length:1;this._padding=Io(r.padding);const o=i*ji(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let u=0,f,p,g;return this.isHorizontal()?(p=Co(a,r,o),g=n+t,f=o-r):(s.position==="left"?(p=r+t,g=Co(a,i,n),u=Li*-.5):(p=o-t,g=Co(a,n,i),u=Li*.5),f=i-n),{titleX:p,titleY:g,maxWidth:f,rotation:u}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ji(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:u,rotation:f}=this._drawArgs(o);Ad(t,n.text,0,0,r,{color:n.color,maxWidth:u,rotation:f,textAlign:eM(n.align),textBaseline:"middle",translation:[s,a]})}}function _ke(e,t){const n=new w9({ctx:e.ctx,options:t,chart:e});es.configure(e,n,t),es.addBox(e,n),e.titleBlock=n}var wke={id:"title",_element:w9,start(e,t,n){_ke(e,n)},stop(e){const t=e.titleBlock;es.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;es.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Rm={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;t-1?e.split(` -`):e}function Cke(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function ez(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,u=ji(t.bodyFont),f=ji(t.titleFont),p=ji(t.footerFont),g=o.length,v=i.length,b=r.length,_=Io(t.padding);let T=_.height,I=0,P=r.reduce((N,z)=>N+z.before.length+z.lines.length+z.after.length,0);if(P+=e.beforeBody.length+e.afterBody.length,g&&(T+=g*f.lineHeight+(g-1)*t.titleSpacing+t.titleMarginBottom),P){const N=t.displayColors?Math.max(a,u.lineHeight):u.lineHeight;T+=b*N+(P-b)*u.lineHeight+(P-1)*t.bodySpacing}v&&(T+=t.footerMarginTop+v*p.lineHeight+(v-1)*t.footerSpacing);let M=0;const D=function(N){I=Math.max(I,n.measureText(N).width+M)};return n.save(),n.font=f.string,kr(e.title,D),n.font=u.string,kr(e.beforeBody.concat(e.afterBody),D),M=t.displayColors?s+2+t.boxPadding:0,kr(r,N=>{kr(N.before,D),kr(N.lines,D),kr(N.after,D)}),M=0,n.font=p.string,kr(e.footer,D),n.restore(),I+=_.width,{width:I,height:T}}function Ske(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function Eke(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function Pke(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:u}}=e;let f="center";return r==="center"?f=i<=(a+u)/2?"left":"right":i<=o/2?f="left":i>=s-o/2&&(f="right"),Eke(f,e,t,n)&&(f="center"),f}function tz(e,t,n){const r=n.yAlign||t.yAlign||Ske(e,n);return{xAlign:n.xAlign||t.xAlign||Pke(e,t,n,r),yAlign:r}}function Tke(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function Ike(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function nz(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:u}=n,f=i+o,{topLeft:p,topRight:g,bottomLeft:v,bottomRight:b}=bd(s);let _=Tke(t,a);const T=Ike(t,u,f);return u==="center"?a==="left"?_+=f:a==="right"&&(_-=f):a==="left"?_-=Math.max(p,v)+i:a==="right"&&(_+=Math.max(g,b)+i),{x:wa(_,0,r.width-t.width),y:wa(T,0,r.height-t.height)}}function Vx(e,t,n){const r=Io(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function rz(e){return Ws([],kl(e))}function kke(e,t,n){return gu(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function iz(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const C9={beforeTitle:Pl,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?C9[t].call(n,r):i}class zP extends ol{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new a9(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=kke(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Zo(r,"beforeTitle",this,t),o=Zo(r,"title",this,t),s=Zo(r,"afterTitle",this,t);let a=[];return a=Ws(a,kl(i)),a=Ws(a,kl(o)),a=Ws(a,kl(s)),a}getBeforeBody(t,n){return rz(Zo(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return kr(t,o=>{const s={before:[],lines:[],after:[]},a=iz(r,o);Ws(s.before,kl(Zo(a,"beforeLabel",this,o))),Ws(s.lines,Zo(a,"label",this,o)),Ws(s.after,kl(Zo(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return rz(Zo(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Zo(r,"beforeFooter",this,t),o=Zo(r,"footer",this,t),s=Zo(r,"afterFooter",this,t);let a=[];return a=Ws(a,kl(i)),a=Ws(a,kl(o)),a=Ws(a,kl(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],u,f;for(u=0,f=n.length;ut.filter(p,g,v,r))),t.itemSort&&(a=a.sort((p,g)=>t.itemSort(p,g,r))),kr(a,p=>{const g=iz(t.callbacks,p);i.push(Zo(g,"labelColor",this,p)),o.push(Zo(g,"labelPointStyle",this,p)),s.push(Zo(g,"labelTextColor",this,p))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Rm[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const u=this._size=ez(this,r),f=Object.assign({},a,u),p=tz(this.chart,r,f),g=nz(r,f,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,o={opacity:1,x:g.x,y:g.y,width:u.width,height:u.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:g}=bd(a),{x:v,y:b}=t,{width:_,height:T}=n;let I,P,M,D,N,z;return o==="center"?(N=b+T/2,i==="left"?(I=v,P=I-s,D=N+s,z=N-s):(I=v+_,P=I+s,D=N-s,z=N+s),M=I):(i==="left"?P=v+Math.max(u,p)+s:i==="right"?P=v+_-Math.max(f,g)-s:P=this.caretX,o==="top"?(D=b,N=D-s,I=P-s,M=P+s):(D=b+T,N=D+s,I=P+s,M=P-s),z=D),{x1:I,x2:P,x3:M,y1:D,y2:N,y3:z}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,u;if(o){const f=ih(r.rtl,this.x,this.width);for(t.x=Vx(this,r.titleAlign,r),n.textAlign=f.textAlign(r.titleAlign),n.textBaseline="middle",s=ji(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,u=0;uM!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Vg(t,{x:T,y:_,w:f,h:u,radius:P}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Vg(t,{x:I,y:_+1,w:f-2,h:u-2,radius:P}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(T,_,f,u),t.strokeRect(T,_,f,u),t.fillStyle=s.backgroundColor,t.fillRect(I,_+1,f-2,u-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:u,boxWidth:f,boxPadding:p}=r,g=ji(r.bodyFont);let v=g.lineHeight,b=0;const _=ih(r.rtl,this.x,this.width),T=function(U){n.fillText(U,_.x(t.x+b),t.y+v/2),t.y+=v+o},I=_.textAlign(s);let P,M,D,N,z,$,j;for(n.textAlign=s,n.textBaseline="middle",n.font=g.string,t.x=Vx(this,I,r),n.fillStyle=r.bodyColor,kr(this.beforeBody,T),b=a&&I!=="right"?s==="center"?f/2+p:f+2+p:0,N=0,$=i.length;N<$;++N){for(P=i[N],M=this.labelTextColors[N],n.fillStyle=M,kr(P.before,T),D=P.lines,a&&D.length&&(this._drawColorBox(n,t,N,_,r),v=Math.max(g.lineHeight,u)),z=0,j=D.length;z0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Rm[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=ez(this,t),u=Object.assign({},s,this._size),f=tz(n,t,u),p=nz(t,u,f,n);(i._to!==p.x||o._to!==p.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Io(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),r9(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),i9(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:u})=>{const f=this.chart.getDatasetMeta(a);if(!f)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:f.data[u],index:u}}),o=!qb(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),u=n||!qb(s,o)||a;return u&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),u}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Rm[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}Ln(zP,"positioners",Rm);var Mke={id:"tooltip",_element:zP,positioners:Rm,afterInit(e,t,n){n&&(e.tooltip=new zP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:C9},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Rke=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Oke(e,t,n,r){const i=e.indexOf(t);if(i===-1)return Rke(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const Dke=(e,t)=>e===null?null:wa(Math.round(e),0,t);function oz(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Ln(FP,"id","category"),Ln(FP,"defaults",{ticks:{callback:oz}});function Ake(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:u,count:f,maxTicks:p,maxDigits:g,includeBounds:v}=e,b=o||1,_=p-1,{min:T,max:I}=t,P=!Mr(s),M=!Mr(a),D=!Mr(f),N=(I-T)/(g+1);let z=s4((I-T)/_/b)*b,$,j,U,q;if(z<1e-14&&!P&&!M)return[{value:T},{value:I}];q=Math.ceil(I/z)-Math.floor(T/z),q>_&&(z=s4(q*z/_/b)*b),Mr(u)||($=Math.pow(10,u),z=Math.ceil(z*$)/$),i==="ticks"?(j=Math.floor(T/z)*z,U=Math.ceil(I/z)*z):(j=T,U=I),P&&M&&o&&cPe((a-s)/o,z/1e3)?(q=Math.round(Math.min((a-s)/z,p)),z=(a-s)/q,j=s,U=a):D?(j=P?s:j,U=M?a:U,q=f-1,z=(U-j)/q):(q=(U-j)/z,Jm(q,Math.round(q),z/1e3)?q=Math.round(q):q=Math.ceil(q));const Y=Math.max(l4(z),l4(j));$=Math.pow(10,Mr(u)?Y:u),j=Math.round(j*$)/$,U=Math.round(U*$)/$;let te=0;for(P&&(v&&j!==s?(n.push({value:s}),ja)break;n.push({value:Z})}return M&&v&&U!==a?n.length&&Jm(n[n.length-1].value,a,az(a,N,e))?n[n.length-1].value=a:n.push({value:a}):(!M||U===a)&&n.push({value:U}),n}function az(e,t,{horizontal:n,minRotation:r}){const i=Bc(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class e_ extends Kd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Mr(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=u=>i=n?i:u,a=u=>o=r?o:u;if(t){const u=il(i),f=il(o);u<0&&f<0?a(0):u>0&&f>0&&s(0)}if(i===o){let u=o===0?1:Math.abs(o*.05);a(o+u),t||s(i-u)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=Ake(i,o);return t.bounds==="ticks"&&Vj(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return nM(t,this.chart.options.locale,this.options.ticks.format)}}class $P extends e_{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=to(t)?t:0,this.max=to(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Bc(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Ln($P,"id","linear"),Ln($P,"defaults",{ticks:{callback:L1.formatters.numeric}});const jg=e=>Math.floor($c(e)),qu=(e,t)=>Math.pow(10,jg(e)+t);function sz(e){return e/Math.pow(10,jg(e))===1}function lz(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function Nke(e,t){const n=t-e;let r=jg(n);for(;lz(e,t,r)>10;)r++;for(;lz(e,t,r)<10;)r--;return Math.min(r,jg(e))}function Lke(e,{min:t,max:n}){t=ga(e.min,t);const r=[],i=jg(t);let o=Nke(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),u=i>o?Math.pow(10,i):0,f=Math.round((t-u)*s)/s,p=Math.floor((t-u)/a/10)*a*10;let g=Math.floor((f-p)/Math.pow(10,o)),v=ga(e.min,Math.round((u+p+g*Math.pow(10,o))*s)/s);for(;v=10?g=g<15?15:20:g++,g>=20&&(o++,g=2,s=o>=0?1:s),v=Math.round((u+p+g*Math.pow(10,o))*s)/s;const b=ga(e.max,v);return r.push({value:b,major:sz(b),significand:g}),r}class cz extends Kd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=e_.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return to(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=to(t)?Math.max(0,t):null,this.max=to(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!to(this._userMin)&&(this.min=t===qu(this.min,0)?qu(this.min,-1):qu(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(qu(r,-1)),s(qu(i,1)))),r<=0&&o(qu(i,-1)),i<=0&&s(qu(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=Lke(n,this);return t.bounds==="ticks"&&Vj(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":nM(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=$c(t),this._valueRange=$c(this.max)-$c(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:($c(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Ln(cz,"id","logarithmic"),Ln(cz,"defaults",{ticks:{callback:L1.formatters.logarithmic,major:{enabled:!0}}});function BP(e){const t=e.ticks;if(t.display&&e.display){const n=Io(t.backdropPadding);return sr(t.font&&t.font.size,vi.font.size)+n.height}return 0}function zke(e,t,n){return n=ai(n)?n:[n],{w:kPe(e,t.string,n),h:n.length*t.lineHeight}}function uz(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function Fke(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Li/o:0;for(let u=0;ut.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(u=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+u))}function Bke(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:s,size:a}=n,u=e.getPointPosition(t,r+i+s,o),f=Math.round(Qk(Cs(u.angle+_a))),p=Kke(u.y,a.h,f),g=jke(f),v=Hke(u.x,a.w,g);return{visible:!0,x:u.x,y:p,textAlign:g,left:v,top:p,right:v+a.w,bottom:p+a.h}}function Vke(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Bl({x:n,y:r},t)||Bl({x:n,y:o},t)||Bl({x:i,y:r},t)||Bl({x:i,y:o},t))}function Uke(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:a}=o.pointLabels,u={extra:BP(o)/2,additionalAngle:s?Li/i:0};let f;for(let p=0;p270||n<90)&&(e-=t),e}function Wke(e,t,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:a}=t;if(!Mr(a)){const u=bd(t.borderRadius),f=Io(t.backdropPadding);e.fillStyle=a;const p=r-f.left,g=i-f.top,v=o-r+f.width,b=s-i+f.height;Object.values(u).some(_=>_!==0)?(e.beginPath(),Vg(e,{x:p,y:g,w:v,h:b,radius:u}),e.fill()):e.fillRect(p,g,v,b)}}function Gke(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(e.getPointLabelContext(i));Wke(n,s,o);const a=ji(s.font),{x:u,y:f,textAlign:p}=o;Ad(n,e._pointLabels[i],u,f+a.lineHeight/2,a,{color:s.color,textAlign:p,textBaseline:"middle"})}}function S9(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,rs);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=Zr(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?Fke(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=rs/(this._pointLabels.length||1),r=this.options.startAngle||0;return Cs(t*n+Bc(r))}getDistanceFromCenterForValue(t){if(Mr(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Mr(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(g!==0){u=this.getDistanceFromCenterForValue(p.value);const v=this.getContext(g),b=i.setContext(v),_=o.setContext(v);qke(this,b,u,s,_)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const p=r.setContext(this.getPointLabelContext(a)),{color:g,lineWidth:v}=p;!v||!g||(t.lineWidth=v,t.strokeStyle=g,t.setLineDash(p.borderDash),t.lineDashOffset=p.borderDashOffset,u=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),f=this.getPointPosition(a,u),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,u)=>{if(u===0&&!n.reverse)return;const f=r.setContext(this.getContext(u)),p=ji(f.font);if(o=this.getDistanceFromCenterForValue(this.ticks[u].value),f.showLabelBackdrop){t.font=p.string,s=t.measureText(a.label).width,t.fillStyle=f.backdropColor;const g=Io(f.backdropPadding);t.fillRect(-s/2-g.left,-o-p.size/2-g.top,s+g.width,p.size+g.height)}Ad(t,a.label,0,-o,p,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}Ln(Ux,"id","radialLinear"),Ln(Ux,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:L1.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Ln(Ux,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Ln(Ux,"descriptors",{angleLines:{_fallback:"grid"}});const F1={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Jo=Object.keys(F1);function dz(e,t){return e-t}function fz(e,t){if(Mr(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),to(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Bg(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function hz(e,t,n,r){const i=Jo.length;for(let o=Jo.indexOf(e);o=Jo.indexOf(n);o--){const s=Jo[o];if(F1[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return Jo[n?Jo.indexOf(n):0]}function Yke(e){for(let t=Jo.indexOf(e)+1,n=Jo.length;t=t?n[r]:n[i];e[o]=!0}}function Qke(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,u;for(a=o;a<=s;a=+i.add(a,1,r))u=n[a],u>=0&&(t[u].major=!0);return t}function mz(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=wa(n,0,s),r=wa(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||hz(o.minUnit,n,r,this._getLabelCapacity(n)),a=sr(i.ticks.stepSize,1),u=s==="week"?o.isoWeekday:!1,f=Bg(u)||u===!0,p={};let g=n,v,b;if(f&&(g=+t.startOf(g,"isoWeek",u)),g=+t.startOf(g,f?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const _=i.ticks.source==="data"&&this.getDataTimestamps();for(v=g,b=0;v+T)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,s=n||i[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Zr(s,[t,n,r],this);const a=o.time.displayFormats,u=this._unit,f=this._majorUnit,p=u&&a[u],g=f&&a[f],v=r[n],b=f&&g&&v&&v.major;return this._adapter.format(t,i||(b?g:p))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=md(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:u}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=md(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:u}=e[i]);const f=s-o;return f?a+(u-a)*(t-o)/f:a}class gz extends t_{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=jx(n,this.min),this._tableRange=jx(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,u,f,p;for(s=0,a=t.length;s=n&&f<=r&&i.push(f);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;si-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(jx(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return jx(this._table,r*this._tableRange+this._minPos,!0)}}Ln(gz,"id","timeseries"),Ln(gz,"defaults",t_.defaults);const E9="label";function vz(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Jke(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function P9(e,t){e.labels=t}function T9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:E9;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function eMe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E9;const n={labels:[],datasets:[]};return P9(n,e.labels),T9(n,e.datasets,t),n}function tMe(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:u,plugins:f=[],fallbackContent:p,updateMode:g,...v}=e,b=E.exports.useRef(null),_=E.exports.useRef(),T=()=>{!b.current||(_.current=new Zs(b.current,{type:s,data:eMe(a,o),options:u&&{...u},plugins:f}),vz(t,_.current))},I=()=>{vz(t,null),_.current&&(_.current.destroy(),_.current=null)};return E.exports.useEffect(()=>{!i&&_.current&&u&&Jke(_.current,u)},[i,u]),E.exports.useEffect(()=>{!i&&_.current&&P9(_.current.config.data,a.labels)},[i,a.labels]),E.exports.useEffect(()=>{!i&&_.current&&a.datasets&&T9(_.current.config.data,a.datasets,o)},[i,a.datasets]),E.exports.useEffect(()=>{!_.current||(i?(I(),setTimeout(T)):_.current.update(g))},[i,u,a.labels,a.datasets,g]),E.exports.useEffect(()=>{!_.current||(I(),setTimeout(T))},[s]),E.exports.useEffect(()=>(T(),()=>I()),[]),A("canvas",{...Object.assign({ref:b,role:"img",height:n,width:r},v),children:p})}const nMe=E.exports.forwardRef(tMe);function rMe(e,t){return Zs.register(t),E.exports.forwardRef((n,r)=>A(nMe,{...Object.assign({},n,{ref:r,type:e})}))}const iMe=rMe("line",_0);Zs.register(FP,b0,S0,Mm,$P,E0,wke,Mke,bke);const yz={t_shap:"Air temperature",fi_remont1_shap:"Replacement of cold water risers",fi_remont2_shap:"Repair of internal cold water mains",fi_remont3_shap:"Replacement of hot water risers",fi_remont4_shap:"Repair of internal hot water mains",fi_remont5_shap:"Repair of sewer risers",fi_remont6_shap:"Repair of sewer outlets and collector pipelines",fi_remont7_shap:"Repair of internal heating systems (with riser replacement)",fi_remont8_shap:"Repair of heating mains",total_area_shap:"Total area",fi_is_block_shap:"Material - block",fi_is_brick_shap:"Material - brick",fi_is_panel_shap:"Material - panel",building_wear_shap:"Wear",fi_is_monolit_shap:"Material - monolithic",fi_energy_class_shap:"Energy efficiency class",fi_building_year_shap:"Year of construction",gvs_avg_heat_load_shap:"Average hot water heat load",heating_heat_load_shap:"Heating heat load",gvs_fact_heat_load_shap:"Actual hot water heat load",ventilation_heat_load_shap:"Ventilation heat load"},oMe=({point:e})=>{const{data:t}=abe(e.id),{consumer_filter:n}=qi(),r=E.exports.useMemo(()=>t?!n||!n.key.includes("prob")?t.prob1_35:t[`${n.key}_35`]:null,[t,n]);if(!t||!r)return"";const i={indexAxis:"y",elements:{bar:{borderWidth:0,borderRadius:5,pointStyle:"circle"}},plugins:{legend:{display:!1},tooltip:{displayColors:!1,yAlign:"top"}},scales:{y:{stacked:!0},x:{title:{display:!0,text:"Contribution to forecast, %"},grid:{color:function(a){return a.tick.value===0?"#000000":"#E5E5E5"}}}}},o=Object.keys(yz).sort((a,u)=>Math.abs(r[a])yz[a]),datasets:[{data:o.map(a=>r?r[a]:0),backgroundColor:o.map(a=>r[a]).map(a=>a<=0?"#278211":"#CC2500"),hoverBackgroundColor:o.map(a=>r[a]).map(a=>a<=0?"#2DB20C":"#F22C00"),type:"bar",showLine:!1}]};return A(iMe,{options:i,data:s})},aMe=()=>it("div",{className:"w-[200px]",children:["The chart shows the top 15 factors that have the greatest impact on the failure forecast for the object.",A("br",{}),A("br",{}),"Factors can have a positive or negative impact.",A("br",{}),A("br",{}),"The stronger the factor's impact on failures, the closer its value is to 100% (-100%)."]}),sMe=({point:e})=>{const[t,n]=E.exports.useState(!1);return it("div",{className:"flex items-center",children:[A(ka,{title:"Impact of factors on forecast",children:A(Yr,{className:"flex justify-center items-center h-6 ml-1 mb-1 p-2",type:"primary",onClick:()=>n(!0),children:"Impact of factors on forecast"})}),A(X8,{open:t,title:"Contribution of factors to failure forecast",onCancel:()=>n(!1),width:800,footer:(()=>[A(Yr,{type:"primary",onClick:()=>n(!1),children:"Close"},"close-button")])(),style:{top:"15px"},children:it("div",{children:[A("div",{className:"flex flex-col gap-2",children:it(ad,{className:Td("p-1"),children:[A(_b,{className:"font-semibold",span:12,children:"Point address:"}),A(_b,{span:12,children:e.building_address})]})}),A(Voe,{}),A(oMe,{point:e}),A(EB,{content:A(aMe,{autoFocus:!0}),trigger:"click",placement:"leftBottom",color:"#ffffff",children:A(Yr,{type:"text",className:"text-[#1890FF] p-0",children:"How to read the chart?"})})]})})]})},lMe=({feature:e})=>it("div",{className:"flex-col gap-2",children:[e.properties.point_type==="potreb"&&A(sMe,{point:e.properties}),A(MEe,{feature:e})]}),cMe={potreb:"Consumer",tp:"Source",ods:"Dispatch center"},uMe=({features:e})=>{const{setPopup:t}=N1();return A("div",{className:"space-y-2 p-1",children:e.map(n=>{const r=n.properties.id;return A("div",{className:"flex flex-row items-center gap-2 w-full",children:A(Yr,{className:"text-start flex-1 !w-0",block:!0,onClick:()=>{t({features:[n],coordinates:n.geometry.coordinates})},children:A("div",{className:"space-x-2 flex items-center w-full",children:A("span",{className:"flex-1 truncate inline-block",children:cMe[n.properties.point_type]})})})},r)})})},dMe=({features:e,lat:t,lng:n,onClose:r})=>A(IEe,{lat:t,lng:n,onClose:r,children:(()=>e.length===1?A(lMe,{feature:e[0]}):A(uMe,{features:e}))()}),fMe=({width:e=24,height:t=24})=>it("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:e,height:t,children:[A("polygon",{points:"23.7,4.1 23.7,6.1 0.1,6.2 0.1,4.1 "}),it("g",{children:[A("circle",{cx:"6.3",cy:"5.2",r:"3.1"}),A("circle",{fill:"#fff",cx:"6.3",cy:"5.2",r:"1.4"})]}),A("polygon",{points:"23.6,11.1 23.7,13.1 0,13.1 0,11 "}),it("g",{children:[A("circle",{cx:"18.6",cy:"12.1",r:"3.1"}),A("circle",{fill:"#fff",cx:"18.6",cy:"12.1",r:"1.4"})]}),A("polygon",{points:"23.8,18.2 23.9,20.1 0.2,20.2 0.2,18.2 "}),it("g",{children:[A("circle",{cx:"10.2",cy:"19.1",r:"3.1"}),A("circle",{fill:"#fff",cx:"10.2",cy:"19.1",r:"1.4"})]})]}),hMe=({toggleCollapse:e})=>A(Yr,{icon:A(fMe,{width:16,height:16}),onClick:e,className:"border-l-0 rounded-bl-none rounded-tl-none absolute top-[100px] flex items-center justify-center"}),pMe=()=>{const e=E.exports.useRef(null),t=E.exports.useRef(null),n=E.exports.useRef(null),{popup:r,setPopup:i}=N1(),{setClickedPointConfig:o}=bv(),{tableState:s,openTable:a}=E1(),u=I=>{if(!I.features){i(null),o(null);return}const P=I.features[0];if(!P){i(null),o(null);return}const{lng:M}=I.lngLat;if(P.geometry.type==="Point"){const D=P.geometry.coordinates.slice();for(;Math.abs(M-D[0])>180;)D[0]+=M>D[0]?360:-360;i({features:I.features,coordinates:D})}},f=I=>{!I.features[0]||(e.current.getCanvas().style.cursor="pointer")},p=I=>{!I.features[0]||(e.current.getCanvas().style.cursor="")};E.exports.useEffect(()=>{const I=new ResizeObserver(Xq(()=>{var P;(P=e==null?void 0:e.current)==null||P.resize()},16));return t.current&&I.observe(t.current),()=>{I.disconnect()}},[t.current]),E.exports.useEffect(()=>{s.fullScreen&&!s.isOpened&&a()},[s.fullScreen]);const[g,v]=E.exports.useState(!1),b=()=>v(I=>!I),[_,T]=E.exports.useState(!1);return E.exports.useEffect(()=>{i3.map(I=>{var M,D;const P=new Image(((M=I.size)==null?void 0:M.width)||64,((D=I.size)==null?void 0:D.height)||64);P.src=I.url,P.crossOrigin="Anonymous",P.onload=()=>{e.current.addImage(I.name,P)}})},[i3]),A(tZ,{children:it("div",{className:"w-screen h-screen relative flex overflow-hidden",children:[A(A_e,{isCollapsed:g,ref:n}),it("div",{className:"flex-1 h-screen flex flex-col ",children:[A("div",{ref:t,className:Td(s.fullScreen?"":"flex-1"),children:it($T,{mapLib:Yq,initialViewState:{latitude:55.7558,longitude:37.6173,zoom:12},dragRotate:!1,ref:e,interactiveLayerIds:[Ci.consumer,Ci.source,Ci.dispatcher],onClick:u,onMouseEnter:f,onMouseLeave:p,id:"map",mapStyle:"https://raw.githubusercontent.com/gtitov/basemaps/refs/heads/master/positron-nolabels.json",children:[r&&A(dMe,{lat:r.coordinates[1],lng:r.coordinates[0],features:r.features,onClose:()=>{i(null),o(null)}}),A(Bbe,{onClick:()=>T(!0)}),A(hMe,{toggleCollapse:b}),A(p_e,{}),A(d_e,{}),A(h_e,{}),A(fbe,{}),_&&A(Ube,{onClose:()=>T(!1)})]})}),A("div",{className:"w-full border-solid border-border border-0 border-t-[1px] z-20",children:A(TEe,{fullWidth:g})})]})]})})};function mMe(){return A(pMe,{})}const gMe=new xxe;Zye();function vMe(){return A(Cxe,{client:gMe,children:A(Oq,{basename:"/",children:A(Rq,{children:A(z5,{path:"/",element:A(mMe,{})})})})})}XS.createRoot(document.getElementById("root")).render(A(vMe,{})); +`):e}function Cke(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function ez(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,u=ji(t.bodyFont),f=ji(t.titleFont),p=ji(t.footerFont),g=o.length,v=i.length,b=r.length,_=Io(t.padding);let T=_.height,I=0,P=r.reduce((N,z)=>N+z.before.length+z.lines.length+z.after.length,0);if(P+=e.beforeBody.length+e.afterBody.length,g&&(T+=g*f.lineHeight+(g-1)*t.titleSpacing+t.titleMarginBottom),P){const N=t.displayColors?Math.max(a,u.lineHeight):u.lineHeight;T+=b*N+(P-b)*u.lineHeight+(P-1)*t.bodySpacing}v&&(T+=t.footerMarginTop+v*p.lineHeight+(v-1)*t.footerSpacing);let M=0;const D=function(N){I=Math.max(I,n.measureText(N).width+M)};return n.save(),n.font=f.string,kr(e.title,D),n.font=u.string,kr(e.beforeBody.concat(e.afterBody),D),M=t.displayColors?s+2+t.boxPadding:0,kr(r,N=>{kr(N.before,D),kr(N.lines,D),kr(N.after,D)}),M=0,n.font=p.string,kr(e.footer,D),n.restore(),I+=_.width,{width:I,height:T}}function Ske(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function Eke(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function Pke(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:u}}=e;let f="center";return r==="center"?f=i<=(a+u)/2?"left":"right":i<=o/2?f="left":i>=s-o/2&&(f="right"),Eke(f,e,t,n)&&(f="center"),f}function tz(e,t,n){const r=n.yAlign||t.yAlign||Ske(e,n);return{xAlign:n.xAlign||t.xAlign||Pke(e,t,n,r),yAlign:r}}function Tke(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function Ike(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function nz(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:u}=n,f=i+o,{topLeft:p,topRight:g,bottomLeft:v,bottomRight:b}=bd(s);let _=Tke(t,a);const T=Ike(t,u,f);return u==="center"?a==="left"?_+=f:a==="right"&&(_-=f):a==="left"?_-=Math.max(p,v)+i:a==="right"&&(_+=Math.max(g,b)+i),{x:wa(_,0,r.width-t.width),y:wa(T,0,r.height-t.height)}}function Vx(e,t,n){const r=Io(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function rz(e){return Ws([],kl(e))}function kke(e,t,n){return gu(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function iz(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const C9={beforeTitle:Pl,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?C9[t].call(n,r):i}class zP extends ol{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new a9(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=kke(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Zo(r,"beforeTitle",this,t),o=Zo(r,"title",this,t),s=Zo(r,"afterTitle",this,t);let a=[];return a=Ws(a,kl(i)),a=Ws(a,kl(o)),a=Ws(a,kl(s)),a}getBeforeBody(t,n){return rz(Zo(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return kr(t,o=>{const s={before:[],lines:[],after:[]},a=iz(r,o);Ws(s.before,kl(Zo(a,"beforeLabel",this,o))),Ws(s.lines,Zo(a,"label",this,o)),Ws(s.after,kl(Zo(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return rz(Zo(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Zo(r,"beforeFooter",this,t),o=Zo(r,"footer",this,t),s=Zo(r,"afterFooter",this,t);let a=[];return a=Ws(a,kl(i)),a=Ws(a,kl(o)),a=Ws(a,kl(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],u,f;for(u=0,f=n.length;ut.filter(p,g,v,r))),t.itemSort&&(a=a.sort((p,g)=>t.itemSort(p,g,r))),kr(a,p=>{const g=iz(t.callbacks,p);i.push(Zo(g,"labelColor",this,p)),o.push(Zo(g,"labelPointStyle",this,p)),s.push(Zo(g,"labelTextColor",this,p))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Rm[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const u=this._size=ez(this,r),f=Object.assign({},a,u),p=tz(this.chart,r,f),g=nz(r,f,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,o={opacity:1,x:g.x,y:g.y,width:u.width,height:u.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:g}=bd(a),{x:v,y:b}=t,{width:_,height:T}=n;let I,P,M,D,N,z;return o==="center"?(N=b+T/2,i==="left"?(I=v,P=I-s,D=N+s,z=N-s):(I=v+_,P=I+s,D=N-s,z=N+s),M=I):(i==="left"?P=v+Math.max(u,p)+s:i==="right"?P=v+_-Math.max(f,g)-s:P=this.caretX,o==="top"?(D=b,N=D-s,I=P-s,M=P+s):(D=b+T,N=D+s,I=P+s,M=P-s),z=D),{x1:I,x2:P,x3:M,y1:D,y2:N,y3:z}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,u;if(o){const f=ih(r.rtl,this.x,this.width);for(t.x=Vx(this,r.titleAlign,r),n.textAlign=f.textAlign(r.titleAlign),n.textBaseline="middle",s=ji(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,u=0;uM!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Vg(t,{x:T,y:_,w:f,h:u,radius:P}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Vg(t,{x:I,y:_+1,w:f-2,h:u-2,radius:P}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(T,_,f,u),t.strokeRect(T,_,f,u),t.fillStyle=s.backgroundColor,t.fillRect(I,_+1,f-2,u-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:u,boxWidth:f,boxPadding:p}=r,g=ji(r.bodyFont);let v=g.lineHeight,b=0;const _=ih(r.rtl,this.x,this.width),T=function(U){n.fillText(U,_.x(t.x+b),t.y+v/2),t.y+=v+o},I=_.textAlign(s);let P,M,D,N,z,$,j;for(n.textAlign=s,n.textBaseline="middle",n.font=g.string,t.x=Vx(this,I,r),n.fillStyle=r.bodyColor,kr(this.beforeBody,T),b=a&&I!=="right"?s==="center"?f/2+p:f+2+p:0,N=0,$=i.length;N<$;++N){for(P=i[N],M=this.labelTextColors[N],n.fillStyle=M,kr(P.before,T),D=P.lines,a&&D.length&&(this._drawColorBox(n,t,N,_,r),v=Math.max(g.lineHeight,u)),z=0,j=D.length;z0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Rm[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=ez(this,t),u=Object.assign({},s,this._size),f=tz(n,t,u),p=nz(t,u,f,n);(i._to!==p.x||o._to!==p.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Io(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),r9(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),i9(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:u})=>{const f=this.chart.getDatasetMeta(a);if(!f)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:f.data[u],index:u}}),o=!qb(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),u=n||!qb(s,o)||a;return u&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),u}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Rm[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}Ln(zP,"positioners",Rm);var Mke={id:"tooltip",_element:zP,positioners:Rm,afterInit(e,t,n){n&&(e.tooltip=new zP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:C9},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Rke=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Oke(e,t,n,r){const i=e.indexOf(t);if(i===-1)return Rke(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const Dke=(e,t)=>e===null?null:wa(Math.round(e),0,t);function oz(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Ln(FP,"id","category"),Ln(FP,"defaults",{ticks:{callback:oz}});function Ake(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:u,count:f,maxTicks:p,maxDigits:g,includeBounds:v}=e,b=o||1,_=p-1,{min:T,max:I}=t,P=!Mr(s),M=!Mr(a),D=!Mr(f),N=(I-T)/(g+1);let z=s4((I-T)/_/b)*b,$,j,U,q;if(z<1e-14&&!P&&!M)return[{value:T},{value:I}];q=Math.ceil(I/z)-Math.floor(T/z),q>_&&(z=s4(q*z/_/b)*b),Mr(u)||($=Math.pow(10,u),z=Math.ceil(z*$)/$),i==="ticks"?(j=Math.floor(T/z)*z,U=Math.ceil(I/z)*z):(j=T,U=I),P&&M&&o&&cPe((a-s)/o,z/1e3)?(q=Math.round(Math.min((a-s)/z,p)),z=(a-s)/q,j=s,U=a):D?(j=P?s:j,U=M?a:U,q=f-1,z=(U-j)/q):(q=(U-j)/z,Jm(q,Math.round(q),z/1e3)?q=Math.round(q):q=Math.ceil(q));const Y=Math.max(l4(z),l4(j));$=Math.pow(10,Mr(u)?Y:u),j=Math.round(j*$)/$,U=Math.round(U*$)/$;let te=0;for(P&&(v&&j!==s?(n.push({value:s}),ja)break;n.push({value:Z})}return M&&v&&U!==a?n.length&&Jm(n[n.length-1].value,a,az(a,N,e))?n[n.length-1].value=a:n.push({value:a}):(!M||U===a)&&n.push({value:U}),n}function az(e,t,{horizontal:n,minRotation:r}){const i=Bc(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class e_ extends Kd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Mr(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=u=>i=n?i:u,a=u=>o=r?o:u;if(t){const u=il(i),f=il(o);u<0&&f<0?a(0):u>0&&f>0&&s(0)}if(i===o){let u=o===0?1:Math.abs(o*.05);a(o+u),t||s(i-u)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=Ake(i,o);return t.bounds==="ticks"&&Vj(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return nM(t,this.chart.options.locale,this.options.ticks.format)}}class $P extends e_{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=to(t)?t:0,this.max=to(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Bc(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Ln($P,"id","linear"),Ln($P,"defaults",{ticks:{callback:L1.formatters.numeric}});const jg=e=>Math.floor($c(e)),qu=(e,t)=>Math.pow(10,jg(e)+t);function sz(e){return e/Math.pow(10,jg(e))===1}function lz(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function Nke(e,t){const n=t-e;let r=jg(n);for(;lz(e,t,r)>10;)r++;for(;lz(e,t,r)<10;)r--;return Math.min(r,jg(e))}function Lke(e,{min:t,max:n}){t=ga(e.min,t);const r=[],i=jg(t);let o=Nke(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),u=i>o?Math.pow(10,i):0,f=Math.round((t-u)*s)/s,p=Math.floor((t-u)/a/10)*a*10;let g=Math.floor((f-p)/Math.pow(10,o)),v=ga(e.min,Math.round((u+p+g*Math.pow(10,o))*s)/s);for(;v=10?g=g<15?15:20:g++,g>=20&&(o++,g=2,s=o>=0?1:s),v=Math.round((u+p+g*Math.pow(10,o))*s)/s;const b=ga(e.max,v);return r.push({value:b,major:sz(b),significand:g}),r}class cz extends Kd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=e_.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return to(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=to(t)?Math.max(0,t):null,this.max=to(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!to(this._userMin)&&(this.min=t===qu(this.min,0)?qu(this.min,-1):qu(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(qu(r,-1)),s(qu(i,1)))),r<=0&&o(qu(i,-1)),i<=0&&s(qu(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=Lke(n,this);return t.bounds==="ticks"&&Vj(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":nM(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=$c(t),this._valueRange=$c(this.max)-$c(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:($c(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Ln(cz,"id","logarithmic"),Ln(cz,"defaults",{ticks:{callback:L1.formatters.logarithmic,major:{enabled:!0}}});function BP(e){const t=e.ticks;if(t.display&&e.display){const n=Io(t.backdropPadding);return sr(t.font&&t.font.size,vi.font.size)+n.height}return 0}function zke(e,t,n){return n=ai(n)?n:[n],{w:kPe(e,t.string,n),h:n.length*t.lineHeight}}function uz(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function Fke(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Li/o:0;for(let u=0;ut.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(u=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+u))}function Bke(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:s,size:a}=n,u=e.getPointPosition(t,r+i+s,o),f=Math.round(Qk(Cs(u.angle+_a))),p=Kke(u.y,a.h,f),g=jke(f),v=Hke(u.x,a.w,g);return{visible:!0,x:u.x,y:p,textAlign:g,left:v,top:p,right:v+a.w,bottom:p+a.h}}function Vke(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Bl({x:n,y:r},t)||Bl({x:n,y:o},t)||Bl({x:i,y:r},t)||Bl({x:i,y:o},t))}function Uke(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:a}=o.pointLabels,u={extra:BP(o)/2,additionalAngle:s?Li/i:0};let f;for(let p=0;p270||n<90)&&(e-=t),e}function Wke(e,t,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:a}=t;if(!Mr(a)){const u=bd(t.borderRadius),f=Io(t.backdropPadding);e.fillStyle=a;const p=r-f.left,g=i-f.top,v=o-r+f.width,b=s-i+f.height;Object.values(u).some(_=>_!==0)?(e.beginPath(),Vg(e,{x:p,y:g,w:v,h:b,radius:u}),e.fill()):e.fillRect(p,g,v,b)}}function Gke(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(e.getPointLabelContext(i));Wke(n,s,o);const a=ji(s.font),{x:u,y:f,textAlign:p}=o;Ad(n,e._pointLabels[i],u,f+a.lineHeight/2,a,{color:s.color,textAlign:p,textBaseline:"middle"})}}function S9(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,rs);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=Zr(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?Fke(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=rs/(this._pointLabels.length||1),r=this.options.startAngle||0;return Cs(t*n+Bc(r))}getDistanceFromCenterForValue(t){if(Mr(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Mr(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(g!==0){u=this.getDistanceFromCenterForValue(p.value);const v=this.getContext(g),b=i.setContext(v),_=o.setContext(v);qke(this,b,u,s,_)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const p=r.setContext(this.getPointLabelContext(a)),{color:g,lineWidth:v}=p;!v||!g||(t.lineWidth=v,t.strokeStyle=g,t.setLineDash(p.borderDash),t.lineDashOffset=p.borderDashOffset,u=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),f=this.getPointPosition(a,u),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,u)=>{if(u===0&&!n.reverse)return;const f=r.setContext(this.getContext(u)),p=ji(f.font);if(o=this.getDistanceFromCenterForValue(this.ticks[u].value),f.showLabelBackdrop){t.font=p.string,s=t.measureText(a.label).width,t.fillStyle=f.backdropColor;const g=Io(f.backdropPadding);t.fillRect(-s/2-g.left,-o-p.size/2-g.top,s+g.width,p.size+g.height)}Ad(t,a.label,0,-o,p,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}Ln(Ux,"id","radialLinear"),Ln(Ux,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:L1.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Ln(Ux,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Ln(Ux,"descriptors",{angleLines:{_fallback:"grid"}});const F1={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Jo=Object.keys(F1);function dz(e,t){return e-t}function fz(e,t){if(Mr(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),to(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Bg(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function hz(e,t,n,r){const i=Jo.length;for(let o=Jo.indexOf(e);o=Jo.indexOf(n);o--){const s=Jo[o];if(F1[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return Jo[n?Jo.indexOf(n):0]}function Yke(e){for(let t=Jo.indexOf(e)+1,n=Jo.length;t=t?n[r]:n[i];e[o]=!0}}function Qke(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,u;for(a=o;a<=s;a=+i.add(a,1,r))u=n[a],u>=0&&(t[u].major=!0);return t}function mz(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=wa(n,0,s),r=wa(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||hz(o.minUnit,n,r,this._getLabelCapacity(n)),a=sr(i.ticks.stepSize,1),u=s==="week"?o.isoWeekday:!1,f=Bg(u)||u===!0,p={};let g=n,v,b;if(f&&(g=+t.startOf(g,"isoWeek",u)),g=+t.startOf(g,f?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const _=i.ticks.source==="data"&&this.getDataTimestamps();for(v=g,b=0;v+T)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,s=n||i[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Zr(s,[t,n,r],this);const a=o.time.displayFormats,u=this._unit,f=this._majorUnit,p=u&&a[u],g=f&&a[f],v=r[n],b=f&&g&&v&&v.major;return this._adapter.format(t,i||(b?g:p))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=md(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:u}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=md(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:u}=e[i]);const f=s-o;return f?a+(u-a)*(t-o)/f:a}class gz extends t_{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=jx(n,this.min),this._tableRange=jx(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,u,f,p;for(s=0,a=t.length;s=n&&f<=r&&i.push(f);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;si-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(jx(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return jx(this._table,r*this._tableRange+this._minPos,!0)}}Ln(gz,"id","timeseries"),Ln(gz,"defaults",t_.defaults);const E9="label";function vz(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Jke(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function P9(e,t){e.labels=t}function T9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:E9;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function eMe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E9;const n={labels:[],datasets:[]};return P9(n,e.labels),T9(n,e.datasets,t),n}function tMe(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:u,plugins:f=[],fallbackContent:p,updateMode:g,...v}=e,b=E.exports.useRef(null),_=E.exports.useRef(),T=()=>{!b.current||(_.current=new Zs(b.current,{type:s,data:eMe(a,o),options:u&&{...u},plugins:f}),vz(t,_.current))},I=()=>{vz(t,null),_.current&&(_.current.destroy(),_.current=null)};return E.exports.useEffect(()=>{!i&&_.current&&u&&Jke(_.current,u)},[i,u]),E.exports.useEffect(()=>{!i&&_.current&&P9(_.current.config.data,a.labels)},[i,a.labels]),E.exports.useEffect(()=>{!i&&_.current&&a.datasets&&T9(_.current.config.data,a.datasets,o)},[i,a.datasets]),E.exports.useEffect(()=>{!_.current||(i?(I(),setTimeout(T)):_.current.update(g))},[i,u,a.labels,a.datasets,g]),E.exports.useEffect(()=>{!_.current||(I(),setTimeout(T))},[s]),E.exports.useEffect(()=>(T(),()=>I()),[]),A("canvas",{...Object.assign({ref:b,role:"img",height:n,width:r},v),children:p})}const nMe=E.exports.forwardRef(tMe);function rMe(e,t){return Zs.register(t),E.exports.forwardRef((n,r)=>A(nMe,{...Object.assign({},n,{ref:r,type:e})}))}const iMe=rMe("line",_0);Zs.register(FP,b0,S0,Mm,$P,E0,wke,Mke,bke);const yz={t_shap:"Air temperature",fi_remont1_shap:"Replacement of cold water risers",fi_remont2_shap:"Repair of internal cold water mains",fi_remont3_shap:"Replacement of hot water risers",fi_remont4_shap:"Repair of internal hot water mains",fi_remont5_shap:"Repair of sewer risers",fi_remont6_shap:"Repair of sewer outlets and collector pipelines",fi_remont7_shap:"Repair of internal heating systems (with riser replacement)",fi_remont8_shap:"Repair of heating mains",total_area_shap:"Total area",fi_is_block_shap:"Material - block",fi_is_brick_shap:"Material - brick",fi_is_panel_shap:"Material - panel",building_wear_shap:"Wear",fi_is_monolit_shap:"Material - monolithic",fi_energy_class_shap:"Energy efficiency class",fi_building_year_shap:"Year of construction",gvs_avg_heat_load_shap:"Average hot water heat load",heating_heat_load_shap:"Heating heat load",gvs_fact_heat_load_shap:"Actual hot water heat load",ventilation_heat_load_shap:"Ventilation heat load"},oMe=({point:e})=>{const{data:t}=ube(e.id),{consumer_filter:n}=qi(),r=E.exports.useMemo(()=>t?!n||!n.key.includes("prob")?t.prob1_35:t[`${n.key}_35`]:null,[t,n]);if(!t||!r)return"";const i={indexAxis:"y",elements:{bar:{borderWidth:0,borderRadius:5,pointStyle:"circle"}},plugins:{legend:{display:!1},tooltip:{displayColors:!1,yAlign:"top"}},scales:{y:{stacked:!0},x:{title:{display:!0,text:"Contribution to forecast, %"},grid:{color:function(a){return a.tick.value===0?"#000000":"#E5E5E5"}}}}},o=Object.keys(yz).sort((a,u)=>Math.abs(r[a])yz[a]),datasets:[{data:o.map(a=>r?r[a]:0),backgroundColor:o.map(a=>r[a]).map(a=>a<=0?"#278211":"#CC2500"),hoverBackgroundColor:o.map(a=>r[a]).map(a=>a<=0?"#2DB20C":"#F22C00"),type:"bar",showLine:!1}]};return A(iMe,{options:i,data:s})},aMe=()=>it("div",{className:"w-[200px]",children:["The chart shows the top 15 factors that have the greatest impact on the failure forecast for the object.",A("br",{}),A("br",{}),"Factors can have a positive or negative impact.",A("br",{}),A("br",{}),"The stronger the factor's impact on failures, the closer its value is to 100% (-100%)."]}),sMe=({point:e})=>{const[t,n]=E.exports.useState(!1);return it("div",{className:"flex items-center",children:[A(ka,{title:"Impact of factors on forecast",children:A(Yr,{className:"flex justify-center items-center h-6 ml-1 mb-1 p-2",type:"primary",onClick:()=>n(!0),children:"Impact of factors on forecast"})}),A(X8,{open:t,title:"Contribution of factors to failure forecast",onCancel:()=>n(!1),width:800,footer:(()=>[A(Yr,{type:"primary",onClick:()=>n(!1),children:"Close"},"close-button")])(),style:{top:"15px"},children:it("div",{children:[A("div",{className:"flex flex-col gap-2",children:it(ad,{className:Td("p-1"),children:[A(_b,{className:"font-semibold",span:12,children:"Point address:"}),A(_b,{span:12,children:e.building_address})]})}),A(Voe,{}),A(oMe,{point:e}),A(EB,{content:A(aMe,{autoFocus:!0}),trigger:"click",placement:"leftBottom",color:"#ffffff",children:A(Yr,{type:"text",className:"text-[#1890FF] p-0",children:"How to read the chart?"})})]})})]})},lMe=({feature:e})=>it("div",{className:"flex-col gap-2",children:[e.properties.point_type==="potreb"&&A(sMe,{point:e.properties}),A(MEe,{feature:e})]}),cMe={potreb:"Consumer",tp:"Source",ods:"Dispatch center"},uMe=({features:e})=>{const{setPopup:t}=N1();return A("div",{className:"space-y-2 p-1",children:e.map(n=>{const r=n.properties.id;return A("div",{className:"flex flex-row items-center gap-2 w-full",children:A(Yr,{className:"text-start flex-1 !w-0",block:!0,onClick:()=>{t({features:[n],coordinates:n.geometry.coordinates})},children:A("div",{className:"space-x-2 flex items-center w-full",children:A("span",{className:"flex-1 truncate inline-block",children:cMe[n.properties.point_type]})})})},r)})})},dMe=({features:e,lat:t,lng:n,onClose:r})=>A(IEe,{lat:t,lng:n,onClose:r,children:(()=>e.length===1?A(lMe,{feature:e[0]}):A(uMe,{features:e}))()}),fMe=({width:e=24,height:t=24})=>it("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:e,height:t,children:[A("polygon",{points:"23.7,4.1 23.7,6.1 0.1,6.2 0.1,4.1 "}),it("g",{children:[A("circle",{cx:"6.3",cy:"5.2",r:"3.1"}),A("circle",{fill:"#fff",cx:"6.3",cy:"5.2",r:"1.4"})]}),A("polygon",{points:"23.6,11.1 23.7,13.1 0,13.1 0,11 "}),it("g",{children:[A("circle",{cx:"18.6",cy:"12.1",r:"3.1"}),A("circle",{fill:"#fff",cx:"18.6",cy:"12.1",r:"1.4"})]}),A("polygon",{points:"23.8,18.2 23.9,20.1 0.2,20.2 0.2,18.2 "}),it("g",{children:[A("circle",{cx:"10.2",cy:"19.1",r:"3.1"}),A("circle",{fill:"#fff",cx:"10.2",cy:"19.1",r:"1.4"})]})]}),hMe=({toggleCollapse:e})=>A(Yr,{icon:A(fMe,{width:16,height:16}),onClick:e,className:"border-l-0 rounded-bl-none rounded-tl-none absolute top-[100px] flex items-center justify-center"}),pMe=()=>{const e=E.exports.useRef(null),t=E.exports.useRef(null),n=E.exports.useRef(null),{popup:r,setPopup:i}=N1(),{setClickedPointConfig:o}=bv(),{tableState:s,openTable:a}=E1(),u=I=>{if(!I.features){i(null),o(null);return}const P=I.features[0];if(!P){i(null),o(null);return}const{lng:M}=I.lngLat;if(P.geometry.type==="Point"){const D=P.geometry.coordinates.slice();for(;Math.abs(M-D[0])>180;)D[0]+=M>D[0]?360:-360;i({features:I.features,coordinates:D})}},f=I=>{!I.features[0]||(e.current.getCanvas().style.cursor="pointer")},p=I=>{!I.features[0]||(e.current.getCanvas().style.cursor="")};E.exports.useEffect(()=>{const I=new ResizeObserver(Xq(()=>{var P;(P=e==null?void 0:e.current)==null||P.resize()},16));return t.current&&I.observe(t.current),()=>{I.disconnect()}},[t.current]),E.exports.useEffect(()=>{s.fullScreen&&!s.isOpened&&a()},[s.fullScreen]);const[g,v]=E.exports.useState(!1),b=()=>v(I=>!I),[_,T]=E.exports.useState(!1);return E.exports.useEffect(()=>{i3.map(I=>{var M,D;const P=new Image(((M=I.size)==null?void 0:M.width)||64,((D=I.size)==null?void 0:D.height)||64);P.src=I.url,P.crossOrigin="Anonymous",P.onload=()=>{e.current.addImage(I.name,P)}})},[i3]),A(tZ,{children:it("div",{className:"w-screen h-screen relative flex overflow-hidden",children:[A(A_e,{isCollapsed:g,ref:n}),it("div",{className:"flex-1 h-screen flex flex-col ",children:[A("div",{ref:t,className:Td(s.fullScreen?"":"flex-1"),children:it($T,{mapLib:Yq,initialViewState:{latitude:55.7558,longitude:37.6173,zoom:12},dragRotate:!1,ref:e,interactiveLayerIds:[Ci.consumer,Ci.source,Ci.dispatcher],onClick:u,onMouseEnter:f,onMouseLeave:p,id:"map",mapStyle:"https://raw.githubusercontent.com/gtitov/basemaps/refs/heads/master/positron-nolabels.json",children:[r&&A(dMe,{lat:r.coordinates[1],lng:r.coordinates[0],features:r.features,onClose:()=>{i(null),o(null)}}),A(Bbe,{onClick:()=>T(!0)}),A(hMe,{toggleCollapse:b}),A(p_e,{}),A(d_e,{}),A(h_e,{}),A(fbe,{}),_&&A(Ube,{onClose:()=>T(!1)})]})}),A("div",{className:"w-full border-solid border-border border-0 border-t-[1px] z-20",children:A(TEe,{fullWidth:g})})]})]})})};function mMe(){return A(pMe,{})}const gMe=new Cxe;exe();function vMe(){return A(Txe,{client:gMe,children:A(Oq,{basename:"/",children:A(Rq,{children:A(z5,{path:"/",element:A(mMe,{})})})})})}XS.createRoot(document.getElementById("root")).render(A(vMe,{})); diff --git a/dist/index.html b/dist/index.html index 8c7f558..b737f41 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ DZKH by Spatial - + diff --git a/src/Map/Popup/FeatureProperties/FeatureProperties.jsx b/src/Map/Popup/FeatureProperties/FeatureProperties.jsx index c2c90cc..09cef50 100644 --- a/src/Map/Popup/FeatureProperties/FeatureProperties.jsx +++ b/src/Map/Popup/FeatureProperties/FeatureProperties.jsx @@ -1,10 +1,10 @@ -import {commonPopupConfig,} from "./config"; -import {Button, Col, Row} from "antd"; -import {isNil} from "../../../utils.js"; -import {useGetRegions} from "../../../components/RegionSelect.jsx"; -import {useSimulateAccident} from "../../../stores/useSimulateAccident.js"; -import {useWeatherFilter} from "../../../dzkh-features/WeatherSlider/useWeatherFilter.js"; -import {tempMapper} from "../../../config.js"; +import { Button, Col, Row } from "antd"; +import { useGetRegions } from "../../../components/RegionSelect.jsx"; +import { tempMapper } from "../../../config.js"; +import { useWeatherFilter } from "../../../dzkh-features/WeatherSlider/useWeatherFilter.js"; +import { useSimulateAccident } from "../../../stores/useSimulateAccident.js"; +import { isNil } from "../../../utils.js"; +import { commonPopupConfig, } from "./config"; const dynamicFields = [ { @@ -44,7 +44,7 @@ export const FeatureProperties = ({ feature }) => { if (isSourcePoint) { return [ - ...commonPopupConfig, {field: `prob6_${tempMapper[temperature]}`, name: 'TP failure'} + ...commonPopupConfig, {field: `prob6_${tempMapper[temperature]}`, name: 'Energy source failure'} ] } diff --git a/src/config.js b/src/config.js index 14d3fac..29589c6 100644 --- a/src/config.js +++ b/src/config.js @@ -1,7 +1,7 @@ export const CONSUMER_OPTIONS = [ { value: "category1", - title: "Forecasting", + title: " Emergency forecasting", selectable: false, children: [ { @@ -28,7 +28,7 @@ export const CONSUMER_OPTIONS = [ }, { value: "category2", - title: "Response", + title: "Emergency response", selectable: false, children: [ { diff --git a/src/dzkh-features/AccidentSimulationResults.jsx b/src/dzkh-features/AccidentSimulationResults.jsx index 0f54402..449c405 100644 --- a/src/dzkh-features/AccidentSimulationResults.jsx +++ b/src/dzkh-features/AccidentSimulationResults.jsx @@ -1,9 +1,9 @@ -import { Button, Col, Divider, Modal, Popover, Row, Tooltip } from "antd"; -import {useSimulateAccident} from "../stores/useSimulateAccident.js"; -import {Title} from "../components/Title.jsx"; -import { AccidentSimulationModal } from "./AccidentSimulation/AccidentSimulationModal.jsx"; +import { Button, Popover } from "antd"; import { useState } from "react"; import { BiInfoCircle } from "react-icons/all.js"; +import { Title } from "../components/Title.jsx"; +import { useSimulateAccident } from "../stores/useSimulateAccident.js"; +import { AccidentSimulationModal } from "./AccidentSimulation/AccidentSimulationModal.jsx"; export const AccidentSimulationResults = () => { const {selectedSourceConfig, setSelectedSourceConfig} = useSimulateAccident(); @@ -17,7 +17,7 @@ export const AccidentSimulationResults = () => { return ( <>
- + <Title text={`Results of Energy source failure simulation ${selectedSourceConfig?.sourceId}`}/> <div className="flex justify-center flex-row gap-2"> <Button type="primary" onClick={stopSimulation}>Cancel</Button> {!!pointId && ( diff --git a/src/dzkh-features/Sidebar/ConsumerParameterSelect.jsx b/src/dzkh-features/Sidebar/ConsumerParameterSelect.jsx index dc31bcf..5032b1f 100644 --- a/src/dzkh-features/Sidebar/ConsumerParameterSelect.jsx +++ b/src/dzkh-features/Sidebar/ConsumerParameterSelect.jsx @@ -11,7 +11,7 @@ export const ConsumerParameterSelect = ({ disabled }) => { return ( <div> - <Title text={"Consumer parameter"} /> + <Title text={"Energy consumer parameter"} /> <TreeSelect mode="tags" diff --git a/src/dzkh-features/Sidebar/SourceParameterSelect.jsx b/src/dzkh-features/Sidebar/SourceParameterSelect.jsx index a380e70..7f5815d 100644 --- a/src/dzkh-features/Sidebar/SourceParameterSelect.jsx +++ b/src/dzkh-features/Sidebar/SourceParameterSelect.jsx @@ -4,7 +4,7 @@ import { useDzkhFilters } from "../../stores/useDzkhFilters.js"; const options = [{ value: "prob6", - label: "TP failure" + label: "Energy source failure" }]; export const SourceParameterSelect = ({ disabled }) => { @@ -15,7 +15,7 @@ export const SourceParameterSelect = ({ disabled }) => { return ( <div> - <Title text={"Source parameter"} /> + <Title text={"Energy source parameter"} /> <TreeSelect mode="tags" diff --git a/src/modules/Table/useColumns.jsx b/src/modules/Table/useColumns.jsx index 4be9ef6..2ab7c5d 100644 --- a/src/modules/Table/useColumns.jsx +++ b/src/modules/Table/useColumns.jsx @@ -1,9 +1,9 @@ -import {tempMapper} from "../../config"; -import {useEffect, useMemo} from "react"; -import {useGetRegions} from "../../components/RegionSelect.jsx"; -import {useTable} from "../../stores/useTable.js"; +import { useEffect, useMemo } from "react"; +import { useGetRegions } from "../../components/RegionSelect.jsx"; +import { tempMapper } from "../../config"; +import { useWeatherFilter } from "../../dzkh-features/WeatherSlider/useWeatherFilter.js"; import useLocalStorage from "../../hooks/useLocalStorage.js"; -import {useWeatherFilter} from "../../dzkh-features/WeatherSlider/useWeatherFilter.js"; +import { useTable } from "../../stores/useTable.js"; export const useColumns = (key) => { const { data: regions } = useGetRegions(); @@ -99,7 +99,7 @@ export const useColumns = (key) => { showSorterTooltip: false, }, { - title: "TP failure", + title: "Energy source failure", dataIndex: `prob6_${tempMapper[temperature]}`, key: "prob6", width: "120px",