@nocobase/portal-template-default 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/CoordinateSystem-C8P-Cleg.js +1 -0
- package/dist/assets/LegendVisualProvider-Bdgkckq-.js +1 -0
- package/dist/assets/LineDraw-C0m1GONT.js +1 -0
- package/dist/assets/SymbolDraw-CCospe5G.js +1 -0
- package/dist/assets/VisualMapping-Cbv1v7Cd.js +1 -0
- package/dist/assets/ai-employee-shortcut-B253WWow.js +1 -0
- package/dist/assets/calendar-B3dXXyIv.js +1 -0
- package/dist/assets/chat-inline-xpQ9iq4p.js +1 -0
- package/dist/assets/chat-side-panel-layout-BVWsp5rr.js +1 -0
- package/dist/assets/components-ChhJaNRc.js +20 -0
- package/dist/assets/configuration-gate-Dwdq_lxf.js +1 -0
- package/dist/assets/createClipPathFromCoordSys-uEftn1Mq.js +1 -0
- package/dist/assets/createSeriesDataSimply-CI7l7Ufv.js +1 -0
- package/dist/assets/customGraphicKeyframeAnimation-DE3jSfMd.js +3 -0
- package/dist/assets/echarts-preview-C-cNUtJF.js +1 -0
- package/dist/assets/echarts-runtime-CEgJbv68.js +58 -0
- package/dist/assets/echarts-runtime-advanced-Buhm2BHz.js +1 -0
- package/dist/assets/echarts-runtime-common-DLAdBAIa.js +1 -0
- package/dist/assets/echarts-runtime-components-ypnyLkYx.js +1 -0
- package/dist/assets/echarts-runtime-hierarchy-ClStquCF.js +1 -0
- package/dist/assets/floating-BarTmn-b.js +13 -0
- package/dist/assets/index-BJIcYTdc.js +53 -0
- package/dist/assets/index-C6xNKxpg.js +656 -0
- package/dist/assets/index-D4JQi1TM.js +54 -0
- package/dist/assets/index-YA7-AUO8.css +1 -0
- package/dist/assets/index-g8zWVpP9.js +23 -0
- package/dist/assets/labelHelper-C137W5gU.js +1 -0
- package/dist/assets/nocobase-ai-chat-VTMaZFQB.svg +50 -0
- package/dist/assets/page-context-Cxx11gzg.js +73 -0
- package/dist/assets/prompt-card-BsYMW_rq.js +1 -0
- package/dist/assets/sectorHelper-Fqgz3uEk.js +1 -0
- package/dist/assets/shortcut-xtghDP63.js +47 -0
- package/dist/assets/static.browser-CfQQzERe.js +30 -0
- package/dist/assets/switch-DrxImI8F.js +1 -0
- package/dist/assets/tool-cards-BGfsY8JF.js +41 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.html +40 -0
- package/dist/index.raw.html +46 -0
- package/dist/logo-dark.png +0 -0
- package/dist/logo-mark-dark.png +0 -0
- package/dist/logo-mark.png +0 -0
- package/dist/logo.png +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function i(e,t){return e.type===t}export{i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function d(a){return{seriesType:a,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(o){for(var u=i.getName(o),r=0;r<n.length;r++)if(!n[r].isSelected(u))return!1;return!0})}}}}var s=(function(){function a(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return a.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},a.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},a.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},a.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},a})();export{s as L,d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as I,dw as k,W as N,a4 as G,dx as H,dy as fe,b8 as he,dz as me,bk as pe,f as C,k as ce,aD as ve,dA as W,dB as K,c_ as re,dC as de,D as ye,br as ge,aK as _e,be as oe,P as be,j as Te,y as Y,x as Se,u as ae,z as j,r as Me,bs as Le,H as Pe,t as we,ac as Ce,ad as Ae,bh as Oe,G as ie,ae as ne,af as se,a as Re,I as Ie}from"./echarts-runtime-CEgJbv68.js";var F=H,Be=(function(a){I(r,a);function r(e){var t=a.call(this)||this;return t.type="view",t.dimensions=["x","y"],t._roamTransformable=new k,t._rawTransformable=new k,t.name=e,t}return r.prototype.setBoundingRect=function(e,t,o,i){return this._rect=new N(e,t,o,i),this._rect},r.prototype.getBoundingRect=function(){return this._rect},r.prototype.setViewRect=function(e,t,o,i){this._transformTo(e,t,o,i),this._viewRect=new N(e,t,o,i)},r.prototype._transformTo=function(e,t,o,i){var n=this.getBoundingRect(),s=this._rawTransformable;s.transform=n.calculateTransform(new N(e,t,o,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},r.prototype.setCenter=function(e,t){e&&(this._center=[G(e[0],t.getWidth()),G(e[1],t.getHeight())],this._updateCenterAndZoom())},r.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(t.max!=null&&(e=Math.min(t.max,e)),t.min!=null&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},r.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),t=e.x+e.width/2,o=e.y+e.height/2;return[t,o]},r.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},r.prototype.getZoom=function(){return this._zoom||1},r.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},r.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,o=this.getDefaultCenter(),i=this.getCenter(),n=this.getZoom();i=H([],i,e),o=H([],o,e),t.originX=i[0],t.originY=i[1],t.x=o[0]-i[0],t.y=o[1]-i[1],t.scaleX=t.scaleY=n,this._updateTransform()},r.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),fe(this.transform||(this.transform=[]),t.transform||he()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],me(this.invTransform,this.transform),this.decomposeTransform()},r.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,o=new k;return o.transform=t.transform,o.decomposeTransform(),{roam:{x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},r.prototype.getViewRect=function(){return this._viewRect},r.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},r.prototype.dataToPoint=function(e,t,o){var i=t?this._rawTransform:this.transform;return o=o||[],i?F(o,e,i):pe(o,e)},r.prototype.pointToData=function(e){var t=this.invTransform;return t?F([],e,t):[e[0],e[1]]},r.prototype.convertToPixel=function(e,t,o){var i=U(t);return i===this?i.dataToPoint(o):null},r.prototype.convertFromPixel=function(e,t,o){var i=U(t);return i===this?i.pointToData(o):null},r.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},r.dimensions=["x","y"],r})(k);function U(a){var r=a.seriesModel;return r?r.coordinateSystem:null}function D(a,r){return a.pointToProjected?a.pointToProjected(r):a.pointToData(r)}function ze(a,r,e,t){var o=a.getZoom(),i=a.getCenter(),n=r.zoom,s=a.projectedToPoint?a.projectedToPoint(i):a.dataToPoint(i);if(r.dx!=null&&r.dy!=null&&(s[0]-=r.dx,s[1]-=r.dy,a.setCenter(D(a,s),t)),n!=null){if(e){var l=e.min||0,u=e.max||1/0;n=Math.max(Math.min(o*n,u),l)/o}a.scaleX*=n,a.scaleY*=n;var f=(r.originX-a.x)*(n-1),m=(r.originY-a.y)*(n-1);a.x-=f,a.y-=m,a.updateTransform(),a.setCenter(D(a,s),t),a.setZoom(n*o)}return{center:a.getCenter(),zoom:a.getZoom()}}var xe=(function(a){I(r,a);function r(e){var t=a.call(this)||this;t._zr=e;var o=C(t._mousedownHandler,t),i=C(t._mousemoveHandler,t),n=C(t._mouseupHandler,t),s=C(t._mousewheelHandler,t),l=C(t._pinchHandler,t);return t.enable=function(u,f){this.disable(),this._opt=ce(ve(f)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",o),e.on("mousemove",i),e.on("mouseup",n)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},t.disable=function(){e.off("mousedown",o),e.off("mousemove",i),e.off("mouseup",n),e.off("mousewheel",s),e.off("pinch",l)},t}return r.prototype.isDragging=function(){return this._dragging},r.prototype.isPinching=function(){return this._pinching},r.prototype.setPointerChecker=function(e){this.pointerChecker=e},r.prototype.dispose=function(){this.disable()},r.prototype._mousedownHandler=function(e){if(!W(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var o=e.offsetX,i=e.offsetY;this.pointerChecker&&this.pointerChecker(e,o,i)&&(this._x=o,this._y=i,this._dragging=!0)}},r.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!E("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||K(this._zr,"globalPan"))){var t=e.offsetX,o=e.offsetY,i=this._x,n=this._y,s=t-i,l=o-n;this._x=t,this._y=o,this._opt.preventDefaultMouseMove&&re(e.event),le(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:i,oldY:n,newX:t,newY:o,isAvailableBehavior:null})}},r.prototype._mouseupHandler=function(e){W(e)||(this._dragging=!1)},r.prototype._mousewheelHandler=function(e){var t=E("zoomOnMouseWheel",e,this._opt),o=E("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,n=Math.abs(i),s=e.offsetX,l=e.offsetY;if(!(i===0||!t&&!o)){if(t){var u=n>3?1.4:n>1?1.2:1.1,f=i>0?u:1/u;X(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(o){var m=Math.abs(i),h=(i>0?1:-1)*(m>3?.4:m>1?.15:.05);X(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},r.prototype._pinchHandler=function(e){if(!K(this._zr,"globalPan")){var t=e.pinchScale>1?1.1:1/1.1;X(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},r})(de);function X(a,r,e,t,o){a.pointerChecker&&a.pointerChecker(t,o.originX,o.originY)&&(re(t.event),le(a,r,e,t,o))}function le(a,r,e,t,o){o.isAvailableBehavior=C(E,null,e,t),a.trigger(r,o)}function E(a,r,e){var t=e[a];return!a||t&&(!ye(t)||r.event[t+"Key"])}function Ve(a,r,e){var t=a.target;t.x+=r,t.y+=e,t.dirty()}function He(a,r,e,t){var o=a.target,i=a.zoomLimit,n=a.zoom=a.zoom||1;if(n*=r,i){var s=i.min||0,l=i.max||1/0;n=Math.max(Math.min(l,n),s)}var u=n/a.zoom;a.zoom=n,o.x-=(e-o.x)*(u-1),o.y-=(t-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}var $=ge.prototype,B=_e.prototype,ue=(function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return a})();(function(a){I(r,a);function r(){return a!==null&&a.apply(this,arguments)||this}return r})(ue);function z(a){return isNaN(+a.cpx1)||isNaN(+a.cpy1)}var ke=(function(a){I(r,a);function r(e){var t=a.call(this,e)||this;return t.type="ec-line",t}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new ue},r.prototype.buildPath=function(e,t){z(t)?$.buildPath.call(this,e,t):B.buildPath.call(this,e,t)},r.prototype.pointAt=function(e){return z(this.shape)?$.pointAt.call(this,e):B.pointAt.call(this,e)},r.prototype.tangentAt=function(e){var t=this.shape,o=z(t)?[t.x2-t.x1,t.y2-t.y1]:B.tangentAt.call(this,e);return oe(o,o)},r})(be),x=["fromSymbol","toSymbol"];function q(a){return"_"+a+"Type"}function J(a,r,e){var t=r.getItemVisual(e,a);if(!t||t==="none")return t;var o=r.getItemVisual(e,a+"Size"),i=r.getItemVisual(e,a+"Rotate"),n=r.getItemVisual(e,a+"Offset"),s=r.getItemVisual(e,a+"KeepAspect"),l=ne(o),u=se(n||0,l);return t+l+u+(i||"")+(s||"")}function Q(a,r,e){var t=r.getItemVisual(e,a);if(!(!t||t==="none")){var o=r.getItemVisual(e,a+"Size"),i=r.getItemVisual(e,a+"Rotate"),n=r.getItemVisual(e,a+"Offset"),s=r.getItemVisual(e,a+"KeepAspect"),l=ne(o),u=se(n||0,l),f=Re(t,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return f.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,f.name=a,f}}function Ee(a){var r=new ke({name:"line",subPixelOptimize:!0});return Z(r.shape,a),r}function Z(a,r){a.x1=r[0][0],a.y1=r[0][1],a.x2=r[1][0],a.y2=r[1][1],a.percent=1;var e=r[2];e?(a.cpx1=e[0],a.cpy1=e[1]):(a.cpx1=NaN,a.cpy1=NaN)}var Ne=(function(a){I(r,a);function r(e,t,o){var i=a.call(this)||this;return i._createLine(e,t,o),i}return r.prototype._createLine=function(e,t,o){var i=e.hostModel,n=e.getItemLayout(t),s=Ee(n);s.shape.percent=0,Te(s,{shape:{percent:1}},i,t),this.add(s),Y(x,function(l){var u=Q(l,e,t);this.add(u),this[q(l)]=J(l,e,t)},this),this._updateCommonStl(e,t,o)},r.prototype.updateData=function(e,t,o){var i=e.hostModel,n=this.childOfName("line"),s=e.getItemLayout(t),l={shape:{}};Z(l.shape,s),Se(n,l,i,t),Y(x,function(u){var f=J(u,e,t),m=q(u);if(this[m]!==f){this.remove(this.childOfName(u));var h=Q(u,e,t);this.add(h)}this[m]=f},this),this._updateCommonStl(e,t,o)},r.prototype.getLinePath=function(){return this.childAt(0)},r.prototype._updateCommonStl=function(e,t,o){var i=e.hostModel,n=this.childOfName("line"),s=o&&o.emphasisLineStyle,l=o&&o.blurLineStyle,u=o&&o.selectLineStyle,f=o&&o.labelStatesModels,m=o&&o.emphasisDisabled,h=o&&o.focus,A=o&&o.blurScope;if(!o||e.hasItemOption){var v=e.getItemModel(t),d=v.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),l=v.getModel(["blur","lineStyle"]).getLineStyle(),u=v.getModel(["select","lineStyle"]).getLineStyle(),m=d.get("disabled"),h=d.get("focus"),A=d.get("blurScope"),f=ae(v)}var S=e.getItemVisual(t,"style"),b=S.stroke;n.useStyle(S),n.style.fill=null,n.style.strokeNoScale=!0,n.ensureState("emphasis").style=s,n.ensureState("blur").style=l,n.ensureState("select").style=u,Y(x,function(P){var p=this.childOfName(P);if(p){p.setColor(b),p.style.opacity=S.opacity;for(var M=0;M<j.length;M++){var c=j[M],w=n.getState(c);if(w){var L=w.style||{},O=p.ensureState(c),R=O.style||(O.style={});L.stroke!=null&&(R[p.__isEmptyBrush?"stroke":"fill"]=L.stroke),L.opacity!=null&&(R.opacity=L.opacity)}}p.markRedraw()}},this);var T=i.getRawValue(t);Me(this,f,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(P,p){return i.getFormattedLabel(P,p,e.dataType)}},inheritColor:b||"#000",defaultOpacity:S.opacity,defaultText:(T==null?e.getName(t):isFinite(T)?Le(T):T)+""});var g=this.getTextContent();if(g){var _=f.normal;g.__align=g.style.align,g.__verticalAlign=g.style.verticalAlign,g.__position=_.get("position")||"middle";var y=_.get("distance");Pe(y)||(y=[y,y]),g.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),we(this,h,A,m)},r.prototype.highlight=function(){Ce(this)},r.prototype.downplay=function(){Ae(this)},r.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},r.prototype.setLinePoints=function(e){var t=this.childOfName("line");Z(t.shape,e),t.dirty()},r.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),o=e.childOfName("toSymbol"),i=e.getTextContent();if(!t&&!o&&(!i||i.ignore))return;for(var n=1,s=this.parent;s;)s.scaleX&&(n/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,f=l.pointAt(0),m=l.pointAt(u),h=Oe([],m,f);oe(h,h);function A(w,L){var O=w.__specifiedRotation;if(O==null){var R=l.tangentAt(L);w.attr("rotation",(L===1?-1:1)*Math.PI/2-Math.atan2(R[1],R[0]))}else w.attr("rotation",O)}if(t&&(t.setPosition(f),A(t,0),t.scaleX=t.scaleY=n*u,t.markRedraw()),o&&(o.setPosition(m),A(o,1),o.scaleX=o.scaleY=n*u,o.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var v=void 0,d=void 0,S=i.__labelDistance,b=S[0]*n,T=S[1]*n,g=u/2,_=l.tangentAt(g),y=[_[1],-_[0]],P=l.pointAt(g);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var p=_[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var M=-Math.atan2(_[1],_[0]);m[0]<f[0]&&(M=Math.PI+M),i.rotation=M}var c=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":c=-T,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":c=T,d="top";break;default:c=0,d="middle"}switch(i.__position){case"end":i.x=h[0]*b+m[0],i.y=h[1]*T+m[1],v=h[0]>.8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*b+f[0],i.y=-h[1]*T+f[1],v=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=b*p+f[0],i.y=f[1]+c,v=_[0]<0?"right":"left",i.originX=-b*p,i.originY=-c;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=P[0],i.y=P[1]+c,v="center",i.originY=-c;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-b*p+m[0],i.y=m[1]+c,v=_[0]>=0?"right":"left",i.originX=b*p,i.originY=-c;break}i.scaleX=i.scaleY=n,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||v})}},r})(ie),Ze=(function(){function a(r){this.group=new ie,this._LineCtor=r||Ne}return a.prototype.updateData=function(r){var e=this;this._progressiveEls=null;var t=this,o=t.group,i=t._lineData;t._lineData=r,i||o.removeAll();var n=ee(r);r.diff(i).add(function(s){e._doAdd(r,s,n)}).update(function(s,l){e._doUpdate(i,r,l,s,n)}).remove(function(s){o.remove(i.getItemGraphicEl(s))}).execute()},a.prototype.updateLayout=function(){var r=this._lineData;r&&r.eachItemGraphicEl(function(e,t){e.updateLayout(r,t)},this)},a.prototype.incrementalPrepareUpdate=function(r){this._seriesScope=ee(r),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(r,e){this._progressiveEls=[];function t(s){!s.isGroup&&!Ye(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var o=r.start;o<r.end;o++){var i=e.getItemLayout(o);if(V(i)){var n=new this._LineCtor(e,o,this._seriesScope);n.traverse(t),this.group.add(n),e.setItemGraphicEl(o,n),this._progressiveEls.push(n)}}},a.prototype.remove=function(){this.group.removeAll()},a.prototype.eachRendered=function(r){Ie(this._progressiveEls||this.group,r)},a.prototype._doAdd=function(r,e,t){var o=r.getItemLayout(e);if(V(o)){var i=new this._LineCtor(r,e,t);r.setItemGraphicEl(e,i),this.group.add(i)}},a.prototype._doUpdate=function(r,e,t,o,i){var n=r.getItemGraphicEl(t);if(!V(e.getItemLayout(o))){this.group.remove(n);return}n?n.updateData(e,o,i):n=new this._LineCtor(e,o,i),e.setItemGraphicEl(o,n),this.group.add(n)},a})();function Ye(a){return a.animators&&a.animators.length>0}function ee(a){var r=a.hostModel,e=r.getModel("emphasis");return{lineStyle:r.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:r.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:r.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:ae(r)}}function te(a){return isNaN(a[0])||isNaN(a[1])}function V(a){return a&&!te(a[0])&&!te(a[1])}export{Ze as L,xe as R,Be as V,He as a,ze as b,Ne as c,Ve as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as U,a as Z,ac as j,ad as k,x as G,J as F,j as H,u as N,af as B,al as J,N as C,r as K,t as $,l as q,ah as T,ae as Q,G as X,I as W,a9 as x}from"./echarts-runtime-CEgJbv68.js";import{a as ee}from"./labelHelper-C137W5gU.js";var te=(function(n){U(t,n);function t(e,l,i,a){var m=n.call(this)||this;return m.updateData(e,l,i,a),m}return t.prototype._createSymbol=function(e,l,i,a,m){this.removeAll();var s=Z(e,-1,-1,2,2,null,m);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=le,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){j(this.childAt(0))},t.prototype.downplay=function(){k(this.childAt(0))},t.prototype.setZ=function(e,l){var i=this.childAt(0);i.zlevel=e,i.z=l},t.prototype.setDraggable=function(e,l){var i=this.childAt(0);i.draggable=e,i.cursor=!l&&e?"move":i.cursor},t.prototype.updateData=function(e,l,i,a){this.silent=!1;var m=e.getItemVisual(l,"symbol")||"circle",s=e.hostModel,c=t.getSymbolSize(e,l),h=m!==this._symbolType,y=a&&a.disableAnimation;if(h){var u=e.getItemVisual(l,"symbolKeepAspect");this._createSymbol(m,e,l,c,u)}else{var o=this.childAt(0);o.silent=!1;var r={scaleX:c[0]/2,scaleY:c[1]/2};y?o.attr(r):G(o,r,s,l),F(o)}if(this._updateCommon(e,l,c,i,a),h){var o=this.childAt(0);if(!y){var r={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:o.style.opacity}};o.scaleX=o.scaleY=0,o.style.opacity=0,H(o,r,s,l)}}y&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,l,i,a,m){var s=this.childAt(0),c=e.hostModel,h,y,u,o,r,f,b,v,p;if(a&&(h=a.emphasisItemStyle,y=a.blurItemStyle,u=a.selectItemStyle,o=a.focus,r=a.blurScope,b=a.labelStatesModels,v=a.hoverScale,p=a.cursorStyle,f=a.emphasisDisabled),!a||e.hasItemOption){var g=a&&a.itemModel?a.itemModel:e.getItemModel(l),S=g.getModel("emphasis");h=S.getModel("itemStyle").getItemStyle(),u=g.getModel(["select","itemStyle"]).getItemStyle(),y=g.getModel(["blur","itemStyle"]).getItemStyle(),o=S.get("focus"),r=S.get("blurScope"),f=S.get("disabled"),b=N(g),v=S.getShallow("scale"),p=g.getShallow("cursor")}var V=e.getItemVisual(l,"symbolRotate");s.attr("rotation",(V||0)*Math.PI/180||0);var _=B(e.getItemVisual(l,"symbolOffset"),i);_&&(s.x=_[0],s.y=_[1]),p&&s.attr("cursor",p);var d=e.getItemVisual(l,"style"),E=d.fill;if(s instanceof J){var I=s.style;s.useStyle(C({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},d))}else s.__isEmptyBrush?s.useStyle(C({},d)):s.useStyle(d),s.style.decal=null,s.setColor(E,m&&m.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(l,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var w=m&&m.useNameLabel;K(s,b,{labelFetcher:c,labelDataIndex:l,defaultText:R,inheritColor:E,defaultOpacity:d.opacity});function R(P){return w?e.getName(P):ee(e,P)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var z=s.ensureState("emphasis");z.style=h,s.ensureState("select").style=u,s.ensureState("blur").style=y;var O=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;z.scaleX=this._sizeX*O,z.scaleY=this._sizeY*O,this.setSymbolScale(1),$(this,o,r,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,l,i){var a=this.childAt(0),m=q(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var c=a.getTextContent();c&&T(c,{style:{opacity:0}},l,{dataIndex:m,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();T(a,{style:{opacity:0},scaleX:0,scaleY:0},l,{dataIndex:m,cb:e,removeOpt:s})},t.getSymbolSize=function(e,l){return Q(e.getItemVisual(l,"symbolSize"))},t})(X);function le(n,t){this.parent.drift(n,t)}function M(n,t,e,l){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(l.isIgnore&&l.isIgnore(e))&&!(l.clipShape&&!l.clipShape.contain(t[0],t[1]))&&n.getItemVisual(e,"symbol")!=="none"}function L(n){return n!=null&&!x(n)&&(n={isIgnore:n}),n||{}}function Y(n){var t=n.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:N(t),cursorStyle:t.get("cursor")}}var ie=(function(){function n(t){this.group=new X,this._SymbolCtor=t||te}return n.prototype.updateData=function(t,e){this._progressiveEls=null,e=L(e);var l=this.group,i=t.hostModel,a=this._data,m=this._SymbolCtor,s=e.disableAnimation,c=Y(t),h={disableAnimation:s},y=e.getSymbolPoint||function(u){return t.getItemLayout(u)};a||l.removeAll(),t.diff(a).add(function(u){var o=y(u);if(M(t,o,u,e)){var r=new m(t,u,c,h);r.setPosition(o),t.setItemGraphicEl(u,r),l.add(r)}}).update(function(u,o){var r=a.getItemGraphicEl(o),f=y(u);if(!M(t,f,u,e)){l.remove(r);return}var b=t.getItemVisual(u,"symbol")||"circle",v=r&&r.getSymbolType&&r.getSymbolType();if(!r||v&&v!==b)l.remove(r),r=new m(t,u,c,h),r.setPosition(f);else{r.updateData(t,u,c,h);var p={x:f[0],y:f[1]};s?r.attr(p):G(r,p,i)}l.add(r),t.setItemGraphicEl(u,r)}).remove(function(u){var o=a.getItemGraphicEl(u);o&&o.fadeOut(function(){l.remove(o)},i)}).execute(),this._getSymbolPoint=y,this._data=t},n.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(l,i){var a=t._getSymbolPoint(i);l.setPosition(a),l.markRedraw()})},n.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Y(t),this._data=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(t,e,l){this._progressiveEls=[],l=L(l);function i(c){c.isGroup||(c.incremental=!0,c.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var m=e.getItemLayout(a);if(M(e,m,a,l)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(i),s.setPosition(m),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},n.prototype.eachRendered=function(t){W(this._progressiveEls||this.group,t)},n.prototype.remove=function(t){var e=this.group,l=this._data;l&&t?l.eachItemGraphicEl(function(i){i.fadeOut(function(){e.remove(i)},l.hostModel)}):e.removeAll()},n})();export{ie as S,te as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as j,m as S,k as $,bB as te,aD as se,D as O,o as he,aR as de,a1 as ve,c0 as ge,d4 as me,b$ as ye,b_ as xe,y as v,H as P,ai as Ve,c8 as Ae,ao as we,aC as Me,c7 as re,cc as be,c1 as Ie,a4 as G,cF as ie,d5 as Se,b as Te,aS as Le,aM as _e,as as D,a9 as H,d6 as Ce,f as ne,aN as Ne,d7 as X,d8 as Y,ba as ze,b9 as J}from"./echarts-runtime-CEgJbv68.js";var C=me.value;function R(r,e){return $({show:e},r)}var Pe=(function(r){j(e,r);function e(){var a=r!==null&&r.apply(this,arguments)||this;return a.type=e.type,a}return e.prototype.optionUpdated=function(){var a=this.get("boundaryGap"),t=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),u=this.get("axisName"),f=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),m=this.get("triggerEvent"),A=S(this.get("indicator")||[],function(c){c.max!=null&&c.max>0&&!c.min?c.min=0:c.min!=null&&c.min<0&&!c.max&&(c.max=0);var g=u;c.color!=null&&(g=$({color:c.color},u));var d=te(se(c),{boundaryGap:a,splitNumber:t,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:c.text,showName:f,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:m},!1);if(O(l)){var x=d.name;d.name=l.replace("{value}",x??"")}else he(l)&&(d.name=l(d.name,d));var y=new de(d,null,this.ecModel);return ve(y,ge.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=A},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:te({lineStyle:{color:"#bbb"}},C.axisLine),axisLabel:R(C.axisLabel,!1),axisTick:R(C.axisTick,!1),splitLine:R(C.splitLine,!0),splitArea:R(C.splitArea,!0),indicator:[]},e})(ye),De=["axisLine","axisTickLabel","axisName"],He=(function(r){j(e,r);function e(){var a=r!==null&&r.apply(this,arguments)||this;return a.type=e.type,a}return e.prototype.render=function(a,t,i){var n=this.group;n.removeAll(),this._buildAxes(a),this._buildSplitLineAndArea(a)},e.prototype._buildAxes=function(a){var t=a.coordinateSystem,i=t.getIndicatorAxes(),n=S(i,function(o){var s=o.model.get("showName")?o.name:"",u=new xe(o.model,{axisName:s,position:[t.cx,t.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});v(n,function(o){v(De,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(a){var t=a.coordinateSystem,i=t.getIndicatorAxes();if(!i.length)return;var n=a.get("shape"),o=a.getModel("splitLine"),s=a.getModel("splitArea"),u=o.getModel("lineStyle"),f=s.getModel("areaStyle"),l=o.get("show"),h=s.get("show"),m=u.get("color"),A=f.get("color"),c=P(m)?m:[m],g=P(A)?A:[A],d=[],x=[];function y(V,b,L){var _=L%b.length;return V[_]=V[_]||[],_}if(n==="circle")for(var T=i[0].getTicksCoords(),ee=t.cx,ae=t.cy,p=0;p<T.length;p++){if(l){var w=y(d,c,p);d[w].push(new Ve({shape:{cx:ee,cy:ae,r:T[p].coord}}))}if(h&&p<T.length-1){var w=y(x,g,p);x[w].push(new Ae({shape:{cx:ee,cy:ae,r0:T[p].coord,r:T[p+1].coord}}))}}else for(var E,ce=S(i,function(V,b){var L=V.getTicksCoords();return E=E==null?L.length-1:Math.min(L.length-1,E),S(L,function(_){return t.coordToPoint(_.coord,b)})}),Z=[],p=0;p<=E;p++){for(var M=[],q=0;q<i.length;q++)M.push(ce[q][p]);if(M[0]&&M.push(M[0].slice()),l){var w=y(d,c,p);d[w].push(new we({shape:{points:M}}))}if(h&&Z){var w=y(x,g,p-1);x[w].push(new Me({shape:{points:M.concat(Z)}}))}Z=M.slice().reverse()}var fe=u.getLineStyle(),pe=f.getAreaStyle();v(x,function(V,b){this.group.add(re(V,{style:$({stroke:"none",fill:g[b%g.length]},pe),silent:!0}))},this),v(d,function(V,b){this.group.add(re(V,{style:$({fill:"none",stroke:c[b%c.length]},fe),silent:!0}))},this)},e.type="radar",e})(be),ke=(function(r){j(e,r);function e(a,t,i){var n=r.call(this,a,t,i)||this;return n.type="value",n.angle=0,n.name="",n}return e})(Ie),Ee=(function(){function r(e,a,t){this.dimensions=[],this._model=e,this._indicatorAxes=S(e.getIndicatorModels(),function(i,n){var o="indicator_"+n,s=new ke(o,new ie);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,t)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,a){var t=this._indicatorAxes[a];return this.coordToPoint(t.dataToCoord(e),a)},r.prototype.coordToPoint=function(e,a){var t=this._indicatorAxes[a],i=t.angle,n=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[n,o]},r.prototype.pointToData=function(e){var a=e[0]-this.cx,t=e[1]-this.cy,i=Math.sqrt(a*a+t*t);a/=i,t/=i;for(var n=Math.atan2(-t,a),o=1/0,s,u=-1,f=0;f<this._indicatorAxes.length;f++){var l=this._indicatorAxes[f],h=Math.abs(n-l.angle);h<o&&(s=l,u=f,o=h)}return[u,+(s&&s.coordToData(i))]},r.prototype.resize=function(e,a){var t=e.get("center"),i=a.getWidth(),n=a.getHeight(),o=Math.min(i,n)/2;this.cx=G(t[0],i),this.cy=G(t[1],n),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(O(s)||Te(s))&&(s=[0,s]),this.r0=G(s[0],o),this.r=G(s[1],o),v(this._indicatorAxes,function(u,f){u.setExtent(this.r0,this.r);var l=this.startAngle+f*Math.PI*2/this._indicatorAxes.length;l=Math.atan2(Math.sin(l),Math.cos(l)),u.angle=l},this)},r.prototype.update=function(e,a){var t=this._indicatorAxes,i=this._model;v(t,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,u){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var f=s.getData();v(t,function(l){l.scale.unionExtentFromData(f,f.mapDimension(l.dim))})}},this);var n=i.get("splitNumber"),o=new ie;o.setExtent(0,n),o.setInterval(1),v(t,function(s,u){Se(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,a,t){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,a,t){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,a){var t=[];return e.eachComponent("radar",function(i){var n=new r(i,e,a);t.push(n),i.coordinateSystem=n}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=t[i.get("radarIndex")||0])}),t},r.dimensions=[],r})();function Ue(r){r.registerCoordinateSystem("radar",Ee),r.registerComponentModel(Pe),r.registerComponentView(He),r.registerVisual({seriesType:"radar",reset:function(e){var a=e.getData();a.each(function(t){a.setItemVisual(t,"legendIcon","roundRect")}),a.setVisual("legendIcon","roundRect")}})}var k=v,Ge=H,U=-1,le=(function(){function r(e){var a=e.mappingMethod,t=e.type,i=this.option=se(e);this.type=t,this.mappingMethod=a,this._normalizeData=Be[a];var n=r.visualHandlers[t];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[a],a==="piecewise"?(K(i),Re(i)):a==="category"?i.categories?Fe(i):K(i,!0):(_e(a!=="linear"||i.dataExtent),K(i))}return r.prototype.mapValueToVisual=function(e){var a=this._normalizeData(e);return this._normalizedToVisual(a,e)},r.prototype.getNormalizer=function(){return ne(this._normalizeData,this)},r.listVisualTypes=function(){return Ne(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,a,t){H(e)?v(e,a,t):a.call(t,e)},r.mapVisual=function(e,a,t){var i,n=P(e)?[]:H(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var u=a.call(t,o,s);i?n=u:n[s]=u}),n},r.retrieveVisuals=function(e){var a={},t;return e&&k(r.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(a[n]=e[n],t=!0)}),t?a:null},r.prepareVisualTypes=function(e){if(P(e))e=e.slice();else if(Ge(e)){var a=[];k(e,function(t,i){a.push(i)}),e=a}else return[];return e.sort(function(t,i){return i==="color"&&t!=="color"&&t.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,a){return a==="color"?!!(e&&e.indexOf(a)===0):e===a},r.findPieceIndex=function(e,a,t){for(var i,n=1/0,o=0,s=a.length;o<s;o++){var u=a[o].value;if(u!=null){if(u===e||O(u)&&u===e+"")return o;t&&m(u,o)}}for(var o=0,s=a.length;o<s;o++){var f=a[o],l=f.interval,h=f.close;if(l){if(l[0]===-1/0){if(B(h[1],e,l[1]))return o}else if(l[1]===1/0){if(B(h[0],l[0],e))return o}else if(B(h[0],l[0],e)&&B(h[1],e,l[1]))return o;t&&m(l[0],o),t&&m(l[1],o)}}if(t)return e===1/0?a.length-1:e===-1/0?0:i;function m(A,c){var g=Math.abs(A-e);g<n&&(n=g,i=c)}},r.visualHandlers={color:{applyVisual:N("color"),getColorMapper:function(){var e=this.option;return ne(e.mappingMethod==="category"?function(a,t){return!t&&(a=this._normalizeData(a)),z.call(this,a)}:function(a,t,i){var n=!!i;return!t&&(a=this._normalizeData(a)),i=Y(a,e.parsedVisual,i),n?i:X(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return X(Y(e,this.option.parsedVisual),"rgba")},category:z,piecewise:function(e,a){var t=W.call(this,a);return t==null&&(t=X(Y(e,this.option.parsedVisual),"rgba")),t},fixed:I}},colorHue:F(function(e,a){return J(e,a)}),colorSaturation:F(function(e,a){return J(e,null,a)}),colorLightness:F(function(e,a){return J(e,null,null,a)}),colorAlpha:F(function(e,a){return ze(e,a)}),decal:{applyVisual:N("decal"),_normalizedToVisual:{linear:null,category:z,piecewise:null,fixed:null}},opacity:{applyVisual:N("opacity"),_normalizedToVisual:Q([0,1])},liftZ:{applyVisual:N("liftZ"),_normalizedToVisual:{linear:I,category:I,piecewise:I,fixed:I}},symbol:{applyVisual:function(e,a,t){var i=this.mapValueToVisual(e);t("symbol",i)},_normalizedToVisual:{linear:oe,category:z,piecewise:function(e,a){var t=W.call(this,a);return t==null&&(t=oe.call(this,e)),t},fixed:I}},symbolSize:{applyVisual:N("symbolSize"),_normalizedToVisual:Q([0,1])}},r})();function Re(r){var e=r.pieceList;r.hasSpecialVisual=!1,v(e,function(a,t){a.originIndex=t,a.visual!=null&&(r.hasSpecialVisual=!0)})}function Fe(r){var e=r.categories,a=r.categoryMap={},t=r.visual;if(k(e,function(o,s){a[o]=s}),!P(t)){var i=[];H(t)?k(t,function(o,s){var u=a[s];i[u??U]=o}):i[U]=t,t=ue(r,i)}for(var n=e.length-1;n>=0;n--)t[n]==null&&(delete a[e[n]],e.pop())}function K(r,e){var a=r.visual,t=[];H(a)?k(a,function(n){t.push(n)}):a!=null&&t.push(a);var i={color:1,symbol:1};!e&&t.length===1&&!i.hasOwnProperty(r.type)&&(t[1]=t[0]),ue(r,t)}function F(r){return{applyVisual:function(e,a,t){var i=this.mapValueToVisual(e);t("color",r(a("color"),i))},_normalizedToVisual:Q([0,1])}}function oe(r){var e=this.option.visual;return e[Math.round(D(r,[0,1],[0,e.length-1],!0))]||{}}function N(r){return function(e,a,t){t(r,this.mapValueToVisual(e))}}function z(r){var e=this.option.visual;return e[this.option.loop&&r!==U?r%e.length:r]}function I(){return this.option.visual[0]}function Q(r){return{linear:function(e){return D(e,r,this.option.visual,!0)},category:z,piecewise:function(e,a){var t=W.call(this,a);return t==null&&(t=D(e,r,this.option.visual,!0)),t},fixed:I}}function W(r){var e=this.option,a=e.pieceList;if(e.hasSpecialVisual){var t=le.findPieceIndex(r,a),i=a[t];if(i&&i.visual)return i.visual[this.type]}}function ue(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=S(e,function(a){var t=Ce(a);return t||[0,0,0,1]})),e}var Be={linear:function(r){return D(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,a=le.findPieceIndex(r,e,!0);if(a!=null)return D(a,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??U},fixed:Le};function B(r,e,a){return r?e<=a:e<a}export{le as V,Ue as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aZ as A,r as I,b7 as S,b8 as w,j as e,b9 as z,ba as E,bb as x,c as H,bc as B,B as F,bd as M,be as P}from"./index-C6xNKxpg.js";function k({aiEmployee:n,tasks:i=[],context:r,target:f,auto:h,size:l=48,label:a,showNotice:c=!1,className:b,onTrigger:o}){const d=A(),[g,u]=I.useState(!1),j=S(),v=w(),N=f??j,t=typeof n=="string"?d.employees.find(s=>s.username===n):d.employees.find(s=>s.username===n.username)??n;if(!t)return null;const m=s=>{o==null||o(s),N.triggerTask({aiEmployee:t,task:s,tasks:s?void 0:i,context:r!=null&&r.length?r:v,auto:h,open:!0})},p=i.filter(s=>s.title);return e.jsxs(z,{children:[e.jsxs(E,{render:e.jsx("button",{type:"button",className:H("group/ai-shortcut relative inline-flex items-center gap-2 rounded-full outline-none transition-transform hover:scale-[1.04] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a&&"border bg-background pr-3 shadow-sm",b),onClick:()=>m(),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1)}),children:[e.jsx(x,{employee:t,flip:g||c,className:"transition-[filter] group-hover/ai-shortcut:brightness-105",style:{width:l,height:l}}),a?e.jsx("span",{className:"text-sm font-medium",children:a}):null,c?e.jsx("span",{className:"absolute top-0 right-0 size-2.5 rounded-full border-2 border-background bg-foreground"}):null]}),e.jsxs(B,{side:"top",align:"start",className:"w-72 p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(x,{employee:t,className:"size-10"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-sm font-medium",children:t.nickname}),t.position?e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:t.position}):null]})]}),t.bio??t.description?e.jsx("p",{className:"mt-3 border-t pt-3 text-xs leading-5 text-muted-foreground",children:t.bio??t.description}):null,p.length?e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5 border-t pt-3",children:p.map((s,C)=>e.jsxs(F,{variant:"secondary",size:"sm",className:"h-auto min-h-7 whitespace-normal py-1 text-left",onClick:y=>{y.stopPropagation(),m(s)},children:[s.autoSend?e.jsx(M,{className:"size-3.5"}):e.jsx(P,{className:"size-3.5"}),e.jsx("span",{children:s.title}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:s.autoSend?"Auto send":"Fill composer"})]},`${s.title}-${C}`))}):null]})]})}export{k as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as y,r as E,j as ae,C as Nn,c as T,a as Cn,b as xn,d as it,B as pn}from"./index-C6xNKxpg.js";function Yn(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const je={},De={};function oe(e,t){try{const r=(je[e]||(je[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in De?De[r]:ut(r,r.split(":"))}catch{if(e in De)return De[e];const n=e==null?void 0:e.match(Tn);return n?ut(e,n.slice(1)):NaN}}const Tn=/([+-]\d\d):?(\d\d)?/;function ut(e,t){const n=+(t[0]||0),r=+(t[1]||0),a=+(t[2]||0)/60;return De[e]=n*60+r>0?n*60+r+a:n*60-r-a}class te extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(oe(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),vt(this,t)):this.setTime(Date.now())}static tz(t,...n){return n.length?new te(...n,t):new te(Date.now(),t)}withTimeZone(t){return new te(+this,t)}getTimezoneOffset(){const t=-oe(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ye(this),+this}[Symbol.for("constructDateFrom")](t){return new te(+new Date(t),this.timeZone)}}const ct=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ct.test(e))return;const t=e.replace(ct,"$1UTC");te.prototype[t]&&(e.startsWith("get")?te.prototype[e]=function(){return this.internal[t]()}:(te.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),_n(this),+this},te.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ye(this),+this}))});function Ye(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-oe(e.timeZone,e)*60))}function _n(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),vt(e)}function vt(e,t){const n=Array.isArray(t)?Pn(t):+e.internal,r=oe(e.timeZone,e),a=r>0?Math.floor(r):Math.ceil(r),o=new Date(+e);o.setUTCHours(o.getUTCHours()-1);const s=-new Date(+e).getTimezoneOffset(),i=-new Date(+o).getTimezoneOffset(),u=s-i;let c=s;if(u&&s!==a){const I=Date.prototype.getHours.apply(e),B=Array.isArray(t)?t[3]||0:e.internal.getUTCHours();if(I!==B){const j=new Date(+e),V=s-a;V&&j.setUTCMinutes(j.getUTCMinutes()+V);const G=oe(e.timeZone,j);(G>0?Math.floor(G):Math.ceil(G))===a&&(c=i)}}const d=c-a;d&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+d);const l=new Date(+e);l.setUTCSeconds(0);const h=s>0?l.getSeconds():(l.getSeconds()-60)%60,w=Math.round(-(oe(e.timeZone,e)*60))%60;(w||h)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+w+h);const D=oe(e.timeZone,e),O=D>0?Math.floor(D):Math.ceil(D),C=-new Date(+e).getTimezoneOffset()-O,b=O!==a,g=C-d,N=O-a,M=n-O*60*1e3,f=N>0&&dt(e)-n===N*60*1e3&&dt(e,M)!==n;if(b&&g&&!f){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g);const I=oe(e.timeZone,e),B=I>0?Math.floor(I):Math.ceil(I),j=O-B;j&&g<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+j)}Ye(e);const _=(t?n:n+w*1e3)-+e.internal;_&&Math.abs(_)<1800*1e3&&(Date.prototype.setTime.call(e,+e+_),Ye(e))}function Pn(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function dt(e,t){const n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-oe(e.timeZone,n)*60)),+n}class z extends te{static tz(t,...n){return n.length?new z(...n,t):new z(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),a=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,a]=this.tzComponents();return`${t} GMT${n}${r}${a} (${Yn(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[n,r,a]}withTimeZone(t){return new z(+this,t)}[Symbol.for("constructDateFrom")](t){return new z(+new Date(t),this.timeZone)}}const Ot=6048e5,En=864e5,ft=Symbol.for("constructDateFrom");function q(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ft in e?e[ft](t):e instanceof Date?new e.constructor(t):new Date(t)}function F(e,t){return q(t||e,e)}function Wt(e,t,n){const r=F(e,n==null?void 0:n.in);return isNaN(t)?q(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function St(e,t,n){const r=F(e,n==null?void 0:n.in);if(isNaN(t))return q(e,NaN);if(!t)return r;const a=r.getDate(),o=q(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const s=o.getDate();return a>=s?o:(r.setFullYear(o.getFullYear(),o.getMonth(),a),r)}let Fn={};function Se(){return Fn}function me(e,t){var i,u,c,d;const n=Se(),r=(t==null?void 0:t.weekStartsOn)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,a=F(e,t==null?void 0:t.in),o=a.getDay(),s=(o<r?7:0)+o-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function Oe(e,t){return me(e,{...t,weekStartsOn:1})}function Nt(e,t){const n=F(e,t==null?void 0:t.in),r=n.getFullYear(),a=q(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=Oe(a),s=q(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Oe(s);return n.getTime()>=o.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function lt(e){const t=F(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ye(e,...t){const n=q.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function We(e,t){const n=F(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Xe(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t),o=We(r),s=We(a),i=+o-lt(o),u=+s-lt(s);return Math.round((i-u)/En)}function Bn(e,t){const n=Nt(e,t),r=q(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Oe(r)}function In(e,t,n){return Wt(e,t*7,n)}function Hn(e,t,n){return St(e,t*12,n)}function An(e,t){let n,r=t==null?void 0:t.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=q.bind(null,a));const o=F(a,r);(!n||n<o||isNaN(+o))&&(n=o)}),q(r,n||NaN)}function qn(e,t){let n,r=t==null?void 0:t.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=q.bind(null,a));const o=F(a,r);(!n||n>o||isNaN(+o))&&(n=o)}),q(r,n||NaN)}function jn(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t);return+We(r)==+We(a)}function Ct(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function zn(e){return!(!Ct(e)&&typeof e!="number"||isNaN(+F(e)))}function xt(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t),o=r.getFullYear()-a.getFullYear(),s=r.getMonth()-a.getMonth();return o*12+s}function Gn(e,t){const n=F(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function pt(e,t){const[n,r]=ye(e,t.start,t.end);return{start:n,end:r}}function Rn(e,t){const{start:n,end:r}=pt(t==null?void 0:t.in,e);let a=+n>+r;const o=a?+n:+r,s=a?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const u=[];for(;+s<=o;)u.push(q(n,s)),s.setMonth(s.getMonth()+i);return a?u.reverse():u}function $n(e,t){const n=F(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Qn(e,t){const n=F(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Yt(e,t){const n=F(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Xn(e,t){const{start:n,end:r}=pt(t==null?void 0:t.in,e);let a=+n>+r;const o=a?+n:+r,s=a?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let i=1;const u=[];for(;+s<=o;)u.push(q(n,s)),s.setFullYear(s.getFullYear()+i);return a?u.reverse():u}function Tt(e,t){var i,u,c,d;const n=Se(),r=(t==null?void 0:t.weekStartsOn)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,a=F(e,t==null?void 0:t.in),o=a.getDay(),s=(o<r?-7:0)+6-(o-r);return a.setDate(a.getDate()+s),a.setHours(23,59,59,999),a}function Vn(e,t){return Tt(e,{...t,weekStartsOn:1})}const Un={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Kn=(e,t,n)=>{let r;const a=Un[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ze(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Zn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Jn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ln={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},er={date:ze({formats:Zn,defaultWidth:"full"}),time:ze({formats:Jn,defaultWidth:"full"}),dateTime:ze({formats:Ln,defaultWidth:"full"})},tr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nr=(e,t,n,r)=>tr[e];function Me(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;a=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[i]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}const rr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ar={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},or={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},sr={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ir={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ur={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},cr=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},dr={ordinalNumber:cr,era:Me({values:rr,defaultWidth:"wide"}),quarter:Me({values:ar,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Me({values:or,defaultWidth:"wide"}),day:Me({values:sr,defaultWidth:"wide"}),dayPeriod:Me({values:ir,defaultWidth:"wide",formattingValues:ur,defaultFormattingWidth:"wide"})};function ke(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const s=o[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(i)?lr(i,l=>l.test(s)):fr(i,l=>l.test(s));let c;c=e.valueCallback?e.valueCallback(u):u,c=n.valueCallback?n.valueCallback(c):c;const d=t.slice(s.length);return{value:c,rest:d}}}function fr(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function lr(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function hr(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(a.length);return{value:s,rest:i}}}const mr=/^(\d+)(th|st|nd|rd)?/i,yr=/\d+/i,gr={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wr={any:[/^b/i,/^(a|c)/i]},br={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Mr={any:[/1/i,/2/i,/3/i,/4/i]},kr={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Dr={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},vr={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Or={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Wr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Sr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nr={ordinalNumber:hr({matchPattern:mr,parsePattern:yr,valueCallback:e=>parseInt(e,10)}),era:ke({matchPatterns:gr,defaultMatchWidth:"wide",parsePatterns:wr,defaultParseWidth:"any"}),quarter:ke({matchPatterns:br,defaultMatchWidth:"wide",parsePatterns:Mr,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ke({matchPatterns:kr,defaultMatchWidth:"wide",parsePatterns:Dr,defaultParseWidth:"any"}),day:ke({matchPatterns:vr,defaultMatchWidth:"wide",parsePatterns:Or,defaultParseWidth:"any"}),dayPeriod:ke({matchPatterns:Wr,defaultMatchWidth:"any",parsePatterns:Sr,defaultParseWidth:"any"})},he={code:"en-US",formatDistance:Kn,formatLong:er,formatRelative:nr,localize:dr,match:Nr,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Cr(e,t){const n=F(e,t==null?void 0:t.in);return Xe(n,Yt(n))+1}function Ve(e,t){const n=F(e,t==null?void 0:t.in),r=+Oe(n)-+Bn(n);return Math.round(r/Ot)+1}function _t(e,t){var d,l,h,w;const n=F(e,t==null?void 0:t.in),r=n.getFullYear(),a=Se(),o=(t==null?void 0:t.firstWeekContainsDate)??((l=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:l.firstWeekContainsDate)??a.firstWeekContainsDate??((w=(h=a.locale)==null?void 0:h.options)==null?void 0:w.firstWeekContainsDate)??1,s=q((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const i=me(s,t),u=q((t==null?void 0:t.in)||e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const c=me(u,t);return+n>=+i?r+1:+n>=+c?r:r-1}function xr(e,t){var i,u,c,d;const n=Se(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,a=_t(e,t),o=q((t==null?void 0:t.in)||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),me(o,t)}function Ue(e,t){const n=F(e,t==null?void 0:t.in),r=+me(n,t)-+xr(n,t);return Math.round(r/Ot)+1}function P(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ue={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return P(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):P(n+1,2)},d(e,t){return P(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return P(e.getHours()%12||12,t.length)},H(e,t){return P(e.getHours(),t.length)},m(e,t){return P(e.getMinutes(),t.length)},s(e,t){return P(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return P(a,t.length)}},fe={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ht={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return ue.y(e,t)},Y:function(e,t,n,r){const a=_t(e,r),o=a>0?a:1-a;if(t==="YY"){const s=o%100;return P(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):P(o,t.length)},R:function(e,t){const n=Nt(e);return P(n,t.length)},u:function(e,t){const n=e.getFullYear();return P(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return P(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return P(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ue.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return P(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=Ue(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):P(a,t.length)},I:function(e,t,n){const r=Ve(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):P(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ue.d(e,t)},D:function(e,t,n){const r=Cr(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):P(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return P(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return P(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return P(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=fe.noon:r===0?a=fe.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=fe.evening:r>=12?a=fe.afternoon:r>=4?a=fe.morning:a=fe.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ue.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ue.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):P(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):P(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ue.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ue.s(e,t)},S:function(e,t){return ue.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return yt(r);case"XXXX":case"XX":return ce(r);case"XXXXX":case"XXX":default:return ce(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return yt(r);case"xxxx":case"xx":return ce(r);case"xxxxx":case"xxx":default:return ce(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mt(r,":");case"OOOO":default:return"GMT"+ce(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mt(r,":");case"zzzz":default:return"GMT"+ce(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return P(r,t.length)},T:function(e,t,n){return P(+e,t.length)}};function mt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+t+P(o,2)}function yt(e,t){return e%60===0?(e>0?"-":"+")+P(Math.abs(e)/60,2):ce(e,t)}function ce(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=P(Math.trunc(r/60),2),o=P(r%60,2);return n+a+t+o}const gt=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Pt=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},pr=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return gt(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",gt(r,t)).replace("{{time}}",Pt(a,t))},Yr={p:Pt,P:pr},Tr=/^D+$/,_r=/^Y+$/,Pr=["D","DD","YY","YYYY"];function Er(e){return Tr.test(e)}function Fr(e){return _r.test(e)}function Br(e,t,n){const r=Ir(e,t,n);if(console.warn(r),Pr.includes(e))throw new RangeError(r)}function Ir(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Hr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ar=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qr=/^'([^]*?)'?$/,jr=/''/g,zr=/[a-zA-Z]/;function ve(e,t,n){var d,l,h,w,D,O,v,C;const r=Se(),a=(n==null?void 0:n.locale)??r.locale??he,o=(n==null?void 0:n.firstWeekContainsDate)??((l=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((w=(h=r.locale)==null?void 0:h.options)==null?void 0:w.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((O=(D=n==null?void 0:n.locale)==null?void 0:D.options)==null?void 0:O.weekStartsOn)??r.weekStartsOn??((C=(v=r.locale)==null?void 0:v.options)==null?void 0:C.weekStartsOn)??0,i=F(e,n==null?void 0:n.in);if(!zn(i))throw new RangeError("Invalid time value");let u=t.match(Ar).map(b=>{const g=b[0];if(g==="p"||g==="P"){const N=Yr[g];return N(b,a.formatLong)}return b}).join("").match(Hr).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const g=b[0];if(g==="'")return{isToken:!1,value:Gr(b)};if(ht[g])return{isToken:!0,value:b};if(g.match(zr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:b}});a.localize.preprocessor&&(u=a.localize.preprocessor(i,u));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:a};return u.map(b=>{if(!b.isToken)return b.value;const g=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Fr(g)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Er(g))&&Br(g,t,String(e));const N=ht[g[0]];return N(i,g,a.localize,c)}).join("")}function Gr(e){const t=e.match(qr);return t?t[1].replace(jr,"'"):e}function Rr(e,t){const n=F(e,t==null?void 0:t.in),r=n.getFullYear(),a=n.getMonth(),o=q(n,0);return o.setFullYear(r,a+1,0),o.setHours(0,0,0,0),o.getDate()}function $r(e,t){return F(e,t==null?void 0:t.in).getMonth()}function Qr(e,t){return F(e,t==null?void 0:t.in).getFullYear()}function Xr(e,t){return+F(e)>+F(t)}function Vr(e,t){return+F(e)<+F(t)}function Ur(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function Kr(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t);return r.getFullYear()===a.getFullYear()}function Zr(e,t,n){const r=F(e,n==null?void 0:n.in),a=r.getFullYear(),o=r.getDate(),s=q(e,0);s.setFullYear(a,t,15),s.setHours(0,0,0,0);const i=Rr(s);return r.setMonth(t,Math.min(o,i)),r}function Jr(e,t,n){const r=F(e,n==null?void 0:n.in);return isNaN(+r)?q(e,NaN):(r.setFullYear(t),r)}const wt=5,Lr=4;function ea(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,a=t.addDays(e,-r+1),o=t.addDays(a,wt*7-1);return t.getMonth(e)===t.getMonth(o)?wt:Lr}function Et(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function ta(e,t){const n=Et(e,t),r=ea(e,t);return t.addDays(n,r*7-1)}const Ft={...he,labels:{labelDayButton:(e,t,n,r)=>{let a;r&&typeof r.format=="function"?a=r.format.bind(r):a=(s,i)=>ve(s,i,{locale:he,...n});let o=a(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(a,o)=>ve(a,o,{locale:he,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let a;r&&typeof r.format=="function"?a=r.format.bind(r):a=(s,i)=>ve(s,i,{locale:he,...n});let o=a(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(a,o)=>ve(a,o,{locale:he,...t}),r(e,"cccc")}}};class Q{constructor(t,n){this.today=()=>{var a;if((a=this.overrides)!=null&&a.today)return this.overrides.today();if(this.options.timeZone)return z.tz(this.options.timeZone);const r=this.options.Date??Date;return new r},this.newDate=(r,a,o)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,a,o):this.options.timeZone?new z(r,a,o,this.options.timeZone):new Date(r,a,o)},this.addDays=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addDays?this.overrides.addDays(r,a):Wt(r,a)},this.addMonths=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addMonths?this.overrides.addMonths(r,a):St(r,a)},this.addWeeks=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addWeeks?this.overrides.addWeeks(r,a):In(r,a)},this.addYears=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addYears?this.overrides.addYears(r,a):Hn(r,a)},this.differenceInCalendarDays=(r,a)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,a):Xe(r,a)},this.differenceInCalendarMonths=(r,a)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,a):xt(r,a)},this.eachMonthOfInterval=r=>{var a;return(a=this.overrides)!=null&&a.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Rn(r)},this.eachYearOfInterval=r=>{var i;const a=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):Xn(r),o=new Set(a.map(u=>this.getYear(u)));if(o.size===a.length)return a;const s=[];return o.forEach(u=>{s.push(new Date(u,0,1))}),s},this.endOfBroadcastWeek=r=>{var a;return(a=this.overrides)!=null&&a.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):ta(r,this)},this.endOfISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.endOfISOWeek?this.overrides.endOfISOWeek(r):Vn(r)},this.endOfMonth=r=>{var a;return(a=this.overrides)!=null&&a.endOfMonth?this.overrides.endOfMonth(r):Gn(r)},this.endOfWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.endOfWeek?this.overrides.endOfWeek(r,a):Tt(r,this.options)},this.endOfYear=r=>{var a;return(a=this.overrides)!=null&&a.endOfYear?this.overrides.endOfYear(r):Qn(r)},this.format=(r,a,o)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,a,this.options):ve(r,a,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.getISOWeek?this.overrides.getISOWeek(r):Ve(r)},this.getMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getMonth?this.overrides.getMonth(r,this.options):$r(r,this.options)},this.getYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getYear?this.overrides.getYear(r,this.options):Qr(r,this.options)},this.getWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getWeek?this.overrides.getWeek(r,this.options):Ue(r,this.options)},this.isAfter=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isAfter?this.overrides.isAfter(r,a):Xr(r,a)},this.isBefore=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isBefore?this.overrides.isBefore(r,a):Vr(r,a)},this.isDate=r=>{var a;return(a=this.overrides)!=null&&a.isDate?this.overrides.isDate(r):Ct(r)},this.isSameDay=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameDay?this.overrides.isSameDay(r,a):jn(r,a)},this.isSameMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameMonth?this.overrides.isSameMonth(r,a):Ur(r,a)},this.isSameYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameYear?this.overrides.isSameYear(r,a):Kr(r,a)},this.max=r=>{var a;return(a=this.overrides)!=null&&a.max?this.overrides.max(r):An(r)},this.min=r=>{var a;return(a=this.overrides)!=null&&a.min?this.overrides.min(r):qn(r)},this.setMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.setMonth?this.overrides.setMonth(r,a):Zr(r,a)},this.setYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.setYear?this.overrides.setYear(r,a):Jr(r,a)},this.startOfBroadcastWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Et(r,this)},this.startOfDay=r=>{var a;return(a=this.overrides)!=null&&a.startOfDay?this.overrides.startOfDay(r):We(r)},this.startOfISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.startOfISOWeek?this.overrides.startOfISOWeek(r):Oe(r)},this.startOfMonth=r=>{var a;return(a=this.overrides)!=null&&a.startOfMonth?this.overrides.startOfMonth(r):$n(r)},this.startOfWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.startOfWeek?this.overrides.startOfWeek(r,this.options):me(r,this.options)},this.startOfYear=r=>{var a;return(a=this.overrides)!=null&&a.startOfYear?this.overrides.startOfYear(r):Yt(r)},this.options={locale:Ft,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let a=0;a<10;a++)r[a.toString()]=n.format(a);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&Q.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:a}=this.options,o=n==null?void 0:n.code;if(o&&Q.yearFirstLocales.has(o))try{return new Intl.DateTimeFormat(o,{month:"long",year:"numeric",timeZone:r,numberingSystem:a}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}Q.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const ne=new Q;class Bt{constructor(t,n,r=ne){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class na{constructor(t,n){this.date=t,this.weeks=n}}class ra{constructor(t,n){this.days=n,this.weekNumber=t}}function aa(e){return y.createElement("span",{...e})}function oa(e){const{size:t=24,orientation:n="left",className:r,style:a}=e;return y.createElement("svg",{className:r,style:a,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&y.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&y.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&y.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&y.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function sa(e){const{day:t,modifiers:n,...r}=e;return y.createElement("td",{...r})}function ia(e){const{day:t,modifiers:n,...r}=e,a=y.useRef(null);return y.useEffect(()=>{var o;n.focused&&((o=a.current)==null||o.focus())},[n.focused]),y.createElement("button",{ref:a,...r})}var m;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(m||(m={}));var H;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(H||(H={}));var J;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(J||(J={}));var $;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})($||($={}));const It=E.createContext(void 0);function Te(){const e=E.useContext(It);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function ua(e){const{options:t,className:n,...r}=e,{classNames:a,components:o,styles:s}=Te(),i=[a[m.Dropdown],n].join(" "),u=t==null?void 0:t.find(({value:c})=>c===r.value);return y.createElement("span",{"data-disabled":r.disabled,className:a[m.DropdownRoot],style:s==null?void 0:s[m.DropdownRoot]},y.createElement(o.Select,{className:i,...r},t==null?void 0:t.map(({value:c,label:d,disabled:l})=>y.createElement(o.Option,{key:c,value:c,disabled:l},d))),y.createElement("span",{className:a[m.CaptionLabel],style:s==null?void 0:s[m.CaptionLabel],"aria-hidden":!0},u==null?void 0:u.label,y.createElement(o.Chevron,{orientation:"down",size:18,className:a[m.Chevron],style:s==null?void 0:s[m.Chevron]})))}function ca(e){return y.createElement("div",{...e})}function da(e){return y.createElement("div",{...e})}function fa(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.createElement("div",{...r},e.children)}function la(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.createElement("div",{...r})}function ha(e){return y.createElement("table",{...e})}function ma(e){return y.createElement("div",{...e})}function ya(e){const{components:t}=Te();return y.createElement(t.Dropdown,{...e})}function ga(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:a,...o}=e,{components:s,classNames:i,styles:u,labels:{labelPrevious:c,labelNext:d}}=Te(),l=E.useCallback(w=>{a&&(n==null||n(w))},[a,n]),h=E.useCallback(w=>{r&&(t==null||t(w))},[r,t]);return y.createElement("nav",{...o},y.createElement(s.PreviousMonthButton,{type:"button",className:i[m.PreviousMonthButton],style:u==null?void 0:u[m.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:h},y.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[m.Chevron],style:u==null?void 0:u[m.Chevron],orientation:"left"})),y.createElement(s.NextMonthButton,{type:"button",className:i[m.NextMonthButton],style:u==null?void 0:u[m.NextMonthButton],tabIndex:a?void 0:-1,"aria-disabled":a?void 0:!0,"aria-label":d(a),onClick:l},y.createElement(s.Chevron,{disabled:a?void 0:!0,orientation:"right",className:i[m.Chevron],style:u==null?void 0:u[m.Chevron]})))}function wa(e){return y.createElement("button",{...e})}function ba(e){return y.createElement("option",{...e})}function Ma(e){return y.createElement("button",{...e})}function ka(e){const{rootRef:t,...n}=e;return y.createElement("div",{...n,ref:t})}function Da(e){return y.createElement("select",{...e})}function va(e){const{week:t,...n}=e;return y.createElement("tr",{...n})}function Oa(e){return y.createElement("th",{...e})}function Wa(e){return y.createElement("thead",{"aria-hidden":!0},y.createElement("tr",{...e}))}function Sa(e){const{week:t,...n}=e;return y.createElement("th",{...n})}function Na(e){return y.createElement("th",{...e})}function Ca(e){return y.createElement("tbody",{...e})}function xa(e){const{components:t}=Te();return y.createElement(t.Dropdown,{...e})}const pa=Object.freeze(Object.defineProperty({__proto__:null,CaptionLabel:aa,Chevron:oa,Day:sa,DayButton:ia,Dropdown:ua,DropdownNav:ca,Footer:da,Month:fa,MonthCaption:la,MonthGrid:ha,Months:ma,MonthsDropdown:ya,Nav:ga,NextMonthButton:wa,Option:ba,PreviousMonthButton:Ma,Root:ka,Select:Da,Week:va,WeekNumber:Sa,WeekNumberHeader:Na,Weekday:Oa,Weekdays:Wa,Weeks:Ca,YearsDropdown:xa},Symbol.toStringTag,{value:"Module"}));function se(e,t,n=!1,r=ne){let{from:a,to:o}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return a&&o?(s(o,a)<0&&([a,o]=[o,a]),s(t,a)>=(n?1:0)&&s(o,t)>=(n?1:0)):!n&&o?i(o,t):!n&&a?i(a,t):!1}function Ke(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function _e(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ze(e){return!!(e&&typeof e=="object"&&"after"in e)}function Je(e){return!!(e&&typeof e=="object"&&"before"in e)}function Ht(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function At(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ie(e,t,n=ne){const r=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:o,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return a(e,i);if(At(i,n))return i.some(u=>a(e,u));if(_e(i))return se(i,e,!1,n);if(Ht(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Ke(i)){const u=o(i.before,e),c=o(i.after,e),d=u>0,l=c<0;return s(i.before,i.after)?l&&d:d||l}return Ze(i)?o(e,i.after)>0:Je(i)?o(i.before,e)>0:typeof i=="function"?i(e):!1})}function Ya(e,t,n,r,a){const{disabled:o,hidden:s,modifiers:i,showOutsideDays:u,broadcastCalendar:c,today:d=a.today()}=t,{isSameDay:l,isSameMonth:h,startOfMonth:w,isBefore:D,endOfMonth:O,isAfter:v}=a,C=n&&w(n),b=r&&O(r),g={[H.focused]:[],[H.outside]:[],[H.disabled]:[],[H.hidden]:[],[H.today]:[]},N={};for(const M of e){const{date:f,displayMonth:S}=M,_=!!(S&&!h(f,S)),I=!!(C&&D(f,C)),B=!!(b&&v(f,b)),j=!!(o&&ie(f,o,a)),V=!!(s&&ie(f,s,a))||I||B||!c&&!u&&_||c&&u===!1&&_,G=l(f,d);_&&g.outside.push(M),j&&g.disabled.push(M),V&&g.hidden.push(M),G&&g.today.push(M),i&&Object.keys(i).forEach(R=>{const de=i==null?void 0:i[R];de&&ie(f,de,a)&&(N[R]?N[R].push(M):N[R]=[M])})}return M=>{const f={[H.focused]:!1,[H.disabled]:!1,[H.hidden]:!1,[H.outside]:!1,[H.today]:!1},S={};for(const _ in g){const I=g[_];f[_]=I.some(B=>B===M)}for(const _ in N)S[_]=N[_].some(I=>I===M);return{...f,...S}}}function Ta(e,t,n={}){return Object.entries(e).filter(([,a])=>a===!0).reduce((a,[o])=>(n[o]?a.push(n[o]):t[H[o]]?a.push(t[H[o]]):t[J[o]]&&a.push(t[J[o]]),a),[t[m.Day]])}function _a(e){return{...pa,...e}}function Pa(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Le(){const e={};for(const t in m)e[m[t]]=`rdp-${m[t]}`;for(const t in H)e[H[t]]=`rdp-${H[t]}`;for(const t in J)e[J[t]]=`rdp-${J[t]}`;for(const t in $)e[$[t]]=`rdp-${$[t]}`;return e}function Ea(e,t,n){return(n??new Q(t)).formatMonthYear(e)}function Fa(e,t,n){return(n??new Q(t)).format(e,"d")}function Ba(e,t=ne){return t.format(e,"LLLL")}function Ia(e,t,n){return(n??new Q(t)).format(e,"cccccc")}function Ha(e,t=ne){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Aa(){return""}function qa(e,t=ne){return t.format(e,"yyyy")}const ja=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Ea,formatDay:Fa,formatMonthDropdown:Ba,formatWeekNumber:Ha,formatWeekNumberHeader:Aa,formatWeekdayName:Ia,formatYearDropdown:qa},Symbol.toStringTag,{value:"Module"}));function za(e){return{...ja,...e}}function qt(e,t,n,r){let a=(r??new Q(n)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}function jt(e,t,n){return(n??new Q(t)).formatMonthYear(e)}function zt(e,t,n,r){let a=(r??new Q(n)).format(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a}function Gt(e){return"Choose the Month"}function Rt(){return""}const Ga="Go to the Next Month";function $t(e,t){return Ga}function Qt(e){return"Go to the Previous Month"}function Xt(e,t,n){return(n??new Q(t)).format(e,"cccc")}function Vt(e,t){return`Week ${e}`}function Ut(e){return"Week Number"}function Kt(e){return"Choose the Year"}const Ra=Object.freeze(Object.defineProperty({__proto__:null,labelDayButton:qt,labelGrid:jt,labelGridcell:zt,labelMonthDropdown:Gt,labelNav:Rt,labelNext:$t,labelPrevious:Qt,labelWeekNumber:Vt,labelWeekNumberHeader:Ut,labelWeekday:Xt,labelYearDropdown:Kt},Symbol.toStringTag,{value:"Module"})),Z=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function $a(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...Ra,...e??{},labelDayButton:Z(qt,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:Z(Gt,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:Z($t,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:Z(Qt,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:Z(Vt,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Z(Kt,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:Z(jt,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:Z(zt,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:Z(Rt,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:Z(Ut,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Z(Xt,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function Qa(e,t,n,r,a){const{startOfMonth:o,startOfYear:s,endOfYear:i,eachMonthOfInterval:u,getMonth:c}=a;return u({start:s(e),end:i(e)}).map(h=>{const w=r.formatMonthDropdown(h,a),D=c(h),O=t&&h<o(t)||n&&h>o(n)||!1;return{value:D,label:w,disabled:O}})}function Xa(e,t={},n={}){let r={...t==null?void 0:t[m.Day]};return Object.entries(e).filter(([,a])=>a===!0).forEach(([a])=>{r={...r,...n==null?void 0:n[a]}}),r}function Va(e,t,n,r){const a=r??e.today(),o=n?e.startOfBroadcastWeek(a,e):t?e.startOfISOWeek(a):e.startOfWeek(a),s=[];for(let i=0;i<7;i++){const u=e.addDays(o,i);s.push(u)}return s}function Ua(e,t,n,r,a=!1){if(!e||!t)return;const{startOfYear:o,endOfYear:s,eachYearOfInterval:i,getYear:u}=r,c=o(e),d=s(t),l=i({start:c,end:d});return a&&l.reverse(),l.map(h=>{const w=n.formatYearDropdown(h,r);return{value:u(h),label:w,disabled:!1}})}function Ka(e,t={}){var i;const{weekStartsOn:n,locale:r}=t,a=n??((i=r==null?void 0:r.options)==null?void 0:i.weekStartsOn)??0,o=u=>{const c=typeof u=="number"||typeof u=="string"?new Date(u):u;return new z(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},s=u=>{const c=o(u);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>o(z.tz(e)),newDate:(u,c,d)=>new z(u,c,d,12,0,0,e),startOfDay:u=>o(u),startOfWeek:(u,c)=>{const d=o(u),l=(c==null?void 0:c.weekStartsOn)??a,h=(d.getDay()-l+7)%7;return d.setDate(d.getDate()-h),d},startOfISOWeek:u=>{const c=o(u),d=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-d),c},startOfMonth:u=>{const c=o(u);return c.setDate(1),c},startOfYear:u=>{const c=o(u);return c.setMonth(0,1),c},endOfWeek:(u,c)=>{const d=o(u),w=((((c==null?void 0:c.weekStartsOn)??a)+6)%7-d.getDay()+7)%7;return d.setDate(d.getDate()+w),d},endOfISOWeek:u=>{const c=o(u),d=(7-c.getDay())%7;return c.setDate(c.getDate()+d),c},endOfMonth:u=>{const c=o(u);return c.setMonth(c.getMonth()+1,0),c},endOfYear:u=>{const c=o(u);return c.setMonth(11,31),c},eachMonthOfInterval:u=>{const c=o(u.start),d=o(u.end),l=[],h=new z(c.getFullYear(),c.getMonth(),1,12,0,0,e),w=d.getFullYear()*12+d.getMonth();for(;h.getFullYear()*12+h.getMonth()<=w;)l.push(new z(h,e)),h.setMonth(h.getMonth()+1,1);return l},addDays:(u,c)=>{const d=o(u);return d.setDate(d.getDate()+c),d},addWeeks:(u,c)=>{const d=o(u);return d.setDate(d.getDate()+c*7),d},addMonths:(u,c)=>{const d=o(u);return d.setMonth(d.getMonth()+c),d},addYears:(u,c)=>{const d=o(u);return d.setFullYear(d.getFullYear()+c),d},eachYearOfInterval:u=>{const c=o(u.start),d=o(u.end),l=[],h=new z(c.getFullYear(),0,1,12,0,0,e);for(;h.getFullYear()<=d.getFullYear();)l.push(new z(h,e)),h.setFullYear(h.getFullYear()+1,0,1);return l},getWeek:(u,c)=>{var l;const d=s(u);return Ue(d,{weekStartsOn:(c==null?void 0:c.weekStartsOn)??a,firstWeekContainsDate:(c==null?void 0:c.firstWeekContainsDate)??((l=r==null?void 0:r.options)==null?void 0:l.firstWeekContainsDate)??1})},getISOWeek:u=>{const c=s(u);return Ve(c)},differenceInCalendarDays:(u,c)=>{const d=s(u),l=s(c);return Xe(d,l)},differenceInCalendarMonths:(u,c)=>{const d=s(u),l=s(c);return xt(d,l)}}}const Ne=e=>e instanceof HTMLElement?e:null,Ge=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Za=e=>Ne(e.querySelector("[data-animated-month]")),Re=e=>Ne(e.querySelector("[data-animated-caption]")),$e=e=>Ne(e.querySelector("[data-animated-weeks]")),Ja=e=>Ne(e.querySelector("[data-animated-nav]")),La=e=>Ne(e.querySelector("[data-animated-weekdays]"));function eo(e,t,{classNames:n,months:r,focused:a,dateLib:o}){const s=E.useRef(null),i=E.useRef(r),u=E.useRef(!1);E.useLayoutEffect(()=>{const c=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const d=o.isSameMonth(r[0].date,c[0].date),l=o.isAfter(r[0].date,c[0].date),h=l?n[$.caption_after_enter]:n[$.caption_before_enter],w=l?n[$.weeks_after_enter]:n[$.weeks_before_enter],D=s.current,O=e.current.cloneNode(!0);if(O instanceof HTMLElement?(Ge(O).forEach(g=>{if(!(g instanceof HTMLElement))return;const N=Za(g);N&&g.contains(N)&&g.removeChild(N);const M=Re(g);M&&M.classList.remove(h);const f=$e(g);f&&f.classList.remove(w)}),s.current=O):s.current=null,u.current||d||a)return;const v=D instanceof HTMLElement?Ge(D):[],C=Ge(e.current);if(C!=null&&C.every(b=>b instanceof HTMLElement)&&(v!=null&&v.every(b=>b instanceof HTMLElement))){u.current=!0,e.current.style.isolation="isolate";const b=Ja(e.current);b&&(b.style.zIndex="1"),C.forEach((g,N)=>{const M=v[N];if(!M)return;g.style.position="relative",g.style.overflow="hidden";const f=Re(g);f&&f.classList.add(h);const S=$e(g);S&&S.classList.add(w);const _=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),f&&f.classList.remove(h),S&&S.classList.remove(w),g.style.position="",g.style.overflow="",g.contains(M)&&g.removeChild(M)};M.style.pointerEvents="none",M.style.position="absolute",M.style.overflow="hidden",M.setAttribute("aria-hidden","true");const I=La(M);I&&(I.style.opacity="0");const B=Re(M);B&&(B.classList.add(l?n[$.caption_before_exit]:n[$.caption_after_exit]),B.addEventListener("animationend",_));const j=$e(M);j&&j.classList.add(l?n[$.weeks_before_exit]:n[$.weeks_after_exit]),g.insertBefore(M,g.firstChild)})}})}function to(e,t,n,r){const a=e[0],o=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:u}=n??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:l,endOfBroadcastWeek:h,endOfISOWeek:w,endOfMonth:D,endOfWeek:O,isAfter:v,startOfBroadcastWeek:C,startOfISOWeek:b,startOfWeek:g}=r,N=u?C(a,r):s?b(a):g(a),M=u?h(o):s?w(D(o)):O(D(o)),f=t&&(u?h(t):s?w(t):O(t)),S=f&&v(M,f)?f:M,_=d(S,N),I=l(o,a)+1,B=[];for(let G=0;G<=_;G++){const R=c(N,G);B.push(R)}const V=(u?35:42)*I;if(i&&B.length<V){const G=V-B.length;for(let R=0;R<G;R++){const de=c(B[B.length-1],1);B.push(de)}}return B}function no(e){const t=[];return e.reduce((n,r)=>{const a=r.weeks.reduce((o,s)=>o.concat(s.days.slice()),t.slice());return n.concat(a.slice())},t.slice())}function ro(e,t,n,r){const{numberOfMonths:a=1}=n,o=[];for(let s=0;s<a;s++){const i=r.addMonths(e,s);if(t&&i>t)break;o.push(i)}return o}function bt(e,t,n,r){const{month:a,defaultMonth:o,today:s=r.today(),numberOfMonths:i=1}=e;let u=a||o||s;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:l}=r;if(n&&c(n,u)<i-1){const h=-1*(i-1);u=d(n,h)}return t&&c(u,t)<0&&(u=t),l(u)}function ao(e,t,n,r){const{addDays:a,endOfBroadcastWeek:o,endOfISOWeek:s,endOfMonth:i,endOfWeek:u,getISOWeek:c,getWeek:d,startOfBroadcastWeek:l,startOfISOWeek:h,startOfWeek:w}=r,D=e.reduce((O,v)=>{const C=n.broadcastCalendar?l(v,r):n.ISOWeek?h(v):w(v),b=n.broadcastCalendar?o(v):n.ISOWeek?s(i(v)):u(i(v)),g=t.filter(S=>S>=C&&S<=b),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&g.length<N){const S=t.filter(_=>{const I=N-g.length;return _>b&&_<=a(b,I)});g.push(...S)}const M=g.reduce((S,_)=>{const I=n.ISOWeek?c(_):d(_),B=S.find(V=>V.weekNumber===I),j=new Bt(_,v,r);return B?B.days.push(j):S.push(new ra(I,[j])),S},[]),f=new na(v,M);return O.push(f),O},[]);return n.reverseMonths?D.reverse():D}function oo(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:a,startOfDay:o,startOfMonth:s,endOfMonth:i,addYears:u,endOfYear:c,today:d}=t,l=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):!n&&l&&(n=a(u(e.today??d(),-100))),r?r=i(r):!r&&l&&(r=c(e.today??d())),[n&&o(n),r&&o(r)]}function so(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:u}=r,c=a?o:1,d=s(e);if(!t)return i(d,c);if(!(u(t,e)<o))return i(d,c)}function io(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:u}=r,c=a?o??1:1,d=s(e);if(!t)return i(d,-c);if(!(u(d,t)<=0))return i(d,-c)}function uo(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Pe(e,t){const[n,r]=E.useState(e);return[t===void 0?n:t,r]}function co(e,t){var N;const[n,r]=oo(e,t),{startOfMonth:a,endOfMonth:o}=t,s=bt(e,n,r,t),[i,u]=Pe(s,e.month?s:void 0);E.useEffect(()=>{const M=bt(e,n,r,t);u(M)},[e.timeZone]);const{months:c,weeks:d,days:l,previousMonth:h,nextMonth:w}=E.useMemo(()=>{const M=ro(i,r,{numberOfMonths:e.numberOfMonths},t),f=to(M,e.endMonth?o(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),S=ao(M,f,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),_=uo(S),I=no(S),B=io(i,n,e,t),j=so(i,r,e,t);return{months:S,weeks:_,days:I,previousMonth:B,nextMonth:j}},[t,i.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(N=e.endMonth)==null?void 0:N.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:D,onMonthChange:O}=e,v=M=>d.some(f=>f.days.some(S=>S.isEqualTo(M))),C=M=>{if(D)return;let f=a(M);n&&f<a(n)&&(f=a(n)),r&&f>a(r)&&(f=a(r)),u(f),O==null||O(f)};return{months:c,weeks:d,days:l,navStart:n,navEnd:r,previousMonth:h,nextMonth:w,goToMonth:C,goToDay:M=>{v(M)||C(M.date)}}}var ee;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(ee||(ee={}));function Mt(e){return!e[H.disabled]&&!e[H.hidden]&&!e[H.outside]}function fo(e,t,n,r){let a,o=-1;for(const s of e){const i=t(s);Mt(i)&&(i[H.focused]&&o<ee.FocusedModifier?(a=s,o=ee.FocusedModifier):r!=null&&r.isEqualTo(s)&&o<ee.LastFocused?(a=s,o=ee.LastFocused):n(s.date)&&o<ee.Selected?(a=s,o=ee.Selected):i[H.today]&&o<ee.Today&&(a=s,o=ee.Today))}return a||(a=e.find(s=>Mt(t(s)))),a}function lo(e,t,n,r,a,o,s){const{ISOWeek:i,broadcastCalendar:u}=o,{addDays:c,addMonths:d,addWeeks:l,addYears:h,endOfBroadcastWeek:w,endOfISOWeek:D,endOfWeek:O,max:v,min:C,startOfBroadcastWeek:b,startOfISOWeek:g,startOfWeek:N}=s;let f={day:c,week:l,month:d,year:h,startOfWeek:S=>u?b(S,s):i?g(S):N(S),endOfWeek:S=>u?w(S):i?D(S):O(S)}[e](n,t==="after"?1:-1);return t==="before"&&r?f=v([r,f]):t==="after"&&a&&(f=C([a,f])),f}function Zt(e,t,n,r,a,o,s,i=0){if(i>365)return;const u=lo(e,t,n.date,r,a,o,s),c=!!(o.disabled&&ie(u,o.disabled,s)),d=!!(o.hidden&&ie(u,o.hidden,s)),l=u,h=new Bt(u,l,s);return!c&&!d?h:Zt(e,t,h,r,a,o,s,i+1)}function ho(e,t,n,r,a){const{autoFocus:o}=e,[s,i]=E.useState(),u=fo(t.days,n,r||(()=>!1),s),[c,d]=E.useState(o?u:void 0);return{isFocusTarget:O=>!!(u!=null&&u.isEqualTo(O)),setFocused:d,focused:c,blur:()=>{i(c),d(void 0)},moveFocus:(O,v)=>{if(!c)return;const C=Zt(O,v,c,t.navStart,t.navEnd,e,a);C&&(e.disableNavigation&&!t.days.some(g=>g.isEqualTo(C))||(t.goToDay(C),d(C)))}}}function mo(e,t){const{selected:n,required:r,onSelect:a}=e,[o,s]=Pe(n,a?n:void 0),i=a?n:o,{isSameDay:u}=t,c=w=>(i==null?void 0:i.some(D=>u(D,w)))??!1,{min:d,max:l}=e;return{selected:i,select:(w,D,O)=>{let v=[...i??[]];if(c(w)){if((i==null?void 0:i.length)===d||r&&(i==null?void 0:i.length)===1)return;v=i==null?void 0:i.filter(C=>!u(C,w))}else(i==null?void 0:i.length)===l?v=[w]:v=[...v,w];return a||s(v),a==null||a(v,w,D,O),v},isSelected:c}}function yo(e,t,n=0,r=0,a=!1,o=ne){const{from:s,to:i}=t||{},{isSameDay:u,isAfter:c,isBefore:d}=o;let l;if(!s&&!i)l={from:e,to:n>0?void 0:e};else if(s&&!i)u(s,e)?n===0?l={from:s,to:e}:a?l={from:s,to:void 0}:l=void 0:d(e,s)?l={from:e,to:s}:l={from:s,to:e};else if(s&&i)if(u(s,e)&&u(i,e))a?l={from:s,to:i}:l=void 0;else if(u(s,e))l={from:s,to:n>0?void 0:e};else if(u(i,e))l={from:e,to:n>0?void 0:e};else if(d(e,s))l={from:e,to:i};else if(c(e,s))l={from:s,to:e};else if(c(e,i))l={from:s,to:e};else throw new Error("Invalid range");if(l!=null&&l.from&&(l!=null&&l.to)){const h=o.differenceInCalendarDays(l.to,l.from);r>0&&h>r?l={from:e,to:void 0}:n>1&&h<n&&(l={from:e,to:void 0})}return l}function go(e,t,n=ne){const r=Array.isArray(t)?t:[t];let a=e.from;const o=n.differenceInCalendarDays(e.to,e.from),s=Math.min(o,6);for(let i=0;i<=s;i++){if(r.includes(a.getDay()))return!0;a=n.addDays(a,1)}return!1}function kt(e,t,n=ne){return se(e,t.from,!1,n)||se(e,t.to,!1,n)||se(t,e.from,!1,n)||se(t,e.to,!1,n)}function wo(e,t,n=ne){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?se(e,i,!1,n):At(i,n)?i.some(u=>se(e,u,!1,n)):_e(i)?i.from&&i.to?kt(e,{from:i.from,to:i.to},n):!1:Ht(i)?go(e,i.dayOfWeek,n):Ke(i)?n.isAfter(i.before,i.after)?kt(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):ie(e.from,i,n)||ie(e.to,i,n):Ze(i)||Je(i)?ie(e.from,i,n)||ie(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const u=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=u;c++){if(s.some(d=>d(i)))return!0;i=n.addDays(i,1)}}return!1}function bo(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:a,selected:o,required:s,onSelect:i}=e,[u,c]=Pe(o,i?o:void 0),d=i?o:u;return{selected:d,select:(w,D,O)=>{const{min:v,max:C}=e;let b;if(w){const g=d==null?void 0:d.from,N=d==null?void 0:d.to,M=!!g&&!!N,f=!!g&&!!N&&t.isSameDay(g,N)&&t.isSameDay(w,g);a&&(M||!(d!=null&&d.from))?!s&&f?b=void 0:b={from:w,to:void 0}:b=yo(w,d,v,C,s,t)}return r&&n&&(b!=null&&b.from)&&b.to&&wo({from:b.from,to:b.to},n,t)&&(b.from=w,b.to=void 0),i||c(b),i==null||i(b,w,D,O),b},isSelected:w=>d&&se(d,w,!1,t)}}function Mo(e,t){const{selected:n,required:r,onSelect:a}=e,[o,s]=Pe(n,a?n:void 0),i=a?n:o,{isSameDay:u}=t;return{selected:i,select:(l,h,w)=>{let D=l;return!r&&i&&i&&u(l,i)&&(D=void 0),a||s(D),a==null||a(D,l,h,w),D},isSelected:l=>i?u(i,l):!1}}function ko(e,t){const n=Mo(e,t),r=mo(e,t),a=bo(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return a;default:return}}function X(e,t){return e instanceof z&&e.timeZone===t?e:new z(e,t)}function le(e,t,n){return X(e,t)}function Dt(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?le(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?le(r,t):r):_e(e)?{...e,from:e.from?X(e.from,t):e.from,to:e.to?X(e.to,t):e.to}:Ke(e)?{before:le(e.before,t),after:le(e.after,t)}:Ze(e)?{after:le(e.after,t)}:Je(e)?{before:le(e.before,t)}:e}function Qe(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Dt(r,t)):Dt(e,t))}function Do(e){var st;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=X(t.today,n)),t.month&&(t.month=X(t.month,n)),t.defaultMonth&&(t.defaultMonth=X(t.defaultMonth,n)),t.startMonth&&(t.startMonth=X(t.startMonth,n)),t.endMonth&&(t.endMonth=X(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=X(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(st=t.selected)==null?void 0:st.map(k=>X(k,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?X(t.selected.from,n):t.selected.from,to:t.selected.to?X(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Qe(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Qe(t.hidden,n)),t.modifiers)){const k={};Object.keys(t.modifiers).forEach(x=>{var W;k[x]=Qe((W=t.modifiers)==null?void 0:W[x],n)}),t.modifiers=k}const{components:r,formatters:a,labels:o,dateLib:s,locale:i,classNames:u}=E.useMemo(()=>{const k={...Ft,...t.locale},x=t.broadcastCalendar?1:t.weekStartsOn,W=t.noonSafe&&t.timeZone?Ka(t.timeZone,{weekStartsOn:x,locale:k}):void 0,A=t.dateLib&&W?{...W,...t.dateLib}:t.dateLib??W,Y=new Q({locale:k,weekStartsOn:x,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},A);return{dateLib:Y,components:_a(t.components),formatters:za(t.formatters),labels:$a(t.labels,Y.options),locale:k,classNames:{...Le(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:s.today()});const{captionLayout:c,mode:d,navLayout:l,numberOfMonths:h=1,onDayBlur:w,onDayClick:D,onDayFocus:O,onDayKeyDown:v,onDayMouseEnter:C,onDayMouseLeave:b,onNextClick:g,onPrevClick:N,showWeekNumber:M,styles:f}=t,{formatCaption:S,formatDay:_,formatMonthDropdown:I,formatWeekNumber:B,formatWeekNumberHeader:j,formatWeekdayName:V,formatYearDropdown:G}=a,R=co(t,s),{days:de,months:ge,navStart:Ee,navEnd:Fe,previousMonth:U,nextMonth:K,goToMonth:re}=R,Be=Ya(de,t,Ee,Fe,s),{isSelected:we,select:be,selected:Ce}=ko(t,s)??{},{blur:et,focused:xe,isFocusTarget:Jt,moveFocus:tt,setFocused:pe}=ho(t,R,Be,we??(()=>!1),s),{labelDayButton:Lt,labelGridcell:en,labelGrid:tn,labelMonthDropdown:nn,labelNav:nt,labelPrevious:rn,labelNext:an,labelWeekday:on,labelWeekNumber:sn,labelWeekNumberHeader:un,labelYearDropdown:cn}=o,dn=E.useMemo(()=>Va(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),rt=d!==void 0||D!==void 0,Ie=E.useCallback(()=>{U&&(re(U),N==null||N(U))},[U,re,N]),He=E.useCallback(()=>{K&&(re(K),g==null||g(K))},[re,K,g]),fn=E.useCallback((k,x)=>W=>{W.preventDefault(),W.stopPropagation(),pe(k),!x.disabled&&(be==null||be(k.date,x,W),D==null||D(k.date,x,W))},[be,D,pe]),ln=E.useCallback((k,x)=>W=>{pe(k),O==null||O(k.date,x,W)},[O,pe]),hn=E.useCallback((k,x)=>W=>{et(),w==null||w(k.date,x,W)},[et,w]),mn=E.useCallback((k,x)=>W=>{const A={ArrowLeft:[W.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[W.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[W.shiftKey?"year":"week","after"],ArrowUp:[W.shiftKey?"year":"week","before"],PageUp:[W.shiftKey?"year":"month","before"],PageDown:[W.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(A[W.key]){W.preventDefault(),W.stopPropagation();const[Y,L]=A[W.key];tt(Y,L)}v==null||v(k.date,x,W)},[tt,v,t.dir]),yn=E.useCallback((k,x)=>W=>{C==null||C(k.date,x,W)},[C]),gn=E.useCallback((k,x)=>W=>{b==null||b(k.date,x,W)},[b]),wn=E.useCallback((k,x)=>W=>{const A=Number(W.target.value),Y=s.setMonth(s.startOfMonth(k),A);re(s.addMonths(Y,-x))},[s,re]),bn=E.useCallback((k,x)=>W=>{const A=Number(W.target.value),Y=s.setYear(s.startOfMonth(k),A);re(s.addMonths(Y,-x))},[s,re]),{className:Mn,style:kn}=E.useMemo(()=>({className:[u[m.Root],t.className].filter(Boolean).join(" "),style:{...f==null?void 0:f[m.Root],...t.style}}),[u,t.className,t.style,f]),Dn=Pa(t),at=k=>{const x=f==null?void 0:f[m.Dropdown],W=f==null?void 0:f[k];if(!(!x&&!W))return{...x,...W}},ot=E.useRef(null);eo(ot,!!t.animate,{classNames:u,months:ge,focused:xe,dateLib:s});const vn={dayPickerProps:t,selected:Ce,select:be,isSelected:we,months:ge,nextMonth:K,previousMonth:U,goToMonth:re,getModifiers:Be,components:r,classNames:u,styles:f,labels:o,formatters:a};return y.createElement(It.Provider,{value:vn},y.createElement(r.Root,{rootRef:t.animate?ot:void 0,className:Mn,style:kn,dir:t.dir,id:t.id,lang:t.lang??i.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Dn},y.createElement(r.Months,{className:u[m.Months],style:f==null?void 0:f[m.Months]},!t.hideNavigation&&!l&&y.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[m.Nav],style:f==null?void 0:f[m.Nav],"aria-label":nt(),onPreviousClick:Ie,onNextClick:He,previousMonth:U,nextMonth:K}),ge.map((k,x)=>{const W=t.reverseMonths?ge.length-1-x:x;return y.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:u[m.Month],style:f==null?void 0:f[m.Month],key:x,displayIndex:x,calendarMonth:k},l==="around"&&!t.hideNavigation&&x===0&&y.createElement(r.PreviousMonthButton,{type:"button",className:u[m.PreviousMonthButton],style:f==null?void 0:f[m.PreviousMonthButton],tabIndex:U?void 0:-1,"aria-disabled":U?void 0:!0,"aria-label":rn(U),onClick:Ie,"data-animated-button":t.animate?"true":void 0},y.createElement(r.Chevron,{disabled:U?void 0:!0,className:u[m.Chevron],style:f==null?void 0:f[m.Chevron],orientation:t.dir==="rtl"?"right":"left"})),y.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:u[m.MonthCaption],style:f==null?void 0:f[m.MonthCaption],calendarMonth:k,displayIndex:x},c!=null&&c.startsWith("dropdown")?y.createElement(r.DropdownNav,{className:u[m.Dropdowns],style:f==null?void 0:f[m.Dropdowns]},(()=>{const A=c==="dropdown"||c==="dropdown-months"?y.createElement(r.MonthsDropdown,{key:"month",className:u[m.MonthsDropdown],"aria-label":nn(),disabled:!!t.disableNavigation,onChange:wn(k.date,W),options:Qa(k.date,Ee,Fe,a,s),style:at(m.MonthsDropdown),value:s.getMonth(k.date)}):y.createElement("span",{key:"month"},I(k.date,s)),Y=c==="dropdown"||c==="dropdown-years"?y.createElement(r.YearsDropdown,{key:"year",className:u[m.YearsDropdown],"aria-label":cn(s.options),disabled:!!t.disableNavigation,onChange:bn(k.date,W),options:Ua(Ee,Fe,a,s,!!t.reverseYears),style:at(m.YearsDropdown),value:s.getYear(k.date)}):y.createElement("span",{key:"year"},G(k.date,s));return s.getMonthYearOrder()==="year-first"?[Y,A]:[A,Y]})(),y.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},S(k.date,s.options,s))):y.createElement(r.CaptionLabel,{className:u[m.CaptionLabel],style:f==null?void 0:f[m.CaptionLabel],role:"status","aria-live":"polite"},S(k.date,s.options,s))),l==="around"&&!t.hideNavigation&&x===h-1&&y.createElement(r.NextMonthButton,{type:"button",className:u[m.NextMonthButton],style:f==null?void 0:f[m.NextMonthButton],tabIndex:K?void 0:-1,"aria-disabled":K?void 0:!0,"aria-label":an(K),onClick:He,"data-animated-button":t.animate?"true":void 0},y.createElement(r.Chevron,{disabled:K?void 0:!0,className:u[m.Chevron],style:f==null?void 0:f[m.Chevron],orientation:t.dir==="rtl"?"left":"right"})),x===h-1&&l==="after"&&!t.hideNavigation&&y.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[m.Nav],style:f==null?void 0:f[m.Nav],"aria-label":nt(),onPreviousClick:Ie,onNextClick:He,previousMonth:U,nextMonth:K}),y.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":tn(k.date,s.options,s)||void 0,className:u[m.MonthGrid],style:f==null?void 0:f[m.MonthGrid]},!t.hideWeekdays&&y.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:u[m.Weekdays],style:f==null?void 0:f[m.Weekdays]},M&&y.createElement(r.WeekNumberHeader,{"aria-label":un(s.options),className:u[m.WeekNumberHeader],style:f==null?void 0:f[m.WeekNumberHeader],scope:"col"},j()),dn.map(A=>y.createElement(r.Weekday,{"aria-label":on(A,s.options,s),className:u[m.Weekday],key:String(A),style:f==null?void 0:f[m.Weekday],scope:"col"},V(A,s.options,s)))),y.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:u[m.Weeks],style:f==null?void 0:f[m.Weeks]},k.weeks.map(A=>y.createElement(r.Week,{className:u[m.Week],key:A.weekNumber,style:f==null?void 0:f[m.Week],week:A},M&&y.createElement(r.WeekNumber,{week:A,style:f==null?void 0:f[m.WeekNumber],"aria-label":sn(A.weekNumber,{locale:i}),className:u[m.WeekNumber],scope:"row",role:"rowheader"},B(A.weekNumber,s)),A.days.map(Y=>{const{date:L}=Y,p=Be(Y);if(p[H.focused]=!p.hidden&&!!(xe!=null&&xe.isEqualTo(Y)),p[J.selected]=(we==null?void 0:we(L))||p.selected,_e(Ce)){const{from:Ae,to:qe}=Ce;p[J.range_start]=!!(Ae&&qe&&s.isSameDay(L,Ae)),p[J.range_end]=!!(Ae&&qe&&s.isSameDay(L,qe)),p[J.range_middle]=se(Ce,L,!0,s)}const On=Xa(p,f,t.modifiersStyles),Wn=Ta(p,u,t.modifiersClassNames),Sn=!rt&&!p.hidden?en(L,p,s.options,s):void 0;return y.createElement(r.Day,{key:`${Y.isoDate}_${Y.displayMonthId}`,day:Y,modifiers:p,className:Wn.join(" "),style:On,role:"gridcell","aria-selected":p.selected||void 0,"aria-label":Sn,"data-day":Y.isoDate,"data-month":Y.outside?Y.dateMonthId:void 0,"data-selected":p.selected||void 0,"data-disabled":p.disabled||void 0,"data-hidden":p.hidden||void 0,"data-outside":Y.outside||void 0,"data-focused":p.focused||void 0,"data-today":p.today||void 0},!p.hidden&&rt?y.createElement(r.DayButton,{className:u[m.DayButton],style:f==null?void 0:f[m.DayButton],type:"button",day:Y,modifiers:p,disabled:!p.focused&&p.disabled||void 0,"aria-disabled":p.focused&&p.disabled||void 0,tabIndex:Jt(Y)?0:-1,"aria-label":Lt(L,p,s.options,s),onClick:fn(Y,p),onBlur:hn(Y,p),onFocus:ln(Y,p),onKeyDown:mn(Y,p),onMouseEnter:yn(Y,p),onMouseLeave:gn(Y,p)},_(L,s.options,s)):!p.hidden&&_(Y.date,s.options,s))}))))))})),t.footer&&y.createElement(r.Footer,{className:u[m.Footer],style:f==null?void 0:f[m.Footer],role:"status","aria-live":"polite"},t.footer)))}function Wo({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:a="ghost",locale:o,formatters:s,components:i,...u}){const c=Le();return ae.jsx(Do,{showOutsideDays:n,className:T("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,locale:o,formatters:{formatMonthDropdown:d=>d.toLocaleString(o==null?void 0:o.code,{month:"short"}),...s},classNames:{root:T("w-fit",c.root),months:T("relative flex flex-col gap-4 md:flex-row",c.months),month:T("flex w-full flex-col gap-4",c.month),nav:T("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",c.nav),button_previous:T(it({variant:a}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",c.button_previous),button_next:T(it({variant:a}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",c.button_next),month_caption:T("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",c.month_caption),dropdowns:T("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",c.dropdowns),dropdown_root:T("relative rounded-(--cell-radius)",c.dropdown_root),dropdown:T("absolute inset-0 bg-popover opacity-0",c.dropdown),caption_label:T("font-medium select-none",r==="label"?"text-sm":"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",c.caption_label),month_grid:T("w-full border-collapse",c.month_grid),weekdays:T("flex",c.weekdays),weekday:T("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",c.weekday),week:T("mt-2 flex w-full",c.week),week_number_header:T("w-(--cell-size) select-none",c.week_number_header),week_number:T("text-[0.8rem] text-muted-foreground select-none",c.week_number),day:T("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",u.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)":"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",c.day),range_start:T("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",c.range_start),range_middle:T("rounded-none",c.range_middle),range_end:T("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",c.range_end),today:T("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",c.today),outside:T("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:T("text-muted-foreground opacity-50",c.disabled),hidden:T("invisible",c.hidden),...t},components:{Root:({className:d,rootRef:l,...h})=>ae.jsx("div",{"data-slot":"calendar",ref:l,className:T(d),...h}),Chevron:({className:d,orientation:l,...h})=>l==="left"?ae.jsx(Nn,{className:T("size-4",d),...h}):l==="right"?ae.jsx(Cn,{className:T("size-4",d),...h}):ae.jsx(xn,{className:T("size-4",d),...h}),DayButton:({...d})=>ae.jsx(vo,{locale:o,...d}),WeekNumber:({children:d,...l})=>ae.jsx("td",{...l,children:ae.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:d})}),...i},...u})}function vo({className:e,day:t,modifiers:n,locale:r,...a}){const o=Le(),s=E.useRef(null);return E.useEffect(()=>{var i;n.focused&&((i=s.current)==null||i.focus())},[n.focused]),ae.jsx(pn,{variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(r==null?void 0:r.code),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:T("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",o.day,e),...a})}export{Wo as Calendar,vo as CalendarDayButton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,c as o}from"./index-C6xNKxpg.js";function a({className:r,children:n}){return e.jsx("div",{className:o("min-h-96 overflow-hidden rounded-xl border bg-card",r),children:n})}export{a as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,an as m,c as p}from"./index-C6xNKxpg.js";function x({open:t,onOpenChange:s,panel:i,children:r,side:n="right",width:a=450,closeOnEscape:c=!0,showCloseHandle:l=!0,className:o}){const d=typeof a=="number"?`${a}px`:a;return e.jsxs("div",{"data-open":t,"data-side":n,className:p("chat-side-panel-layout @container min-w-0",o),style:{"--chat-side-panel-width":d},children:[e.jsx("div",{className:"min-w-0",children:r}),e.jsx(m,{open:t,onOpenChange:s,side:n,width:a,closeOnEscape:c,showCloseHandle:l,children:i})]})}export{x as C};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{h as K,u as q,i as J,r as o,j as e,k as E,S as T,l as H,c as A,m as P,n as U,o as L,p as k,s as Y,q as Q,v as h,w as x,x as B,y as _,z as D,A as S,D as v,I as X,T as Z,B as ee,E as se,F as te,G as z,H as $,J as C,K as m,M as G,N as p}from"./index-C6xNKxpg.js";const N="__union__",F="anonymous";function V(s){return K((s==null?void 0:s.title)||(s==null?void 0:s.name)||"Role",{ns:"starter"})}function ae({roles:s,roleMode:t,allowAnonymous:n=!1}){if(t==="only-use-union")return[{name:N,title:"Full permissions"}];const i=s.filter(a=>a.name!==N&&a.name!==F);return n&&i.push({name:F,title:"Anonymous"}),t==="allow-use-union"&&i.unshift({name:N,title:"Full permissions"}),i}function ne({className:s,triggerClassName:t,label:n="Switch role",showWhenUnavailable:i=!1}){var I;const{data:a,isLoading:R}=q(),l=J(),[f,g]=o.useState(!1),[j,b]=o.useState(),c=o.useMemo(()=>ae({roles:(a==null?void 0:a.roles)??[],roleMode:l.data.roleMode,allowAnonymous:l.data.allowAnonymous}),[l.data.allowAnonymous,l.data.roleMode,a==null?void 0:a.roles]),d=l.data.role??((I=c[0])==null?void 0:I.name),r=c.length>1&&l.data.roleMode!=="only-use-union";return R?e.jsx(E,{className:"size-4 animate-spin text-muted-foreground"}):!r&&!i?null:r?e.jsxs("div",{className:A("space-y-2",s),children:[n===!1?null:e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:n}),e.jsxs(P,{value:d,disabled:f,onValueChange:u=>{!u||u===d||(g(!0),b(void 0),Y(u,{reloadAcl:!1}).then(()=>window.location.reload()).catch(w=>{b(w instanceof Error?w.message:"Unable to switch role"),g(!1)}))},children:[e.jsxs(U,{className:A("w-full min-w-52",t),"aria-label":"Switch role",children:[f?e.jsx(E,{className:"animate-spin"}):e.jsx(T,{}),e.jsx(L,{children:M(c,d)})]}),e.jsx(k,{children:c.map((u,w)=>{var W;return e.jsx(re,{role:u,showSeparator:w===1&&((W=c[0])==null?void 0:W.name)===N},u.name)})})]}),j?e.jsx("p",{className:"text-xs text-destructive",children:j}):null]}):e.jsxs("div",{className:A("flex items-center gap-2 text-sm",s),children:[e.jsx(T,{className:"size-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Current role"}),e.jsx(H,{variant:"secondary",children:M(c,d)})]})}function re({role:s,showSeparator:t}){return e.jsxs(e.Fragment,{children:[t?e.jsx(Q,{}):null,e.jsx(h,{value:s.name,children:V(s)})]})}function M(s,t){return V(s.find(n=>n.name===t)??(t?{name:t}:void 0))}const O={header:"Application header","user-menu":"User menu",settings:"Account settings",custom:"Custom surface"},le={"current-role":"Show current role",hide:"Hide component"},oe={header:"Place it in the application header beside the existing account controls. Keep the trigger compact and preserve the responsive user menu.","user-menu":"Place it inside the existing user/account popover as a full-width menu section, separated from profile and sign-out actions.",settings:"Place it in an account settings section with a field label and short explanation of how the active role changes visible data and actions.",custom:"Place it in the application surface described below, matching the surrounding layout and spacing."};function ie(){const[s,t]=o.useState("user-menu"),[n,i]=o.useState("Working as"),[a,R]=o.useState("current-role"),[l,f]=o.useState("Use the Starter's existing account controls and visual language. Do not create a separate demo page."),[g,j]=o.useState(!1),[b,c]=o.useState(!1),d=o.useMemo(()=>`Integrate the RoleSwitcher into the existing NocoBase Admin Starter.
|
|
2
|
+
|
|
3
|
+
Target placement
|
|
4
|
+
- Placement: ${O[s]}
|
|
5
|
+
- ${oe[s]}
|
|
6
|
+
- Application context: ${l}
|
|
7
|
+
|
|
8
|
+
Component presentation
|
|
9
|
+
- Label: ${n.trim()?n:"No label; pass label={false}."}
|
|
10
|
+
- When role switching is unavailable: ${a==="current-role"?"Keep the current identity visible by passing showWhenUnavailable.":"Hide the component by keeping showWhenUnavailable false."}
|
|
11
|
+
- Use className and triggerClassName only to fit the existing surface; do not fork or restyle the internal Select implementation.
|
|
12
|
+
|
|
13
|
+
Integration requirements
|
|
14
|
+
- Import and reuse RoleSwitcher from the installed local entry point at @/extensions/nocobase-acl.
|
|
15
|
+
- Update the existing application surface instead of creating an isolated example page.
|
|
16
|
+
- Do not fetch, hard-code, or pass a duplicate role list. The component reads roles from the signed-in identity.
|
|
17
|
+
- Do not reimplement Full permissions, Anonymous, or role-mode logic. The component derives these options from the Starter ACL store.
|
|
18
|
+
- Do not add a separate role-switch mutation. The component already calls users:setDefaultRole and reloads the application after a successful switch.
|
|
19
|
+
- Preserve existing account, responsive navigation, and sign-out behavior.
|
|
20
|
+
- Return the complete updated component for the target surface and mention any imports that were added.`,[n,s,l,a]);return e.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-[360px_minmax(0,1fr)]",children:[e.jsxs(x,{className:"gap-0 py-0",children:[e.jsxs(B,{className:"border-b py-4",children:[e.jsx(_,{className:"text-base",children:"Placement settings"}),e.jsx(D,{children:"Choose where the shared role switcher belongs and how its compact state should appear."})]}),e.jsxs(S,{className:"space-y-5 py-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{children:"Placement"}),e.jsxs(P,{value:s,onValueChange:r=>r&&t(r),children:[e.jsx(U,{className:"w-full",children:e.jsx(L,{children:O[s]})}),e.jsxs(k,{children:[e.jsx(h,{value:"header",children:"Application header"}),e.jsx(h,{value:"user-menu",children:"User menu"}),e.jsx(h,{value:"settings",children:"Account settings"}),e.jsx(h,{value:"custom",children:"Custom surface"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{htmlFor:"role-switcher-label",children:"Label"}),e.jsx(X,{id:"role-switcher-label",value:n,onChange:r=>i(r.target.value),placeholder:"Leave empty for no label"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{children:"Single-role behavior"}),e.jsxs(P,{value:a,onValueChange:r=>r&&R(r),children:[e.jsx(U,{className:"w-full",children:e.jsx(L,{children:le[a]})}),e.jsxs(k,{children:[e.jsx(h,{value:"current-role",children:"Show current role"}),e.jsx(h,{value:"hide",children:"Hide component"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{htmlFor:"role-switcher-surface",children:"Application context"}),e.jsx(Z,{id:"role-switcher-surface",value:l,onChange:r=>f(r.target.value),className:"min-h-28"})]})]})]}),e.jsxs(x,{className:"gap-0 overflow-hidden py-0",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-b px-4 py-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"Generated integration prompt"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Updates as you change placement and presentation settings."})]}),e.jsxs(ee,{size:"sm",onClick:async()=>{try{await navigator.clipboard.writeText(d),c(!1),j(!0),window.setTimeout(()=>j(!1),1500)}catch{c(!0)}},children:[g?e.jsx(se,{}):e.jsx(te,{}),g?"Copied":"Copy prompt"]})]}),b?e.jsx("p",{className:"border-b px-4 py-2 text-xs text-destructive",children:"Clipboard access failed. Select the prompt and copy it manually."}):null,e.jsx(S,{className:"p-0",children:e.jsx("pre",{className:"max-h-[560px] overflow-auto whitespace-pre-wrap bg-muted/25 p-5 font-mono text-xs leading-5 text-muted-foreground",children:d})})]})]})}const ce=[["className","string","undefined","Styles the component wrapper so it can fit a toolbar, menu, or settings layout."],["triggerClassName","string","undefined","Styles only the Select trigger without changing the wrapper."],["label","ReactNode | false",'"Switch role"',"Replaces the field label. Pass false for a compact control without a label."],["showWhenUnavailable","boolean","false","Shows the current role as a non-interactive badge when the user cannot switch roles."]],de=[["Multiple assigned roles","Renders a Select using roles from the signed-in identity."],["allow-use-union","Prepends Full permissions using the __union__ role."],["only-use-union","Shows Full permissions as the current non-interactive role."],["allowAnonymous","Appends Anonymous to the available role options."],["One available role","Returns null, or shows the current-role badge when showWhenUnavailable is true."]];function me(){return e.jsxs("div",{className:"space-y-12 pb-12",children:[e.jsxs("header",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-[-0.025em] sm:text-3xl",children:"Role switcher"}),e.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:"A reusable role selector backed by the Starter's NocoBase ACL store and signed-in identity."})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(y,{eyebrow:"Role selection",title:"RoleSwitcher",description:"The component resolves the signed-in user's roles and NocoBase role mode automatically. Business pages only decide its placement and presentation."}),e.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-2",children:[e.jsxs(x,{children:[e.jsxs(B,{children:[e.jsx(_,{children:"Live component"}),e.jsx(D,{children:"Uses the current identity and active NocoBase ACL response."})]}),e.jsx(S,{children:e.jsx(ne,{showWhenUnavailable:!0,className:"w-full max-w-sm",label:"Working as"})})]}),e.jsxs(x,{children:[e.jsxs(B,{children:[e.jsx(_,{children:"Unavailable state"}),e.jsx(D,{children:"With one usable role, showWhenUnavailable keeps identity visible without presenting a disabled Select."})]}),e.jsx(S,{children:e.jsxs("div",{className:"flex min-h-9 items-center gap-2 text-sm",children:[e.jsx(T,{className:"size-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Current role"}),e.jsx(H,{variant:"secondary",children:"Member"})]})})]})]})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(y,{eyebrow:"Prompt generator",title:"Place the role switcher in an existing application surface",description:"Describe the target placement and presentation. The generated prompt integrates the exported component without rebuilding its role-loading or switching behavior."}),e.jsx(ie,{})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(y,{eyebrow:"Component API",title:"Role switcher props",description:"Role data, union mode, Anonymous, persistence, and reload behavior are built in rather than exposed as duplicated application props."}),e.jsx(he,{rows:ce})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(y,{eyebrow:"Automatic behavior",title:"Role options follow NocoBase configuration",description:"These states are derived from the identity and roles:check response, so applications do not maintain a second role list."}),e.jsx(x,{className:"gap-0 overflow-hidden py-0",children:e.jsxs(z,{children:[e.jsx($,{children:e.jsxs(C,{children:[e.jsx(m,{children:"Condition"}),e.jsx(m,{children:"Rendered behavior"})]})}),e.jsx(G,{children:de.map(([s,t])=>e.jsxs(C,{children:[e.jsx(p,{className:"font-medium",children:s}),e.jsx(p,{className:"text-muted-foreground",children:t})]},s))})]})})]})]})}function he({rows:s}){return e.jsx(x,{className:"gap-0 overflow-hidden py-0",children:e.jsxs(z,{children:[e.jsx($,{children:e.jsxs(C,{children:[e.jsx(m,{children:"Prop"}),e.jsx(m,{children:"Type"}),e.jsx(m,{children:"Default"}),e.jsx(m,{children:"Description"})]})}),e.jsx(G,{children:s.map(([t,n,i,a])=>e.jsxs(C,{children:[e.jsx(p,{className:"font-mono text-xs font-medium",children:t}),e.jsx(p,{className:"font-mono text-xs text-muted-foreground",children:n}),e.jsx(p,{className:"font-mono text-xs text-muted-foreground",children:i}),e.jsx(p,{className:"min-w-72 whitespace-normal text-muted-foreground",children:a})]},t))})]})})}function y({eyebrow:s,title:t,description:n}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:s}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:t}),e.jsx("p",{className:"mt-1.5 max-w-3xl text-sm leading-6 text-muted-foreground",children:n})]})}export{me as AclComponentsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aZ as c,j as s,bf as d,bg as m,bh as p,bi as y,bj as v}from"./index-C6xNKxpg.js";const n=[{username:"atlas",nickname:"Atlas",position:"General assistant",greeting:"How can I help with this page?"},{username:"viz",nickname:"Viz",position:"Insights analyst",greeting:"What would you like to explore?"}],t=[{value:"__preview__",label:"Preview only",configured:!1}],a=()=>new ReadableStream({start(e){e.close()}}),u={listEmployees:async()=>n,listModels:async()=>t,updateEmployeeUserPrompt:async()=>{},listConversations:async()=>[],getConversationMessages:async()=>[],getConversationActiveState:async()=>"idle",updateConversationTitle:async()=>{},destroyConversation:async()=>{},uploadFile:async e=>({id:crypto.randomUUID(),filename:e.name,mimetype:e.type,size:e.size}),createConversation:async()=>`preview-${crypto.randomUUID()}`,sendMessagesStream:async()=>a(),resendMessagesStream:async()=>a(),updateToolCallDecision:async()=>({updated:0,toolCalls:[]}),resumeToolCallStream:async()=>a(),resumeConversationStream:async()=>a()};function h({children:e}){const{configurationStatus:o,hasEnabledModels:i,employees:r}=c();if(o==="ready"&&i)return e;const l=r.length?e:s.jsx(d,{employees:n,models:t,service:u,children:e});return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(m,{children:[s.jsx(p,{}),s.jsx(y,{children:"Preview mode"}),s.jsx(v,{children:"Component examples remain available. Sending messages requires an enabled AI model in the connected NocoBase application."})]}),l]})}export{h as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as $,bQ as I,bR as L,P as N,bS as O,bs as H,M as Y,j as X,R as S,o as y}from"./echarts-runtime-CEgJbv68.js";var B=Math.min,j=Math.max;function F(h,t){return isNaN(h)||isNaN(t)}function Z(h,t,l,r,f,i,a,n,u){for(var s,w,c,R,b,e,P=l,p=0;p<r;p++){var o=t[P*2],v=t[P*2+1];if(P>=f||P<0)break;if(F(o,v)){if(u){P+=i;continue}break}if(P===l)h[i>0?"moveTo":"lineTo"](o,v),c=o,R=v;else{var T=o-s,d=v-w;if(T*T+d*d<.5){P+=i;continue}if(a>0){for(var A=P+i,k=t[A*2],M=t[A*2+1];k===o&&M===v&&p<r;)p++,A+=i,P+=i,k=t[A*2],M=t[A*2+1],o=t[P*2],v=t[P*2+1],T=o-s,d=v-w;var Q=p+1;if(u)for(;F(k,M)&&Q<r;)Q++,A+=i,k=t[A*2],M=t[A*2+1];var G=.5,q=0,z=0,m=void 0,g=void 0;if(Q>=r||F(k,M))b=o,e=v;else{q=k-s,z=M-w;var W=o-s,J=k-o,U=v-w,V=M-v,D=void 0,E=void 0;if(n==="x"){D=Math.abs(W),E=Math.abs(J);var C=q>0?1:-1;b=o-C*D*a,e=v,m=o+C*E*a,g=v}else if(n==="y"){D=Math.abs(U),E=Math.abs(V);var K=z>0?1:-1;b=o,e=v-K*D*a,m=o,g=v+K*E*a}else D=Math.sqrt(W*W+U*U),E=Math.sqrt(J*J+V*V),G=E/(E+D),b=o-q*a*(1-G),e=v-z*a*(1-G),m=o+q*a*G,g=v+z*a*G,m=B(m,j(k,o)),g=B(g,j(M,v)),m=j(m,B(k,o)),g=j(g,B(M,v)),q=m-o,z=g-v,b=o-q*D/E,e=v-z*D/E,b=B(b,j(s,o)),e=B(e,j(w,v)),b=j(b,B(s,o)),e=j(e,B(w,v)),q=o-b,z=v-e,m=o+q*E/D,g=v+z*E/D}h.bezierCurveTo(c,R,b,e,o,v),c=m,R=g}else h.lineTo(o,v)}s=o,w=v,P+=i}return p}var _=(function(){function h(){this.smooth=0,this.smoothConstraint=!0}return h})(),ta=(function(h){$(t,h);function t(l){var r=h.call(this,l)||this;return r.type="ec-polyline",r}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _},t.prototype.buildPath=function(l,r){var f=r.points,i=0,a=f.length/2;if(r.connectNulls){for(;a>0&&F(f[a*2-2],f[a*2-1]);a--);for(;i<a&&F(f[i*2],f[i*2+1]);i++);}for(;i<a;)i+=Z(l,f,i,a,a,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},t.prototype.getPointOn=function(l,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var f=this.path,i=f.data,a=I.CMD,n,u,s=r==="x",w=[],c=0;c<i.length;){var R=i[c++],b=void 0,e=void 0,P=void 0,p=void 0,o=void 0,v=void 0,T=void 0;switch(R){case a.M:n=i[c++],u=i[c++];break;case a.L:if(b=i[c++],e=i[c++],T=s?(l-n)/(b-n):(l-u)/(e-u),T<=1&&T>=0){var d=s?(e-u)*T+u:(b-n)*T+n;return s?[l,d]:[d,l]}n=b,u=e;break;case a.C:b=i[c++],e=i[c++],P=i[c++],p=i[c++],o=i[c++],v=i[c++];var A=s?L(n,b,P,o,l,w):L(u,e,p,v,l,w);if(A>0)for(var k=0;k<A;k++){var M=w[k];if(M<=1&&M>=0){var d=s?O(u,e,p,v,M):O(n,b,P,o,M);return s?[l,d]:[d,l]}}n=o,u=v;break}}},t})(N),x=(function(h){$(t,h);function t(){return h!==null&&h.apply(this,arguments)||this}return t})(_),oa=(function(h){$(t,h);function t(l){var r=h.call(this,l)||this;return r.type="ec-polygon",r}return t.prototype.getDefaultShape=function(){return new x},t.prototype.buildPath=function(l,r){var f=r.points,i=r.stackedOnPoints,a=0,n=f.length/2,u=r.smoothMonotone;if(r.connectNulls){for(;n>0&&F(f[n*2-2],f[n*2-1]);n--);for(;a<n&&F(f[a*2],f[a*2+1]);a++);}for(;a<n;){var s=Z(l,f,a,n,n,1,r.smooth,u,r.connectNulls);Z(l,i,a+s-1,s,n,-1,r.stackedOnSmooth,u,r.connectNulls),a+=s+1,l.closePath()}},t})(N);function aa(h,t,l,r,f){var i=h.getArea(),a=i.x,n=i.y,u=i.width,s=i.height,w=l.get(["lineStyle","width"])||0;a-=w/2,n-=w/2,u+=w,s+=w,u=Math.ceil(u),a!==Math.floor(a)&&(a=Math.floor(a),u++);var c=new S({shape:{x:a,y:n,width:u,height:s}});if(t){var R=h.getBaseAxis(),b=R.isHorizontal(),e=R.inverse;b?(e&&(c.shape.x+=u),c.shape.width=0):(e||(c.shape.y+=s),c.shape.height=0);var P=y(f)?function(p){f(p,c)}:null;X(c,{shape:{width:u,height:s,x:a,y:n}},l,null,r,P)}return c}function ra(h,t,l){var r=h.getArea(),f=H(r.r0,1),i=H(r.r,1),a=new Y({shape:{cx:H(h.cx,1),cy:H(h.cy,1),r0:f,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(t){var n=h.getBaseAxis().dim==="angle";n?a.shape.endAngle=r.startAngle:a.shape.r=f,X(a,{shape:{endAngle:r.endAngle,r:i}},l)}return a}function va(h,t,l,r,f){if(h){if(h.type==="polar")return ra(h,t,l);if(h.type==="cartesian2d")return aa(h,t,l,r,f)}else return null;return null}export{ta as E,oa as a,ra as b,aa as c,va as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as t,N as c,aP as m,aQ as o}from"./echarts-runtime-CEgJbv68.js";function S(e,a,n){a=t(a)&&{coordDimensions:a}||c({encodeDefine:e.getEncode()},a);var r=e.getSource(),s=m(r,a).dimensions,i=new o(s,e);return i.initData(r,n),i}export{S as c};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{D as Q,aN as W,G as C,R as lt,bL as v,d9 as me,da as we,al as be,ao as $t,aC as Kt,db as Ae,br as Ee,ai as Ce,dc as Te,L as Fe,k as Ge,y as x,m as O,dd as Pe,de as At,bY as Qt,b0 as Le,a$ as te,b8 as ee,aU as m,aM as Me,W as tt,df as Re,dg as De,dh as ke,_ as M,ab as We,a1 as ae,bJ as re,N as F,bH as Ve,aj as Be,bB as dt,a4 as rt,at as ne,di as Oe,dj as ze,az as Ye,dk as ie,aR as Et,o as Ue,b$ as vt,dl as He,au as gt,x as Xe,dm as Je,b6 as ut,aL as oe,aH as je,bw as Ie,r as Ne,u as Ze,l as ft,cr as qe,t as $e,dn as Ke,d1 as Qe,cc as yt,aV as J,a9 as ta,f as xt,cy as ea,cV as aa,bb as se,c1 as ra,c5 as na,c4 as ia,bZ as oa,aD as le,cT as sa,bs as la,b7 as ua,a5 as fa,c0 as pa,cz as ca,b_ as ha,c9 as da,dp as va,dq as ga,dr as ya,cb as xa,ds as ue,dt as j,du as Sa,a3 as St,P as _a,dv as ma,H as wa}from"./echarts-runtime-CEgJbv68.js";import{V as fe,R as ba,u as Aa,a as Ea,b as Ca}from"./LineDraw-C0m1GONT.js";function pe(r){if(Q(r)){var t=new DOMParser;r=t.parseFromString(r,"text/xml")}var e=r;for(e.nodeType===9&&(e=e.firstChild);e.nodeName.toLowerCase()!=="svg"||e.nodeType!==1;)e=e.nextSibling;return e}var nt,q={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Ct=W(q),$={"alignment-baseline":"textBaseline","stop-color":"stopColor"},Tt=W($),Ta=(function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(t,e){e=e||{};var a=pe(t);this._defsUsePending=[];var n=new C;this._root=n;var i=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||e.width),l=parseFloat(a.getAttribute("height")||e.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),b(a,n,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;Pa(this._defs,this._defsUsePending),this._defsUsePending=[];var f,p;if(o){var h=et(o);h.length>=4&&(f={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(f&&s!=null&&l!=null&&(p=he(f,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var c=n;n=new C,n.add(c),c.scaleX=c.scaleY=p.scale,c.x=p.x,c.y=p.y}return!e.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new lt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:p,named:i}},r.prototype._parseNode=function(t,e,a,n,i,o){var s=t.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!i){var f=nt[s];if(f&&v(nt,s)){l=f.call(this,t,e);var p=t.getAttribute("name");if(p){var h={name:p,namedFrom:null,svgNodeTagLower:s,el:l};a.push(h),s==="g"&&(u=h)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});e.add(l)}}var c=Ft[s];if(c&&v(Ft,s)){var d=c.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=d)}}if(l&&l.isGroup)for(var y=t.firstChild;y;)y.nodeType===1?this._parseNode(y,l,a,u,i,o):y.nodeType===3&&o&&this._parseText(y,l),y=y.nextSibling},r.prototype._parseText=function(t,e){var a=new me({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});A(e,a),b(t,a,this._defsUsePending,!1,!1),Fa(a,e);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,e.add(a),a},r.internalField=(function(){nt={g:function(t,e){var a=new C;return A(e,a),b(t,a,this._defsUsePending,!1,!1),a},rect:function(t,e){var a=new lt;return A(e,a),b(t,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(t,e){var a=new Ce;return A(e,a),b(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),a.silent=!0,a},line:function(t,e){var a=new Ee;return A(e,a),b(t,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(t,e){var a=new Ae;return A(e,a),b(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(t,e){var a=t.getAttribute("points"),n;a&&(n=Lt(a));var i=new Kt({shape:{points:n||[]},silent:!0});return A(e,i),b(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var a=t.getAttribute("points"),n;a&&(n=Lt(a));var i=new $t({shape:{points:n||[]},silent:!0});return A(e,i),b(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var a=new be;return A(e,a),b(t,a,this._defsUsePending,!1,!1),a.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),a.silent=!0,a},text:function(t,e){var a=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new C;return A(e,s),b(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var a=t.getAttribute("x"),n=t.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new C;return A(e,s),b(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(t,e){var a=t.getAttribute("d")||"",n=we(a);return A(e,n),b(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),r})(),Ft={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new Fe(t,e,a,n);return Gt(r,i),Pt(r,i),i},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new Te(t,e,a);return Gt(r,n),Pt(r,n),n}};function Gt(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function Pt(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var a=e.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};ce(e,i,i);var o=i.stopColor||e.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:n,color:o})}e=e.nextSibling}}function A(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Ge(t.__inheritedStyle,r.__inheritedStyle))}function Lt(r){for(var t=et(r),e=[],a=0;a<t.length;a+=2){var n=parseFloat(t[a]),i=parseFloat(t[a+1]);e.push([n,i])}return e}function b(r,t,e,a,n){var i=t,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};r.nodeType===1&&(Ra(r,t),ce(r,o,s),a||Da(r,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=Mt(i,"fill",o.fill,e)),o.stroke!=null&&(i.style.stroke=Mt(i,"stroke",o.stroke,e)),x(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),x(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),n&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=O(et(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function Fa(r,t){var e=t.__selfStyle;if(e){var a=e.textBaseline,n=a;!a||a==="auto"||a==="baseline"?n="alphabetic":a==="before-edge"||a==="text-before-edge"?n="top":a==="after-edge"||a==="text-after-edge"?n="bottom":(a==="central"||a==="mathematical")&&(n="middle"),r.style.textBaseline=n}var i=t.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var Ga=/^url\(\s*#(.*?)\)/;function Mt(r,t,e,a){var n=e&&e.match(Ga);if(n){var i=Pe(n[1]);a.push([r,t,i]);return}return e==="none"&&(e=null),e}function Pa(r,t){for(var e=0;e<t.length;e++){var a=t[e];a[0].style[a[1]]=r[a[2]]}}var La=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function et(r){return r.match(La)||[]}var Ma=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,it=Math.PI/180;function Ra(r,t){var e=r.getAttribute("transform");if(e){e=e.replace(/,/g," ");var a=[],n=null;e.replace(Ma,function(p,h,c){return a.push(h,c),""});for(var i=a.length-1;i>0;i-=2){var o=a[i],s=a[i-1],l=et(o);switch(n=n||ee(),s){case"translate":te(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Le(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Qt(n,n,-parseFloat(l[0])*it,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*it);At(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*it);At(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}t.setLocalTransform(n)}}var Rt=/([^\s:;]+)\s*:\s*([^:;]+)/g;function ce(r,t,e){var a=r.getAttribute("style");if(a){Rt.lastIndex=0;for(var n;(n=Rt.exec(a))!=null;){var i=n[1],o=v(q,i)?q[i]:null;o&&(t[o]=n[2]);var s=v($,i)?$[i]:null;s&&(e[s]=n[2])}}}function Da(r,t,e){for(var a=0;a<Ct.length;a++){var n=Ct[a],i=r.getAttribute(n);i!=null&&(t[q[n]]=i)}for(var a=0;a<Tt.length;a++){var n=Tt[a],i=r.getAttribute(n);i!=null&&(e[$[n]]=i)}}function he(r,t){var e=t.width/r.width,a=t.height/r.height,n=Math.min(e,a);return{scale:n,x:-(r.x+r.width/2)*n+(t.x+t.width/2),y:-(r.y+r.height/2)*n+(t.y+t.height/2)}}function ka(r,t){var e=new Ta;return e.parse(r,t)}var Wa=m(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Va=(function(){function r(t,e){this.type="geoSVG",this._usedGraphicMap=m(),this._freedGraphics=[],this._mapName=t,this._parsedXML=pe(e)}return r.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=Oa(t.named),a=e.regions,n=e.regionsMap;this._regions=a,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(t){var e,a;try{e=t&&ka(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},a=e.root,Me(a!=null)}catch(y){throw new Error(`Invalid svg format
|
|
2
|
+
`+y.message)}var n=new C;n.add(a),n.isGeoSVGGraphicRoot=!0;var i=e.width,o=e.height,s=e.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,f=void 0,p=void 0,h=void 0;if(i!=null?(u=0,p=i):s&&(u=s.x,p=s.width),o!=null?(f=0,h=o):s&&(f=s.y,h=s.height),u==null||f==null){var c=a.getBoundingRect();u==null&&(u=c.x,p=c.width),f==null&&(f=c.y,h=c.height)}l=this._boundingRect=new tt(u,f,p,h)}if(s){var d=he(s,l);a.scaleX=a.scaleY=d.scale,a.x=d.x,a.y=d.y}n.setClipPath(new lt({shape:l.plain()}));var g=[];return x(e.named,function(y){Wa.get(y.svgNodeTagLower)!=null&&(g.push(y),Ba(y.el))}),{root:n,boundingRect:l,named:g}},r.prototype.useGraphic=function(t){var e=this._usedGraphicMap,a=e.get(t);return a||(a=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,a),a)},r.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,a=e.get(t);a&&(e.removeKey(t),this._freedGraphics.push(a))},r})();function Ba(r){r.silent=!1,r.isGroup&&r.traverse(function(t){t.silent=!1})}function Oa(r){var t=[],e=m();return x(r,function(a){if(a.namedFrom==null){var n=new Re(a.name,a.el);t.push(n),e.set(a.name,n)}}),{regions:t,regionsMap:e}}var pt=[126,25],Dt="南海诸岛",k=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var D=0;D<k.length;D++)for(var V=0;V<k[D].length;V++)k[D][V][0]/=10.5,k[D][V][1]/=-10.5/.75,k[D][V][0]+=pt[0],k[D][V][1]+=pt[1];function za(r,t){if(r==="china"){for(var e=0;e<t.length;e++)if(t[e].name===Dt)return;t.push(new De(Dt,O(k,function(a){return{type:"polygon",exterior:a}}),pt))}}var Ya={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function Ua(r,t){if(r==="china"){var e=Ya[t.name];if(e){var a=t.getCenter();a[0]+=e[0]/10.5,a[1]+=-e[1]/(10.5/.75),t.setCenter(a)}}}var Ha=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function Xa(r,t){r==="china"&&t.name==="台湾"&&t.geometries.push({type:"polygon",exterior:Ha[0]})}var Ja="name",ja=(function(){function r(t,e,a){this.type="geoJSON",this._parsedMap=m(),this._mapName=t,this._specialAreas=a,this._geoJSON=Na(e)}return r.prototype.load=function(t,e){e=e||Ja;var a=this._parsedMap.get(e);if(!a){var n=this._parseToRegions(e);a=this._parsedMap.set(e,{regions:n,boundingRect:Ia(n)})}var i=m(),o=[];return x(a.regions,function(s){var l=s.name;t&&v(t,l)&&(s=s.cloneShallow(l=t[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:a.boundingRect||new tt(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(t){var e=this._mapName,a=this._geoJSON,n;try{n=a?ke(a,t):[]}catch(i){throw new Error(`Invalid geoJson format
|
|
3
|
+
`+i.message)}return za(e,n),x(n,function(i){var o=i.name;Ua(e,i),Xa(e,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),n},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r})();function Ia(r){for(var t,e=0;e<r.length;e++){var a=r[e].getBoundingRect();t=t||a.clone(),t.union(a)}return t}function Na(r){return Q(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var X=m();const L={registerMap:function(r,t,e){if(t.svg){var a=new Va(r,t.svg);X.set(r,a)}else{var n=t.geoJson||t.geoJSON;n&&!t.features?e=t.specialAreas:n=t;var a=new ja(r,n,e);X.set(r,a)}},getGeoResource:function(r){return X.get(r)},getMapForUser:function(r){var t=X.get(r);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(r,t,e){var a=X.get(r);if(a)return a.load(t,e)}};var Za={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},de=["lng","lat"],ct=(function(r){M(t,r);function t(e,a,n){var i=r.call(this,e)||this;i.dimensions=de,i.type="geo",i._nameCoordMap=m(),i.map=a;var o=n.projection,s=L.load(a,n.nameMap,n.nameProperty),l=L.getGeoResource(a);i.resourceType=l?l.type:null;var u=i.regions=s.regions,f=Za[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var p;if(o)for(var h=0;h<u.length;h++){var c=u[h].getBoundingRect(o);p=p||c.clone(),p.union(c)}else p=s.boundingRect;return i.setBoundingRect(p.x,p.y,p.width,p.height),i.aspectScale=o?1:We(n.aspectScale,f.aspectScale),i._invertLongitute=o?!1:f.invertLongitute,i}return t.prototype._transformTo=function(e,a,n,i){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new tt(e,a,n,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var a=this.regions,n=0;n<a.length;n++){var i=a[n];if(i.type==="geoJSON"&&i.contain(e))return a[n]}},t.prototype.addGeoCoord=function(e,a){this._nameCoordMap.set(e,a)},t.prototype.getGeoCoord=function(e){var a=this._regionsMap.get(e);return this._nameCoordMap.get(e)||a&&a.getCenter()},t.prototype.dataToPoint=function(e,a,n){if(Q(e)&&(e=this.getGeoCoord(e)),e){var i=this.projection;return i&&(e=i.project(e)),e&&this.projectedToPoint(e,a,n)}},t.prototype.pointToData=function(e){var a=this.projection;return a&&(e=a.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(e){return r.prototype.pointToData.call(this,e)},t.prototype.projectedToPoint=function(e,a,n){return r.prototype.dataToPoint.call(this,e,a,n)},t.prototype.convertToPixel=function(e,a,n){var i=kt(a);return i===this?i.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,a,n){var i=kt(a);return i===this?i.pointToData(n):null},t})(fe);ae(ct,fe);function kt(r){var t=r.geoModel,e=r.seriesModel;return t?t.coordinateSystem:e?e.coordinateSystem||(e.getReferringComponents("geo",re).models[0]||{}).coordinateSystem:null}function Wt(r,t){var e=r.get("boundingCoords");if(e!=null){var a=e[0],n=e[1];if(isFinite(a[0])&&isFinite(a[1])&&isFinite(n[0])&&isFinite(n[1])){var i=this.projection;if(i){var o=a[0],s=a[1],l=n[0],u=n[1];a=[1/0,1/0],n=[-1/0,-1/0];var f=function(I,U,P,R){for(var E=P-I,H=R-U,at=0;at<=100;at++){var wt=at/100,bt=i.project([I+E*wt,U+H*wt]);Oe(a,a,bt),ze(n,n,bt)}};f(o,s,l,s),f(l,s,l,u),f(l,u,o,u),f(o,u,l,s)}this.setBoundingRect(a[0],a[1],n[0]-a[0],n[1]-a[1])}}var p=this.getBoundingRect(),h=r.get("layoutCenter"),c=r.get("layoutSize"),d=t.getWidth(),g=t.getHeight(),y=p.width/p.height*this.aspectScale,S=!1,w,G;h&&c&&(w=[rt(h[0],d),rt(h[1],g)],G=rt(c,Math.min(d,g)),!isNaN(w[0])&&!isNaN(w[1])&&!isNaN(G)&&(S=!0));var _;if(S)_={},y>1?(_.width=G,_.height=G/y):(_.height=G,_.width=G*y),_.y=w[1]-_.height/2,_.x=w[0]-_.width/2;else{var Y=r.getBoxLayoutParams();Y.aspect=y,_=ne(Y,{width:d,height:g})}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center"),t),this.setZoom(r.get("zoom"))}function qa(r,t){x(t.get("geoCoord"),function(e,a){r.addGeoCoord(a,e)})}var $a=(function(){function r(){this.dimensions=de}return r.prototype.create=function(t,e){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new ct(l+s,l,F({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=Wt,u.resize(o,e)}),t.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var i={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),x(i,function(o,s){var l=O(o,function(f){return f.get("nameMap")}),u=new ct(s,s,F({nameMap:Ve(l)},n(o[0])));u.zoomLimit=Be.apply(null,O(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=Wt,u.resize(o[0],e),x(o,function(f){f.coordinateSystem=u,qa(u,f)})}),a},r.prototype.getFilledRegions=function(t,e,a,n){for(var i=(t||[]).slice(),o=m(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=L.load(e,a,n);return x(l.regions,function(u){var f=u.name,p=o.get(f),h=u.properties&&u.properties.echartsStyle;p||(p={name:f},i.push(p)),h&&dt(p,h)}),i},r})(),ve=new $a,Ka=(function(r){M(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a,n){var i=L.getGeoResource(e.map);if(i&&i.type==="geoJSON"){var o=e.itemStyle=e.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(e,n),Ye(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,a=this.option;a.regions=ve.getFilledRegions(a.regions,a.map,a.nameMap,a.nameProperty);var n={};this._optionModelMap=ie(a.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new Et(o,e,e.ecModel)),o.selected&&(n[s]=!0)),i},m()),a.selectedMap||(a.selectedMap=n)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Et(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,a){var n=this.getRegionModel(e),i=a==="normal"?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),o={name:e};if(Ue(i))return o.status=a,i(o);if(Q(i))return i.replace("{a}",e??"")},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var a=this.option,n=a.selectedMode;if(n){n!=="multiple"&&(a.selectedMap=null);var i=a.selectedMap||(a.selectedMap={});i[e]=!0}},t.prototype.unSelect=function(e){var a=this.option.selectedMap;a&&(a[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var a=this.option.selectedMap;return!!(a&&a[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t})(vt),_t=["rect","circle","line","ellipse","polygon","polyline","path"],Qa=m(_t),tr=m(_t.concat(["g"])),er=m(_t.concat(["g"])),ge=gt();function N(r){var t=r.getItemStyle(),e=r.get("areaColor");return e!=null&&(t.fill=e),t}function Vt(r){var t=r.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var ar=(function(){function r(t){var e=new C;this.uid=He("ec_map_draw"),this._controller=new ba(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new C),e.add(this._svgGroup=new C)}return r.prototype.draw=function(t,e,a,n,i){var o=t.mainType==="geo",s=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},function(S){!s&&S.getHostGeoModel()===t&&(s=S.getData())});var l=t.coordinateSystem,u=this._regionsGroup,f=this.group,p=l.getTransformInfo(),h=p.raw,c=p.roam,d=!u.childAt(0)||i;d?(f.x=c.x,f.y=c.y,f.scaleX=c.scaleX,f.scaleY=c.scaleY,f.dirty()):Xe(f,c,t);var g=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,y={api:a,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(y):l.resourceType==="geoSVG"&&this._buildSVG(y),this._updateController(t,e,a),this._updateMapSelectHandler(t,u,a,n)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=m(),a=m(),n=this._regionsGroup,i=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function f(c,d){return d&&(c=d(c)),c&&[c[0]*i.scaleX+i.x,c[1]*i.scaleY+i.y]}function p(c){for(var d=[],g=!u&&l&&l.project,y=0;y<c.length;++y){var S=f(c[y],g);S&&d.push(S)}return d}function h(c){return{shape:{points:p(c)}}}n.removeAll(),x(t.geo.regions,function(c){var d=c.name,g=e.get(d),y=a.get(d)||{},S=y.dataIdx,w=y.regionModel;if(!g){g=e.set(d,new C),n.add(g),S=s?s.indexOfName(d):null,w=t.isGeo?o.getRegionModel(d):s?s.getItemModel(S):null;var G=w.get("silent",!0);G!=null&&(g.silent=G),a.set(d,{dataIdx:S,regionModel:w})}var _=[],Y=[];x(c.geometries,function(P){if(P.type==="polygon"){var R=[P.exterior].concat(P.interiors||[]);u&&(R=Ht(R,u)),x(R,function(H){_.push(new Kt(h(H)))})}else{var E=P.points;u&&(E=Ht(E,u,!0)),x(E,function(H){Y.push(new $t(h(H)))})}});var I=f(c.getCenter(),l&&l.project);function U(P,R){if(P.length){var E=new Je({culling:!0,segmentIgnoreThreshold:1,shape:{paths:P}});g.add(E),Bt(t,E,S,w),Ot(t,E,d,w,o,S,I),R&&(Vt(E),x(E.states,Vt))}}U(_),U(Y,!0)}),e.each(function(c,d){var g=a.get(d),y=g.dataIdx,S=g.regionModel;zt(t,c,d,S,o,y),Yt(t,c,d,S,o),Ut(t,c,d,S,o)},this)},r.prototype._buildSVG=function(t){var e=t.geo.map,a=t.transformInfoRaw;this._svgGroup.x=a.x,this._svgGroup.y=a.y,this._svgGroup.scaleX=a.scaleX,this._svgGroup.scaleY=a.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var n=this._svgDispatcherMap=m(),i=!1;x(this._svgGraphicRecord.named,function(o){var s=o.name,l=t.mapOrGeoModel,u=t.data,f=o.svgNodeTagLower,p=o.el,h=u?u.indexOfName(s):null,c=l.getRegionModel(s);Qa.get(f)!=null&&p instanceof ut&&Bt(t,p,h,c),p instanceof ut&&(p.culling=!0);var d=c.get("silent",!0);if(d!=null&&(p.silent=d),p.z2EmphasisLift=0,!o.namedFrom&&(er.get(f)!=null&&Ot(t,p,s,c,l,h,null),zt(t,p,s,c,l,h),Yt(t,p,s,c,l),tr.get(f)!=null)){var g=Ut(t,p,s,c,l);g==="self"&&(i=!0);var y=n.get(s)||n.set(s,[]);y.push(p)}},this),this._enableBlurEntireSVG(i,t)},r.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var a=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),n=a.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){oe(i);var o=i.ensureState("blur").style||{};o.opacity==null&&n!=null&&(o.opacity=n),i.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(t,e){if(t==null)return[];var a=e.coordinateSystem;if(a.resourceType==="geoJSON"){var n=this._regionsGroupByName;if(n){var i=n.get(t);return i?[i]:[]}}else if(a.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},r.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},r.prototype._useSVG=function(t){var e=L.getGeoResource(t);if(e&&e.type==="geoSVG"){var a=e.useGraphic(this.uid);this._svgGroup.add(a.root),this._svgGraphicRecord=a,this._svgMapName=t}},r.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var e=L.getGeoResource(t);e&&e.type==="geoSVG"&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(t,e,a){var n=t.coordinateSystem,i=this._controller,o=this._controllerHost;o.zoomLimit=t.get("scaleLimit"),o.zoom=n.getZoom(),i.enable(t.get("roam")||!1);var s=t.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=t.id,u}i.off("pan").on("pan",function(u){this._mouseDownFlag=!1,Aa(o,u.dx,u.dy),a.dispatchAction(F(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,Ea(o,u.scale,u.originX,u.originY),a.dispatchAction(F(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(u,f,p){return n.containPoint([f,p])&&!je(u,a,t)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var e=t.getTextContent();e&&(e.ignore=ge(e).ignore)})},r.prototype._updateMapSelectHandler=function(t,e,a,n){var i=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",function(){i._mouseDownFlag=!0}),e.on("click",function(o){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},r})();function Bt(r,t,e,a){var n=a.getModel("itemStyle"),i=a.getModel(["emphasis","itemStyle"]),o=a.getModel(["blur","itemStyle"]),s=a.getModel(["select","itemStyle"]),l=N(n),u=N(i),f=N(s),p=N(o),h=r.data;if(h){var c=h.getItemVisual(e,"style"),d=h.getItemVisual(e,"decal");r.isVisualEncodedByVisualMap&&c.fill&&(l.fill=c.fill),d&&(l.decal=Ie(d,r.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=f,t.ensureState("blur").style=p,oe(t)}function Ot(r,t,e,a,n,i,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),f=s&&s.getItemLayout(i);if(l||u||f&&f.showLabel){var p=l?e:i,h=void 0;(!s||i>=0)&&(h=n);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Ne(t,Ze(a),{labelFetcher:h,labelDataIndex:p,defaultText:e},c);var d=t.getTextContent();if(d&&(ge(d).ignore=d.ignore,t.textConfig&&o)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function zt(r,t,e,a,n,i){r.data?r.data.setItemGraphicEl(i,t):ft(t).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:e,region:a&&a.option||{}}}function Yt(r,t,e,a,n){r.data||qe({el:t,componentModel:n,itemName:e,itemTooltipOption:a.get("tooltip")})}function Ut(r,t,e,a,n){t.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return $e(t,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&Ke(t,n,e),o}function Ht(r,t,e){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),x(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!e&&s.polygonEnd(),a}var rr=(function(r){M(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.focusBlurEnabled=!0,e}return t.prototype.init=function(e,a){this._api=a},t.prototype.render=function(e,a,n,i){if(this._model=e,!e.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new ar(n));var o=this._mapDraw;o.draw(e,a,n,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=e.get("silent"),this.group.add(o.group),this.updateSelectStatus(e,a,n)},t.prototype._handleRegionClick=function(e){var a;Qe(e.target,function(n){return(a=ft(n).eventData)!=null},!0),a&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:a.name})},t.prototype.updateSelectStatus=function(e,a,n){var i=this;this._mapDraw.group.traverse(function(o){var s=ft(o).eventData;if(s)return i._model.isSelected(s.name)?n.enterSelect(o):n.leaveSelect(o),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t})(yt);function nr(r,t,e){L.registerMap(r,t,e)}function Ur(r){r.registerCoordinateSystem("geo",ve),r.registerComponentModel(Ka),r.registerComponentView(rr),r.registerImpl("registerMap",nr),r.registerImpl("getMap",function(e){return L.getMapForUser(e)});function t(e,a){a.update="geo:updateSelectStatus",r.registerAction(a,function(n,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:n},function(l){l[e](n.name);var u=l.coordinateSystem;x(u.regions,function(p){o[p.name]=l.isSelected(p.name)||!1});var f=[];x(o,function(p,h){o[h]&&f.push(h)}),s.push({geoIndex:l.componentIndex,name:f})}),{selected:o,allSelected:s,name:n.name}})}t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,a,n){var i=e.componentType||"series";a.eachComponent({mainType:i,query:e},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=Ca(s,e,o.get("scaleLimit"),n);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&x(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function ir(r){or(r),sr(r)}function or(r){if(!r.parallel){var t=!1;x(r.series,function(e){e&&e.type==="parallel"&&(t=!0)}),t&&(r.parallel=[{}])}}function sr(r){var t=J(r.parallelAxis);x(t,function(e){if(ta(e)){var a=e.parallelIndex||0,n=J(r.parallel)[a];n&&n.parallelAxisDefault&&dt(e,n.parallelAxisDefault,!1)}})}var lr=5,ur=(function(r){M(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this._model=e,this._api=n,this._handlers||(this._handlers={},x(fr,function(i,o){n.getZr().on(o,this._handlers[o]=xt(i,this))},this)),ea(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,a){aa(this,"_throttledDispatchExpand"),x(this._handlers,function(n,i){a.getZr().off(i,n)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(F({type:"parallelAxisExpand"},e))},t.type="parallel",t})(yt),fr={mousedown:function(r){ot(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var t=this._mouseDownPoint;if(ot(this,"click")&&t){var e=[r.offsetX,r.offsetY],a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2);if(a>lr)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!ot(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=e.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function ot(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var pr=(function(r){M(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var a=this.option;e&&dt(a,e,!0),this._initDimensions()},t.prototype.contains=function(e,a){var n=e.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){x(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){e.hasOwnProperty(a)&&(this.option[a]=e[a])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],a=this.parallelAxisIndex=[],n=se(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);x(n,function(i){e.push("dim"+i.get("dim")),a.push(i.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t})(vt),cr=(function(r){M(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t})(ra),st=x,ye=Math.min,xe=Math.max,Xt=Math.floor,hr=Math.ceil,Jt=la,dr=Math.PI,vr=(function(){function r(t,e,a){this.type="parallel",this._axesMap=m(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,a)}return r.prototype._init=function(t,e,a){var n=t.dimensions,i=t.parallelAxisIndex;st(n,function(o,s){var l=i[s],u=e.getComponent("parallelAxis",l),f=this._axesMap.set(o,new cr(o,na(u),[0,0],u.get("type"),l)),p=f.type==="category";f.onBand=p&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),a=e.axisBase,n=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],s=t[i];return o>=a&&o<=a+e.axisLength&&s>=n&&s<=n+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(a){if(t.contains(a,e)){var n=a.getData();st(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),ia(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){this._rect=ne(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,a=["x","y"],n=["width","height"],i=t.get("layout"),o=i==="horizontal"?0:1,s=e[n[o]],l=[0,s],u=this.dimensions.length,f=Z(t.get("axisExpandWidth"),l),p=Z(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>p&&p>1&&f>0&&s>0,c=t.get("axisExpandWindow"),d;if(c)d=Z(c[1]-c[0],l),c[1]=c[0]+d;else{d=Z(f*(p-1),l);var g=t.get("axisExpandCenter")||Xt(u/2);c=[f*g-d/2],c[1]=c[0]+d}var y=(s-d)/(u-p);y<3&&(y=0);var S=[Xt(Jt(c[0]/f,1))+1,hr(Jt(c[1]/f,1))-1],w=y/f*c[0];return{layout:i,pixelDimIndex:o,layoutBase:e[a[o]],layoutLength:s,axisBase:e[a[1-o]],axisLength:e[n[1-o]],axisExpandable:h,axisExpandWidth:f,axisCollapseWidth:y,axisExpandWindow:c,axisCount:u,winInnerIndices:S,axisExpandWindow0Pos:w}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;e.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),st(a,function(o,s){var l=(n.axisExpandable?yr:gr)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:dr/2,vertical:0},p=[u[i].x+t.x,u[i].y+t.y],h=f[i],c=ee();Qt(c,c,h),te(c,c,p),this._axesLayout[o]={position:p,rotation:h,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,a,n){a==null&&(a=0),n==null&&(n=t.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];x(o,function(y){s.push(t.mapDimension(y)),l.push(i.get(y).model)});for(var u=this.hasAxisBrushed(),f=a;f<n;f++){var p=void 0;if(!u)p="normal";else{p="active";for(var h=t.getValues(s,f),c=0,d=o.length;c<d;c++){var g=l[c].getActiveState(h[c]);if(g==="inactive"){p="inactive";break}}}e(p,f)}},r.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,a=!1,n=0,i=t.length;n<i;n++)e.get(t[n]).model.getActiveState()!=="normal"&&(a=!0);return a},r.prototype.axisCoordToPoint=function(t,e){var a=this._axesLayout[e];return oa([t,0],a.transform)},r.prototype.getAxisLayout=function(t){return le(this._axesLayout[t])},r.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),a=e.pixelDimIndex,n=e.axisExpandWindow.slice(),i=n[1]-n[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var s=t[a]-e.layoutBase-e.axisExpandWindow0Pos,l,u="slide",f=e.axisCollapseWidth,p=this._model.get("axisExpandSlideTriggerArea"),h=p[0]!=null;if(f)h&&f&&s<i*p[0]?(u="jump",l=s-i*p[2]):h&&f&&s>i*(1-p[0])?(u="jump",l=s-i*(1-p[2])):(l=s-i*p[1])>=0&&(l=s-i*(1-p[1]))<=0&&(l=0),l*=e.axisExpandWidth/f,l?sa(l,n,o,"all"):u="none";else{var c=n[1]-n[0],d=o[1]*s/c;n=[xe(0,d-c/2)],n[1]=ye(o[1],n[0]+c),n[0]=n[1]-c}return{axisExpandWindow:n,behavior:u}},r})();function Z(r,t){return ye(xe(r,t[0]),t[1])}function gr(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function yr(r,t){var e=t.layoutLength,a=t.axisExpandWidth,n=t.axisCount,i=t.axisCollapseWidth,o=t.winInnerIndices,s,l=i,u=!1,f;return r<o[0]?(s=r*i,f=i):r<=o[1]?(s=t.axisExpandWindow0Pos+r*a-t.axisExpandWindow[0],l=a,u=!0):(s=e-(n-1-r)*i,f=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:f}}function xr(r,t){var e=[];return r.eachComponent("parallel",function(a,n){var i=new vr(a,r,t);i.name="parallel_"+n,i.resize(a,t),a.coordinateSystem=i,i.model=a,e.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var n=a.getReferringComponents("parallel",re).models[0];a.coordinateSystem=n.coordinateSystem}}),e}var Sr={create:xr},ht=(function(r){M(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.activeIntervals=[],e}return t.prototype.getAreaSelectStyle=function(){return ua([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var a=this.activeIntervals=le(e);if(a)for(var n=a.length-1;n>=0;n--)fa(a[n])},t.prototype.getActiveState=function(e){var a=this.activeIntervals;if(!a.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,o=a.length;i<o;i++)if(a[i][0]<=e&&e<=a[i][1])return"active";return"inactive"},t})(vt);ae(ht,pa);var _r=["axisLine","axisTickLabel","axisName"],mr=(function(r){M(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){r.prototype.init.apply(this,arguments),(this._brushController=new ca(a.getZr())).on("brush",xt(this._onBrush,this))},t.prototype.render=function(e,a,n,i){if(!wr(e,a,i)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new C,this.group.add(this._axisGroup),!!e.get("show")){var s=Ar(e,a),l=s.coordinateSystem,u=e.getAreaSelectStyle(),f=u.width,p=e.axis.dim,h=l.getAxisLayout(p),c=F({strokeContainThreshold:f},h),d=new ha(e,c);x(_r,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,u,e,s,f,n),da(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),p=tt.create({x:l[0],y:-o/2,width:u,height:o});p.x-=f,p.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:ya(p),isTargetByCursor:ga(p,s,i),getLinearBrushOtherExtent:va(p,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(br(n))},t.prototype._onBrush=function(e){var a=e.areas,n=this.axisModel,i=n.axis,o=O(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t})(yt);function wr(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function br(r){var t=r.axis;return O(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function Ar(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var Er={type:"axisAreaSelect",event:"axisAreaSelected"};function Cr(r){r.registerAction(Er,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(a){a.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(a){a.setAxisExpand(t)})})}var Tr={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Hr(r){r.registerComponentView(ur),r.registerComponentModel(pr),r.registerCoordinateSystem("parallel",Sr),r.registerPreprocessor(ir),r.registerComponentModel(ht),r.registerComponentView(mr),xa(r,"parallel",ht,Tr),Cr(r)}function Xr(r,t,e,a){return r&&(r.legacy||r.legacy!==!1&&!e&&!a&&t!=="tspan"&&(t==="text"||v(r,"text")))}function Jr(r,t,e){var a=r,n,i,o;if(t==="text")o=a;else{o={},v(a,"text")&&(o.text=a.text),v(a,"rich")&&(o.rich=a.rich),v(a,"textFill")&&(o.fill=a.textFill),v(a,"textStroke")&&(o.stroke=a.textStroke),v(a,"fontFamily")&&(o.fontFamily=a.fontFamily),v(a,"fontSize")&&(o.fontSize=a.fontSize),v(a,"fontStyle")&&(o.fontStyle=a.fontStyle),v(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=v(a,"textPosition");e?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),v(a,"textPosition")&&(n.position=a.textPosition),v(a,"textOffset")&&(n.offset=a.textOffset),v(a,"textRotation")&&(n.rotation=a.textRotation),v(a,"textDistance")&&(n.distance=a.textDistance)}return jt(o,r),x(o.rich,function(l){jt(l,l)}),{textConfig:n,textContent:i}}function jt(r,t){t&&(t.font=t.textFont||t.font,v(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),v(t,"textAlign")&&(r.align=t.textAlign),v(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),v(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),v(t,"textWidth")&&(r.width=t.textWidth),v(t,"textHeight")&&(r.height=t.textHeight),v(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),v(t,"textPadding")&&(r.padding=t.textPadding),v(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),v(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),v(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),v(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),v(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),v(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),v(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function jr(r,t,e){var a=r;a.textPosition=a.textPosition||e.position||"inside",e.offset!=null&&(a.textOffset=e.offset),e.rotation!=null&&(a.textRotation=e.rotation),e.distance!=null&&(a.textDistance=e.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||"#000";It(a,t);var o=a.textFill==null;return n?o&&(a.textFill=e.insideFill||"#fff",!a.textStroke&&e.insideStroke&&(a.textStroke=e.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||e.outsideFill||"#000"),!a.textStroke&&e.outsideStroke&&(a.textStroke=e.outsideStroke)),a.text=t.text,a.rich=t.rich,x(t.rich,function(s){It(s,s)}),a}function It(r,t){t&&(v(t,"fill")&&(r.textFill=t.fill),v(t,"stroke")&&(r.textStroke=t.fill),v(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),v(t,"font")&&(r.font=t.font),v(t,"fontStyle")&&(r.fontStyle=t.fontStyle),v(t,"fontWeight")&&(r.fontWeight=t.fontWeight),v(t,"fontSize")&&(r.fontSize=t.fontSize),v(t,"fontFamily")&&(r.fontFamily=t.fontFamily),v(t,"align")&&(r.textAlign=t.align),v(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),v(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),v(t,"width")&&(r.textWidth=t.width),v(t,"height")&&(r.textHeight=t.height),v(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),v(t,"padding")&&(r.textPadding=t.padding),v(t,"borderColor")&&(r.textBorderColor=t.borderColor),v(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),v(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),v(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),v(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),v(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),v(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),v(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),v(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),v(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),v(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}var Se={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Nt=W(Se);ie(j,function(r,t){return r[t]=1,r},{});j.join(", ");var K=["","style","shape","extra"],z=gt();function mt(r,t,e,a,n){var i=r+"Animation",o=ue(r,a,n)||{},s=z(t).userDuring;return o.duration>0&&(o.during=s?xt(Rr,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),F(o,e[i]),o}function Ir(r,t,e,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=e.isAnimationEnabled(),l=z(r),u=t.style;l.userDuring=t.during;var f={},p={};if(kr(r,t,p),qt("shape",t,p),qt("extra",t,p),!i&&s&&(Dr(r,t,f),Zt("shape",r,t,f),Zt("extra",r,t,f),Wr(r,t,u,f)),p.style=u,Gr(r,p,o),Lr(r,t),s)if(i){var h={};x(K,function(d){var g=d?t[d]:t;g&&g.enterFrom&&(d&&(h[d]=h[d]||{}),F(d?h[d]:h,g.enterFrom))});var c=mt("enter",r,t,e,n);c.duration>0&&r.animateFrom(h,c)}else Pr(r,t,n||0,e,f);Fr(r,t),u?r.dirty():r.markRedraw()}function Fr(r,t){for(var e=z(r).leaveToProps,a=0;a<K.length;a++){var n=K[a],i=n?t[n]:t;i&&i.leaveTo&&(e||(e=z(r).leaveToProps={}),n&&(e[n]=e[n]||{}),F(n?e[n]:e,i.leaveTo))}}function Nr(r,t,e,a){if(r){var n=r.parent,i=z(r).leaveToProps;if(i){var o=mt("update",r,t,e,0);o.done=function(){n.remove(r)},r.animateTo(i,o)}else n.remove(r)}}function B(r){return r==="all"}function Gr(r,t,e){var a=t.style;if(!r.isGroup&&a){if(e){r.useStyle({});for(var n=r.animators,i=0;i<n.length;i++){var o=n[i];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(a)}t&&(t.style=null,t&&r.attr(t),t.style=a)}function Pr(r,t,e,a,n){if(n){var i=mt("update",r,t,a,e);i.duration>0&&r.animateFrom(n,i)}}function Lr(r,t){v(t,"silent")&&(r.silent=t.silent),v(t,"ignore")&&(r.ignore=t.ignore),r instanceof ut&&v(t,"invisible")&&(r.invisible=t.invisible),r instanceof _a&&v(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var T={},Mr={setTransform:function(r,t){return T.el[r]=t,this},getTransform:function(r){return T.el[r]},setShape:function(r,t){var e=T.el,a=e.shape||(e.shape={});return a[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=T.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=T.el,a=e.style;return a&&(a[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=T.el.style;if(t)return t[r]},setExtra:function(r,t){var e=T.el.extra||(T.el.extra={});return e[r]=t,this},getExtra:function(r){var t=T.el.extra;if(t)return t[r]}};function Rr(){var r=this,t=r.el;if(t){var e=z(t).userDuring,a=r.userDuring;if(e!==a){r.el=r.userDuring=null;return}T.el=t,a(Mr)}}function Zt(r,t,e,a){var n=e[r];if(n){var i=t[r],o;if(i){var s=e.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),B(l))F(o,i);else for(var u=J(l),f=0;f<u.length;f++){var p=u[f],h=i[p];o[p]=h}else if(B(s)||St(s,r)>=0){!o&&(o=a[r]={});for(var c=W(i),f=0;f<c.length;f++){var p=c[f],h=i[p];Vr(n[p],h)&&(o[p]=h)}}}}}function qt(r,t,e){var a=t[r];if(a)for(var n=e[r]={},i=W(a),o=0;o<i.length;o++){var s=i[o];n[s]=Sa(a[s])}}function Dr(r,t,e){for(var a=t.transition,n=B(a)?j:J(a||[]),i=0;i<n.length;i++){var o=n[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];e[o]=s}}}function kr(r,t,e){for(var a=0;a<Nt.length;a++){var n=Nt[a],i=Se[n],o=t[n];o&&(e[i[0]]=o[0],e[i[1]]=o[1])}for(var a=0;a<j.length;a++){var s=j[a];t[s]!=null&&(e[s]=t[s])}}function Wr(r,t,e,a){if(e){var n=r.style,i;if(n){var o=e.transition,s=t.transition;if(o&&!B(o)){var l=J(o);!i&&(i=a.style={});for(var u=0;u<l.length;u++){var f=l[u],p=n[f];i[f]=p}}else if(r.getAnimationStyleProps&&(B(s)||B(o)||St(s,"style")>=0)){var h=r.getAnimationStyleProps(),c=h?h.style:null;if(c){!i&&(i=a.style={});for(var d=W(e),u=0;u<d.length;u++){var f=d[u];if(c[f]){var p=n[f];i[f]=p}}}}}}}function Vr(r,t){return ma(r)?r!==t:r!=null&&isFinite(r)}var _e=gt(),Br=["percent","easing","shape","style","extra"];function Zr(r){r.stopAnimation("keyframe"),r.attr(_e(r))}function Or(r,t,e){if(!(!e.isAnimationEnabled()||!t)){if(wa(t)){x(t,function(s){Or(r,s,e)});return}var a=t.keyframes,n=t.duration;if(e&&n==null){var i=ue("enter",e,0);n=i&&i.duration}if(!(!a||!n)){var o=_e(r);x(K,function(s){if(!(s&&!r[s])){var l;a.sort(function(u,f){return u.percent-f.percent}),x(a,function(u){var f=r.animators,p=s?u[s]:u;if(p){var h=W(p);if(s||(h=se(h,function(g){return St(Br,g)<0})),!!h.length){l||(l=r.animate(s,t.loop,!0),l.scope="keyframe");for(var c=0;c<f.length;c++)f[c]!==l&&f[c].targetName===l.targetName&&f[c].stopTracks(h);s&&(o[s]=o[s]||{});var d=s?o[s]:o;x(h,function(g){d[g]=((s?r[s]:r)||{})[g]}),l.whenWithKeys(n*u.percent,p,h,u.easing)}}}),l&&l.delay(t.delay||0).duration(n).start(t.easing)}})}}}export{ar as M,Hr as a,Nr as b,jr as c,Ir as d,Or as e,Xr as f,L as g,Jr as h,Ur as i,B as j,Zr as s,Fr as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as Z,t as ee,e as te,f as re,r as g,j as A,L as ne}from"./index-C6xNKxpg.js";import{g as ie,p as oe,e as se}from"./echarts-runtime-CEgJbv68.js";var w={};const Q=Z(ee);var S={},y={},M={},k;function ae(){return k||(k=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=1;e.default=function(){return"".concat(t++)}})(M)),M}var E={},q={},x={},D;function X(){return D||(D=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,r=null;return function(){for(var f=this,n=arguments.length,c=new Array(n),l=0;l<n;l++)c[l]=arguments[l];clearTimeout(r),r=setTimeout(function(){o.apply(f,c)},s)}}})(x)),x}var _={},N;function L(){return N||(N=1,Object.defineProperty(_,"__esModule",{value:!0}),_.SizeSensorId=_.SensorTabIndex=_.SensorClassName=void 0,_.SizeSensorId="size-sensor-id",_.SensorClassName="size-sensor-object",_.SensorTabIndex="-1"),_}var F;function ue(){if(F)return q;F=1,Object.defineProperty(q,"__esModule",{value:!0}),q.createSensor=void 0;var e=o(X()),t=L();function o(s){return s&&s.__esModule?s:{default:s}}return q.createSensor=function(r,f){var n=void 0,c=[],l=function(){getComputedStyle(r).position==="static"&&(r.style.position="relative");var i=document.createElement("object");return i.onload=function(){i.contentDocument.defaultView.addEventListener("resize",v),v()},i.style.display="block",i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.height="100%",i.style.width="100%",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.zIndex="-1",i.style.opacity="0",i.setAttribute("class",t.SensorClassName),i.setAttribute("tabindex",t.SensorTabIndex),i.type="text/html",r.appendChild(i),i.data="about:blank",i},v=(0,e.default)(function(){c.forEach(function(u){u(r)})}),a=function(i){n||(n=l()),c.indexOf(i)===-1&&c.push(i)},d=function(){n&&n.parentNode&&(n.contentDocument&&n.contentDocument.defaultView.removeEventListener("resize",v),n.parentNode.removeChild(n),r.removeAttribute(t.SizeSensorId),n=void 0,c=[],f&&f())},p=function(i){var h=c.indexOf(i);h!==-1&&c.splice(h,1),c.length===0&&n&&d()};return{element:r,bind:a,destroy:d,unbind:p}},q}var O={},T;function ce(){if(T)return O;T=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createSensor=void 0;var e=L(),t=o(X());function o(s){return s&&s.__esModule?s:{default:s}}return O.createSensor=function(r,f){var n=void 0,c=[],l=(0,t.default)(function(){c.forEach(function(u){u(r)})}),v=function(){var i=new ResizeObserver(l);return i.observe(r),l(),i},a=function(i){n||(n=v()),c.indexOf(i)===-1&&c.push(i)},d=function(){n&&n.disconnect(),c=[],n=void 0,r.removeAttribute(e.SizeSensorId),f&&f()},p=function(i){var h=c.indexOf(i);h!==-1&&c.splice(h,1),c.length===0&&n&&d()};return{element:r,bind:a,destroy:d,unbind:p}},O}var $;function de(){if($)return E;$=1,Object.defineProperty(E,"__esModule",{value:!0}),E.createSensor=void 0;var e=ue(),t=ce();return E.createSensor=typeof ResizeObserver<"u"?t.createSensor:e.createSensor,E}var U;function fe(){if(U)return y;U=1,Object.defineProperty(y,"__esModule",{value:!0}),y.removeSensor=y.getSensor=y.Sensors=void 0;var e=s(ae()),t=de(),o=L();function s(n){return n&&n.__esModule?n:{default:n}}var r=y.Sensors={};function f(n){n&&r[n]&&delete r[n]}return y.getSensor=function(c){var l=c.getAttribute(o.SizeSensorId);if(l&&r[l])return r[l];var v=(0,e.default)();c.setAttribute(o.SizeSensorId,v);var a=(0,t.createSensor)(c,function(){return f(v)});return r[v]=a,a},y.removeSensor=function(c){var l=c.element.getAttribute(o.SizeSensorId);c.destroy(),f(l)},y}var H;function le(){if(H)return S;H=1,Object.defineProperty(S,"__esModule",{value:!0}),S.ver=S.clear=S.bind=void 0;var e=fe();return S.bind=function(o,s){var r=(0,e.getSensor)(o);return r.bind(s),function(){r.unbind(s)}},S.clear=function(o){var s=(0,e.getSensor)(o);(0,e.removeSensor)(s)},S.ver="1.0.3",S}var R={},K;function ve(){if(K)return R;K=1,Object.defineProperty(R,"__esModule",{value:!0}),R.pick=void 0;function e(t,o){var s={};return o.forEach(function(r){s[r]=t[r]}),s}return R.pick=e,R}var j={},V;function pe(){if(V)return j;V=1,Object.defineProperty(j,"__esModule",{value:!0}),j.isFunction=void 0;function e(t){return typeof t=="function"}return j.isFunction=e,j}var I={},W;function he(){if(W)return I;W=1,Object.defineProperty(I,"__esModule",{value:!0}),I.isString=void 0;function e(t){return typeof t=="string"}return I.isString=e,I}var z={},P,B;function Se(){return B||(B=1,P=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var s,r,f;if(Array.isArray(t)){if(s=t.length,s!=o.length)return!1;for(r=s;r--!==0;)if(!e(t[r],o[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(f=Object.keys(t),s=f.length,s!==Object.keys(o).length)return!1;for(r=s;r--!==0;)if(!Object.prototype.hasOwnProperty.call(o,f[r]))return!1;for(r=s;r--!==0;){var n=f[r];if(!e(t[n],o[n]))return!1}return!0}return t!==t&&o!==o}),P}var J;function ye(){if(J)return z;J=1,Object.defineProperty(z,"__esModule",{value:!0}),z.isEqual=void 0;var e=Q,t=(0,e.__importDefault)(Se());return z.isEqual=t.default,z}var G;function _e(){if(G)return w;G=1,Object.defineProperty(w,"__esModule",{value:!0});var e=Q,t=(0,e.__importStar)(te()),o=le(),s=ve(),r=pe(),f=he(),n=ye(),c=(function(l){(0,e.__extends)(v,l);function v(a){var d=l.call(this,a)||this;return d.echarts=a.echarts,d.ele=null,d.isInitialResize=!0,d}return v.prototype.componentDidMount=function(){this.renderNewEcharts()},v.prototype.componentDidUpdate=function(a){var d=this.props.shouldSetOption;if(!((0,r.isFunction)(d)&&!d(a,this.props))){if(!(0,n.isEqual)(a.theme,this.props.theme)||!(0,n.isEqual)(a.opts,this.props.opts)||!(0,n.isEqual)(a.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var p=["option","notMerge","lazyUpdate","showLoading","loadingOption"];(0,n.isEqual)((0,s.pick)(this.props,p),(0,s.pick)(a,p))||this.updateEChartsOption(),(!(0,n.isEqual)(a.style,this.props.style)||!(0,n.isEqual)(a.className,this.props.className))&&this.resize()}},v.prototype.componentWillUnmount=function(){this.dispose()},v.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)||this.echarts.init(this.ele,this.props.theme,this.props.opts)},v.prototype.dispose=function(){if(this.ele){try{(0,o.clear)(this.ele)}catch(a){console.warn(a)}this.echarts.dispose(this.ele)}},v.prototype.renderNewEcharts=function(){var a=this,d=this.props,p=d.onEvents,u=d.onChartReady,i=this.updateEChartsOption();this.bindEvents(i,p||{}),(0,r.isFunction)(u)&&u(i),this.ele&&(0,o.bind)(this.ele,function(){a.resize()})},v.prototype.bindEvents=function(a,d){function p(i,h){(0,f.isString)(i)&&(0,r.isFunction)(h)&&a.on(i,function(b){h(b,a)})}for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&p(u,d[u])},v.prototype.updateEChartsOption=function(){var a=this.props,d=a.option,p=a.notMerge,u=p===void 0?!1:p,i=a.lazyUpdate,h=i===void 0?!1:i,b=a.showLoading,m=a.loadingOption,Y=m===void 0?null:m,C=this.getEchartsInstance();return C.setOption(d,u,h),b?C.showLoading(Y):C.hideLoading(),C},v.prototype.resize=function(){var a=this.getEchartsInstance();if(!this.isInitialResize)try{a.resize()}catch(d){console.warn(d)}this.isInitialResize=!1},v.prototype.render=function(){var a=this,d=this.props,p=d.style,u=d.className,i=u===void 0?"":u,h=(0,e.__assign)({height:300},p);return t.default.createElement("div",{ref:function(b){a.ele=b},style:h,className:"echarts-for-react "+i})},v})(t.PureComponent);return w.default=c,w}var be=_e();const ge=re(be);var me=(e,t,o,s,r,f,n,c)=>{let l=document.documentElement,v=["light","dark"];function a(u){(Array.isArray(e)?e:[e]).forEach(i=>{let h=i==="class",b=h&&f?r.map(m=>f[m]||m):r;h?(l.classList.remove(...b),l.classList.add(f&&f[u]?f[u]:u)):l.setAttribute(i,u)}),d(u)}function d(u){c&&v.includes(u)&&(l.style.colorScheme=u)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)a(s);else try{let u=localStorage.getItem(t)||o,i=n&&u==="system"?p():u;a(i)}catch{}},Ee=g.createContext(void 0),qe={setTheme:e=>{},themes:[]},Oe=()=>{var e;return(e=g.useContext(Ee))!=null?e:qe};g.memo(({forcedTheme:e,storageKey:t,attribute:o,enableSystem:s,enableColorScheme:r,defaultTheme:f,value:n,themes:c,nonce:l,scriptProps:v})=>{let a=JSON.stringify([o,t,f,e,c,n,s,r]).slice(1,-1);return g.createElement("script",{...v,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${me.toString()})(${a})`}})});function Ie({options:e}){const{resolvedTheme:t}=Oe(),o=ie(e),[s,r]=g.useState(),[f,n]=g.useState();if(g.useEffect(()=>{let c=!0;return n(void 0),oe(e).then(()=>{c&&r(o)}).catch(l=>{c&&n(l)}),()=>{c=!1}},[e,o]),f)throw f;return s!==o?A.jsx(ne,{className:"h-[280px]"}):A.jsx(ge,{echarts:se,option:{...e,animation:!1,backgroundColor:e.backgroundColor??"transparent",toolbox:{show:!0,feature:{saveAsImage:{title:"Save as image"}}}},theme:t==="dark"?"nocobase-dark":void 0,notMerge:!0,style:{height:280,width:"100%"}})}export{Ie as default};
|