(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1259],{46151:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(85893),i=n(67294),a=n(94184),o=n.n(a),l=n(38625),s=n(77014),u=n.n(s);function c(e){var t=e.isChart,n=e.canEdit,a=e.title,s=e.model,c=e.message,d=(0,i.useRef)(null),h=(0,i.useState)(!1),p=h[0],f=h[1];return(0,i.useEffect)((function(){var e=function(){return function(e,t){if(e){var n=e.getBoundingClientRect().width,r=Math.min(.4645*n,t?350:172);e.style.height=r+"px",e.classList.toggle(u().small,n<240&&n>=170),e.classList.toggle(u().xsmall,n<170&&n>=120),e.classList.toggle(u().tiny,n<120)}}(d.current,t)};return window.addEventListener("resize",e),e(),function(){window.removeEventListener("resize",e)}})),a||(a="No data found",c||(c=s&&s.hasData?"Select data from the spreadsheet":"Add data to your document")),(0,r.jsx)("span",{className:o()(u().dataerror,t&&u().chartError,n?u().canEdit:u().readOnly),role:"status",ref:d,children:(0,r.jsx)(l.Z,{className:u().tooltip,cursorPosition:n&&p&&c?"static":null,showAnchor:!0,hoverNode:c||"",children:(0,r.jsxs)("span",{className:u().errorInner,onMouseEnter:function(){return f(!0)},onMouseLeave:function(){return f(!1)},children:[(0,r.jsx)("span",{className:u().title,children:(0,r.jsxs)("span",{className:u().twrap,children:[(0,r.jsx)("svg",{width:"20",height:"19",viewBox:"0 0 20 19",fill:"currentColor",children:(0,r.jsx)("path",{d:"M19.59 15.12L12.04 1.21C11.6 0.46 10.85 0 9.99 0C9.14 0 8.36 0.46 7.95 1.21L0.39 15.12C-0.00 15.84 0.00 16.73 0.42 17.44C0.84 18.15 1.61 18.59 2.44 18.58H17.54C18.36 18.58 19.12 18.15 19.54 17.44C19.96 16.74 19.98 15.87 19.59 15.14V15.12ZM8.83 5.20C8.83 4.55 9.35 4.03 10.00 4.03C10.64 4.03 11.16 4.55 11.16 5.20V10.54C11.16 11.18 10.64 11.70 10.00 11.70C9.35 11.70 8.83 11.18 8.83 10.54V5.20ZM8.69 14.34C8.69 15.07 9.29 15.67 10.03 15.67C10.76 15.67 11.36 15.07 11.36 14.34C11.36 13.60 10.76 13.00 10.03 13.00C9.29 13.00 8.69 13.60 8.69 14.34Z",fillRule:"evenodd"})}),(0,r.jsx)("span",{children:a})]})}),n&&(0,r.jsx)("span",{className:u().message,children:c})]})})})}},20312:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51438),i=n(52951),a=n(14924),o=n(28668),l=n(26042),s=n(69396),u=n(71418),c=n(85893),d=n(67294),h=n(45697),p=n.n(h),f=n(51471),v=n(20615),m=function(e){(0,o.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,r.Z)(this,n),(i=t.call(this,e)).state={hasError:!1},i}return(0,i.Z)(n,[{key:"componentDidCatch",value:function(e){var t=this;this.setState({hasError:!0},(function(){t.props.emit&&t.props.emit("boundarycatch",e)}))}},{key:"renderError",value:function(){return(0,c.jsx)(v.Z,(0,s.Z)((0,l.Z)({},this.props),{children:(0,c.jsx)(f.Z,{})}))}},{key:"render",value:function(){return this.state.hasError?this.renderError():this.props.children}}]),n}(d.Component);(0,a.Z)(m,"propTypes",{editorline:p().number,emit:p().func})},31259:function(e,t,n){"use strict";n.d(t,{Z:function(){return L}});var r=n(26042),i=n(69396),a=n(85893),o=(n(67294),n(94184)),l=n.n(o),s=n(45697),u=n.n(s),c=n(62011),d=n(36397);var h=function(e){e.visible,e.columns;return null},p=n(2214),f=n(51471),v=n(20312),m=n(42315),g=n(87594),b=n(78237),x=n(6624),y=n(15692),k=n(98583),w=n(20275),Z=n(55120),_=n(31409),j=n(10435),S=n.n(j),C=Object.prototype.hasOwnProperty,T=function(){};function M(e){if(!e.isReady)return null;var t=m.Z[e.type];t||(t=f.Z,e=(0,i.Z)((0,r.Z)({},e),{message:'Unknown element: "'.concat(e.type,'"')}));var n=e.uuid;return(0,a.jsx)(v.Z,{emit:e.emit,children:(0,a.jsx)(t,(0,r.Z)({parentKey:n},e),n+"-grid")},n+"-err")}M.propTypes={isReady:u().bool,type:u().string,uuid:u().string,emit:u().func};var N={row:function(e){return(0,a.jsx)(b.Z,(0,r.Z)({},e))},col:function(e){return(0,a.jsx)(g.Z,(0,r.Z)({},e))},"grid:block":function(e){return(0,a.jsx)(M,(0,r.Z)({},e))},"grid:inline":function(e){return(0,a.jsx)(M,(0,r.Z)({},e))},h1:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},h2:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},h3:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},h4:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},h5:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},h6:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},ol:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},ul:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},quote:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},p:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},code:function(e){return(0,a.jsx)(w.Z,(0,r.Z)({},e))},hr:function(e){return(0,a.jsx)("div",{id:e.id,className:(0,p.h)("hr"),children:(0,a.jsx)(k.Z,(0,r.Z)({},e))},e.key)},link:function(e){return(0,a.jsx)(x.Z,(0,r.Z)({},e))},mention:function(e){return(0,a.jsx)(y.Z,(0,r.Z)({},e))},block:function(e){return(0,a.jsx)("span",{id:e.id,children:e.children},e.key)},blank:function(){return null},"p:hidden":function(){return null},inlinePlaceholder:function(){return null},slidebreak:function(){return null},pagebreak:function(){return null},chartAssistant:function(){return null}},E=[{id:"bold",handler:function(e){return(0,a.jsx)("strong",{children:e.children},e.key)}},{id:"italic",handler:function(e){return(0,a.jsx)("em",{children:e.children},e.key)}},{id:"code",handler:function(e){return(0,a.jsx)("code",{children:e.children},e.key)}}];function D(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e)return[];if(C.call(e,"text")){var a=e.text;return E.forEach((function(t){e[t.id]&&(a=t.handler({key:e.id,children:a}))})),a}var o=N[e.type];o||(o=N.block);var l=e.children?e.children.map((function(e){return D(e,t,n)})):null;e.data&&n&&(e.data.thumbnailMode=!0);var s=Object.assign({key:e.id,id:e.id,element:e,children:l,value:e.value,pageBreakAfter:i},t,e.data);return s.track=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s.emit("track",(0,r.Z)({isGRID:!0,type:t,elementType:"unknown",documentId:s.documentId,elementId:e.id,elementLabel:s.title||"",timestamp:Date.now(),submitData:{}},n))},o(s,e)}function R(e,t){if(t)for(var n=0;n<t.length;n++){var r=t[n];if(r.id===e)return r;var i=R(e,r.children);if(i)return i}}function L(e){var t=e.theme,n=e.embed,o=e.model,s=(0,d.s4)();if(!e.document.length)return null;var u=(0,i.Z)((0,r.Z)({emit:T,track:T,onError:T},e.globalProps),{theme:t,model:o,isAuthenticated:!!c.r.get(),isReady:s,embed:n});return(0,a.jsx)("div",{style:t.styles,id:"grid-doc-body","data-testid":"grid-document",className:l()(S().document,e.useFullWidth&&S().useFullWidth),ref:e.renderedRef,onClick:function(t){return function(e,t,n){for(var i=e.target;i&&n.emit;){if(i.id){var a=R(i.id,t);if(a)return void n.emit("interaction",{type:"click",id:a.id,name:a.type,attr:(0,r.Z)({},a.data),documentId:n.documentId})}i=i.parentNode}}(t,e.document,u)},children:(0,a.jsxs)(_.C2,{chartTheme:e.chartTheme,theme:t,children:[e.document.map((function(t,n){var r,i="pagebreak"===(null===(r=e.document[n+1])||void 0===r?void 0:r.type);return D(t,u,e.thumbnailMode,i)})),e.children,(0,a.jsx)(h,{visible:!1})]})})}L.propTypes={document:u().array.isRequired,thumbnailMode:u().bool,globalProps:u().object,theme:u().object,chartTheme:u().object,useFullWidth:u().bool,model:u().object.isRequired,renderedRef:u().object,embed:u().bool},L.defaultProps={theme:Z.uH,embed:!1},M.propTypes={uuid:u().string,type:u().string,isReady:u().bool}},26781:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(85893),i=(n(67294),n(94184)),a=n.n(i),o=n(45697),l=n.n(o),s=n(75368),u=n.n(s);function c(e){if(!e.text)return null;var t=a()(e.inline?u().innerlabel:u().label,e.disabled&&u().disabled,e.className);return(0,r.jsx)("span",{className:t,children:String(e.text).trim()})}c.propTypes={className:l().string,disabled:l().bool,inline:l().bool,text:l().string}},5899:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(4111),i=n(51438),a=n(52951),o=n(14924),l=n(28668),s=n(71418),u=n(85893),c=n(67294),d=n(94184),h=n.n(d),p=n(73058),f=n(72476),v=n(39626),m=n.n(v);function g(e){e.cancelable&&(e.stopPropagation(),e.preventDefault())}var b=function(e){(0,l.Z)(n,e);var t=(0,s.Z)(n);function n(e){var a;return(0,i.Z)(this,n),a=t.call(this,e),(0,o.Z)((0,r.Z)(a),"onResize",(function(){var e,t;a.lastWidth!==(null===(e=a.pane)||void 0===e?void 0:e.clientWidth)&&(a.onScroll(),a.lastWidth=null===(t=a.pane)||void 0===t?void 0:t.clientWidth,a.props.onResize&&a.props.onResize(a.lastWidth))})),(0,o.Z)((0,r.Z)(a),"onScroll",(function(e){var t,n,r,i;if(a.pane){var o,l=a.onScrollUpdate({scrollPos:a.pane.scrollLeft,contentSize:a.pane.scrollWidth,containerSize:a.pane.offsetWidth,thumbElm:null===(t=a.thumbXRef)||void 0===t?void 0:t.current,trackElm:null===(n=a.trackXRef)||void 0===n?void 0:n.current}),s=a.onScrollUpdate({offsetStart:a.props.offsetTop,offsetEnd:a.props.offsetBottom,scrollPos:a.pane.scrollTop,contentSize:a.pane.scrollHeight,containerSize:a.pane.offsetHeight,thumbElm:null===(r=a.thumbYRef)||void 0===r?void 0:r.current,trackElm:null===(i=a.trackYRef)||void 0===i?void 0:i.current});null!=l&&((o={}).showBarX=l),null!=s&&((o=o||{}).showBarY=s),o&&a.setState(o),a.props.onScroll&&e&&a.props.onScroll({left:a.pane.scrollLeft,top:a.pane.scrollTop})}})),(0,o.Z)((0,r.Z)(a),"onDragStart",(function(e){var t,n;e.preventDefault();var r="vertical"===e.currentTarget.dataset.orientation;a.setState({posX:(e.touches?e.touches[0]:e).pageX,startX:null===(t=a.thumbXRef.current)||void 0===t?void 0:t.offsetLeft,posY:(e.touches?e.touches[0]:e).pageY,startY:null===(n=a.thumbYRef.current)||void 0===n?void 0:n.offsetTop,dragVertical:r}),document.addEventListener("pointermove",a.onDrag),document.addEventListener("pointerup",a.onDragEnd),document.addEventListener("selectstart",g),window.self!==window.top&&document.addEventListener("pointerleave",a.onDragEnd)})),(0,o.Z)((0,r.Z)(a),"onDragEnd",(function(){a.setState({posX:null,posY:null}),document.removeEventListener("pointermove",a.onDrag),document.removeEventListener("pointerup",a.onDragEnd),document.removeEventListener("selectstart",g),window.self!==window.top&&document.removeEventListener("pointerleave",a.onDragEnd)})),(0,o.Z)((0,r.Z)(a),"onDrag",(function(e){var t=(0,r.Z)(a).pane;if(t){var n=e.touches?e.touches[0]:e;if(a.trackYRef.current&&a.state.dragVertical){var i=a.state.posY?n.pageY-a.state.posY:0,o=a.state.startY+i,l=a.trackYRef.current.clientHeight-a.thumbYRef.current.clientHeight,s=Math.min(l,Math.max(o,0)),u=t.scrollHeight-t.offsetHeight;t.scrollTop=u*(s/l)}else if(a.trackXRef.current){var c=a.state.posX?n.pageX-a.state.posX:0,d=a.state.startX+c,h=a.trackXRef.current.clientWidth-a.thumbXRef.current.clientWidth,p=Math.min(h,Math.max(d,0)),f=t.scrollWidth-t.offsetWidth;t.scrollLeft=f*(p/h)}}})),(0,o.Z)((0,r.Z)(a),"onClick",(function(e){if(e.target===e.currentTarget){var t=0,n=0;if("vertical"===e.target.dataset.orientation){var r=a.trackYRef.current,i=a.thumbYRef.current;n=e.clientY-r.getBoundingClientRect().top<parseFloat(i.style.top)/100*r.offsetHeight?-1:1}else{var o=a.trackXRef.current,l=a.thumbXRef.current;t=e.clientX-o.getBoundingClientRect().left<parseFloat(l.style.left)/100*o.offsetWidth?-1:1}a.pane&&a.pane.scrollTo({left:a.pane.scrollLeft+40*t,top:a.pane.scrollTop+40*n,behavior:"smooth"})}})),a.state={id:(0,p.Z)(),showBarX:!1,showBarY:!1,posX:null,posY:null,startX:0,startY:0,dragVertical:null},a.thumb=null,a.pane=null,a.isMobile=(0,f.t)(),a.thumbXRef=c.createRef(),a.trackXRef=c.createRef(),a.thumbYRef=c.createRef(),a.trackYRef=c.createRef(),a}return(0,a.Z)(n,[{key:"componentDidMount",value:function(){var e;window.addEventListener("resize",this.onResize),this.observer=new MutationObserver(this.onResize),this.observer.observe(document,{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style","class"]}),null===(e=this.thumb)||void 0===e||e.addEventListener("touchstart",g,{passive:!1}),this.onScroll()}},{key:"componentDidUpdate",value:function(e,t){var n,r;(this.onScroll(),this.lastWidth=null===(n=this.pane)||void 0===n?void 0:n.clientWidth,!t.showBarX&&this.state.showBarX)&&(null===(r=this.thumb)||void 0===r||r.addEventListener("touchstart",g,{passive:!1}))}},{key:"componentWillUnmount",value:function(){var e,t;window.removeEventListener("resize",this.onScroll),null===(e=this.observer)||void 0===e||e.disconnect(),null===(t=this.thumb)||void 0===t||t.removeEventListener("touchstart",g)}},{key:"onScrollUpdate",value:function(e){var t=e.offsetStart,n=void 0===t?0:t,r=e.offsetEnd,i=void 0===r?0:r,a=e.scrollPos,o=e.contentSize,l=e.containerSize,s=e.thumbElm,u=e.trackElm,c=l-n-i,d=o-l;if(o===l)return null===s||void 0===s||s.removeEventListener("touchstart",g,{passive:!1}),!1;if(!s)return!0;var h=a/d,p=l/o,f=p*l;u.setAttribute("aria-valuenow",Math.round(1e3*h)/10);var v=h*((l-f)/l)*100+"%";"vertical"===(null===u||void 0===u?void 0:u.dataset.orientation)?(s.style.top=v,s.style.height=100*p+"%",u.style.top=n+"px",u.style.height=c+"px"):(s.style.left=v,s.style.width=100*p+"%",u.style.left=n+"px",u.style.width=c+"px")}},{key:"scrollTo",value:function(e,t){this.pane&&this.pane.scrollTo(e,t)}},{key:"renderScrollBar",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e?"vertical":"horizontal";return(0,u.jsx)("div",{className:h()(m().scrollBarTrack,e?m().vertical:m().horizontal),ref:e?this.trackYRef:this.trackXRef,role:"scrollbar","aria-controls":this.state.id,"aria-orientation":t,"aria-valuenow":0,"data-orientation":t,tabIndex:this.isMobile?void 0:-1,onClick:this.isMobile?void 0:this.onClick,children:(0,u.jsx)("div",{className:m().scrollBarThumb,onPointerDown:this.onDragStart,onTouchStart:g,"data-orientation":t,ref:e?this.thumbYRef:this.thumbXRef,children:(0,u.jsx)("div",{})})})}},{key:"render",value:function(){var e=this,t=this.props,n=t.maxHeight,r=void 0===n?0:n,i=t.offsetTop,a=void 0===i?0:i,o=t.offsetBottom,l=void 0===o?0:o,s=t.className,c=t.style;return(0,u.jsxs)("div",{className:h()(m().scrollAreaWrap),style:c,children:[(0,u.jsx)("div",{className:h()(s,m().scrollArea),style:{maxHeight:r?r+a+l+"px":void 0},ref:function(t){return e.pane=t},id:this.state.id,onScroll:this.onScroll,children:this.props.children}),this.state.showBarX&&this.renderScrollBar(!1),this.state.showBarY&&this.renderScrollBar(!0)]})}}]),n}(c.PureComponent)},31409:function(e,t,n){"use strict";n.d(t,{C2:function(){return p},t9:function(){return f},u6:function(){return h}});var r=n(26042),i=n(69396),a=n(85893),o=n(67294),l=n(45697),s=n.n(l),u=n(42012),c=n(55120),d=new u.ZP(u.ZP.defaultName),h=(0,o.createContext)({theme:c.uH,chartTheme:d}),p=function(e){var t=e.theme,n=e.chartTheme,r=e.updateBackground,i=void 0!==r&&r,l=e.children;return t||(t=c.uH),n||(n=d),(0,o.useEffect)((function(){if(i)return document.body.style.backgroundColor=t.background,function(){document.body.style.backgroundColor=""}}),[i,t.background]),(0,a.jsx)(h.Provider,{value:{theme:t,chartTheme:n},children:l})};function f(e){var t=(0,o.useContext)(h),n=t.chartTheme,a=t.theme,l=(0,o.useState)({theme:a,chartTheme:n}),s=l[0],d=l[1],p=a.resolveColor(e);return(0,o.useEffect)((function(){var t=s.theme,o=s.themeStyles,l=s.lastThemeId;if(e){if(l!==a.id||p!==t.backgroundColor){var h=new c.ZP((0,i.Z)((0,r.Z)({},a.saveData()),{backgroundColor:p})),f=new u.ZP(n.name,{foreground:h.color,background:h.background,font:h.chartFont});d({theme:h,chartTheme:f,themeStyles:h.subStyles(a),lastThemeId:a.id})}}else(o||a!==t)&&d({theme:a,chartTheme:n})}),[p,e,a,s,n]),s}p.propTypes={theme:s().instanceOf(c.ZP),chartTheme:s().instanceOf(u.ZP),updateBackground:s().bool}},38625:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(85893),i=n(67294),a=n(73935),o=n(94184),l=n.n(o),s=n(45697),u=n.n(s),c=n(62011),d=n(63499),h=n(31409),p=n(35208),f=n(10765),v=n.n(f);function m(e){var t=(0,i.useContext)(h.u6).theme,n=e.hoverNode,o=e.cursorPosition,s=e.showAnchor,u=e.className,f=e.gap,m=e.sliderShift,g=e.sliderWidthAdjust,b=(0,i.useRef)(null),x=(0,i.useRef)(null),y=(0,i.useRef)(null);(0,i.useEffect)((function(){if(x.current&&b.current&&!o)x.current.style.display="none";else if(x.current&&b.current&&o){var e=x.current.style;e.display="",e.left="-1000px";var t=b.current.getBoundingClientRect(),n=(0,p.Vd)(x.current).getBoundingClientRect(),r=x.current.clientHeight,i=x.current.clientWidth,a=t.left-n.left,l=t.top-n.top;if("static"===o){var s=(0,c.aO)().width,u=6-n.left,d=-n.left+s-12-i,h=i/2,v=null==m?.5:m,k=g||0,w=a+.5*-k+((t.width+k)*v-i/2);w<u?(h=i/2-(u-w),w=u):w>d&&(h=i/2-(d-w),w=d),y.current&&(y.current.style.left=h+"px"),e.top=l-r-f+"px",e.left=w+"px"}else{var Z=(0,p.bt)(b.current),_=(0,p.Ro)(o,b.current),j=(_.left||0)+Z.left+a,S=(_.top||0)+Z.top+l;e.left=(_.left||0)>t.width/2?j-i-15+"px":j+15+"px",e.top=(_.top||0)>t.height/2?S-r-10+"px":S+10+"px"}}}),[y,o,f,n,m,g]);var k=(0,r.jsxs)("span",{role:"tooltip",style:{display:"none","--tooltip-background":t.color,"--tooltip-color":t.textColorFor(t.color),"--tooltip-link-color":t.linkColorFor(t.color),"--tooltip-font":t.baseFontStack},className:l()(v().tooltip,u,s?v().withAnchor:null),ref:x,children:[n,(0,r.jsx)("span",{className:l()(v().anchor,!s&&v().hide),ref:y})]}),w=null;if(e.children){var Z=i.Children.only(e.children);w=i.cloneElement(Z,{ref:function(e){b.current=e;var t=Z.ref;"function"===typeof t?t(e):null!==t&&(t.current=e)}})}var _=e.portalContainer||(0,d.xX)()||document.body;return(0,r.jsxs)(r.Fragment,{children:[w,o&&_?a.createPortal(k,_):null]})}m.propTypes={portalContainer:u().element,className:u().string,sliderShift:u().number,sliderWidthAdjust:u().number,children:u().node,cursorPosition:u().oneOfType([u().exact({clientX:u().number.isRequired,clientY:u().number.isRequired}),u().string]),showAnchor:u().bool,hoverNode:u().node.isRequired,gap:u().number},m.defaultProps={showAnchor:!1,gap:10}},20615:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(26042),i=n(69396),a=n(85893),o=(n(67294),n(94184)),l=n.n(o),s=n(45697),u=n.n(s),c=n(2214),d=n(40401),h=n(26781),p=n(57096),f=n(15017),v=n(66775),m=n(61144),g=n.n(m),b=function(e){return e.preventDefault()};function x(e){var t,n,o,s,u,m,x,y=e.isSelected,k=e.isInSelection,w=e.subRef,Z=e.children,_=e.type,j=e.attributes,S=e.listeners,C=e.isEditor,T=e.extraControls,M=e.element,N=e.style,E=e.slateChildren,D=e.isPlaceholder,R=e.clickSpan,L=e.pageBreakAfter,W=e.inlineMode,z=e.inlineWidth,P="grid:block"!==(null===(t=d.fx.get(_))||void 0===t?void 0:t.name),A=!e.model||p.RrV.read(e),V=null!==(x=null===(n=e.element)||void 0===n?void 0:n.type)&&void 0!==x?x:P?"grid:inline":"grid:block",F=l()(g().grid,e.className,"element_"+(null===M||void 0===M||null===(o=M.data)||void 0===o?void 0:o.type),C&&g().editor,C&&"editmode",P?g().inline:g().block,!A&&g().invisible,(0,c.h)(_),!Z&&g().empty,y&&k&&"selection",D&&g().placeholder,(0,v.a)(V,p.hkI.read(e)),L&&"pageBreakAfter",R&&g().clicktrap,P&&(0,f.E6)(z,W)),B=(0,i.Z)((0,r.Z)({},j,S),{id:e.id||(null===M||void 0===M?void 0:M.id),className:F,title:e.htmlTitle,style:N,"data-grid-element":!0,"data-type":null===M||void 0===M||null===(s=M.data)||void 0===s?void 0:s.type,"data-obid":"grid-"+(null===M||void 0===M||null===(u=M.data)||void 0===u?void 0:u.type),"data-editblock":!P||null,"data-testid":null===M||void 0===M||null===(m=M.data)||void 0===m?void 0:m.testId,"data-selected":y||null,onMouseDown:R?b:null,onClick:e.onEditorClick});if(P){var I=W?"label":"span";return(0,a.jsxs)("span",(0,i.Z)((0,r.Z)({},B),{children:[(0,a.jsxs)(I,{ref:w,contentEditable:!1,className:"ctrl",children:[e.label||"row"===W?(0,a.jsx)(h.Z,{disabled:e.isDisabled,className:"label",text:e.label||"\u200b",inline:!0}):null,(0,a.jsx)("span",{className:"value",children:Z})]}),E,T]}))}return(0,a.jsxs)("div",(0,i.Z)((0,r.Z)({},B),{children:[(0,a.jsx)("div",{ref:w,contentEditable:!1,children:Z}),E,T]}))}x.propTypes={id:u().string,attributes:u().object,listeners:u().object,slateChildren:u().node,children:u().node,label:u().string,inlineMode:u().oneOf(["col","row","text"]),inlineWidth:u().oneOf(["","x-small","small","medium","large","x-large","full"]),className:u().string,style:u().object,htmlTitle:u().string,isDisabled:u().bool,isEditor:u().bool,isSelected:u().bool,isInSelection:u().bool,isPlaceholder:u().bool,clickSpan:u().bool,pageBreakAfter:u().bool,emit:u().func,subRef:u().func,onEditorClick:u().func,extraControls:u().node,type:u().string,model:u().object,visible:u().oneOfType([u().string,u().bool]),element:u().shape({id:u().string,type:u().string,data:u().shape({testId:u().string,type:u().string})})}},2214:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});var r=n(40401),i={h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,quote:1};function a(e,t){if("row"===e||"col"===e||"hr"===e)return"ws-"+e;if("ul"===e||"ol"===e)return"ws-text ws-"+e+" "+e+" list indent-"+(t||0);if("code"===e)return"grid-block ws-text ws-"+e;if(e in i)return"ws-text ws-"+e;if("grid:block"===e)return"ws-block grid-block";if("chartAssistant"===e)return"ws-block";if("slidebreak"===e)return"ws-break";if("grid:inline"!==e){var n=r.fx.get(e);if(n&&"grid:block"===n.name)return"ws-block ws-"+e}return"grid-inline"}},40401:function(e,t,n){"use strict";n.d(t,{Qi:function(){return u},dJ:function(){return c},fx:function(){return h},jt:function(){return d}});var r=n(26042),i=n(69396),a=n(10253),o={Interaction:6,Display:5,Actions:4,Charts:3,Text:2,Other:1},l=[{label:"Column chart",analyticsLabel:"Column Chart",value:"column",name:"grid:block",group:"Charts",description:"Shows comparative size, rank or trend in numerical values",icon:"column",canAutoSelect:!0,supportsQueryUI:!0},{label:"Bar chart",analyticsLabel:"Bar Chart",value:"bar",name:"grid:block",group:"Charts",description:"Shows comparative size or rank of numerical values",icon:"bar",canAutoSelect:!0,supportsQueryUI:!0},{label:"Area chart",analyticsLabel:"Area Chart",value:"area",name:"grid:block",group:"Charts",description:"Shows sums of numerical data, usually over time",icon:"area",defaultProps:{stacked:!0},canAutoSelect:!0,supportsQueryUI:!0},{label:"Pie chart",analyticsLabel:"Pie Chart",value:"pie",name:"grid:block",group:"Charts",description:"Shows numerical proportions of a whole",icon:"pie",canAutoSelect:!0,supportsQueryUI:!0},{label:"Combo chart",analyticsLabel:"Combo Chart",value:"combo",name:"grid:block",group:"Charts",description:"Shows data as columns and lines in one chart",icon:"combo",defaultProps:{axisValue2:{min:0}}},{label:"Line chart",analyticsLabel:"Line Chart",value:"line",name:"grid:block",group:"Charts",description:"Shows trends in numerical data, usually over time",icon:"line",canAutoSelect:!0,supportsQueryUI:!0},{label:"Scatter plot",analyticsLabel:"Scatter Plot",value:"scatter",name:"grid:block",group:"Charts",description:"Compares numerical data on 2 or 3 dimensions",search:[{alias:"bubbles",minLength:3},{alias:"chart"}],icon:"scatter",canAutoSelect:!0},{label:"Waterfall chart",analyticsLabel:"Waterfall Chart",value:"waterfall",name:"grid:block",group:"Charts",description:"Shows a running total as values are added or subtracted",icon:"waterfall"},{label:"Table",analyticsLabel:"Table",value:"table",name:"grid:block",group:"Display",defaultProps:{striped:!1},description:"Displays data in an easily readable table",icon:"table",supportsQueryUI:!0},{label:"Sheet",analyticsLabel:"Sheet",value:"sheet",name:"grid:block",group:"Display",description:"Displays data in a spreadsheet-like data-grid",icon:"sheet"},{label:"Formula output",analyticsLabel:"Formula Output",value:"text",name:"grid:inline",group:"Display",description:"Displays output from formula or reference in text",search:"text fx",icon:"text"},{label:"Cell value",analyticsLabel:"Cell Value",value:"text",name:"grid:inline",group:"Display",description:"Displays the value of a specific cell in a spreadsheet",search:"text fx",icon:"text"},{label:"Canvas",analyticsLabel:"Canvas",value:"canvas",name:"grid:block",group:"Display",description:"A free-form dynamic drawing element",icon:"canvas",restrictByFlag:"test-elements",panelAutoFocus:"url"},{label:"Slider",analyticsLabel:"Slider",value:"slider",name:"grid:inline",group:"Interaction",defaultProps:{width:"large",size:"medium"},description:"Changes numerical cell values by dragging",icon:"slider",useClickSpan:!0,canResize:!0},{label:"Dropdown",analyticsLabel:"Dropdown Selection",value:"dropdown",name:"grid:inline",group:"Interaction",defaultProps:{width:"large",size:"medium"},description:"Select cell value from a set of options",search:"selection",icon:"dropdown",useClickSpan:!0,canResize:!0},{label:"Input field",analyticsLabel:"Input Field",value:"input",name:"grid:inline",group:"Interaction",defaultProps:{width:"large",size:"medium",disableHelper:!0},description:"Direct entry of data into a cell",icon:"input",useClickSpan:!0,canResize:!0},{label:"Radio buttons",analyticsLabel:"Radio Selection",value:"radio",name:"grid:inline",group:"Interaction",description:"Selects cell value from a small set of options",search:"checkbox select",icon:"radio",useClickSpan:!0},{label:"Button",analyticsLabel:"Button",value:"button",name:"grid:inline",group:"Interaction",defaultProps:{size:"medium"},description:"Sets the value of a cell, or a group of cells",icon:"button",useClickSpan:!0},{label:"Checkbox",analyticsLabel:"Checkbox",value:"checkbox",name:"grid:inline",group:"Interaction",description:"Flips the value of a cell between two options",icon:"checkbox",useClickSpan:!0},{label:"Timer",analyticsLabel:"Timer",value:"timer",name:"grid:inline",group:"Other",defaultProps:{size:"medium"},description:"Changes a cell value at a configurable interval",icon:"timer",useClickSpan:!0},{label:"Interactive value",analyticsLabel:"Tangle",value:"tangle",name:"grid:inline",group:"Interaction",description:"Change numerical cell values by dragging your mouse",icon:"tangle",search:"tangle scrubbable"},{label:"KPI",analyticsLabel:"Kpi",value:"kpi",name:"grid:inline",group:"Display",description:"Displays a number and its most recent change",icon:"kpi",search:"change"},{analyticsLabel:"Layout Element",value:"row",name:"row",group:"Other",icon:"layout",search:"layout row split column section arrange",disabledText:"Cannot add a column within a column",label:"Layout element",description:"Arranges content into 2 or more columns",documentData:Array(2).fill([])},{label:"Paragraph",analyticsLabel:"Paragraph",value:"p",name:"p",group:"Text",description:"A text paragraph",search:"text",icon:"paragraph"},{label:"Equation",analyticsLabel:"LaTeX Math Equation",value:"latex",name:"grid:inline",group:"Other",description:"Displays a math equation using LaTeX notation",search:"formula latex math",icon:"math",panelAutoFocus:"equation"},{label:"Quote",analyticsLabel:"Quote",value:"quote",name:"quote",group:"Text",description:"A paragraph formatted to indicate a quote",search:"text",icon:"quote"},{label:"Heading 1",analyticsLabel:"Heading 1",value:"h1",name:"h1",group:"Text",description:"A large heading, e.g. a title",search:"text h1",icon:"h1"},{label:"Heading 2",analyticsLabel:"Heading 2",value:"h2",name:"h2",group:"Text",description:"A medium sized heading",search:"text h2",icon:"h2"},{label:"Heading 3",analyticsLabel:"Heading 3",value:"h3",name:"h3",group:"Text",description:"A small heading",search:"text h3",icon:"h3"},{label:"Code",analyticsLabel:"Code",value:"code",name:"code",group:"Text",description:"Monospaced text",search:"text",icon:"code"},{label:"Ordered list",analyticsLabel:"Ordered List",value:"ol",name:"ol",group:"Text",description:"An numbered list item",search:"text",icon:"",hidden:!0},{label:"Unordered list",analyticsLabel:"Unordered List",value:"ul",name:"ul",group:"Text",description:"A bulleted list item",search:"text",icon:"",hidden:!0},{label:"Source link",analyticsLabel:"Source link",value:"source",name:"grid:inline",group:"Other",description:"A link to the project's data source",search:"workbook spreadsheet",icon:"source"},{label:"Image",analyticsLabel:"Image",value:"image",name:"grid:inline",group:"Other",description:"Upload or link an image/gif",search:"picture icon jif gifs giphy",icon:"image",suppressPanel:!0,canResize:!0,panelAutoFocus:"url"},{label:"Video",analyticsLabel:"Video",value:"embed",name:"grid:block",group:"Other",description:"An embedded video from link",search:"embed",icon:"embed",suppressSpreadsheetPanel:!0,useClickSpan:!0,panelAutoFocus:"url"},{label:"Divider",analyticsLabel:"Horizontal Rule",value:"hr",name:"hr",group:"Other",description:"A horizontal divider for visual separation",search:"horizontal ruler hr",icon:"ruler"},{label:"Submit",analyticsLabel:"Submit Button",value:"submitbutton",name:"grid:inline",group:"Actions",defaultProps:{size:"medium"},description:"Submits input information via email",search:"button",icon:"button",suppressSpreadsheetPanel:!0,panelAutoFocus:"type",useClickSpan:!0,hidden:!0},{label:"Submit",analyticsLabel:"Submit Button",value:"submitbutton2",name:"grid:inline",group:"Actions",description:"Send form submissions to email or Zapier",search:"button",defaultProps:{emailEnabled:"true",size:"medium"},icon:"button",suppressSpreadsheetPanel:!0,panelAutoFocus:"type",useClickSpan:!0},{label:"Save to PDF",analyticsLabel:"Save to PDF Button",value:"actionbutton",name:"grid:inline",group:"Actions",defaultProps:{size:"medium",buttonType:"pdf"},description:"Exports the content to PDF",search:"button",icon:"button",useClickSpan:!0,parent:"Action button"},{label:"Reset",analyticsLabel:"Reset Button",value:"resetbutton",name:"grid:inline",group:"Actions",defaultProps:{size:"medium"},description:"Resets the document to its default state",search:"button",icon:"button",useClickSpan:!0},{label:"Recalculate",analyticsLabel:"Recalculate Button",value:"recalcbutton",name:"grid:inline",group:"Actions",defaultProps:{size:"medium"},description:"Recalculates random & time-sensitive functions",search:"button",icon:"button",useClickSpan:!0},{label:"Open URL",analyticsLabel:"Open URL Button",value:"actionbutton",name:"grid:inline",group:"Actions",defaultProps:{size:"medium",buttonType:"openurl"},description:"Opens a URL in a new tab",search:"button",icon:"button",useClickSpan:!0,parent:"Action button"},{label:"Copy URL",analyticsLabel:"Copy URL Button",value:"actionbutton",name:"grid:inline",group:"Actions",defaultProps:{size:"medium",buttonType:"copyurl"},description:"Copies a URL to the clipboard",search:"button",icon:"button",useClickSpan:!0,parent:"Action button"},{label:"Goal Seek",analyticsLabel:"Goal Seek Button",value:"goalseekbutton",name:"grid:inline",group:"Actions",defaultProps:{size:"medium"},description:"Seeks a value in one cell to produce a value in another",search:"button",icon:"button",restrictByFeature:["can_use_goal_seek","hide"],useClickSpan:!0},{label:"Action button",analyticsLabel:"Action Button",value:"actionbutton",name:"grid:inline",group:"Actions",defaultProps:{size:"medium"},description:"",search:"button",icon:"button",useClickSpan:!0,hidden:!0},{label:"Present",analyticsLabel:"Present Button",value:"actionbutton",name:"grid:inline",group:"Actions",defaultProps:{size:"medium",buttonType:"present"},description:"Opens the content in full screen mode",search:"button",icon:"button",useClickSpan:!0,parent:"Action button"},{label:"Tooltip",analyticsLabel:"Tooltip",value:"tooltip",name:"grid:inline",group:"Other",description:"Icon indicating additional information",search:"tooltip",icon:"tooltip",suppressSpreadsheetPanel:!0},{label:"Slide break",analyticsLabel:"Slide Break",value:"slidebreak",name:"slidebreak",group:"Other",description:"Splits content horizontally in full screen mode",search:"break slide",icon:"slidebreak",disabledText:"Cannot add a slide break within a column"},{label:"Page break",analyticsLabel:"Page Break",value:"pagebreak",name:"pagebreak",group:"Other",description:"Adds a page break for printing or PDF export",search:"break page",icon:"slidebreak",disabledText:"Cannot add a page break within a column"},{label:"Debug ruler",analyticsLabel:"Debug Ruler",value:"debugline",name:"grid:inline",group:"Other",description:"Developer debug utility element",search:"developer",icon:"ruler",restrictByFlag:"devs-doc-features"}];l.sort((function(e,t){var n=o[e.group]||0;return(o[t.group]||0)-n}));var s=function(){return!1};function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,r=e.restrictByFeature||e.restrictByFlag;if(!e.hidden&&!r)return{disable:!1,hide:!1};if(!e.hidden&&r){var i=!0;if(e.restrictByFlag){var o=e.restrictByFlag,l=!0;o.startsWith("!")&&(o=o.slice(1),l=!1),i=n(o)===l}var u=(0,a.Z)(e.restrictByFeature||["",""],2),c=u[0],d=u[1],h=!0;if(c.startsWith("!")&&(c=c.slice(1),h=!1),i&&(!e.restrictByFeature||t[c]===h))return{disable:!1,hide:!1};if(i&&"disable"===d)return{disable:!0,hide:!1}}return{disable:!0,hide:!0}}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,a=[],o=!0,l=!1,c=void 0;try{for(var d,h=e[Symbol.iterator]();!(o=(d=h.next()).done);o=!0){var p=d.value,f=u(p,t,n);f.hide||a.push((0,i.Z)((0,r.Z)({},p),{disabledFeature:f.disable}))}}catch(v){l=!0,c=v}finally{try{o||null==h.return||h.return()}finally{if(l)throw c}}return a}t.ZP=l;var d=l.filter((function(e){return e.name.startsWith("grid:")})),h=new Map(d.map((function(e){return[e.value,e]})))},51471:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(85893),i=(n(67294),n(45697)),a=n.n(i),o=n(51120),l=n.n(o),s="Something went wrong trying to render this section!";function u(e){return e.inline?(0,r.jsx)("span",{className:l().error,contentEditable:!1,style:{color:"#900",textDecoration:"underline",userSelect:"none"},children:e.message||s}):(0,r.jsxs)("div",{className:l().error,contentEditable:!1,style:{color:"#900",border:"1px dotted red",padding:"4px 8px",borderRadius:"3px",userSelect:"none"},children:["\ud83d\udca5 ",e.message||s," \ud83d\udca5"]})}u.propTypes={inline:a().bool,message:a().string}},38174:function(e,t){"use strict";var n={},r={setMeta:function(e,t){var r=t.naturalWidth,i=t.naturalHeight;r&&(n[e]=[r,i])},getMeta:function(e){return n[e]||null},removeMeta:function(e){delete n[e]}};t.Z=r},42315:function(e,t,n){"use strict";n.d(t,{Z:function(){return Ia}});var r=n(26042),i=n(69396),a=n(85893),o=n(67294),l=n(45697),s=n.n(l),u=n(91930),c=n(82788),d=n(57096),h=n(92220),p=n(99534),f=n(94184),v=n.n(f),m=n(31409),g=n(63985);function b(e,t,n){return Math.max(e,Math.min(n,t))}var x=function(e){return Math.round(100*e)/100};function y(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;"large"===e?(n=2.6,r=1.6*(t=t||19)):"medium"===e?(n=2.2,r=1.3*(t=t||17)):(n=1.8,r=t=t||15),t=b(g.rP,t||0,g.Fm);var a=Math.round(t*n);return{fontSize:t,padding:n,buttonPadding:r,height:a,indent:3+5*n,borderRadius:x(Math.max(0,Math.min(1,i/2))*a)}}var k=n(20615),w=n(87175),Z=n.n(w);function _(e){var t,n=e.disabled,l=e.onClick,s=e.label,u=(0,p.Z)(e,["disabled","onClick","label"]),c=(0,o.useContext)(m.u6).theme,h={};if(!n&&d.VMk.isSet(u)){var f=d.VMk.read(u);f&&(h.borderColor=c.borderColor(f),h.background=c.resolveColor(f),h.color=c.textColorFor(f))}var g=y(d.Z6c.read(u),d.l0e.isSet(u)?d.l0e.read(u):null,null!==(t=d.RTo.read(u))&&void 0!==t?t:.5);return h.fontSize=Math.round(g.fontSize)+"px",h.lineHeight=g.height-2+"px",h.padding="0 ".concat(g.buttonPadding,"px"),h.borderRadius=g.borderRadius,(0,a.jsxs)(k.Z,(0,i.Z)((0,r.Z)({},u),{className:v()(Z().button),inlineWidth:d.NrA.read(u),inlineMode:"text",htmlTitle:u.title,children:[(0,a.jsx)("button",{type:"button",onClick:n?void 0:l,className:v()(Z().buttonElm,n?Z().disabled:void 0),style:h,"aria-disabled":n||!1,children:"string"===typeof s?s.trim()||"\xa0":s}),u.children]}))}_.propTypes={disabled:s().bool,onClick:s().func,label:s().node,title:s().string};var j=(0,r.Z)({title:d.mn7,visible:d.RrV,buttonType:d.kn_,targetOrigin:d.dYK,urlPrefix:d.arB,href:d.xuP,disabled:d.JUm},d.hVv),S={"":"Select action",present:"Present",copyurl:"Copy URL",pdf:"Save to PDF",openurl:"Open URL"},C={present:"presentbutton",copyurl:"copyurlbutton",pdf:"pdfbutton",openurl:"linkbutton"};function T(e){if(!e.isEditor&&!d.RrV.read(e))return null;var t=d.kn_.read(e),n="openurl"===t&&!d.xuP.isSet(e),o=d.mn7.read(e);o||(o=n?"Add a link URL":S[t]);var l=""===t||d.JUm.read(e)||n;return(0,a.jsx)(_,(0,i.Z)((0,r.Z)({},e),{label:o,disabled:l,onClick:function(){if(!e.isEditor&&!l)if("openurl"===t){var n=(0,h.L)(d.xuP.read(e),e.isAuthenticated);e.track("interact",{elementType:"linkbutton",targetUrl:n.url}),window.open(n.props.href,n.props.target)}else{C[t]&&e.track("interact",{elementType:C[t]});var r=d.dYK.read(e),i=d.arB.read(e),a=e.model.writes(),o=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Date.now,a=(0,u.ru)(t),o=t.length?(0,u.N$)(a):"",l=n||r;return o&&"openurl"!==e&&(l="".concat(l,"?s=").concat(o)),{gridMessage:i(),s:o,state:a,url:l,urlPrefix:n,type:e}}(t,a,i,e.canonicalUrl,e.timeProvider);window.postMessage(o,window.location.origin),window.self!==window.top&&window.parent.postMessage(o,r)}}}))}T.options=j,T.requiredOption=null,T.propTypes={isEditor:s().bool,isAuthenticated:s().bool,model:c.Z.isRequired,canonicalUrl:s().string,timeProvider:s().func,track:s().func};var M=(0,r.Z)({expr:d.jFN,title:d.mn7,value:d.S3k,visible:d.RrV,disabled:d.JUm},d.hVv);function N(e){if(!e.isEditor&&!d.RrV.read(e))return null;var t=d.jFN.isFx(e),n=d.JUm.read(e),o="Target cell not selected";return t&&(o=d.mn7.isSet(e)?d.mn7.read(e):"Set value"),(0,a.jsx)(_,(0,i.Z)((0,r.Z)({},e),{label:o,disabled:!t||n,onClick:function(){t&&!n&&(e.track("interact",{elementType:"button"}),d.jFN.write(e,d.S3k.readCells(e)))}}))}N.options=M,N.requiredOption="expr",N.isInput=!0,N.propTypes={parentKey:s().string,error:s().string,locale:s().string,isEditor:s().bool,track:s().func,model:c.Z.isRequired};var E=n(82670),D=(0,r.Z)({title:d.mn7,visible:d.RrV,writeCell:d.LFW,readCell:d.GP,targetValue:d.Cx7,disabled:d.JUm},d.hVv);function R(e){var t=d.mn7.read(e)||"Calculate",n="";d.LFW.isSet(e)?d.GP.isSet(e)?e.canUse("can_use_goal_seek")||(n="Restricted element"):n="Missing goal cell":n="Missing a cell to change";var l=!e.model||d.JUm.read(e)||!!n,s=(0,o.useCallback)((function(){if(!l){e.track("interact",{elementType:"goalseekbutton"});var t=d.LFW.read(e),n=d.GP.read(e),r=d.Cx7.read(e);try{var i=e.model.goalSeek(t,n,r);(0,E.Z)(i,Error)}catch(a){e.onError(a)}}}),[l,e]);return e.isEditor||d.RrV.read(e)?(0,a.jsx)(_,(0,i.Z)((0,r.Z)({},e),{label:n||t,disabled:l,onClick:s})):null}R.options=D,R.requiredOption=null,R.propTypes={isEditor:s().bool,model:c.Z.isRequired,canUse:s().func,track:s().func,onError:s().func};var L=(0,r.Z)({title:d.mn7,visible:d.RrV,disabled:d.JUm},d.hVv);function W(e){if(!e.isEditor&&!d.RrV.read(e))return null;var t=d.JUm.read(e);return(0,a.jsx)(_,(0,i.Z)((0,r.Z)({},e),{label:d.mn7.read(e)||"Recalculate",disabled:t,onClick:function(){t||(e.track("interact",{elementType:"recalcbutton"}),e.model.recalculate())}}))}W.options=L,W.requiredOption=null,W.propTypes={isEditor:s().bool,track:s().func,model:c.Z.isRequired};var z=(0,r.Z)({title:d.mn7,visible:d.RrV,disabled:d.JUm},d.hVv);function P(e){if(!e.isEditor&&!d.RrV.read(e))return null;var t=d.JUm.read(e);return(0,a.jsx)(_,(0,i.Z)((0,r.Z)({},e),{label:d.mn7.read(e)||"Restore defaults",disabled:t,onClick:function(){t||(e.track("interact",{elementType:"resetbutton"}),e.model.reset())}}))}P.options=z,P.requiredOption=null,P.propTypes={isEditor:s().bool,track:s().func,model:c.Z.isRequired};var A=n(47568),V=n(14924),F=n(10253),B=n(29815),I=n(97582),O=n(24739),U=n(80690),H=n(5118),q=n(38625),Y=n(75966),X=n.n(Y),G={spinner:function(){return(0,a.jsx)("svg",{role:"img",height:26,viewBox:"0 0 16 16",shapeRendering:"geometricPrecision","data-testid":"spinner-icon",children:(0,a.jsx)("path",{d:"M 12 8 A 4 4 0 1 1 9 4",strokeWidth:"1.5",strokeLinecap:"round",fill:"none",stroke:"currentColor",children:(0,a.jsx)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 8 8",to:"360 8 8",dur:"1s",repeatCount:"indefinite"})})})},checkmark:function(){return(0,a.jsx)("svg",{role:"img",height:26,viewBox:"0 0 16 16",shapeRendering:"geometricPrecision","data-testid":"checkmark-icon",children:(0,a.jsx)("path",{d:"M4.5,8.3 L7,10.8 L11.5,6.3",strokeWidth:"1.5",strokeLinecap:"round",fill:"none",stroke:"currentColor"})})},warning:function(){return(0,a.jsx)("svg",{role:"img",width:26,height:26,viewBox:"0 0 24 24","data-testid":"warning-icon",children:(0,a.jsx)("path",{fill:"currentColor",d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"})})}};function K(e){var t=e.message,n=e.icon,r=(0,F.Z)(o.useState(!1),2),i=r[0],l=r[1];return t&&G[n]?(0,a.jsx)("span",{className:X().helper,onMouseEnter:function(){return l(!0)},onMouseLeave:function(){return l(!1)},children:(0,a.jsx)(q.Z,{hoverNode:t,cursorPosition:i?"static":null,gap:6,showAnchor:!0,children:G[n]()})}):null}K.propTypes={icon:s().string,message:s().string};var J,$,Q=(0,r.Z)((0,V.Z)({title:d.mn7,value:d.S3k,expr:d.jFN,visible:d.RrV,disabled:d.JUm,emailEnabled:d.IAr,emailAddress:d.VZl,emailSubject:d.tTx,fields:d.Sfq},d.BM2.name,d.BM2),d.hVv),ee=(J={},(0,V.Z)(J,0,{message:"",icon:""}),(0,V.Z)(J,1,{message:"Sending data...",icon:"spinner"}),(0,V.Z)(J,2,{message:"Successfully submitted!",icon:"checkmark"}),(0,V.Z)(J,3,{message:"Form submission failed",icon:"warning"}),J),te=($={},(0,V.Z)($,1,{title:"Configure form fields",hover:"Form submission requires at least one form field"}),(0,V.Z)($,2,{title:"Email field missing",hover:'HubSpot syncing only works if the form contains a field named "email"'}),$);function ne(e){var t={value:null};if(e)if("number"===typeof e.v){t.value=e.v;var n=e.z;n&&(t.number_format=n,t.formatted_number=(0,O.WU)(n,e.v),t.is_date=(0,O.V5)(n))}else"boolean"===typeof e.v?t.value=e.v:null!==e.v&&(t.value=String(e.v));return t}function re(e){var t=e.writes(),n=(0,u.ru)(t);return{state:t,s:t.length?(0,u.N$)(n):""}}function ie(e){var t,n,l=(0,F.Z)(o.useState(0),2),s=l[0],u=l[1],c=(0,F.Z)(o.useState(""),2),h=c[0],p=c[1];if(o.useEffect((function(){2===s&&(re(e.model).s!==h&&u(0))}),[e.model.lastWrite]),!e.isEditor&&!d.RrV.read(e))return null;var f=[];d.IAr.read(e)&&f.push("email"),d.BM2.read(e)&&f.push("hubspot");var v=d.mn7.read(e)||"Submit",m=0;d.Sfq.isSet(e)?f.includes("hubspot")&&!function(e){return d.Sfq.readCell(e).some((function(e){return"email"===e.name.v}))}(e)&&(m=2):m=1;var b=d.JUm.read(e)||1===s||2===s||!!m,x=e.minDelay||g.k9,y=e.submitForm||U.R,k=function(){var t=(0,A.Z)((function(){var t,n,r,i,a,o,l,c,h,v,m,g;return(0,I.__generator)(this,(function(k){switch(k.label){case 0:if(e.isEditor||1===s||b)return[2];e.track("interact",{elementType:"submitbutton"}),t=d.S3k.readCells(e),n=d.jFN.isSet(e)?d.jFN.read(e).v:null,r=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.jFN.isSet(e)&&d.jFN.write(e,t,n)},r(t,!0),i=re(e.model),a=d.Sfq.readCell(e),o=function(e){var t,n={},r=!0,i=!1,a=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done);r=!0){var s=o.value,u=s.name,c=s.value;u&&("string"===typeof(t=u.v)||"number"===typeof t||"boolean"===typeof t)&&""!==u.v&&(n[String(u.v)]=ne(c))}}catch(d){i=!0,a=d}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}return n}(a),r(!1),l=Date.now(),p(i.s),u(1),k.label=1;case 1:return k.trys.push([1,3,,4]),c=d.tTx.read(e),h=function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var l=a.value,s=!0,u=!1,c=void 0;try{for(var d,h=l[Symbol.iterator]();!(s=(d=h.next()).done);s=!0){var p=d.value;if(p&&p.v){var f,v=String(p.v).split(/[,;]/).map((function(e){return e.trim()})).filter((function(e){return(0,H.J)(e)}));(f=t).push.apply(f,(0,B.Z)(v))}}}catch(m){u=!0,c=m}finally{try{s||null==h.return||h.return()}finally{if(u)throw c}}}}catch(m){r=!0,i=m}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return t}(d.VZl.readCells(e)),v=d.Nn3.read(e),[4,y(e.documentId,f,o,i,c,h,v)];case 2:return k.sent(),e.track("submit",{elementType:"submitbutton",submitData:o}),m=(Date.now()-l)/1e3,w=function(){u(2),r(t)},(Z=m)<(_=x)?setTimeout(w,_-Z):w(),[3,4];case 3:return g=k.sent(),u(3),r(n),e.onError&&e.onError(g),[3,4];case 4:return[2]}var w,Z,_}))}));return function(){return t.apply(this,arguments)}}();return(0,a.jsx)(_,(0,i.Z)((0,r.Z)({},e),{label:(null===(t=te[m])||void 0===t?void 0:t.title)||v,disabled:b,onClick:k,children:(0,a.jsx)(K,{message:(null===(n=te[m])||void 0===n?void 0:n.hover)||ee[s].message,icon:m?"warning":ee[s].icon})}))}ie.options=Q,ie.requiredOption=null,ie.propTypes={minDelay:s().number,isEditor:s().bool,model:c.Z.isRequired,documentId:s().string,track:s().func.isRequired,onError:s().func,submitForm:s().func};var ae,oe=n(52916),le=(0,r.Z)({title:d.mn7,value:d.S3k,expr:d.jFN,visible:d.RrV,buttonType:d.B46,subject:d.j8b,disabled:d.JUm},d.hVv),se=(ae={},(0,V.Z)(ae,0,{message:"",icon:""}),(0,V.Z)(ae,1,{message:"Sending data...",icon:"spinner"}),(0,V.Z)(ae,2,{message:"Successfully submitted!",icon:"checkmark"}),ae);function ue(e){var t=(0,F.Z)(o.useState(0),2),n=t[0],l=t[1],s=(0,F.Z)(o.useState(null),2),c=s[0],h=s[1];if(o.useEffect((function(){2===n&&null!=c&&c!==e.model.lastWrite&&l(0)}),[n,c,e.model.lastWrite]),!e.isEditor&&!d.RrV.read(e))return null;var p=d.B46.read(e),f=d.mn7.read(e);f||(f=p?"Submit":"Action type not selected");var v=d.JUm.read(e)||!e.canUse("can_use_form_submissions")||1===n||2===n||""===p,m=e.minDelay||g.k9,b=e.createDocumentState||oe.Cy,x=function(){var t=(0,A.Z)((function(){var t,r,i,a,o,s,c,f,g,x;return(0,I.__generator)(this,(function(y){switch(y.label){case 0:if(e.isEditor||1===n||v)return[2];e.track("interact",{elementType:"submitbutton"}),t=e.documentId,r=e.model.writes(),i=(0,u.ru)(r),a=r.length?(0,u.N$)(i):"",o={state:r,s:a},(s=d.j8b.read(e))&&(o.subject=s),(c=function(t){d.jFN.isSet(e)&&d.jFN.write(e,t)})(!1),f=Date.now(),h(e.model.lastWrite),l(1),y.label=1;case 1:return y.trys.push([1,3,4,5]),[4,b(t,p,o)];case 2:return y.sent(),e.track("submit",{elementType:"submitbutton",submitData:o}),[3,5];case 3:return g=y.sent(),e.onError(g),[3,5];case 4:return(x=(Date.now()-f)/1e3)<m?setTimeout((function(){l(2),c(d.S3k.readCells(e))}),m-x):(l(2),c(d.S3k.readCells(e))),[7];case 5:return[2]}}))}));return function(){return t.apply(this,arguments)}}();return(0,a.jsx)(_,(0,i.Z)((0,r.Z)({},e),{label:f,disabled:v,onClick:x,children:(0,a.jsx)(K,{message:se[n].message,icon:se[n].icon})}))}ue.options=le,ue.requiredOption=null,ue.propTypes={minDelay:s().number,isEditor:s().bool,model:c.Z.isRequired,documentId:s().string,canUse:s().func,track:s().func,onError:s().func,createDocumentState:s().func};var ce=n(4111),de=n(51438),he=n(52951),pe=n(28668),fe=n(71418),ve=function(){function e(){var t=this;(0,de.Z)(this,e),(0,V.Z)(this,"tick",(function(){if(t._running){var e=Date.now(),n=t._timers.filter((function(t){return e-t.lastTick>t.freq}));n.forEach((function(t,r){t.lastTick=e,t.handler(r,n.length)})),requestAnimationFrame(t.tick)}})),this._running=!1,this._timers=[]}return(0,he.Z)(e,[{key:"io",value:function(){this._timers.length?this._running||(this._running=!0,this.tick()):this._running=!1}},{key:"addTimer",value:function(e,t){this._timers.push({lastTick:Date.now(),handler:e,freq:1e3*t}),this.io()}},{key:"removeTimer",value:function(e){this._timers=this._timers.filter((function(t){return t.handler!==e})),this.io()}}]),e}(),me=n(15017),ge=new ve,be=(0,r.Z)({visible:d.RrV,expr:d.jFN,interval:d.FG_,value:d.bNt,loop:d.VXY,min:d.VV$,max:d.Fp7,autoplay:d.FLO,disabled:d.JUm},d.hVv),xe=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"tick",(function(e,t){var n=r.props,i=r.state.playing;if(i&&!n.isEditor&&n.expr){var a=null,o=null,l=e===t-1;if(d.bNt.isSet(r.props))a=d.bNt.read(r.props);else{var s=d.jFN.read(n);if(a=s&&s.v,!(0,me.hj)(a))return r.seekStart(l);o=1}if((0,me.hj)(a)){var u=d.VV$.read(n),c=d.Fp7.read(n);if(null!=o&&(a=(u||0)+o*Math.round((a-(u||0))/o)+o),null!=u&&a<u)return r.seekStart(l);if(null!=c&&a>c){if(d.VXY.read(n))return r.seekStart(l);a=c,r.setState({playing:!i})}a=+a.toFixed(13)}r.write(a,l)}})),(0,V.Z)((0,ce.Z)(r),"isPlaying",(function(){return r.state.playing})),(0,V.Z)((0,ce.Z)(r),"togglePlaying",(function(){var e=r.state.playing;e||r.props.track("interact",{elementType:"timer"});var t=r.props;if(!e&&t.expr){var n=d.jFN.read(t),i=n&&n.v,a=r.state.max;(0,me.hj)(a)&&i>=a&&r.seekStart()}r.setState({playing:!e})})),r.state={},r}return(0,he.Z)(n,[{key:"componentDidMount",value:function(){this.props.thumbnailMode||ge.addTimer(this.tick,this.state.freq)}},{key:"componentWillUnmount",value:function(){ge.removeTimer(this.tick)}},{key:"write",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.props,i=null===(t=d.jFN.read(r))||void 0===t?void 0:t.v;e!==i&&d.jFN.write(r,e,!1),n&&r.model.recalculate()}},{key:"seekStart",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=null!==(e=d.VV$.read(this.props))&&void 0!==e?e:1,i=null!==(t=d.Fp7.read(this.props))&&void 0!==t?t:1,a=r+i<0?i:r;return this.write(a,n)}},{key:"render",value:function(){var e=this.props,t=e.isEditor,n=t?"Timer is never active when document is being edited.":null;return this.state.visible||t?(0,a.jsx)(_,(0,i.Z)((0,r.Z)({},e),{label:(0,a.jsx)("svg",{viewBox:"0 0 16 16",style:{verticalAlign:"-4%",height:"0.8em",width:"0.8em"},children:(0,a.jsx)("path",{d:this.state.playing?"M2,1 L6.5,1 L6.5,15 L2,15 L2,1 M9.5,1 L14,1 L14,15 L9.5,15 L9.5,1":"M5,0 L13,8 L5,16 z",fill:"currentColor"})}),title:n,disabled:this.state.isDisabled,onClick:this.props.isEditor?void 0:this.togglePlaying})):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(!e.isEditor&&e.model&&e.model.lastWrite===t.modelId)return null;var n=e.model,r=d.FG_.read(e)||1,i=t.playing,a=d.FLO.read(e);return a===t.lastAutoplay&&null!=i||(i=a),{visible:d.RrV.read(e),freq:r,playing:i,lastAutoplay:a,modelId:n.lastWrite,isDisabled:!(0,me.ud)(e.expr)||d.JUm.read(e)}}}]),n}(o.PureComponent);(0,V.Z)(xe,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,thumbnailMode:s().bool,isEditor:s().bool,className:s().string,children:s().node,expr:s().string,track:s().func}),(0,V.Z)(xe,"chartType","timer"),(0,V.Z)(xe,"options",be),(0,V.Z)(xe,"requiredOption","expr"),(0,V.Z)(xe,"isInput",!0);var ye=n(45162),ke=n(46244),we=n(85925),Ze=n(14643),_e=n(69786),je=n(18990),Se=n(43419),Ce=n(47281),Te=n(35208),Me=n(60841),Ne=n.n(Me);function Ee(e){var t=e.dimspec?Object.keys(e.dimspec):[];if(e.simple&&1===t.length){var n=e.dimspec[t[0]];return(0,a.jsxs)("div",{className:v()(Ne().simpleHoverInfo,!(e.title&&e.subtitle)&&Ne().valOnly),children:[e.title&&(0,a.jsx)("span",{className:v()(Ne().title,!e.subtitle&&Ne().titleSolo),children:e.title}),e.subtitle&&(0,a.jsx)("span",{className:Ne().subtitle,children:e.subtitle}),(0,a.jsx)("span",{className:Ne().val,children:n}),e.children&&(0,a.jsx)("div",{className:Ne().children,children:e.children})]})}return(0,a.jsxs)("div",{className:Ne().hoverInfo,children:[(0,a.jsxs)("div",{className:v()(Ne().titles,t.length>1&&Ne().titlesSpaced),children:[e.title&&(0,a.jsx)("div",{className:Ne().title,children:e.title}),e.subtitle&&(0,a.jsx)("div",{className:Ne().subtitle,children:e.subtitle}),e.swatch&&(0,a.jsx)("div",{className:v()(Ne().swatch,e.subtitle&&Ne().subtitleSwatch),style:{backgroundColor:e.swatch}})]}),(0,a.jsx)("div",{className:Ne().dims,children:t.map((function(t){var n=e.dimspec[t];return 0===n||n?(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)("span",{className:Ne().key,children:t}),(0,a.jsx)("span",{className:Ne().val,children:n})]},t):null}))}),e.children&&(0,a.jsx)("div",{className:Ne().children,children:e.children})]})}Ee.propTypes={title:s().string,subtitle:s().string,swatch:s().string,simple:s().bool,dimspec:s().object,children:s().node};var De=n(46151),Re=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"realUpdateWidth",(function(){!r.isWidthCurrent()&&r.wrapper&&r.setState({width:r.getContainerWidth()}),r._widthTime=performance.now()})),(0,V.Z)((0,ce.Z)(r),"updateWidth",(function(){if(!r.isWidthCurrent()){var e=performance.now()-r._widthTime;!r._widthTime||e>80?(clearTimeout(r._widthTimer),r._widthTimer="undefined"!==typeof queueMicrotask?queueMicrotask(r.realUpdateWidth):setTimeout(r.realUpdateWidth,0)):(clearTimeout(r._widthTimer),r._widthTimer=setTimeout(r.realUpdateWidth,80-e))}})),r.state={hover:null,width:754},r._widthTime=0,r._widthTimer,r}return(0,he.Z)(n,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.updateWidth),this.updateWidth(),this.observer=new MutationObserver(this.updateWidth),this.observer.observe(document,{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style","class"]})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateWidth),this.observer&&this.observer.disconnect()}},{key:"getContainerWidth",value:function(){if(this.wrapper){var e=Math.round(this.wrapper.offsetWidth);return Math.max(e,100)}return null}},{key:"isWidthCurrent",value:function(){return this.getContainerWidth()===this.state.width}},{key:"wrap",value:function(e){var t=this;return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({subRef:function(e){return t.wrapper=e},className:"chart"},this.props),{children:(0,a.jsx)(q.Z,{cursorPosition:this.state.hover?this.state.hover.cursorPosition:null,hoverNode:(0,a.jsx)(Ee,(0,r.Z)({},this.state.hover||{})),children:e})}))}},{key:"renderError",value:function(e,t){return this.wrap((0,a.jsx)(De.Z,(0,r.Z)({title:e,message:t,isChart:!0},this.props)))}},{key:"render",value:function(){return null}}]),n}(o.Component),Le=n(42012),We=n(22530),ze=n.n(We);function Pe(e){if(!e.text)return null;var t=e.align,n=e.textAlign,r=e.vAlign,i=e.width,l=e.height,s=e.lineHeight,u=e.text,c=e.angle,d=e.color,h=e.onClick,p=e.padding||0,f=e.x||0,v=e.y||0,m=0,g=-p;"top"===r&&(m=.71,g=p),"middle"===r&&(m=.32,g=0);var b="start",x=p;"center"===t&&(b="middle",x=0),"right"===t&&(b="end",x=-p);var y=e.size||14,k=e.font||"Source Serif Pro, Roboto, Arial, Helvetica, sans-serif";if(!i)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("text",{fontSize:y+"px",fontFamily:k,textAnchor:b,dy:m+"em",x:f+x,y:v+g,onClick:h,fill:d||"currentColor",transform:c?"rotate(".concat(c,", ").concat(f||0,", ").concat(v||0,") "):void 0,children:u}),false]});var w={width:i,height:l,align:n||t,valign:r,font:"".concat(y,"px/").concat(y*(s||1.2),"px ").concat(k),createElement:o.createElement,parser:e.format||"html"};e.overflow&&(w.overflow=e.overflow),e.overflowLine&&(w.overflowLine=e.overflowLine);var Z=new(ze())(w),_=Z.linebreak(u),j=0;"center"===t&&(j=_.width/2),"right"===t&&(j=_.width);var S=0,C=0;"bottom"===r?(C=l,S=l-_.height):"middle"===r&&(C=.5*l,S=l/2-_.height/2);var T,M=Math.max(3,.5*p);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{transform:(c?"rotate(".concat(c,", ").concat(f||0,", ").concat(v||0,")"):"")+"translate(".concat((f||0)-j+x,",").concat((v||0)-C+g,")"),fill:d||"currentColor",stroke:e.strokeColor||"none",strokeLinejoin:"round",strokeWidth:e.strokeColor?null!==(T=e.strokeWidth)&&void 0!==T?T:2:null,paintOrder:"stroke",onClick:h,children:[e.backgroundColor&&(0,a.jsx)("rect",{rx:6,x:-M,y:-M+S,width:_.width+2*M,height:_.height+2*M,fill:e.backgroundColor,fillOpacity:e.backgroundOpacity,stroke:"none"}),(0,a.jsx)("g",{fillOpacity:e.opacity,children:Z.render(_)})]}),false]})}Pe.defaultProps={opacity:1,backgroundOpacity:1},Pe.propTypes={x:s().number,y:s().number,text:s().oneOfType([s().string,s().number]),color:s().string,strokeColor:s().string,opacity:s().number,strokeWidth:s().number,backgroundColor:s().string,backgroundOpacity:s().number,vAlign:s().oneOf(["top","bottom","middle"]),align:s().oneOf(["left","right","center"]),textAlign:s().oneOf(["left","right","center"]),lineHeight:s().number,size:s().number,width:s().number,angle:s().number,padding:s().number,height:s().number,overflow:s().string,overflowLine:s().string,font:s().string,debug:s().bool,format:s().oneOf(["html","latex","text"]),onClick:s().func};var Ae,Ve=n(9089),Fe=n(82222),Be=n(81035);try{var Ie=document.createElement("canvas").getContext("2d");Ae=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"14px Roboto, Arial, Helvetica";return Ie?(Ie.font=t,Ie.measureText(e).width):5.5*String(e).length}}catch(Oa){Ae=function(e){return 5.5*String(e).length}}var Oe=Ae;function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0,r=1/0,i=n;if(e)for(var a=0;a<e.length;a++)if(null!=e[a]){var o=Oe(e[a],t);if(o>r)return r;o>i&&(i=o)}return i}var He=n(918),qe=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=this;(0,de.Z)(this,e),(0,V.Z)(this,"name",""),(0,V.Z)(this,"title",""),(0,V.Z)(this,"format",null),(0,V.Z)(this,"scale",(0,He.Z)()),(0,V.Z)(this,"reverse",!1),(0,V.Z)(this,"locale","en-US"),(0,V.Z)(this,"orient",null),(0,V.Z)(this,"preferGrid",!1),(0,V.Z)(this,"maxWidth",150),(0,V.Z)(this,"disabled",!1),(0,V.Z)(this,"scaleByValue",(function(e){return r.scale(e)})),this.name=t,this.style={},this.applyStyle(n)}return(0,he.Z)(e,[{key:"applyStyle",value:function(e){this.style=Object.assign({},Le.n_,e),this.style&&!this.style.ticks&&(this.style.ticks="none")}},{key:"size",get:function(){var e=this.range(),t=Math.abs(e[0]-e[1]);return isFinite(t)?t:0}},{key:"hasTicks",get:function(){return this.style.ticks&&"none"!==this.style.ticks}},{key:"tickSpace",get:function(){return"across"===this.style.ticks?Math.ceil(this.style.tickSize/2):"inside"===this.style.ticks?0:this.hasTicks?this.style.tickSize:0}},{key:"titleSpace",get:function(){var e=this.style,t="center"===e.titlePosition;return this.title&&(t||this.horizontal)?1*e.titleFontSize:0}},{key:"error",get:function(){return null}},{key:"horizontal",get:function(){return"top"===this.orient||"bottom"===this.orient}},{key:"font",get:function(){var e=this.style,t=Math.round(e.fontSize*e.lineHeight*10)/10;return"".concat(e.fontSize,"px/").concat(t,"px ").concat(e.fontFamily)}},{key:"labelMaxWidth",get:function(){return 30}},{key:"labelMaxHeight",get:function(){return this.style.fontSize*this.style.lineHeight}},{key:"width",get:function(){return this.disabled?0:"left"===this.orient||"right"===this.orient?this.tickSpace+this.style.gutterSize+this.labelMaxWidth+(this.titleSpace?this.style.gutterSize:0)+this.titleSpace:this.size}},{key:"height",get:function(){return this.disabled?0:"top"===this.orient||"bottom"===this.orient?this.tickSpace+this.style.gutterSize+this.labelMaxHeight+(this.titleSpace?this.style.gutterSize:0)+this.titleSpace:this.size}},{key:"getTicks",value:function(){return[]}},{key:"range",value:function(e){if(!e)return this.scale.range();this.scale.range(e)}},{key:"labelData",value:function(e){if(!e)return this._labelData;this._labelData=e}}]),e}(),Ye=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e,r){var i;return(0,de.Z)(this,n),i=t.call(this,e,r),(0,V.Z)((0,ce.Z)(i),"preferGrid",!0),(0,V.Z)((0,ce.Z)(i),"clipMin",null),(0,V.Z)((0,ce.Z)(i),"clipMax",null),i.scale=(0,He.Z)(),i}return(0,he.Z)(n,[{key:"zero",get:function(){return 0}},{key:"labelMaxHeight",get:function(){return this.style.fontSize*this.style.lineHeight}},{key:"labelMaxWidth",get:function(){var e=this.getTicks();if(!e.length)return 0;var t=0,n=this.font,r=!0,i=!1,a=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done);r=!0){var s=o.value,u=Oe(s.label,n);u>t&&(t=Math.ceil(u))}}catch(Oa){i=!0,a=Oa}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}return t}},{key:"getTicks",value:function(){var e=this,t=this.scale,n=this.size,r=this.format||"",i={locale:this.locale,throws:!1,nbsp:!0},a=5;if(this.horizontal){if(n<350&&(a=3),n<250&&(a=2),n<150)return[];if(n<200){var o=t.domain();return isFinite(o[0])&&isFinite(o[0])?[{index:0,value:o[0],minor:!1,pos:this.scale(o[0]),label:(0,O.WU)(r,o[0],i),align:"left"},{index:1,value:o[1],minor:!1,pos:this.scale(o[1]),label:(0,O.WU)(r,o[1],i),align:"right"}]:[]}}else n<250&&(a=4),n<200&&(a=3),n<150&&(a=2),n<100&&(a=0);return t.ticks(a).map((function(t,n){return{index:n,value:t,minor:!1,pos:e.scale(t),label:(0,O.WU)(r,t,i)}}))}},{key:"isClipped",get:function(){return null!=this.clipMin||null!=this.clipMax}},{key:"domain",value:function(e,t){if(!e){var n,r,i=this.scale.domain();return[null!==(n=this.clipMin)&&void 0!==n?n:i[0],null!==(r=this.clipMax)&&void 0!==r?r:i[1]]}var a=t?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(0,F.Z)(e,2),r=n[0],i=n[1];return i<t?[r,t]:r>t?[t,i]:e}(e):function(e){var t=(0,F.Z)(e,2),n=t[0],r=t[1];return n>0&&n/r<.2?[0,r]:r<0&&r/n<.2?[n,0]:e}(e);null!=this.clipMin&&(a[0]=this.clipMin),null!=this.clipMax&&(a[1]=this.clipMax),this.scale.domain(this.reverse?a.reverse():a)}},{key:"range",value:function(e){if(!e)return this.scale.range();this.scale.rangeRound(e)}}]),n}(qe);function Xe(e,t){return e&&t&&e<0===t<0}var Ge=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e,r){var i;return(0,de.Z)(this,n),i=t.call(this,e,r),(0,V.Z)((0,ce.Z)(i),"preferGrid",!0),i.scale=(0,Be.Z)(),i}return(0,he.Z)(n,[{key:"zero",get:function(){var e=(0,F.Z)(this.scale.domain(),2),t=e[0],r=e[1];return Math.abs(t)<Math.abs(r)?n.logZero(t):n.logZero(r)}},{key:"error",get:function(){var e=this.scale.domain();return Xe(e[0],e[1])?null:"A logarithmic axis may not include a zero."}},{key:"getTicks",value:function(){var e,t=this,n=this.scale;this.horizontal||(e=4);var r=n.ticks(e),i=n.range(),a=Math.max(i[0],i[1])-Math.min(i[0],i[1]),o=this.format||"";if(this.error)return[{index:0,value:NaN,minor:!1,pos:a/2,label:"#DIV/0!"}];var l=1,s=Math.abs(function(e){var t=(0,F.Z)(e.domain(),2),n=t[0],r=t[1],i=Math.floor(Math.log(Math.abs(n)+1e-6)/Math.LN10);return Math.floor(Math.log(Math.abs(r)+1e-6)/Math.LN10)-i}(n));a/(s+1)>100&&(l=5);var u=0,c={locale:this.locale,throws:!1,nbsp:!0};if(r=r.map((function(e,n){var r=Math.abs(e),i=Math.pow(10,Math.floor(Math.log(r+1e-6)/Math.LN10)),a=r/i<=1,s=a||r/i<=l;return s&&u++,{index:n,value:e,minor:!a,grid:a||1!==l,pos:t.scale(e),label:s?(0,O.WU)(o,e,c):""}})),!u&&r.length){var d=r.length-1;r[0].label=(0,O.WU)(o,r[0].value,c),r[d].label=(0,O.WU)(o,r[d].value,c)}else if(this.horizontal&&r.length>1){var h=!1,p=r.filter((function(e){return e.label}));p.forEach((function(e){e.width=Oe(e.label,t.font)}));for(var f=p[0],v=1;v<p.length;v++){var m=p[v];if(h){if(m.minor){m.label="";continue}h=!1}m.pos-m.width/2-(f.pos+f.width/2)<8&&(m.minor&&!f.minor?(m.label="",h=!0):!m.minor&&f.minor?(f.label="",h=!0):m.value>f.value?(m.label="",h=!0):m.value<f.value&&(f.label="",h=!0)),m.label&&(f=m)}}return r}},{key:"domain",value:function(e,t){var n,r;if(!e){var i,a,o=this.scale.domain();return[null!==(i=this.clipMin)&&void 0!==i?i:o[0],null!==(a=this.clipMax)&&void 0!==a?a:o[1]]}var l=(n=Math).min.apply(n,(0,B.Z)(e)),s=(r=Math).max.apply(r,(0,B.Z)(e)),u=[l,s];if(Xe(l,s)){var c=Math.min(Math.abs(l),Math.abs(s)),d=Math.floor(Math.log10(Math.abs(c))),h=c/Math.pow(10,d+1)<.25;(t||h)&&(u[Math.sign(l)<0?1:0]=Math.pow(10,d)*Math.sign(l))}null!=this.clipMin&&(u[0]=this.clipMin),null!=this.clipMax&&(u[1]=this.clipMax),this.scale.domain(this.reverse?u.reverse():u)}}]),n}(Ye);Ge.logZero=function(e){var t=Math.floor(Math.log10(Math.abs(e)));return Math.pow(10,t)*Math.sign(e)};var Ke=n(4447),Je=n(79937);function $e(e){var t=e.byPoint,n=e.palette,r=e.backgroundColor,i=function(e){return n[(e||0)%n.length]};if(t){var a=(0,Ke.ZP)(r||"#fff");return function(e,t){var n=i(t),r=e%6*(1/6);return(0,Je.Z)(n,a)(r)}}return i}function Qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e||!Array.isArray(e[0]))return[];var n=e[0].length,r=e.length;return"row"===t?e.map((function(e){return e[0]})):"col"===t?e[0]:r>1&&1===n?e.map((function(e){return e[0]})):1===r&&n>1||n<r?e[0]:e.map((function(e){return e[0]}))}var et=function(e){var t=e&&(0,Fe.Z)(e.v);return"number"===t||"boolean"===t||null},tt=function(e){return!(e&&e.length&&e[0].length)};function nt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row";return e&&Array.isArray(e[0])?1===e.length&&0===e[0].length?[]:e.length>1&&1===e[0].length?e.map((function(e){return e[0]})):1===e.length&&e[0].length>1?e[0].map((function(e){return e})):"row"===t?e.map((function(e){return e[e.length-1]})):"col"===t?e[e.length-1].concat([]):[]:null}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=nt(e,t);return i?i.map((function(e){return(0,me.Mm)(e,n,r)})):i}function it(e,t){for(var n=(0,F.Z)(t,2),r=n[0],i=n[1],a=[],o=1/0,l=-1/0,s=0;s<r;s++){for(var u=0,c=0,d=0;d<i;d++){var h=e[d][s],p=h.v;p<0?(h.base=c,c+=p):(h.base=u,u+=p),o>p&&(o=p),l<p&&(l=p)}u&&a.push({v:u}),c&&a.push({v:c})}isFinite(o)&&a.push({v:o}),isFinite(l)&&a.push({v:l});var f=a.reduce((function(e,t){var n=Ge.logZero(t.v);return Math.abs(n)<Math.abs(e.v)?{v:n}:e}),{v:1/0});return isFinite(f.v)&&a.push(f),a}function at(e){e.forEach((function(e){for(var t=0;t<e.length;t++)if(null==e[t].v){for(var n=t;n<e.length;n++){if(!e[n].gap)break}if(t>0&&n<e.length)for(var r=e[t-1].v,i=e[n].v,a=n-t,o=0;o<a;o++){var l=(o+1)/(a+1);e[t+o].v=r*(1-l)+i*l}t=n}}))}var ot=n(47808),lt=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e,r){var i;(0,de.Z)(this,n),i=t.call(this,e,r),(0,V.Z)((0,ce.Z)(i),"scaleByValue",(function(e){if(null==e)return NaN;if(i._labelData){var t=i._labelData.findIndex((function(t){return t&&t.v===e}));return i.scale(t)}return i.scale(e-1)}));var a=(0,ot.Z)().paddingOuter(.1).paddingInner(.1);return i.scale=function(e){return a(e)+.5*a.bandwidth()},i.scale.bandwidth=function(){return a.bandwidth()},i.scale.domain=function(e){return e?a.domain(e):a.domain()},i.scale.range=function(e){return e?a.range(e):a.range()},i.scale.ticks=function(e){return a.ticks(e)},i}return(0,he.Z)(n,[{key:"labelMaxWidth",get:function(){var e=this.getTicks(),t=0;return e.forEach((function(e){e.lines&&e.lines.width>t&&(t=e.lines.width)})),Math.ceil(t)}},{key:"labelMaxHeight",get:function(){var e=this.getTicks().reduce((function(e,t){return Math.max(e,t.lines?t.lines.length:1)}),0);return this.style.fontSize*this.style.lineHeight*e}},{key:"domain",value:function(e){if(!e)return this.scale.domain();this.scale.domain(this.reverse?e.reverse():e)}},{key:"bandwidth",value:function(){return this.scale.bandwidth()}},{key:"getTicks",value:function(){var e=this,t=this.scale,n=this.size,r=t.domain();if(!r.length)return[];var i=r[0],a=r[r.length-1]<i,l=this.format||"",s=this.locale,u=this._labelData;u&&(r=r.slice(0,u.length));var c=0,d=!!u&&this.horizontal;r=r.map((function(e,n){var r=u?(0,me.Mm)(u[e],l,s):(0,O.WU)(l,e+1,{locale:s,throws:!1,nbsp:!0});return r.length>c&&(c=r.length),d&&/[\s;\xAD%?\u2026\xb4\xb1\xb0\xa2\xa3\xa4$\xa5\u2212]/.test(r)&&(d=!1),{index:n,value:e,minor:!1,pos:t(e),label:r}}));var h=u?40:25;d&&(h=Ue([r.find((function(e){return e.label.length===c})).label],this.font));if(this.horizontal){if(u){var p=r,f=(n-10*r.length)/r.length;if(f<h&&c>1){var v=Math.floor(n/Math.ceil(h+10)),m=Math.ceil(r.length/v);p=[];for(var g=0;g<r.length;g+=m)p.push(r[g]);f=(n-10*p.length)/p.length}var b=new(ze())({width:f,align:"center",height:this.style.fontSize*this.style.lineHeight*3,font:this.font,createElement:o.createElement,parser:"text",overflowLine:".",overflow:"."});return p.forEach((function(t){t.lines=b.linebreak(t.label),t.lines.length>1&&(e.lines=2)})),p}var x=r.length,y=Ue([r[0].label,r[~~(x/2)].label,r[x-1].label],this.font);if(y+5>n/x){var k=Math.floor(n/Math.ceil(y+8.5)),w=Math.ceil(x/k),Z=w,_=Math.floor(Math.log(w)/Math.LN10);if(_>=2){var j=Math.pow(10,_),S=w/j;Z=j*(S=S<=1?1:S<=1.5?1.5:S<=2?2:S<=2.5?2.5:S<=3?3:S<=4?4:S<=5?5:10)}else w<=1?Z=1:w<=2?Z=2:w<=5?Z=5:w<=10?Z=10:w<=20?Z=20:w<=25?Z=25:w<=50?Z=50:w<=100&&(Z=100);for(var C=a?[]:[r[0]],T=0;T<x+1;T+=Z){var M=T-1;r[M]&&C.push(a?r[x-1-M]:r[M])}a&&C.length>1&&Z>2&&C.push(r[r.length-1]),r=C}}else{var N=this.font,E=r.reduce((function(e,t){return Math.max(Oe(t.label,N)+3,e)}),0),D=Math.min(E,this.maxWidth||0),R=new(ze())({width:D,height:Math.max(20,Math.round(n/(r.length||1))-10),align:"right",x:-D,font:N,createElement:o.createElement,parser:"text",overflowLine:".",overflow:"."});r.forEach((function(e){e.lines=R.linebreak(e.label)}))}return r}},{key:"labels",get:function(){if(this._labelData){var e=this.format||null,t=this.locale||"en-US";return this._labelData.map((function(n){return(0,me.Mm)(n,e,t)}))}return null}}]),n}(qe),st={log:1,logarithmic:1};var ut={v:null};function ct(e){if(Array.isArray(e)){var t,n=e[0].length-(e.emptyRight||0),r=e.length-(e.emptyBottom||0);if(n*r===0)t=Object.assign((function(){return ut}),{size:1});else if(1===n&&1===r){var i;t=Object.assign((function(){return null!==(i=e[0][0])&&void 0!==i?i:ut}),{size:r})}else if(1===n||n<r)t=Object.assign((function(t){return null!=t&&e[t]?e[t][0]:ut}),{size:r});else{var a;t=Object.assign((function(t){return null!==(a=e[0][null!==t&&void 0!==t?t:-1])&&void 0!==a?a:ut}),{size:n})}return t}var o=function(){return{v:e}};return o.size=1,o}function dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"anno-grad";return(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:e+"-y",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:"#F5F5F5",stopOpacity:0}),(0,a.jsx)("stop",{offset:"20%",stopColor:"#D8D9E5",stopOpacity:.2}),(0,a.jsx)("stop",{offset:"80%",stopColor:"#D8D9E5",stopOpacity:.2}),(0,a.jsx)("stop",{offset:"100%",stopColor:"#F5F5F5",stopOpacity:0})]}),(0,a.jsxs)("linearGradient",{id:e+"-x",gradientTransform:"rotate(90)",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:"#F5F5F5",stopOpacity:0}),(0,a.jsx)("stop",{offset:"20%",stopColor:"#D8D9E5",stopOpacity:.2}),(0,a.jsx)("stop",{offset:"80%",stopColor:"#D8D9E5",stopOpacity:.2}),(0,a.jsx)("stop",{offset:"100%",stopColor:"#F5F5F5",stopOpacity:0})]})]})}Object.freeze(ut);var ht={xrange:"yrange",yrange:"xrange",xline:"yline",yline:"xline"};function pt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{flipXY:!1}).flipXY,n=t?"y1":"x1",r=t?"y2":"x2",i=t?"x1":"y1",a=t?"x2":"y2",o=[],l=1;return e.forEach((function(e){var s=e.type,u=e.title,c=e.visible,d=ct(u),h=ct(c),p=[];if("point"!==s&&"area"!==s&&"xline"!==s&&"xrange"!==s||p.push([n,ct(e.x1)]),"point"!==s&&"area"!==s&&"yline"!==s&&"yrange"!==s||p.push([i,ct(e.y1)]),"xrange"!==s&&"area"!==s||p.push([r,ct(e.x2)]),"yrange"!==s&&"area"!==s||p.push([a,ct(e.y2)]),p.length)for(var f,v=(f=Math).max.apply(f,(0,B.Z)(p.map((function(e){return e[1].size})))),m=0;m<v;m++){for(var g,b={type:t&&null!==(g=ht[s])&&void 0!==g?g:s,id:l++},x=0,y=0;y<p.length;y++){var k=(0,F.Z)(p[y],2),w=k[0],Z=(0,k[1])(m);if(b[w]=Z.v,null==Z.v)break;x+=1}if(x===p.length){var _=d(m);b.title=_&&null!=_.v?(0,me.Mm)(_):null;var j,S=h(m);b.visible=null!=S&&!(null!==(j=S.v)&&void 0!==j&&!j),o.push(b)}}})),o}var ft={NE:["left","bottom",1,-1],N:["center","bottom",0,-1],NW:["right","bottom",-1,-1],W:["right","middle",-1,0],SW:["right","top",-1,1],S:["center","top",0,1],SE:["left","top",1,1],E:["left","middle",1,0]};function vt(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,i=(0,F.Z)(t,4),a=i[0],o=i[1],l=i[2],s=i[3],u=(0,F.Z)(n,4),c=u[0],d=u[1],h=u[2],p=u[3],f=0;f<e.length;f++){var v=ft[e[f]],m=a-.5*l+v[2]*(.5*l+r),g=o-.5*s+v[3]*(.5*s+r),b=m+l,x=g+s;if(m>=c&&b<c+h&&g>=d&&x<d+p)return v}return ft[e[0]]||ft.N}function mt(e){var t,n,r,i,o,l=e.x,s=e.y,u=e.data;if(!e.visible||!u||!u.length)return null;var c,d,h=!!e.debug,p="bar"===e.pointMark,f="column"===e.pointMark,v=!p&&!f,m=e.bandWidth,g=l.scale.range(),x=s.scale.range(),y=(t=Math).max.apply(t,(0,B.Z)(x)),k=(n=Math).min.apply(n,(0,B.Z)(x)),w=(r=Math).max.apply(r,(0,B.Z)(g)),Z=(i=Math).min.apply(i,(0,B.Z)(g)),_=(w-Z)/4,j=.45*(y-k),S=null!==(c=null===(o=e.styles)||void 0===o?void 0:o.annotation)&&void 0!==c?c:Le.Ce,C=null!==(d=S.fontSize)&&void 0!==d?d:14,T=S.fontFamily||e.styles.fontStack,M=u.some((function(e){return"xrange"===e.type||"yrange"===e.type}));return(0,a.jsxs)("g",{className:"annotations",pointerEvents:"none",children:[M&&dt(),u.map((function(e){var t=e.type;if(!1===e.visible)return null;var n,r=l.scaleByValue(e.x1),i=l.scaleByValue(e.x2);i<r&&(r=(n=[i,r])[0],i=n[1]);var o,u=s.scaleByValue(e.y1),c=s.scaleByValue(e.y2);c<u&&(u=(o=[c,u])[0],c=o[1]);if("point"===t){if(r<Z||r>w||u<Z||u>y||isNaN(r)||isNaN(u))return null;var d=f?["E","W","N","S","NE","NW","SW","SE"]:["N","S","E","W","NE","NW","SW","SE"],g=(0,F.Z)(vt(d,[r,u,_,j],[Z,k,w-Z,y-Z]),4),x=g[0],M=g[1],N=g[2],E=g[3];return(0,a.jsxs)("g",{shapeRendering:"geometricPrecision",children:[f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("rect",{rx:3,fill:S.bar.background,fillOpacity:S.bar.backgroundOpacity,x:r-m/2-4,y:u-2,width:m+8,height:4}),(0,a.jsx)("line",{stroke:S.bar.color,strokeDasharray:S.bar.dashArray,strokeOpacity:S.bar.opacity,strokeWidth:1.3,y1:u,y2:u,x1:r-m/2,x2:r+m/2})]}),p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("rect",{rx:3,fill:S.bar.background,fillOpacity:S.bar.backgroundOpacity,x:r-2,y:u-m/2-4,width:4,height:m+8}),(0,a.jsx)("line",{stroke:S.bar.color,strokeDasharray:S.bar.dashArray,strokeOpacity:S.bar.opacity,strokeWidth:1.3,y1:u-m/2,y2:u+m/2,x1:r,x2:r})]}),v&&(0,a.jsx)("circle",{r:8,fill:S.point.color,fillOpacity:S.point.opacity,cx:r,cy:u}),(0,a.jsx)(Pe,{size:C,font:T,lineHeight:1.15,x:r+8*N+(f?N*m/2:0),y:u+8*E+(p?E*m/2:0),padding:8,color:S.label.color,opacity:S.label.opacity,backgroundColor:S.label.background,backgroundOpacity:S.label.backgroundOpacity,vAlign:M,align:x,textAlign:"left",width:_,height:j,text:e.title,debug:h,overflowLine:"ellipsis",overflow:"ellipsis"})]},"note-"+e.id)}if("yline"===t){if(u<k||u>y||isNaN(u))return null;var D=(0,F.Z)(vt(["N","NW","NE","S","SE","SW"],[w,u,_,j],[Z,k,w-Z,y-Z]),2),R=D[0],L=D[1];return(0,a.jsxs)("g",{children:[(0,a.jsx)("line",{className:"note-"+t,stroke:S.line.color,strokeDasharray:S.line.dashArray,strokeOpacity:S.line.opacity,y1:u,y2:u,x1:Z,x2:w}),(0,a.jsx)(Pe,{size:C,font:T,lineHeight:1.15,x:w,y:u,padding:8,color:S.label.color,opacity:S.label.opacity,text:e.title,debug:h,backgroundColor:S.label.background,backgroundOpacity:S.label.backgroundOpacity,vAlign:L,align:R,textAlign:"left",width:_,height:j,overflowLine:"ellipsis",overflow:"ellipsis"})]},"note-"+e.id)}if("xline"===t){if(r<Z||r>w||isNaN(r))return null;var W=(0,F.Z)(vt(["SW","SE","S","E","W"],[r,k,_,j],[Z,k,w-Z,y-Z]),2),z=W[0],P=W[1];return(0,a.jsxs)("g",{children:[(0,a.jsx)("line",{stroke:S.line.color,strokeDasharray:S.line.dashArray,strokeOpacity:S.line.opacity,y1:k,y2:y,x1:r,x2:r}),(0,a.jsx)(Pe,{size:C,font:T,lineHeight:1.15,x:r,y:k,padding:8,color:S.label.color,opacity:S.label.opacity,text:e.title,debug:h,backgroundColor:S.label.background,backgroundOpacity:S.label.backgroundOpacity,vAlign:P,align:z,textAlign:"left",width:_,height:j,overflowLine:"ellipsis",overflow:"ellipsis"})]},"note-"+e.id)}return"yrange"===t?isNaN(u)||isNaN(c)||(u<k||u>y)&&(c<k||c>y)?null:(u=b(k,u,y),c=b(k,c,y),(0,a.jsxs)("g",{children:[(0,a.jsx)("polygon",{fill:"url(#anno-grad-y)",points:"".concat(Z,",").concat(u," ").concat(w,",").concat(u," ").concat(w,",").concat(c," ").concat(Z,",").concat(c)}),(0,a.jsx)("line",{stroke:S.line.color,strokeDasharray:S.line.dashArray,strokeOpacity:S.line.opacity,y1:u,y2:u,x1:Z,x2:w}),(0,a.jsx)("line",{stroke:S.line.color,strokeDasharray:S.line.dashArray,strokeOpacity:S.line.opacity,y1:c,y2:c,x1:Z,x2:w}),(0,a.jsx)(Pe,{size:C,font:T,x:w,y:u-1-5+(c-u)/2,padding:5,color:S.label.color,opacity:S.label.opacity,vAlign:"middle",align:"right",textAlign:"left",text:e.title,debug:h})]},"note-"+e.id)):"xrange"===t?isNaN(r)||isNaN(i)||(r<Z||r>w)&&(i<Z||i>y)?null:(r=b(Z,r,w),i=b(Z,i,w),(0,a.jsxs)("g",{children:[(0,a.jsx)("polygon",{fill:"url(#anno-grad-x)",points:"".concat(r,",").concat(k," ").concat(r,",").concat(y," ").concat(i,",").concat(y," ").concat(i,",").concat(k)}),(0,a.jsx)("line",{stroke:S.line.color,strokeDasharray:S.line.dashArray,strokeOpacity:S.line.opacity,y1:k,y2:y,x1:r,x2:r}),(0,a.jsx)("line",{stroke:S.line.color,strokeDasharray:S.line.dashArray,strokeOpacity:S.line.opacity,y1:k,y2:y,x1:i,x2:i}),(0,a.jsx)(Pe,{size:C,font:T,x:r+(i-r)/2,y:u+5,padding:5,color:S.label.color,opacity:S.label.opacity,vAlign:"middle",align:"center",textAlign:"left",text:e.title,debug:h})]},"note-"+e.id)):"area"===t?(u<k||u>y)&&(c<k||c>y)||(r<Z||r>w)&&(i<Z||i>y)||isNaN(u)||isNaN(c)||isNaN(r)||isNaN(i)?null:(r=b(Z,r,w),i=b(Z,i,w),u=b(k,u,y),c=b(k,c,y),(0,a.jsxs)("g",{children:[(0,a.jsx)("polygon",{fill:"url(#anno-grad-xy)",stroke:S.line.color,points:"".concat(r,",").concat(u," ").concat(r,",").concat(c," ").concat(i,",").concat(c," ").concat(i,",").concat(u)}),(0,a.jsx)(Pe,{size:C,font:T,x:i,y:u-1-5,padding:5,color:S.label.color,opacity:S.label.opacity,vAlign:"middle",align:"right",textAlign:"left",text:e.title,debug:h})]},"note-"+e.id)):null}))]})}function gt(e){var t=e.id,n=e.width,r=e.height,i=e.children,o=e.active;return void 0!==o&&o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:t,children:(0,a.jsx)("rect",{x:"0",y:"0",width:n,height:r})})}),(0,a.jsx)("g",{clipPath:"url(#".concat(t,")"),children:i})]}):i}function bt(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function xt(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1/0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return!0},o=1/0,l=null;return e&&e.length&&e.forEach((function(e){e.forEach((function(e){if(a(e)){var s=bt([n(e),r(e)],t);s<i&&s<o&&(o=s,l=e)}}))})),l}mt.propTypes={visible:s().bool,debug:s().bool,x:s().instanceOf(qe).isRequired,y:s().instanceOf(qe).isRequired,styles:s().object,data:s().array,pointMark:s().oneOf(["bar","column","dot"]),bandWidth:s().number},mt.defaultProps={pointMark:"dot",visible:!0},gt.propTypes={id:s().string.isRequired,width:s().number.isRequired,height:s().number.isRequired,active:s().bool};var yt=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onPoint",(function(e){var t=(0,Te.Ro)(e,e.target),n=r.props,i=n.x,a=n.y,o=[t.left||0,t.top||0],l=xt(r.props.series,o,i,a,40,r.props.defined);l?(r.setState({target:l}),r.props.onPoint(l,e)):(r.setState({target:null}),r.props.onUnPoint(null,e))})),(0,V.Z)((0,ce.Z)(r),"onUnPoint",(function(e){r.setState({target:null}),r.props.onUnPoint(null,e)})),r.state={target:null},r}return(0,he.Z)(n,[{key:"shouldComponentUpdate",value:function(e,t){return!(!e.visible&&!this.props.visible)&&(0,me.dm)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,r=e.x,i=e.y,o=e.r,l=e.fill,s=e.stroke,u=e.shape;if(!e.visible)return null;var c=this.state.target,d=this.props.strokeWidth;null==d&&(d="line"===u?1.3:1);var h=(0,me.Yq)(o,3),p=(0,me.Yq)(l,"currentColor"),f=(0,me.Yq)(s,void 0),v=c&&h(c)||0;return(0,a.jsxs)("g",{pointerEvents:"all",onMouseMove:this.onPoint,onMouseLeave:this.onUnPoint,children:[(0,a.jsx)("rect",{width:t,height:n,fill:"none",pointerEvents:"all"}),!!c&&"line"===u&&(0,a.jsx)("line",{x1:r(c),x2:r(c),y1:i(c)-v,y2:i(c)+v,stroke:f(c),strokeWidth:d,strokeOpacity:.8,r:v}),!!c&&"circle"===u&&(0,a.jsx)("circle",{cx:r(c),cy:i(c),fill:p(c),stroke:f(c),strokeWidth:d,r:v})]})}}]),n}(o.Component);(0,V.Z)(yt,"propTypes",{visible:s().bool,defined:s().func,x:s().func.isRequired,y:s().func.isRequired,r:s().oneOfType([s().func,s().number]),fill:s().oneOfType([s().func,s().string]),stroke:s().oneOfType([s().func,s().string]),series:s().array,shape:s().oneOf(["circle","line"]),strokeWidth:s().number,height:s().number,width:s().number,onPoint:s().func,onUnPoint:s().func}),(0,V.Z)(yt,"defaultProps",{visible:!0,onPoint:function(){},onUnPoint:function(){},shape:"circle",r:3});var kt=function(e){return e.lines&&(e.lines.hasLineOverflow||e.lines.hasOverflow)};function wt(e){var t=e.data,n=t.style;if(t.disabled)return null;var r=t.hasTicks,i=r&&n.domainTicks,o=t.style.gutterSize,l=t.tickSpace+o,s="center"===n.titlePosition,u=t.titleSpace,c=n.lineHeight,d=n.fontSize,h=n.color,p=t.scale,f=t.orient,v=t.height,m=p.range(),g="translate(".concat(e.x||0,",").concat(e.y||0,")"),b=t.title&&String(t.title),x=t.getTicks(),y=m[1]-m[0],k=r?n.tickSize:0,w=0;if("across"===n.ticks?w=-k/2:"inside"===n.ticks?w="bottom"===f||"right"===f?-k:0:"outside"===n.ticks&&(w="bottom"===f||"right"===f?0:-k),"bottom"===f){var Z=(y-7*x.length)/x.length;return(0,a.jsxs)("g",{className:"axis",transform:g,children:[(0,a.jsx)(Pe,{align:s?"center":"right",x:s?m[0]+.5*y:m[1],y:v-.5*t.titleSpace,vAlign:"middle",size:n.titleFontSize,color:h,text:b,font:n.fontStack,debug:e.debug}),n.axisLine&&(0,a.jsx)("line",{stroke:h,className:"baseline",strokeLinecap:"round",x2:m[1]}),i&&(0,a.jsxs)("g",{className:"domain",stroke:h,children:[(0,a.jsx)("line",{strokeLinecap:"round",x1:m[0],x2:m[0],y1:w,y2:w+k}),(0,a.jsx)("line",{strokeLinecap:"round",x1:m[1],x2:m[1],y1:w,y2:w+k})]}),e.debug&&null,x.map((function(e){return(0,a.jsxs)("g",{className:"tick",opacity:"1",fill:h,transform:"translate(".concat(e.pos,",0)"),children:[kt(e)?(0,a.jsx)("title",{children:e.label}):null,r&&(0,a.jsx)("line",{strokeLinecap:"round",stroke:h,y1:w,y2:w+k*(e.minor?.5:1)}),e.lines?(0,a.jsx)("g",{fill:h,transform:"translate(".concat(-Z/2,",").concat(l,")"),children:e.lines.render()}):(0,a.jsx)(Pe,{size:d,font:n.fontStack,y:l+t.labelMaxHeight/2,color:h,vAlign:"middle",align:"center",text:e.label})]},"x:"+e.index)}))]})}return"left"===f?(0,a.jsxs)("g",{className:"axis",transform:g,children:[(0,a.jsx)(Pe,{align:s?"center":"left",vAlign:s?"middle":null,x:s?-t.width+u-.5*n.titleFontSize:0,y:s?m[0]+.5*y:-5,angle:s?-90:null,size:n.titleFontSize,text:b,color:h,font:n.fontStack,debug:e.debug}),i&&(0,a.jsxs)("g",{className:"domain",stroke:h,children:[(0,a.jsx)("line",{strokeLinecap:"round",y1:m[0],y2:m[0],x1:w,x2:w+k}),(0,a.jsx)("line",{strokeLinecap:"round",y1:m[1],y2:m[1],x1:w,x2:w+k})]}),n.axisLine&&(0,a.jsx)("line",{stroke:h,strokeLinecap:"round",className:"baseline",y1:m[0],y2:m[1]}),e.debug&&null,x.map((function(e){var t=e.pos,i=e.lines||{},o=(i.length||1)*d*c;return(0,a.jsxs)("g",{className:"tick",opacity:"1",transform:"translate(0,".concat(t,")"),children:[kt(e)?(0,a.jsx)("title",{children:e.label}):null,r&&(0,a.jsx)("line",{strokeLinecap:"round",stroke:h,x1:e.minor?w+.5*k:w,x2:w+k}),e.lines?(0,a.jsx)("g",{fill:h,transform:"translate(".concat(-l,",").concat(-o/2,")"),children:i.render()}):(0,a.jsx)(Pe,{size:d,font:n.fontStack,x:-l,color:h,vAlign:"middle",align:"right",text:e.label})]},"y:"+e.index)}))]}):"right"===f?(0,a.jsxs)("g",{className:"axis",transform:g,children:[(0,a.jsx)(Pe,{align:s?"center":"right",vAlign:s?"middle":null,x:s?t.width-u+.5*n.titleFontSize:0,y:s?m[0]+.5*y:-5,angle:s?90:null,size:n.titleFontSize,text:b,color:h,font:n.fontStack,debug:e.debug}),i&&(0,a.jsxs)("g",{className:"domain",stroke:h,children:[(0,a.jsx)("line",{strokeLinecap:"round",y1:m[0],y2:m[0],x1:w,x2:w+k}),(0,a.jsx)("line",{strokeLinecap:"round",y1:m[1],y2:m[1],x1:w,x2:w+k})]}),n.axisLine&&(0,a.jsx)("line",{stroke:h,strokeLinecap:"round",className:"baseline",y1:m[0],y2:m[1]}),e.debug&&null,x.map((function(e){var t=e.pos,i=e.lines||{},o=(i.length||1)*d*c;return(0,a.jsxs)("g",{className:"tick",opacity:"1",transform:"translate(0,".concat(t,")"),children:[kt(e)?(0,a.jsx)("title",{children:e.label}):null,r&&(0,a.jsx)("line",{strokeLinecap:"round",stroke:h,x1:e.minor?w+.5*k:w,x2:w+k}),e.lines?(0,a.jsx)("g",{fill:h,transform:"translate(".concat(l,",").concat(-o/2,")"),children:i.render()}):(0,a.jsx)(Pe,{size:d,font:n.fontStack,x:l,color:h,vAlign:"middle",align:"left",text:e.label})]},"y:"+e.index)}))]}):(0,a.jsx)("text",{children:"TBD"})}function Zt(e){return(0,a.jsx)(wt,(0,r.Z)({type:"data"},e))}function _t(e){return(0,a.jsx)(wt,(0,r.Z)({type:"value"},e))}function jt(e){var t=e.data,n=t.lines,o=t.href,l=t.style,s=e.y;if(!n)return null;var u={className:"footnote",transform:"translate(0,".concat(s,")"),fontSize:l.fontSize,fontFamily:l.fontFamily};return o?(0,a.jsx)("a",(0,i.Z)((0,r.Z)({href:o,rel:"noopener nofollow noreferrer",target:"_blank"},u),{children:n.render()})):(0,a.jsx)("g",(0,i.Z)((0,r.Z)({fill:l.color},u),{children:n.render()}))}wt.propTypes={x:s().number,y:s().number,data:s().instanceOf(qe).isRequired,debug:s().bool},Zt.prepare=function(e){var t,n,r,i=e.props,a=e.orient,o=e.locale,l=e.domain,s=e.length,u=e.labels,c=void 0===u?[]:u,h=e.axisName,p=void 0===h?"axisDim":h,f=e.defaultTitle,v=void 0===f?"":f,m=Object.assign({locale:i.locale,model:i.model},i[p]),g=(n=c,n&&Array.isArray(n[0])?1===n.length&&0===n[0].length?[]:n.length>1&&1===n[0].length?n.map((function(e){return e[0]})):1===n.length&&n[0].length>1?n[0]:n.map((function(e){return e[e.length-1]})):[]).slice(0,s),b=null!==(r=null===i||void 0===i||null===(t=i.chartTheme)||void 0===t?void 0:t.dataAxis)&&void 0!==r?r:{},x=new lt(p,b);x.disabled=d.wah.read(m),x.reverse=d.t2f.read(m),x.title=d.PAN.read(m)||v,x.style.fontFamily=b.fontStack||Le.tG,x.domain(l||(0,ye.Z)(s)),c&&g.length&&x.labelData(g);var y=d.yfo.read(m);return y&&(x.format=y),x.orient=a,x.locale=o,x},Zt.propTypes={x:s().number,y:s().number,data:s().instanceOf(qe).isRequired,debug:s().bool},_t.prepare=function(e){var t=e.props,n=e.orient,r=e.locale,i=e.data,a=void 0===i?[]:i,o=e.needZero,l=void 0!==o&&o,s=e.axisName,u=void 0===s?"axisValue":s,c=e.defaultTitle,h=void 0===c?"":c,p=Object.assign({locale:t.locale,model:t.model},t[u]),f=(0,me.vl)(d.UGP.read(p)),v=(0,me.vl)(d.x_l.read(p)),m=1===st[f]?new Ge(u):new Ye(u);m.disabled=d.wah.read(p),m.reverse=d.t2f.read(p),m.title=d.PAN.read(p)||h;var g=!0===v||"true"===v||"min"===v,b=!0===v||"true"===v||"max"===v,x=(0,Ve.Z)(a,(function(e){return function(e){var t=e&&(0,Fe.Z)(e.v);return("string"===t||"number"===t||"boolean"===t)&&""!==e.v||null}(e)&&isFinite(e.v)?e.v:null})),y=d.PjO.read(p),k=d.kq3.read(p);!g&&null!=k&&isFinite(k)&&k<x[0]&&x.push(k),!b&&null!=y&&isFinite(y)&&y>x[1]&&x.push(y);var w=(0,Ve.Z)(x);(g||b)&&(m.clipMin=g?k:null,m.clipMax=b?y:null),m.domain(w,l);var Z=d.yfo.read(p);if(!Z){var _=a.find(et);Z=_&&_.z||function(e){if(!e.ticks)return"General";var t=e.ticks(),n=Math.abs((t[1]||0)-(t[0]||0)),r=Math.max(0,-Math.floor(Math.log10(n)+.01)),i="#,##0";return r&&(i+=".000000".slice(0,1+Math.min(r,6))),i+";-"+i+";0"}(m.scale)}return m.format=Z,m.orient=n,m.locale=r,m},_t.propTypes={x:s().number,y:s().number,data:s().instanceOf(qe).isRequired,debug:s().bool},jt.propTypes={data:s().object,href:s().string,y:s().number};var St=function(){function e(t,n,r){(0,de.Z)(this,e);var i=Le.DM.fontFamily,a=Le.DM.fontSize,o=Le.DM.lineHeight;this.text=t,this.href=n,this.style=r,this.lines=null,this._font="".concat(a,"px/").concat(o," ").concat(i),this._maxWidth=100}return(0,he.Z)(e,[{key:"font",get:function(){return this._font},set:function(e){this._font=e,this.update()}},{key:"maxWidth",get:function(){return this._maxWidth},set:function(e){this._maxWidth=e,this.update()}},{key:"height",get:function(){var e,t;return null!==(t=null===(e=this.lines)||void 0===e?void 0:e.height)&&void 0!==t?t:0}},{key:"update",value:function(){if(this.text){var e=new(ze())({font:this.font,width:this.maxWidth,align:"right",createElement:o.createElement});this.lines=e.linebreak(this.text)}else this.lines=null;return this}}]),e}();jt.prepare=function(e){var t=e.text,n=e.href,r=e.style,i="";return t?i=t:n&&(i=n.length>50?n.slice(0,49)+"\u2026":n),new St(i,n,r).update()};var Ct={both:{x:!0,y:!0},none:{x:!1,y:!1},x:{x:!0,y:!1},y:{x:!1,y:!0}};function Tt(e){var t,n,r=e.x,i=e.y,o=r.scale.range(),l=i.scale.range(),s=Ct[e.style]||{x:!!r.preferGrid,y:!!i.preferGrid},u="grid:",c=s.y?i.getTicks():[],d=s.x?r.getTicks():[],h=null!==(n=null===(t=e.styles)||void 0===t?void 0:t.grid)&&void 0!==n?n:{};return(0,a.jsxs)("g",{className:"grid",fill:"none",stroke:e.color,children:[c.map((function(e){if(!1===e.grid)return null;var t=!(!i.scale.ticks||e.value);return(0,a.jsx)("line",{className:"line y",stroke:t?h.zeroColor:h.color,strokeLinecap:"round",strokeDasharray:t?h.zeroDashArray:h.dashArray,y1:e.pos,y2:e.pos,x1:o[0],x2:o[1]},u+"y:"+e.index)})),d.map((function(e){if(!1===e.grid)return null;var t=!(!r.scale.ticks||e.value);return(0,a.jsx)("line",{className:"line x",stroke:t?h.zeroColor:h.color,strokeLinecap:"round",strokeDasharray:t?h.zeroDashArray:h.dashArray,y1:l[0],y2:l[1],x1:e.pos,x2:e.pos},u+"x:"+e.index)}))]})}Tt.propTypes={x:s().instanceOf(qe).isRequired,y:s().instanceOf(qe).isRequired,style:s().oneOf(["both","none","x","y"]),color:s().string,styles:s().object};var Mt=function(){function e(t){(0,de.Z)(this,e),(0,V.Z)(this,"length",0),(0,V.Z)(this,"columnSize",0),(0,V.Z)(this,"columnGutter",15),(0,V.Z)(this,"lineHeight",20),(0,V.Z)(this,"width",0),(0,V.Z)(this,"height",0),(0,V.Z)(this,"columns",0),(0,V.Z)(this,"style",Le.E2),this._mw=100,this.applyStyle(t)}return(0,he.Z)(e,[{key:"add",value:function(e){this[this.length]=e,this.length+=1}},{key:"forEach",value:function(e,t){for(var n=0;n<this.length;n++)e.call(t,this[n],n)}},{key:"map",value:function(e,t){for(var n=[],r=0;r<this.length;r++)n[r]=e.call(t,this[r],r);return n}},{key:"font",get:function(){var e=this.style;return e.fontSize+"px "+(e.fontStack||e.fontFamily)}},{key:"maxWidth",get:function(){return this._mw},set:function(e){this._mw=e,this.update()}},{key:"applyStyle",value:function(e){this.style=e||Le.E2}},{key:"colorize",value:function(e){this.forEach((function(t,n){return t.color=e(n)}))}},{key:"update",value:function(){var e=0,t=this._mw,n=0,r=0;this.forEach((function(t){t.hidden||(e++,n+=t.width,t.width>r&&(r=t.width))})),this.columnSize=r;var i=n+15*(e-1);if(i>=t-30){var a=Math.min(e,Math.floor(t/(r+15)))||1;this.width=r*a+15*(a-1),this.height=20*Math.ceil(e/a),this.columns=a}else this.width=i,this.height=20,this.columns=0;return this}}]),e}();var Nt=function(e,t,n){return"square"===e?(0,a.jsx)("rect",{fill:t,width:.5*n,height:.5*n,y:.25*n}):"line"===e?(0,a.jsx)("rect",{fill:t,width:.5*n,height:.125*n,x:0*n,y:.4375*n}):(0,a.jsx)("circle",{fill:t,r:.3*n,cx:.25*n,cy:.5*n})};function Et(e){var t=e.data,n="grid:legend:";if(!t)return null;var o,l=t.lineHeight,s=t.columnGutter,u=t.columns,c=null!==(o=t.style)&&void 0!==o?o:{},d=e.x+Math.max(0,(e.width-t.width)/2),h={className:"legend",transform:"translate(".concat(d,",").concat(e.y,")"),fontSize:(null===c||void 0===c?void 0:c.fontSize)||14,fontFamily:(null===c||void 0===c?void 0:c.fontStack)||Le.tG,textAnchor:"start",fill:c.color||"currentColor"},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return(0,a.jsxs)("g",{className:"label",transform:"translate(".concat(t,",").concat(n,")"),children:[Nt(e.symbol||c.symbol,e.color,l),(0,a.jsx)("text",{x:15,y:l/2,dy:"0.33em",children:e.text})]},r)};if(u){var f=0;return(0,a.jsxs)("g",(0,i.Z)((0,r.Z)({},h),{children:[false,t.map((function(e,r){if(e.hidden)return null;var i=(t.columnSize+t.columnGutter)*(r%u||0),a=Math.floor(f/u)*l;return f++,p(e,i,a,n+r)}))]}))}var v=0;return(0,a.jsxs)("g",(0,i.Z)((0,r.Z)({},h),{children:[false,t.map((function(e,t){if(e.hidden)return null;var r=p(e,v,0,n+t);return v+=e.width+s,r}))]}))}Et.prepare=function(e){var t=e.labels,n=void 0===t?[]:t,r=e.dir,i=void 0===r?"row":r,a=e.length,o=void 0===a?0:a,l=e.style,s=void 0===l?null:l,u=rt(n,i,void 0,e.locale)||[],c=new Mt(s);return(0,ye.Z)(o).forEach((function(e){var t=u[e]||"Series".concat(e+1);c.add({text:t,width:Oe(t,c.font)+15,hidden:!1})})),c.update()},Et.propTypes={debug:s().bool,x:s().number,y:s().number,data:s().instanceOf(Mt),width:s().number,style:s().object},Et.defaultProps={x:0,y:0};var Dt="Nunito, sans-serif",Rt="20px/1.2",Lt="16px/1.2",Wt=function(e){return e.filter(Boolean).join(" ")},zt=new(ze())({createElement:o.createElement});function Pt(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,l={};t.forEach((function(e){return l[e.orient]=e}));var s=l.top,u=l.bottom,c=l.left,d=l.right,h={top:6,bottom:6,left:6,right:20},p=i||Math.min(500,.45*e);c&&(c.range([p,0]),h.left=c.width),d&&(d.range([p,0]),h.right=d.width);var f=e-h.left-h.right;s&&(s.range([0,f]),h.top=s.height),u&&(u.range([0,f]),h.bottom=u.height);var v=0;(c&&c.title&&"corner"===c.style.titlePosition||d&&d.title&&"corner"===d.style.titlePosition)&&(v=10),h.top+=v;var m=null;n&&(zt.font(Wt([500,Rt,a||Dt])),zt.width(e),m=zt.linebreak(n),h.top+=m.height);var g=null;if(r){var b=new(ze())({font:Wt([400,Lt,a||Dt]),width:e,createElement:o.createElement});g=b.linebreak(r),h.top+=g.height}return(n||r)&&v&&(h.top+=5),{margin:h,width:f,height:p,title:m,subtitle:g}}function At(e){return!e||null==e.v||""===e.v||(t=e.v,(0,E.Z)(t,Error)&&"#N/A"===t.message);var t}function Vt(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.spanGaps,a=void 0!==i&&i,o=r.stackSeries,l=void 0!==o&&o,s=[],u=(0,ye.Z)(t[1]).map((function(){return[]})),c=function(t,r){var i="row"===n?e[t][r]:e[r][t],a={series:t,category:r,cell:i,base:null,v:null};return At(i)?(a.v=null,a.gap=!0):et(i)?a.v=i.v:a.v=0,a},d=(0,F.Z)(t,2),h=d[0],p=d[1],f=0;f<h;f++)for(var v=0;v<p;v++){var m=c(v,f);s.push(m),u[v].push(m)}return a&&at(u),l&&(s=it(u,t)),[u,s]}var Ft={expr:d.aTG,title:d.ngi,subtitle:d.sIU,footnote:d.Ab9,footnoteLink:d.YSc,stacked:d.AVO,labels:d.X0T,legend:d.j3,size:d.hkI,legendVisible:d.sd1,format:d.WUZ,dir:d.aL8,blanks:d.Na0,interpolate:d.sXR,visible:d.RrV,chartColors:d.vK5,annotations:d.r8$,axisValue:{title:d.PAN,format:d.yfo,clip:d.x_l,type:d.UGP,min:d.kq3,max:d.PjO,reverse:d.t2f},axisDim:{title:d.PAN,format:d.yfo,reverse:d.t2f}},Bt={linear:we.Z,step:Ze.ZP,"step-after":Ze.cD,"step-before":Ze.RN,monotone:_e.Z,basis:je.ZP},It={gap:"gap",zero:"zero",span:"span"},Ot=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(){return(0,de.Z)(this,n),t.apply(this,arguments)}return(0,he.Z)(n,[{key:"render",value:function(){var e,t=this,n=this.props;if(!n.isEditor&&!d.RrV.read(n))return null;if(!(0,me.ud)(n.expr)||!n.model||!n.model.hasData)return this.renderError();var r=(n.parentKey||n.id)+":",i=this.context,o=i.theme,l=i.chartTheme,s=this.state,u=s.dir,c=s.legendRaw,h=s.legendVisible,p=s.size,f=s.series,v=s.valueAxis,m=s.dimAxis,g=s.isStacked,b=s.gapHandling,x=s.labels,y=s.format,k=d.ngi.read(n),w=d.sIU.read(n),Z=(0,me.wB)(d.sXR.read(n),Bt,"linear"),_=d.vK5.read(n,{minColors:7,autoExtend:!0,default:l.palette}).map(o.resolveColor),j=Et.prepare({labels:c,dir:u,length:p[1],locale:n.locale,style:null===l||void 0===l?void 0:l.legend}),S=jt.prepare({text:d.Ab9.read(n),href:d.YSc.read(n),style:null===l||void 0===l?void 0:l.footnote}),C=(0,ke.Z)(_).domain((0,ye.Z)(p[1]));j.forEach((function(e,t){return e.color=C(t)})),v.applyStyle(l.valueAxis),m.applyStyle(l.dataAxis);var T,M=this.state.width,N=Pt(M,[m,v],k,w,void 0,o.chartFontStack),E=N.margin,D=N.width,R=N.height,L=N.title,W=N.subtitle;j.maxWidth=M,S.maxWidth=M-E.right,E.bottom+=h?(null!==(T=null===(e=l.legend)||void 0===e?void 0:e.margin)&&void 0!==T?T:0)+j.height:0;var z,P,A,B,I,O,U=0;S.height&&(E.bottom+=S.height+(null!==(P=null===(z=l.footnote)||void 0===z?void 0:z.margin)&&void 0!==P?P:0),U=R+E.top+E.bottom-S.height,h&&(U-=j.height+(null!==(B=null===(A=l.legend)||void 0===A?void 0:A.margin)&&void 0!==B?B:0)));var H="gap"!==b&&"span"!==b||function(e){return null!=e.v};g?O=(0,Se.Z)().curve(Z).x((function(e){return m.scale(e.category)})).y0((function(e){return v.scale(e.base||v.zero)})).y1((function(e){return v.scale(e.base+e.v)})).defined(H):(O=(0,Se.Z)().curve(Z).x((function(e){return m.scale(e.category)})).y0(v.scale(v.zero)).y1((function(e){return v.scale(e.v||0)})).defined(H),I=(0,Ce.Z)().curve(Z).x((function(e){return m.scale(e.category)})).y((function(e){return v.scale(e.v||0)})).defined(H));var q,Y=v.error;if(!Y&&g&&f.length>1){var X=(0,F.Z)(v.domain(),2);Y=X[0]<0!==X[1]<=0?"Stacked area charts won't function when two or more series have positive and negative values.":null}return this.wrap((0,a.jsxs)("svg",{viewBox:"0 0 ".concat(D+E.left+E.right," ").concat(R+E.top+E.bottom),style:{overflow:"visible"},"aria-label":"Area Chart",role:"img",children:[L&&(0,a.jsx)("g",{fill:o.color,transform:"translate(1,0)",children:L.render()}),W&&(0,a.jsx)("g",{fill:o.color,transform:"translate(1,".concat(null!==(q=null===L||void 0===L?void 0:L.height)&&void 0!==q?q:0,")"),children:W.render()}),(0,a.jsxs)("g",{transform:"translate(".concat(E.left,",").concat(E.top,")"),style:{display:""},children:[(0,a.jsxs)("g",{pointerEvents:Y?"none":"all",children:[(0,a.jsx)(Tt,{styles:l,x:m,y:v}),(0,a.jsxs)(gt,{id:"clip-"+n.id,active:v.isClipped,width:D,height:R,children:[Y?(0,a.jsxs)("g",{children:[(0,a.jsx)(Pe,{y:0,x:D/2,height:R,width:D-.15*D,align:"center",vAlign:"middle",color:o.color,size:14,text:"Invalid data: "+Y}),(0,a.jsx)("rect",{})]}):(0,a.jsx)("g",{fill:"none",strokeWidth:"2",children:f.map((function(e,t){return(0,a.jsxs)("g",{children:[I&&(0,a.jsx)("path",{d:I(e),stroke:C(t)}),O&&(0,a.jsx)("path",{d:O(e),fill:C(t),fillOpacity:g?1:.25})]},r+"line"+t)}))}),(0,a.jsx)(mt,{visible:!Y,styles:l,x:m,y:v,data:this.state.annotations}),(0,a.jsx)(yt,{visible:!Y,width:D,height:R,series:f,defined:function(e){return!e.gap},shape:g?"line":"circle",r:g?function(e){var t=v.scale(e.base||v.zero);return(v.scale(e.base+e.v)-t)/2}:4,fill:function(e){return C(e.series)},stroke:function(e){return g?o.textColorFor(C(e.series)):o.background},x:function(e){return m.scale(e.category)},y:function(e){if(g){var t=v.scale(e.base||v.zero);return t+(v.scale(e.base+e.v)-t)/2}return v.scale(e.v)},onPoint:function(e,n){var r=e.series,i=e.category,a=e.cell,o=(0,me.Mm)(a,y,t.props.locale);a&&!/\S/.test(o)&&(o='"'+o+'"'),t.setState({hover:{title:x?x[i]:String(i+1),dimspec:(0,V.Z)({},j[r].text,o),simple:1===p[1],cursorPosition:(0,Te.Ny)(n)}})},onUnPoint:function(){t.setState({hover:null})}})]})]}),(0,a.jsx)(Zt,{data:m,y:R}),(0,a.jsx)(_t,{data:v})]}),(0,a.jsx)(jt,{data:S,y:U}),(0,a.jsx)(Et,{data:h&&j||null,width:M,y:R+E.top+E.bottom-j.height})]}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.locale===t.lastLocale&&!e.isSelected&&e.model&&e.model.lastWrite===t.modelId)return null;var n=d.aTG.readCropped(e),i=n[0].length-(n.emptyRight||0),a=n.length-(n.emptyBottom||0),o=(0,me.vl)(d.aL8.read(e));o&&"auto"!==o||(o=i<a?"col":"row");var l="row"===o?[i,a]:[a,i],s=e.locale,u=e.axisDim&&d.WUZ.read((0,r.Z)({model:e.model,locale:e.locale},e.axisDim)),c=d.X0T.read(e),h=rt(c,o,u,s);if(!(0,me.ud)(e.expr)){var p=h?h.length:0;l=[p,1],n=Array(p).fill(0).map((function(){return[]}))}var f=(0,me.wB)(d.Na0.read(e),It,"gap"),v=d.AVO.read(e),m=(0,F.Z)(Vt(n,l,o,{spanGaps:"span"===f,stackSeries:v}),2),g=m[0],b=m[1],x=d.j3.read(e);return{labels:h,dir:o,size:l,series:g,rawValues:[],gapHandling:f,isStacked:v,legendRaw:x,annotations:pt(d.r8$.read(e)),legendVisible:d.sd1.isSet(e)?d.sd1.read(e):!tt(x),valueAxis:_t.prepare({props:e,data:b,locale:s,orient:"left",needZero:!0}),dimAxis:Zt.prepare({props:e,length:l[0],labels:c,locale:s,orient:"bottom"}),format:d.WUZ.read(e),modelId:e.model&&e.model.lastWrite,lastLocale:s}}}]),n}(Re);(0,V.Z)(Ot,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired}),(0,V.Z)(Ot,"chartType","line"),(0,V.Z)(Ot,"options",Ft),(0,V.Z)(Ot,"requiredOption","expr"),(0,V.Z)(Ot,"contextType",m.u6);var Ut=n(58254),Ht=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),(r=t.call(this,e)).state={},r}return(0,he.Z)(n,[{key:"shouldComponentUpdate",value:function(e,t){return!(!e.visible&&!this.props.visible)&&(0,me.dm)(this,e,t)}},{key:"contrast",value:function(e){var t;return"currentcolor"===e.toLowerCase()?null===(t=this.props.styles)||void 0===t?void 0:t.background:(0,Ut.$p)(e)}},{key:"calcVerticalBar",value:function(e,t){var n,r,i=this.props,a=i.x,o=i.y,l=i.zero,s=e.category,u=e.v,c=e.base||0;return u<0?(n=o(c||l),r=o(c+u)-n):(n=o(c+u),r=o(c||l)-n),{valid:isFinite(r)&&isFinite(n),x:a(s),y:r<0?n+r:n,height:Math.abs(r),width:t,pos:n,size:r,thickness:t,color:this.state.fill(e)}}},{key:"calcHorizontalBar",value:function(e,t){var n,r,i=this.props,a=i.x,o=i.y,l=i.zero,s=e.category,u=e.v,c=e.base||0;return u<0?(n=a(c||l),r=a(c+u)-n):(n=a(c+u),r=a(c||l)-n),{valid:isFinite(r)&&isFinite(n),x:r<0?n+r:n,y:o(s),width:Math.abs(r),height:t,pos:n,size:r,thickness:t,color:this.state.fill(e)}}},{key:"renderLabel",value:function(e,t,n){var r,i,o,l,s,u=this.state,c=u.showValues,d=u.selectiveValues,h=this.props,p=h.x,f=h.y,v=h.label,m=h.horizontal,g=h.zero,b=h.width,x=h.height,y=h.styles,k=null===y||void 0===y?void 0:y.fontStack,w=v&&this.props.label(e),Z="14px "+k;if(!c||!v||!w)return null;if(n){if(r=t.x+t.width/2,i=t.y+t.height/2,s=this.contrast(t.color),o="center",l="middle",d){if(t.height<=16)return null;var _=ze().measureText(w,Z);if(t.width<=_+4)return null}}else if(m){var j=p(g),S=isFinite(e.v)?p(e.v)-j:0;r=e.v<0?t.pos+t.size:t.pos,i=f(e.category)+t.thickness/2,s=null===y||void 0===y?void 0:y.color;var C=!1,T=ze().measureText(w,Z);isFinite(e.v)&&e.v?(C=S>=0?b-r>r-j:r<j-r)!==S>=0&&(Math.abs(S)<T+10?r=j:s=this.contrast(t.color)):C=j<b-(T+5),o=C?"left":"right",l="middle"}else{var M=f(g),N=isFinite(e.v)?f(e.v)-M:0;r=p(e.category)+t.thickness/2,i=e.v<0?t.pos+t.size:t.pos,s=null===y||void 0===y?void 0:y.color;var E=!0;if(isFinite(e.v)&&e.v?(E=N>=0?x-i>i-M:i<M-i)!==N>=0&&(Math.abs(N)<19?i=M:s=this.contrast(t.color)):E=M<19,o="center",l=E?"top":"bottom",d){var D=ze().measureText(w,Z);if(t.width<=D+4)return null}}return(0,a.jsx)(Pe,{x:r,y:i,align:o,vAlign:l,padding:5,color:s,size:14,text:w,font:k})}},{key:"render",value:function(){var e=this,t=this.props,n=t.series,r=t.visible,i=t.overlap,o=t.bandWidth,l=t.horizontal,s=t.centerLabels;if(!r)return null;var u=o/n.length,c=u+(o-u)*i,d=.016*c/2,h=o/2,p=(1-i)*c;return c*=.984,n.map((function(t,n){var r=l?"translate(0,".concat(d+p*n-h,")"):"translate(".concat(d+p*n-h,",0)");return(0,a.jsx)("g",{transform:r,children:t.map((function(t){var n=l?e.calcHorizontalBar(t,c):e.calcVerticalBar(t,c);return(0,a.jsxs)("g",{onMouseMove:function(n){var r;return null===(r=e.props)||void 0===r?void 0:r.onPoint(t,n)},onMouseLeave:e.props.onUnPoint,children:[n.valid&&(0,a.jsx)("rect",{x:n.x,y:n.y,height:n.height,width:n.width,fill:n.color}),e.renderLabel(t,n,s)]},t.category)}))},n)}))}}],[{key:"getDerivedStateFromProps",value:function(e){return{fill:(0,me.Yq)(e.fill,"currentColor"),showValues:e.showValues!==d.ADu.NONE,selectiveValues:e.showValues===d.ADu.SOME}}}]),n}(o.Component);(0,V.Z)(Ht,"propTypes",{visible:s().bool,series:s().array,x:s().func.isRequired,y:s().func.isRequired,overlap:s().number,zero:s().number,fill:s().oneOfType([s().func,s().string]).isRequired,horizontal:s().bool,onPoint:s().func,onUnPoint:s().func,bandWidth:s().number,showValues:s().oneOf([d.ADu.NONE,d.ADu.SOME,d.ADu.ALL]),centerLabels:s().bool,styles:s().object,label:s().func,height:s().number,width:s().number}),(0,V.Z)(Ht,"defaultProps",{visible:!0,horizontal:!0,overlap:0,width:754,zero:0});var qt={ascending:1,asc:1,descending:-1,desc:-1};function Yt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=null,a=(0,me.vl)(d.aND.read(n)),o=e[1];if(a in qt){var l=d.MRu.read(n);(!l||!isFinite(l)||l<0||l>o||l%1)&&(l=1);var s=qt[a]||qt.desc;i=(0,me.XV)((0,ye.Z)(e[0]),s,(function(e){var n=t[Math.floor(e*o+Math.max(1,l||0)-1)];return n?n.v:null}))}return i&&r&&(i=i.reverse()),i}var Xt={expr:d.aTG,title:d.ngi,subtitle:d.sIU,footnote:d.Ab9,footnoteLink:d.YSc,stacked:d.AVO,labels:d.dJg,legend:d.j3,legendVisible:d.sd1,format:d.WUZ,sortBy:d.MRu,sortOrder:d.aND,colorByPoint:d.qIO,size:d.hkI,dir:d.aL8,visible:d.RrV,chartColors:d.vK5,annotations:d.r8$,valueLabels:d.ADu,axisValue:{title:d.PAN,format:d.yfo,clip:d.x_l,type:d.UGP,min:d.kq3,max:d.PjO,reverse:d.t2f},axisDim:{title:d.PAN,format:d.yfo,reverse:d.t2f}},Gt=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(){return(0,de.Z)(this,n),t.apply(this,arguments)}return(0,he.Z)(n,[{key:"render",value:function(){var e,t=this,n=this.props;if(!n.isEditor&&!d.RrV.read(n))return null;if(!(0,me.ud)(n.expr)||!n.model||!n.model.hasData)return this.renderError();var r=this.state.width,i=d.ngi.read(n),o=d.sIU.read(n),l=this.context,s=l.chartTheme,u=l.theme,c=this.state,h=c.dir,p=c.legendRaw,f=c.legendVisible,v=c.size,m=c.data,b=c.valueAxis,x=c.dimAxis,y=c.isStacked,k=c.labels,w=c.format,Z=c.series,_=c.showValues,j=d.vK5.read(n,{minColors:7,autoExtend:!0,default:s.palette}).map(u.resolveColor),S=Et.prepare({labels:p,dir:h,length:v[1],locale:n.locale,style:null===s||void 0===s?void 0:s.legend}),C=jt.prepare({text:d.Ab9.read(n),href:d.YSc.read(n),style:null===s||void 0===s?void 0:s.footnote});b.applyStyle(s.valueAxis),x.applyStyle(s.dataAxis);var T=25*(y?v[0]:m.length);(0,me.ud)(n.expr)||(T=Math.max(T,200)),x.maxWidth=Math.round(39e-5*Math.pow(r,2)+.143*r+13);var M,N=Pt(r,[x,b],i,o,T,u.chartFontStack),E=N.margin,D=N.width,R=N.title,L=N.subtitle;S.maxWidth=r,C.maxWidth=r-E.right,E.bottom+=f?(null!==(M=null===(e=s.legend)||void 0===e?void 0:e.margin)&&void 0!==M?M:0)+S.height:0;var W=$e({byPoint:d.qIO.read(n),backgroundColor:u.backgroundColor,palette:j});S.forEach((function(e,t){return e.color=W(t)}));var z,P,A,F,B=0;C.height&&(E.bottom+=C.height+(null!==(P=null===(z=s.footnote)||void 0===z?void 0:z.margin)&&void 0!==P?P:0),B=T+E.top+E.bottom-C.height,f&&(B-=S.height+(null!==(F=null===(A=s.legend)||void 0===A?void 0:A.margin)&&void 0!==F?F:0)));var I,O=b.error;return this.wrap((0,a.jsxs)("svg",{viewBox:"0 0 ".concat(D+E.left+E.right," ").concat(T+E.top+E.bottom),style:{overflow:"visible"},"aria-label":"Bar Chart",role:"img",children:[R&&(0,a.jsx)("g",{transform:"translate(1,0)",fill:u.color,children:R.render()}),L&&(0,a.jsx)("g",{transform:"translate(1,".concat(null!==(I=null===R||void 0===R?void 0:R.height)&&void 0!==I?I:0,")"),fill:u.color,children:L.render()}),(0,a.jsxs)("g",{transform:"translate(".concat(E.left,",").concat(E.top,")"),children:[(0,a.jsx)(Tt,{x:b,y:x,styles:s}),O&&(0,a.jsxs)("g",{children:[(0,a.jsx)(Pe,{y:0,x:D/2,height:T,width:D-.15*D,align:"center",vAlign:"middle",color:u.color,size:14,text:"Invalid data: "+O}),(0,a.jsx)("rect",{})]}),(0,a.jsxs)(gt,{id:"clip-"+n.id,active:b.isClipped,width:D,height:T,children:[(0,a.jsx)(Ht,{visible:!O,series:Z,x:b.scale,y:x.scale,fill:function(e){return W(e.series,e.category)},overlap:y?1:0,bandWidth:x.bandwidth(),zero:b.zero,onPoint:function(e,r){t.setState({hover:{title:k?k[e.category]:String(e.category+1),dimspec:(0,V.Z)({},S[e.series].text,(0,me.Mm)(e.cell,w,n.locale)),simple:1===v[1],cursorPosition:(0,Te.Ny)(r)}})},onUnPoint:function(){return t.setState({hover:null})},showValues:this.state.width>g.HN?_:d.ADu.NONE,centerLabels:y,styles:s,label:function(e){return(0,me.Mm)(e.cell,w,n.locale)},width:D,height:T}),(0,a.jsx)(mt,{visible:!O,styles:s,x:b,y:x,data:this.state.annotations,pointMark:"bar",bandWidth:x.bandwidth()})]}),(0,a.jsx)(Zt,{data:x}),(0,a.jsx)(_t,{data:b,y:T})]}),(0,a.jsx)(jt,{data:C,y:B}),(0,a.jsx)(Et,{data:f&&S||null,width:r,y:T+E.top+E.bottom-S.height})]}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.locale===t.lastLocale&&!e.isSelected&&e.model&&e.model.lastWrite===t.modelId)return null;var n=d.aTG.readCropped(e),i=n[0].length-(n.emptyRight||0),a=n.length-(n.emptyBottom||0),o=(0,me.vl)(d.aL8.read(e));o&&"auto"!==o||(o=i<a?"col":"row");var l,s="row"===o?[i,a]:[a,i],u=e.locale,c=e.axisDim&&d.WUZ.read((0,r.Z)({model:e.model,locale:e.locale},e.axisDim)),h=d.dJg.read(e),p=rt(h,o,c,u);if((0,me.ud)(e.expr))l=(0,ye.Z)(a*i).map((function(e){var t=~~(e%s[1]),r=~~(e/s[1]),i="row"===o?n[t][r]:n[r][t];return null==i||(0,E.Z)(i,Error)?null:i}));else{var f=p?p.length:0;s=[f,1],l=(0,ye.Z)(f).map((function(){return{v:null}}))}var v=d.AVO.read(e),m=(0,F.Z)(Vt(n,s,o,{stackSeries:v}),2),g=m[0],b=m[1],x=d.j3.read(e);return{dir:o,size:s,data:l,series:g,isStacked:v,legendRaw:x,annotations:pt(d.r8$.read(e),{flipXY:!0}),showValues:d.ADu.read(e),legendVisible:d.sd1.isSet(e)?d.sd1.read(e):!tt(x),valueAxis:_t.prepare({props:e,data:b,locale:u,orient:"bottom",needZero:!0}),dimAxis:Zt.prepare({props:e,domain:Yt(s,l,e,!0),length:s[0],labels:h,locale:u,orient:"left"}),labels:p&&p.slice(0,s[0]),format:d.WUZ.read(e),lastLocale:u,modelId:e.model.lastWrite}}}]),n}(Re);function Kt(e){return(0,a.jsx)(Ht,(0,i.Z)((0,r.Z)({},e),{horizontal:!1}))}(0,V.Z)(Gt,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,locale:s().string}),(0,V.Z)(Gt,"chartType","bar"),(0,V.Z)(Gt,"options",Xt),(0,V.Z)(Gt,"requiredOption","expr"),(0,V.Z)(Gt,"contextType",m.u6);var Jt={expr:d.aTG,title:d.ngi,subtitle:d.sIU,footnote:d.Ab9,footnoteLink:d.YSc,stacked:d.AVO,labels:d.X0T,legend:d.j3,legendVisible:d.sd1,format:d.WUZ,sortBy:d.MRu,sortOrder:d.aND,size:d.hkI,colorByPoint:d.qIO,dir:d.aL8,visible:d.RrV,chartColors:d.vK5,annotations:d.r8$,valueLabels:d.ADu,axisValue:{title:d.PAN,format:d.yfo,clip:d.x_l,type:d.UGP,min:d.kq3,max:d.PjO,reverse:d.t2f},axisDim:{title:d.PAN,format:d.yfo,reverse:d.t2f}},$t=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(){return(0,de.Z)(this,n),t.apply(this,arguments)}return(0,he.Z)(n,[{key:"render",value:function(){var e,t=this,n=this.props;if(!n.isEditor&&!d.RrV.read(n))return null;if(!(0,me.ud)(n.expr)||!n.model||!n.model.hasData)return this.renderError();var r=this.state,i=r.legendVisible,o=r.valueAxis,l=r.dimAxis,s=r.isStacked,u=r.labels,c=r.size,h=r.format,p=r.showValues,f=d.ngi.read(n),v=d.sIU.read(n),m=this.context,b=m.theme,x=m.chartTheme,y=d.vK5.read(n,{minColors:7,autoExtend:!0,default:x.palette}).map(b.resolveColor),k=Et.prepare({labels:this.state.legendRaw,dir:this.state.dir,length:c[1],locale:n.locale,style:x.legend}),w=jt.prepare({text:d.Ab9.read(n),href:d.YSc.read(n),style:x.footnote});o.applyStyle(x.valueAxis),l.applyStyle(x.dataAxis);var Z,_=$e({byPoint:d.qIO.read(n),backgroundColor:b.backgroundColor,palette:y}),j=this.state.width,S=Pt(j,[l,o],f,v,void 0,b.chartFontStack),C=S.margin,T=S.width,M=S.height,N=S.title,E=S.subtitle;k.maxWidth=j,C.bottom+=i?(null!==(Z=null===(e=x.legend)||void 0===e?void 0:e.margin)&&void 0!==Z?Z:0)+k.height:0,k.forEach((function(e,t){return e.color=_(t)})),w.maxWidth=j-C.right;var D,R,L,W,z=0;w.height&&(C.bottom+=w.height+(null!==(R=null===(D=x.footnote)||void 0===D?void 0:D.margin)&&void 0!==R?R:0),z=M+C.top+C.bottom-w.height,i&&(z-=k.height+(null!==(W=null===(L=x.legend)||void 0===L?void 0:L.margin)&&void 0!==W?W:0)));l.range([0,T]),o.range([M,0]);var P,A=o.error;return this.wrap((0,a.jsxs)("svg",{viewBox:"0 0 ".concat(T+C.left+C.right," ").concat(M+C.top+C.bottom),style:{overflow:"visible"},"aria-label":"Column Chart",role:"img",children:[N&&(0,a.jsx)("g",{transform:"translate(1,0)",fill:b.color,children:N.render()}),E&&(0,a.jsx)("g",{transform:"translate(1,".concat(null!==(P=null===N||void 0===N?void 0:N.height)&&void 0!==P?P:0,")"),fill:b.color,children:E.render()}),(0,a.jsxs)("g",{transform:"translate(".concat(C.left,",").concat(C.top,")"),children:[(0,a.jsx)(Tt,{styles:x,x:l,y:o}),A&&(0,a.jsxs)("g",{children:[(0,a.jsx)(Pe,{y:0,x:T/2,height:M,width:T-.15*T,align:"center",vAlign:"middle",color:b.color,size:14,text:"Invalid data: "+A}),(0,a.jsx)("rect",{})]}),(0,a.jsxs)(gt,{id:"clip-"+n.id,active:o.isClipped,width:T,height:M,children:[(0,a.jsx)(Kt,{visible:!A,series:this.state.series,x:l.scale,y:o.scale,fill:function(e){return _(e.series,e.category)},overlap:s?1:0,bandWidth:l.bandwidth(),zero:o.zero,onPoint:function(e,r){t.setState({hover:{title:u?u[e.category]:String(e.category+1),dimspec:(0,V.Z)({},k[e.series].text,(0,me.Mm)(e.cell,h,n.locale)),simple:1===c[1],cursorPosition:(0,Te.Ny)(r)}})},onUnPoint:function(){return t.setState({hover:null})},showValues:this.state.width>g.HN?p:d.ADu.NONE,centerLabels:s,styles:x,label:function(e){return(0,me.Mm)(e.cell,h,n.locale)},width:T,height:M}),(0,a.jsx)(mt,{visible:!A,styles:x,pointMark:"column",bandWidth:l.bandwidth(),x:l,y:o,data:this.state.annotations})]}),(0,a.jsx)(Zt,{data:l,y:M}),(0,a.jsx)(_t,{data:o})]}),(0,a.jsx)(jt,{data:w,y:z}),(0,a.jsx)(Et,{data:i&&k||null,width:j,y:M+C.top+C.bottom-k.height})]}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.locale===t.lastLocale&&!e.isSelected&&e.model&&e.model.lastWrite===t.modelId)return null;var n=d.aTG.readCropped(e),i=n[0].length-(n.emptyRight||0),a=n.length-(n.emptyBottom||0),o=(0,me.vl)(d.aL8.read(e));o&&"auto"!==o||(o=i<a?"col":"row");var l,s="row"===o?[i,a]:[a,i],u=e.locale,c=e.axisDim&&d.WUZ.read((0,r.Z)({model:e.model,locale:e.locale},e.axisDim)),h=d.X0T.read(e),p=rt(h,o,c,u);if((0,me.ud)(e.expr))l=(0,ye.Z)(a*i).map((function(e){var t=~~(e%s[1]),r=~~(e/s[1]),i="row"===o?n[t][r]:n[r][t];return null==i||(0,E.Z)(i,Error)?null:i}));else{var f=p?p.length:0;s=[f,1],l=(0,ye.Z)(f).map((function(){return{v:null}}))}var v=d.AVO.read(e),m=(0,F.Z)(Vt(n,s,o,{stackSeries:v}),2),g=m[0],b=m[1],x=d.j3.read(e);return{labels:p,size:s,data:l,series:g,isStacked:v,dir:o,legendRaw:x,annotations:pt(d.r8$.read(e)),showValues:d.ADu.read(e),legendVisible:d.sd1.isSet(e)?d.sd1.read(e):!tt(x),valueAxis:_t.prepare({props:e,data:b,locale:u,orient:"left",needZero:!0}),dimAxis:Zt.prepare({props:e,domain:Yt(s,l,e),length:s[0],labels:h,locale:u,orient:"bottom"}),format:d.WUZ.read(e),modelId:e.model&&e.model.lastWrite,lastLocale:u}}}]),n}(Re);(0,V.Z)($t,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,locale:s().string}),(0,V.Z)($t,"chartType","column"),(0,V.Z)($t,"options",Jt),(0,V.Z)($t,"requiredOption","expr"),(0,V.Z)($t,"contextType",m.u6);var Qt=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),(r=t.call(this,e)).state={},r}return(0,he.Z)(n,[{key:"shouldComponentUpdate",value:function(e,t){return!(!e.visible&&!this.props.visible)&&(0,me.dm)(this,e,t)}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.series,i=t.visible,o=t.x,l=t.y,s=t.r,u=t.opacity,c=t.fill,d=t.stroke,h=t.strokeWidth,p=t.defined;if(!i)return null;var f=(0,me.Yq)(s,3),v=(0,me.Yq)(u,1),m=(0,me.Yq)(c,"currentColor"),g=(0,me.Yq)(d,"currentColor"),b=(0,me.Yq)(p,!0);return(0,a.jsx)("g",{fill:"none",className:n,children:r.map((function(t,n){return(0,a.jsx)("g",{children:t.map((function(t,n){if(!t||!b(t))return null;var r=m(t),i=g(t),s=v(t);return(0,a.jsx)("circle",{pointerEvents:"all",fillOpacity:r?s:void 0,fill:r,strokeOpacity:i?s:void 0,strokeWidth:i?h:void 0,stroke:i,cx:o(t),cy:l(t),r:f(t),onMouseMove:function(n){var r,i;return null===(i=(r=e.props).onPoint)||void 0===i?void 0:i.call(r,t,n)},onMouseLeave:e.props.onUnPoint},n)}))},n)}))})}}]),n}(o.Component);(0,V.Z)(Qt,"propTypes",{visible:s().bool,className:s().string,x:s().func.isRequired,y:s().func.isRequired,r:s().oneOfType([s().func,s().number]),fill:s().oneOfType([s().func,s().string]).isRequired,stroke:s().oneOfType([s().func,s().string]),strokeWidth:s().number,defined:s().oneOfType([s().func,s().bool]),series:s().array,opacity:s().oneOfType([s().func,s().number]),onPoint:s().func,onUnPoint:s().func}),(0,V.Z)(Qt,"defaultProps",{visible:!0,defined:!0,strokeWidth:1.5,r:3});var en={linear:we.Z,step:Ze.ZP,"step-after":Ze.cD,"step-before":Ze.RN,monotone:_e.Z,basis:je.ZP},tn=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),(r=t.call(this,e)).state={path:(0,Ce.Z)()},r}return(0,he.Z)(n,[{key:"shouldComponentUpdate",value:function(e,t){return!(!e.visible&&!this.props.visible)&&(0,me.dm)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.lineWidth,n=e.className,r=e.series,i=e.visible,o=e.x,l=e.y,s=e.defined,u=e.colorScale;if(!i)return null;var c=this.state,d=c.interpolate,h=c.path,p=(0,me.Yq)(u,"black");return h.x(o).y(l).defined(null===s||void 0===s||s).curve(d),(0,a.jsx)("g",{fill:"none",pointerEvents:"none",strokeWidth:t,className:n,children:r.map((function(e,t){return e.length?(0,a.jsx)("g",{children:(0,a.jsx)("path",{d:h(e,t),stroke:p(e[0],t),strokeLinecap:"square"})},"line"+t):null}))})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r=null!==(n=en[e.interpolate])&&void 0!==n?n:we.Z;return r!==t.interpolate?{interpolate:r}:null}}]),n}(o.Component);(0,V.Z)(tn,"propTypes",{visible:s().bool,className:s().string,x:s().func.isRequired,y:s().func.isRequired,colorScale:s().func.isRequired,interpolate:s().string,defined:s().func,series:s().array,lineWidth:s().number}),(0,V.Z)(tn,"defaultProps",{visible:!0,lineWidth:2});var nn,rn={expr:d.qoh,exprLines:d.igW,title:d.ngi,subtitle:d.sIU,footnote:d.Ab9,footnoteLink:d.YSc,stacked:d.AVO,labels:d.X0T,legend:d.u8h,legendLines:d.$HV,legendVisible:d.sd1,format:d.WUZ,formatLines:d.oLd,colorByPoint:d.qIO,dir:d.aL8,visible:d.RrV,chartColors:d.vK5,interpolate:d.sXR,size:d.hkI,axisValue:{title:d.PAN,format:d.yfo,clip:d.x_l,type:d.UGP,min:d.kq3,max:d.PjO,reverse:d.t2f},axisValue2:{title:d.PAN,format:d.yfo,clip:d.x_l,type:d.UGP,min:d.kq3,max:d.PjO,reverse:d.t2f,disabled:d.wah},axisDim:{title:d.PAN,format:d.yfo,reverse:d.t2f}},an=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(){var e;return(0,de.Z)(this,n),e=t.apply(this,arguments),(0,V.Z)((0,ce.Z)(e),"isDefined",(function(e){return null!=e.v})),(0,V.Z)((0,ce.Z)(e),"transformX",(function(t){return e.state.dimAxis.scale(t.category)})),(0,V.Z)((0,ce.Z)(e),"transformY",(function(t){return e.state.valueAxis2.scale(t.v)})),(0,V.Z)((0,ce.Z)(e),"transformY2",(function(t){return e.state.valueAxis2.scale(t.v)})),(0,V.Z)((0,ce.Z)(e),"valueLabel",(function(e){return String(e.v)})),(0,V.Z)((0,ce.Z)(e),"onMouseMove",(function(t){var n=e.state,r=n.dimAxis,i=n.seriesLine,a=n.formatCols,o=n.formatLines,l=(0,Te.Ro)(t,t.target),s=xt(i,[l.left||0,l.top||0],e.transformX,e.transformY,.5*r.bandwidth(),e.isDefined);s?e.onPoint(s,t,o):e.lastRectPoint?e.onPoint(e.lastRectPoint,t,a):e.onUnpoint()})),(0,V.Z)((0,ce.Z)(e),"onPoint",(function(t,n,r){var i=e.state,a=i.labels,o=i.size,l=i.legend;e.setState({focusKnot:t,hover:{title:a?a[t.category]:String(t.category+1),dimspec:(0,V.Z)({},l[t.series].text,(0,me.Mm)(t.cell,r,e.props.locale)),simple:1===o[1],cursorPosition:(0,Te.Ny)(n)}})})),(0,V.Z)((0,ce.Z)(e),"onUnpoint",(function(){e.setState({focusKnot:null,hover:null})})),(0,V.Z)((0,ce.Z)(e),"onPointRect",(function(t){e.lastRectPoint=t})),(0,V.Z)((0,ce.Z)(e),"onUnpointRect",(function(){e.lastRectPoint=null})),e}return(0,he.Z)(n,[{key:"render",value:function(){var e,t=this,n=this.props;if(!n.isEditor&&!d.RrV.read(n))return null;if(!(0,me.ud)(n.expr)||!n.model||!n.model.hasData)return this.renderError();var r=this.context,i=r.chartTheme,o=r.theme,l=this.state,s=l.legend,u=l.legendVisible,c=l.valueAxis,h=l.valueAxis2,p=l.dimAxis,f=l.isStacked,v=l.haveLineData,m=l.seriesLine,g=d.ngi.read(n),x=d.sIU.read(n),y=d.vK5.read(n,{minColors:7,autoExtend:!0,default:i.palette}).map(o.resolveColor),k=$e({byPoint:d.qIO.read(n),backgroundColor:o.backgroundColor,palette:y}),w=function(e){return k(e.series,e.category)},Z=jt.prepare({text:d.Ab9.read(n),href:d.YSc.read(n),style:null===i||void 0===i?void 0:i.footnote});p.applyStyle(i.dataAxis),c.applyStyle(i.valueAxis),h.applyStyle(i.valueAxis);var _,j=this.state.width,S=Pt(j,[p,c,h],g,x,void 0,o.chartFontStack),C=S.margin,T=S.width,M=S.height,N=S.title,E=S.subtitle;s.maxWidth=j,C.bottom+=u?(null!==(_=null===(e=i.legend)||void 0===e?void 0:e.margin)&&void 0!==_?_:0)+s.height:0,s.forEach((function(e,t){return e.color=w({series:t})})),Z.maxWidth=j-C.right;var D,R,L,W,z=0;Z.height&&(C.bottom+=Z.height+(null!==(R=null===(D=i.footnote)||void 0===D?void 0:D.margin)&&void 0!==R?R:0),z=M+C.top+C.bottom-Z.height,u&&(z-=s.height+(null!==(W=null===(L=i.legend)||void 0===L?void 0:L.margin)&&void 0!==W?W:0)));p.range([0,T]),c.range([M,0]),h.range([M,0]),s.applyStyle(i.legend);var P,A=c.error||h.error,V=p.size/p.domain().length,F=V>30&&m.length<9,B=b(1.2,1+.3*Math.pow(V,.5),2.8);return this.wrap((0,a.jsxs)("svg",{viewBox:"0 0 ".concat(T+C.left+C.right," ").concat(M+C.top+C.bottom),style:{overflow:"visible"},"aria-label":"Combo Chart",role:"img",children:[N&&(0,a.jsx)("g",{transform:"translate(1,0)",fill:o.color,children:N.render()}),E&&(0,a.jsx)("g",{transform:"translate(1,".concat(null!==(P=null===N||void 0===N?void 0:N.height)&&void 0!==P?P:0,")"),fill:o.color,children:E.render()}),(0,a.jsxs)("g",{transform:"translate(".concat(C.left,",").concat(C.top,")"),pointerEvents:"all",onMouseMove:this.onMouseMove,onMouseLeave:this.onUnpoint,children:[(0,a.jsx)("rect",{width:T,height:M,fill:"none",pointerEvents:"all"}),(0,a.jsx)(Tt,{styles:i,x:p,y:c}),A&&(0,a.jsxs)("g",{children:[(0,a.jsx)(Pe,{y:0,x:T/2,height:M,width:T-.15*T,align:"center",vAlign:"middle",color:o.color,size:14,text:"Invalid data: "+A}),(0,a.jsx)("rect",{})]}),(0,a.jsx)(gt,{id:"clip-"+n.id,active:c.isClipped,width:T,height:M,children:(0,a.jsx)(Kt,{visible:!A,series:this.state.series,x:p.scale,y:c.scale,fill:w,overlap:f?1:0,bandWidth:p.bandwidth(),zero:c.zero,onPoint:this.onPointRect,onUnPoint:this.onUnpointRect,showValues:d.ADu.NONE,styles:i,label:this.valueLabel,width:T,height:M})}),(0,a.jsxs)(gt,{id:"clip2-"+n.id,active:h.isClipped,width:T,height:M,children:[(0,a.jsx)(tn,{visible:v,width:T,series:m,x:this.transformX,y:this.transformY2,colorScale:w,interpolate:d.sXR.read(n),defined:this.isDefined,lineWidth:B}),(0,a.jsx)(Qt,{visible:v&&F,width:T,series:m,x:this.transformX,y:this.transformY2,r:function(e){return e===t.state.focusKnot?1.8*B:1.2*B},fill:w,stroke:"none",defined:this.isDefined})]}),(0,a.jsx)(Zt,{data:p,y:M}),(0,a.jsx)(_t,{data:c}),(0,a.jsx)(_t,{data:h,x:T})]}),(0,a.jsx)(jt,{data:Z,y:z}),(0,a.jsx)(Et,{data:u&&s||null,width:j,y:M+C.top+C.bottom-s.height})]}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.locale===t.lastLocale&&!e.isSelected&&e.model&&e.model.lastWrite===t.modelId)return null;var n,i,a,o=e.locale,l=e.axisDim&&d.WUZ.read((0,r.Z)({model:e.model,locale:e.locale},e.axisDim)),s=d.X0T.read(e),u=d.AVO.read(e),c=(0,me.vl)(d.aL8.read(e)),h=null,p=[],f=[],v=(0,me.ud)(e.exprLines),m=(0,r.Z)({model:e.model},e.axisValue2),g=d.wah.read(m),b=d.qoh.readCropped(e),x=b[0].length-(b.emptyRight||0),y=b.length-(b.emptyBottom||0);if(c&&"auto"!==c||(c=x<y?"col":"row"),h="row"===c?[x,y]:[y,x],a=(0,F.Z)(Vt(b,h,c,{stackSeries:u}),2),n=a[0],i=a[1],d.igW.isSet(e)){var k=d.igW.readCropped(e),w=k[0].length-(k.emptyRight||0),Z=k.length-(k.emptyBottom||0);w*Z===0&&(Z=0);var _,j,S="row"===c?[w,Z]:[Z,w],C=h[1];if(p=(_=(0,F.Z)(Vt(k,S,c),2))[0],f=_[1],p.forEach((function(e){e.forEach((function(e){e.series+=C}))})),g)(j=i).push.apply(j,(0,B.Z)(f));h=[Math.max(h[0],S[0]),h[1]+S[1]]}for(var T=rt(s,c,l,o),M=Qe(d.u8h.read(e)),N=Qe(d.$HV.read(e)),E=[[]],D=n.length+p.length,R=0;R<D;R++){var L=R<n.length?M[R]:N[R-n.length];null!=L&&(E[0][R]=L)}var W=Et.prepare({labels:E,length:D,locale:e.locale});return W.forEach((function(e,t){t>=n.length&&(e.symbol="line")})),{legend:W,labels:T,size:h,series:n,seriesLine:p,isStacked:u,haveLineData:v,legendVisible:d.sd1.isSet(e)?d.sd1.read(e):!tt(E),valueAxis:_t.prepare({props:e,data:i,locale:o,orient:"left",needZero:!0}),valueAxis2:_t.prepare({props:e,data:g?i:f,locale:o,orient:"right",needZero:g,axisName:"axisValue2"}),dimAxis:Zt.prepare({props:e,length:h[0],labels:s,locale:o,orient:"bottom"}),formatCols:d.WUZ.read(e),formatLines:d.oLd.read(e),modelId:e.model&&e.model.lastWrite,lastLocale:o}}}]),n}(Re);(0,V.Z)(an,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,locale:s().string}),(0,V.Z)(an,"chartType","column"),(0,V.Z)(an,"options",rn),(0,V.Z)(an,"requiredOption","expr"),(0,V.Z)(an,"contextType",m.u6);var on=(nn={expr:d.aTG,title:d.ngi,subtitle:d.sIU,footnote:d.Ab9,footnoteLink:d.YSc,labels:d.X0T,legend:d.j3,legendVisible:d.sd1,format:d.WUZ,dir:d.aL8,blanks:d.Na0,interpolate:d.sXR,visible:d.RrV,chartColors:d.vK5,annotations:d.r8$,size:d.hkI},(0,V.Z)(nn,d.dsG.name,d.dsG),(0,V.Z)(nn,"axisValue",{title:d.PAN,format:d.yfo,clip:d.x_l,type:d.UGP,min:d.kq3,max:d.PjO,reverse:d.t2f}),(0,V.Z)(nn,"axisDim",{title:d.PAN,format:d.yfo,reverse:d.t2f}),nn);function ln(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function sn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=1/0,i=null;return e.forEach((function(e){var a=ln(e,t);a<n&&a<r&&(r=a,i=e)})),i}var un={gap:"gap",zero:"zero",span:"span"},cn=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(){var e;return(0,de.Z)(this,n),e=t.apply(this,arguments),(0,V.Z)((0,ce.Z)(e),"onPoint",(function(t){var n,r,i=(0,Te.Ro)(t,t.target),a=sn(e.points||[],[null!==(n=i.left)&&void 0!==n?n:NaN,null!==(r=i.top)&&void 0!==r?r:NaN],40);if(a){var o=e.state,l=o.labels,s=o.legend,u=o.size,c=o.format,d=(0,F.Z)(a[2],4),h=d[0],p=d[1],f=(d[2],d[3]),v=(0,me.Mm)(f,c,e.props.locale);f&&!/\S/.test(v)&&(v='"'+v+'"'),e.setState({focusKnot:a,hover:{title:l?l[p]:String(p+1),dimspec:(0,V.Z)({},s[h].text,v),simple:1===u[1],cursorPosition:(0,Te.Ny)(t)}})}else e.onUnPoint()})),(0,V.Z)((0,ce.Z)(e),"onUnPoint",(function(){e.setState({focusKnot:null,hover:null})})),(0,V.Z)((0,ce.Z)(e),"isDefined",(function(t){return"gap"!==e.state.gapHandling||null!=t[2]})),e}return(0,he.Z)(n,[{key:"render",value:function(){var e,t=this.props;if(!t.isEditor&&!d.RrV.read(t))return null;if(!(0,me.ud)(t.expr)||!t.model||!t.model.hasData)return this.renderError();var n=this.context,r=n.chartTheme,i=n.theme,o=this.state,l=o.legend,s=o.legendVisible,u=o.size,c=o.series,h=o.rawValues,p=o.valueAxis,f=o.dimAxis,v=d.ngi.read(t),m=d.sIU.read(t),g=d.vK5.read(t,{minColors:7,autoExtend:!0,default:r.palette}).map(i.resolveColor),x=jt.prepare({text:d.Ab9.read(t),href:d.YSc.read(t),style:r.footnote}),y=(0,ke.Z)(g).domain((0,ye.Z)(u[1]));l.applyStyle(r.legend),l.colorize(y),p.applyStyle(r.valueAxis),f.applyStyle(r.dataAxis);var k,w=this.state.width,Z=Pt(w,[f,p],v,m,void 0,i.chartFontStack),_=Z.margin,j=Z.width,S=Z.height,C=Z.title,T=Z.subtitle;l.maxWidth=w,x.maxWidth=w-_.right,_.bottom+=s?(null!==(k=null===(e=r.legend)||void 0===e?void 0:e.margin)&&void 0!==k?k:0)+l.height:0;var M,N,E,D,R=0;x.height&&(_.bottom+=x.height+(null!==(N=null===(M=r.footnote)||void 0===M?void 0:M.margin)&&void 0!==N?N:0),R=S+_.top+_.bottom-x.height,s&&(R-=l.height+(null!==(D=null===(E=r.legend)||void 0===E?void 0:E.margin)&&void 0!==D?D:0)));this.points=h.map((function(e){return[f.scale(e[1]),p.scale(e[2].v),e]}));var L=this.state.focusKnot,W=f.size/f.domain().length,z=W>30&&c.length<9;"false"===d.dsG.read(t)&&(z=!1);var P,A=b(1.2,1+.3*Math.pow(W,.5),2.8),V=(0,me.ud)(t.expr);return this.wrap((0,a.jsxs)("svg",{viewBox:"0 0 ".concat(j+_.left+_.right," ").concat(S+_.top+_.bottom),style:{overflow:"visible"},"aria-label":"Line Chart",role:"img",children:[C&&(0,a.jsx)("g",{fill:i.color,transform:"translate(1,0)",children:C.render()}),T&&(0,a.jsx)("g",{fill:i.color,transform:"translate(1,".concat(null!==(P=null===C||void 0===C?void 0:C.height)&&void 0!==P?P:0,")"),children:T.render()}),(0,a.jsxs)("g",{transform:"translate(".concat(_.left,",").concat(_.top,")"),style:{display:""},children:[(0,a.jsxs)("g",{pointerEvents:"all",onMouseMove:this.onPoint,onMouseLeave:this.onUnPoint,children:[(0,a.jsx)("rect",{width:j,height:S,fill:"none"}),(0,a.jsx)(Tt,{styles:r,x:f,y:p}),(0,a.jsxs)(gt,{id:"clip-"+t.id,active:p.isClipped,width:j,height:S,children:[(0,a.jsx)(tn,{visible:V,width:j,series:c,x:this.state.transformX,y:this.state.transformY,colorScale:function(e){return y(e[0])},interpolate:d.sXR.read(t),defined:this.isDefined,lineWidth:A}),(0,a.jsx)(Qt,{visible:V&&z,width:j,series:c,x:this.state.transformX,y:this.state.transformY,r:1.2*A,fill:function(e){return y(e[0])},stroke:i.background,defined:this.isDefined}),L&&(0,a.jsx)("circle",{cx:L[0],cy:L[1],fill:y(L[2][0]),strokeWidth:"1",stroke:i.background,r:1.8*A}),(0,a.jsx)(mt,{visible:V,styles:r,x:f,y:p,data:this.state.annotations})]})]}),(0,a.jsx)(Zt,{data:f,y:S}),(0,a.jsx)(_t,{data:p})]}),(0,a.jsx)(jt,{data:x,y:R}),(0,a.jsx)(Et,{data:s&&l||null,width:w,y:S+_.top+_.bottom-l.height})]}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.locale===t.lastLocale&&!e.isSelected&&e.model&&e.model.lastWrite===t.modelId)return null;var n=d.aTG.readCropped(e),i=n[0].length-(n.emptyRight||0),a=n.length-(n.emptyBottom||0),o=(0,me.vl)(d.aL8.read(e));o&&"auto"!==o||(o=i<a?"col":"row");var l="row"===o?[i,a]:[a,i],s=e.locale,u=e.axisDim&&d.WUZ.read((0,r.Z)({model:e.model,locale:e.locale},e.axisDim)),c=d.X0T.read(e),h=rt(c,o,u,s),p=[];if(!(0,me.ud)(e.expr)){var f=h?h.length:0;l=[f,1],n=[[]]}var v=(0,me.wB)(d.Na0.read(e),un,"gap"),m=[],g=(0,ye.Z)(l[1]).map((function(){return[]}));(0,ye.Z)(a*i).forEach((function(e){var t=~~(e%l[1]),r=~~(e/l[1]),i="row"===o?n[t][r]:n[r][t],a=i||null;if(a=At(i)?null:et(i)?i:{v:0})m.push(a),p.push([t,r,a,i]),g[t].push([t,r,a]);else if("zero"===v){var s={v:0};m.push(s),p.push([t,r,i||s,i]),g[t].push([t,r,null])}else"gap"===v&&g[t].push([t,r,null])}));var b=d.j3.read(e),x=Zt.prepare({props:e,length:l[0],labels:c,locale:s,orient:"bottom"}),y=_t.prepare({props:e,data:m,locale:s,orient:"left"});return{legend:Et.prepare({labels:b,dir:o,length:l[1],locale:e.locale}),labels:h,size:l,series:g,rawValues:p,gapHandling:v,annotations:pt(d.r8$.read(e)),legendVisible:d.sd1.isSet(e)?d.sd1.read(e):!tt(b),valueAxis:y,dimAxis:x,transformX:function(e){return x.scale(e[1])},transformY:function(e){return y.scale(e[2]?e[2].v:0)},format:d.WUZ.read(e),modelId:e.model&&e.model.lastWrite,lastLocale:s}}}]),n}(Re);(0,V.Z)(cn,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired}),(0,V.Z)(cn,"chartType","line"),(0,V.Z)(cn,"options",on),(0,V.Z)(cn,"requiredOption","expr"),(0,V.Z)(cn,"contextType",m.u6);var dn=n(83462),hn=2*Math.PI;function pn(e,t){for(var n=Math.atan2(t,e)+Math.PI/2;n<0;)n+=hn;return{angle:n,radius:Math.sqrt(e*e+t*t)}}function fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6;return e.x<t.x+t.width+n&&e.x+e.width+n>t.x&&e.y<t.y+t.height&&e.height+e.y>t.y}function vn(e,t){return t.angle>e.startAngle&&t.angle<e.endAngle}var mn={expr:d.aTG,title:d.ngi,subtitle:d.sIU,footnote:d.Ab9,footnoteLink:d.YSc,legend:d.j3,legendVisible:d.sd1,sortOrder:d.zPv,size:d.hkI,format:d.WUZ,piehole:d.hAB,dir:d.aL8,visible:d.RrV,chartColors:d.vK5,valueLabels:d.ADu},gn=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(){return(0,de.Z)(this,n),t.apply(this,arguments)}return(0,he.Z)(n,[{key:"contrastColor",value:function(e){if(!e)return"white";if("currentcolor"===e.toLowerCase()){var t=this.context;return(0,Ut.$p)(t.theme.color,"white","black")}return(0,Ut.$p)(e,"white","black")}},{key:"render",value:function(){var e=this,t=this.props;if(!t.isEditor&&!d.RrV.read(t))return null;var n=this.context,r=n.chartTheme,i=n.theme,o=t.locale,l=this.state,s=l.dir,u=l.legendRaw,c=l.showLegend,h=l.data,p=l.format,f=l.error,v=l.isDonut,m=l.numSlices,b=this.state.width>g.HN?this.state.showValues:d.ADu.NONE,x=d.ngi.read(t),y=d.sIU.read(t),k=(0,Je.Z)(i.backgroundColor||"#fff",i.color||"black");if(!(0,me.ud)(t.expr)||!t.model||!t.model.hasData)return this.renderError();var w=d.vK5.read(t,{minColors:7,autoExtend:!0,default:r.palette}).map(i.resolveColor);h.forEach((function(e){e.color=w[e.index%w.length]}));var Z=jt.prepare({text:d.Ab9.read(t),href:d.YSc.read(t),style:r.footnote}),_=Et.prepare({labels:u,dir:s,length:m,locale:t.locale,style:r.legend});_.forEach((function(e,t){return e.color=w[t%w.length]}));var j,S,C=this.state.width,T=Pt(C,[],x,y,void 0,i.chartFontStack),M=T.margin,N=T.width,E=T.height,D=T.title,R=T.subtitle;(_.maxWidth=C,Z.maxWidth=C-M.right,c&&_)&&(M.bottom+=(null!==(S=null===(j=r.legend)||void 0===j?void 0:j.margin)&&void 0!==S?S:0)+_.height);var L,W,z,P,A=0;Z.height&&(M.bottom+=Z.height+(null!==(z=null===(L=r.footnote)||void 0===L?void 0:L.margin)&&void 0!==z?z:0),A=E+M.top+(null!==(P=null===(W=r.footnote)||void 0===W?void 0:W.margin)&&void 0!==P?P:0));var V,B=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,me.Mm)(e.cell,p,o);return t&&!(0,O.TQ)(p||e.cell.z||"")&&(n+=(0,O.WU)('" ("#,##0.0#%")"',e.percent,{locale:o,nbsp:!0})),n},I=function(e,t){var n,r;return{title:null!==(r=null===(n=_[e.index])||void 0===n?void 0:n.text)&&void 0!==r?r:"Series1",dimspec:{value:B(e,!0)},simple:!0,cursorPosition:t}},U=Math.min(N,E)/2-1,H=(0,dn.Z)().innerRadius(v?U/2:0).outerRadius(U),q=(0,dn.Z)().innerRadius(U).outerRadius(.5*U);(h.forEach((function(t){if(b===d.ADu.NONE)t.label=null;else{var n=B(t),r=(0,F.Z)(q.centroid(t),2),i=r[0],a=r[1],o=e.contrastColor(t.color);t.label={width:ze().measureText(n),color:o,dark:"black"===o,height:14,text:n,x:i,y:a}}})),b===d.ADu.SOME)&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=function(e,r){return r.radius<t&&r.radius>(n?.5*t:0)};e.forEach((function(t){var n=t.label;if(n&&!n.hidden){var a=pn(n.x-n.width/2,n.y),o=pn(n.x+n.width/2,n.y),l=i(t,a),s=i(t,o),u=vn(t,a),c=vn(t,o);if(!(l&&u&&s&&c)){var d=n.dark;if(u&&!l&&d!==r||c&&!s&&d!==r)n.hidden=!0;else if(!u&&l||!c&&s){var h=a.angle,p=o.angle;p<h&&(p+=hn),e.filter((function(e){var t=e.startAngle,n=e.endAngle;return t>h&&n<p||h>t&&h<n||p>t&&p<n})).every((function(e){return e.label.dark===d}))||(n.hidden=!0)}}}})),e.sort((function(e,t){return t.v-e.v})).map((function(e){return e.label})).forEach((function(e,t,n){if(e&&!e.hidden)for(var r=t+1;r<n.length;r++){var i=n[r];!i.hidden&&i!==e&&fn(e,i)&&(i.hidden=!0)}}))}(h,U,v,"black"===(0,Ut.$p)(i.background,"white","black"));return this.wrap((0,a.jsxs)("svg",{viewBox:"0 0 ".concat(N+M.left+M.right," ").concat(E+M.top+M.bottom),style:{overflow:"visible"},"aria-label":"Pie Chart",role:"img",children:[D&&(0,a.jsx)("g",{transform:"translate(1,0)",fill:i.color,children:D.render()}),R&&(0,a.jsx)("g",{transform:"translate(1,".concat(null!==(V=null===D||void 0===D?void 0:D.height)&&void 0!==V?V:0,")"),fill:i.color,children:R.render()}),(0,a.jsx)("g",{transform:"translate(".concat(M.left,",").concat(M.top,")"),children:f?(0,a.jsxs)("g",{children:[(0,a.jsx)("circle",{r:U,cx:N/2,cy:E/2,fill:"none",stroke:k(.3),strokeDasharray:"4 3",strokeWidth:1.5}),(0,a.jsx)(Pe,{y:E/2,x:N/2,height:E,width:N-.15*N,align:"center",vAlign:"middle",color:i.color,font:i.chartFontStack,size:14,text:"Invalid data: "+f}),(0,a.jsx)("rect",{})]}):(0,a.jsxs)("g",{transform:"translate(".concat(N/2,",").concat(E/2,")"),children:[h.map((function(t,n){return(0,a.jsx)("path",{fill:t.color,strokeWidth:.5,d:H(t),onMouseOver:function(n){var r=(0,Te.Ny)(n);e.setState({hover:I(t,r)})},onMouseMove:function(n){var r=(0,Te.Ny)(n);e.setState({hover:I(t,r)})},onMouseLeave:function(){e.setState({hover:null})}},n)})),h.map((function(e,t){return!(!e.label||e.label.hidden)&&(0,a.jsx)("g",{pointerEvents:"none",children:(0,a.jsx)(Pe,{x:e.label.x,y:e.label.y,align:"center",vAlign:"middle",font:i.chartFontStack,color:e.label.color,size:14,text:e.label.text})},t)}))]})}),(0,a.jsx)(jt,{data:Z,y:A}),(0,a.jsx)(Et,{data:c&&_||null,width:C,y:E+M.top+M.bottom-_.height})]}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.locale===t.lastLocale&&!e.isSelected&&e.model&&e.model.lastWrite===t.modelId)return null;var n=d.aTG.read(e),r=n[0].length-(n.emptyRight||0),i=n.length-(n.emptyBottom||0),a=(0,me.vl)(d.aL8.read(e));a&&"auto"!==a||(a=1===r?"row":1===i||r<i?"col":"row");for(var o,l="row"===a?[r,i]:[i,r],s=[],u=0,c=(0,F.Z)(l,2)[1],h=0;h<c;h++){var p="row"===a?n[h][0]:n[0][h];if(et(p)){var f=p.v;f<0&&(o="Cannot draw pie chart because the data contains a negative number."),s.push({v:f,cell:p,index:h,percent:0}),u+=f}}(!s.length||u<=0)&&(o="Cannot draw pie chart because the data has no positive numbers."),s.forEach((function(e){return e.percent=e.v/u}));var v=d.zPv.read(e);"descending"===v||"desc"===v?s=s.sort((function(e,t){return t.v-e.v})):"ascending"===v||"asc"===v?s=s.sort((function(e,t){return e.v-t.v})):"helium"===v&&(s=function(e){var t=[],n=[],r=0,i=0;return(e=e.sort((function(e,t){return t.v-e.v}))).forEach((function(e){r<=i?(r+=e.v,n.push(e)):(i+=e.v,t.unshift(e))})),n.concat(t)}(s)),s.reduce((function(e,t){var n=t.percent*Math.PI*2;return t.startAngle=e,t.midAngle=e+n/2,t.endAngle=e+n,t.endAngle}),0);var m=d.j3.read(e);return{dir:a,legendRaw:m,size:l,data:s,error:o,numSlices:c,showValues:d.ADu.read(e),isDonut:d.hAB.read(e),showLegend:d.sd1.isSet(e)?d.sd1.read(e):!tt(m),modelId:e.model&&e.model.lastWrite,format:d.WUZ.read(e),lastLocale:e.locale}}}]),n}(Re);(0,V.Z)(gn,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired}),(0,V.Z)(gn,"chartType","pie"),(0,V.Z)(gn,"options",mn),(0,V.Z)(gn,"requiredOption","expr"),(0,V.Z)(gn,"contextType",m.u6);var bn=n(14177),xn={gap:"gap",zero:"zero",span:"span"},yn={expr:d.aTG,title:d.ngi,subtitle:d.sIU,footnote:d.Ab9,footnoteLink:d.YSc,labels:d.Z4D,legend:d.Va_,legendVisible:d.sd1,format:d.WUZ,blanks:d.Na0,dir:d.aL8,visible:d.RrV,chartColors:d.vK5,categories:d.kaq,annotations:d.rtj,size:d.hkI,axisValue:{title:d.PAN,format:d.yfo,clip:d.x_l,type:d.UGP,min:d.kq3,max:d.PjO,reverse:d.t2f},axisValue2:{title:d.PAN,format:d.yfo,clip:d.x_l,type:d.UGP,min:d.kq3,max:d.PjO,reverse:d.t2f},axisBubble:{title:d.PAN,format:d.yfo,min:d.k_n,max:d.PjO}},kn=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(){return(0,de.Z)(this,n),t.apply(this,arguments)}return(0,he.Z)(n,[{key:"render",value:function(){var e,t=this,n=this.props;if(!n.isEditor&&!d.RrV.read(n))return null;if(!(0,me.ud)(n.expr)||!n.model||!n.model.hasData)return this.renderError();var r=this.state.width,i=this.context,o=i.theme,l=i.chartTheme,s=n.locale,u=this.state,c=u.z,h=u.dir,p=u.format,f=u.axisValue,v=u.axisValue2,m=u.axisBubble,g=u.legendVisible,b=u.uniqueCategories,x=d.ngi.read(n),y=d.sIU.read(n),k=d.vK5.read(n,{minColors:7,autoExtend:!0,default:l.palette}).map(o.resolveColor),w=(0,ke.Z)(k).domain((0,ye.Z)(b)),Z=Et.prepare({labels:b.map((function(e){return[{v:e}]})),dir:h,length:b.length,locale:s,style:null===l||void 0===l?void 0:l.legend});Z.forEach((function(e){return e.color=w(e.text)})),Z.maxWidth=r;var _=jt.prepare({text:d.Ab9.read(n),href:d.YSc.read(n),style:null===l||void 0===l?void 0:l.footnote});f.applyStyle(l.valueAxis),v.applyStyle(l.valueAxis);var j,S=Pt(r,[f,v],x,y,void 0,o.chartFontStack),C=S.margin,T=S.width,M=S.height,N=S.title,E=S.subtitle;C.bottom+=g?(null!==(j=null===(e=l.legend)||void 0===e?void 0:e.margin)&&void 0!==j?j:0)+Z.height:0,_.maxWidth=r-C.right,c.range([2.5,.075*Math.min(T,M)]);var D,R,L,W,z=0;_.height&&(C.bottom+=_.height+(null!==(R=null===(D=l.footnote)||void 0===D?void 0:D.margin)&&void 0!==R?R:0),z=M+C.top+C.bottom-_.height,g&&(z-=Z.height+(null!==(W=null===(L=l.legend)||void 0===L?void 0:L.margin)&&void 0!==W?W:0)));var P,A=function(e){return e.z&&e.z.v<0},B=function(e,t){var n,r=[v.title].filter(Boolean).join(": "),i=[f.title].filter(Boolean).join(": "),a=["Size",m.title].filter(Boolean).join(": ");return{title:e.label,subtitle:e.category,swatch:w(e.category),dimspec:(n={},(0,V.Z)(n,r||"X axis",(0,me.Mm)(e.x,p||v.format,s)),(0,V.Z)(n,i||"Y axis",(0,me.Mm)(e.y,p||f.format,s)),(0,V.Z)(n,a||"Size axis",(0,me.Mm)(e.z,p||m.format,s)),n),cursorPosition:t}},I=this.state.data;if(v.isClipped||f.isClipped){var O=(0,F.Z)(v.domain(),2),U=O[0],H=O[1],q=(0,F.Z)(f.domain(),2),Y=q[0],X=q[1];I=[I[0].filter((function(e){return!(e.x.v<U||e.x.v>H||e.y.v<Y||e.y.v>X)}))]}return this.wrap((0,a.jsxs)("svg",{viewBox:"0 0 ".concat(T+C.left+C.right," ").concat(M+C.top+C.bottom),style:{overflow:"visible"},"aria-label":"Scatter Plot",role:"img",children:[N&&(0,a.jsx)("g",{transform:"translate(1,0)",fill:o.color,children:N.render()}),E&&(0,a.jsx)("g",{transform:"translate(1,".concat(null!==(P=null===N||void 0===N?void 0:N.height)&&void 0!==P?P:0,")"),fill:o.color,children:E.render()}),(0,a.jsxs)("g",{transform:"translate(".concat(C.left,",").concat(C.top,")"),children:[(0,a.jsx)(Tt,{styles:l,x:v,y:f}),(0,a.jsx)(Qt,{series:I,x:function(e){return v.scale(e.x.v)},y:function(e){return f.scale(e.y.v)},r:function(e){return e.z?c(Math.abs(e.z.v)):4},opacity:.45,stroke:function(e){return A(e)?w(e.category):null},strokeWidth:1.7,fill:function(e){return A(e)?o.background:w(e.category)}}),(0,a.jsx)(yt,{width:T,height:M,series:I,x:function(e){return v.scale(e.x.v)},y:function(e){return f.scale(e.y.v)},r:function(e){return e.z?c(Math.abs(e.z.v)):4},stroke:function(e){return A(e)?w(e.category):null},strokeWidth:1.7,fill:function(e){return A(e)?o.background:w(e.category)},onPoint:function(e,n){t.setState({hover:B(e,(0,Te.Ny)(n))})},onUnPoint:function(){t.setState({hover:null})}}),(0,a.jsx)(mt,{styles:l,x:v,y:f,data:this.state.annotations}),(0,a.jsx)(_t,{data:f}),(0,a.jsx)(_t,{data:v,y:M})]}),(0,a.jsx)(jt,{data:_,y:z}),(0,a.jsx)(Et,{data:g&&Z||null,width:r,y:M+C.top+C.bottom-Z.height})]}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.locale===t.lastLocale&&!e.isSelected&&e.model&&e.model.lastWrite===t.modelId)return null;var n=d.aTG.read(e),i=n[0].length-(n.emptyRight||0),a=n.length-(n.emptyBottom||0),o=(0,me.vl)(d.aL8.read(e));o&&"auto"!==o||(o=i<a?"col":"row");var l="row"===o?[i,a]:[a,i],s=e.locale,u=nt(d.Z4D.read(e),o),c=(0,me.wB)(d.Na0.read(e),xn,"gap"),h=rt(d.Va_.read(e),o,void 0,s),p=function(e){var t=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,n=rt(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row",arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0);if(n){var r=new Set(n),i=Array.from(r).indexOf(""),a=n.length;if(t&&n.length>0&&t>n.length&&(-1===i&&(i=r.size),a=t),-1!==i)for(var o=0;o<=a;o++)n[o]&&""!==n[o]||(n[o]="Category ".concat(i+1))}return n}(d.kaq.read(e),o,void 0,s,l[0]),f=Array.from(new Set(p)),v=l[1],m=l[0],g=[],b=!1,x=1===v?["y"]:["x","y","z"],y={x:[],y:[],z:[]};if(v)for(var k=0;k<m;k++){for(var w,Z=!0,_={index:k,label:u&&u[k]?(0,me.Mm)(u[k],void 0,s):null,category:null!==(w=null===p||void 0===p?void 0:p[k])&&void 0!==w?w:null},j=0;j<Math.min(3,v);j++){var S="row"===o?n[j][k]:n[k][j],C=x[j];At(S)&&(S=null);var T=S&&!et(S);if(S&&!T||(S="zero"===c?{v:0}:null),S)_[C]={v:S.v,z:S.z,id:S.id,F:S.F,sheetIndex:S.sheetIndex},y[C].push(S);else{if("x"!==C||!T){Z=!1;break}b=!0}}Z&&g.push(_)}var M=1===v||b;M&&(y.x=[],g.forEach((function(e){e.x={v:e.index+1},y.x.push(e.x)})));var N=(0,Ve.Z)(y.z,(function(e){return Math.abs(1*e.v)}));if(e.axisBubble){var E=(0,r.Z)({model:e.model,locale:e.locale},e.axisBubble),D=d.k_n.read(E),R=d.PjO.read(E);null!=D&&isFinite(D)&&D<N[0]&&N.push(D),null!=R&&isFinite(R)&&R>N[1]&&N.push(R)}var L=(0,bn._b)().domain((0,Ve.Z)(N));return L.zero=0,{size:l,data:[g],z:L,dotPlotMode:M,axisTitles:h,uniqueCategories:f,annotations:pt(d.rtj.read(e)),legendVisible:d.sd1.isSet(e)?d.sd1.read(e):f.length>0,axisValue:_t.prepare({props:e,axisName:"axisValue",data:y.y,locale:s,defaultTitle:h&&h[1]||"",orient:"left"}),axisValue2:_t.prepare({props:e,axisName:"axisValue2",data:y.x,locale:s,defaultTitle:h&&h[0]||"",orient:"bottom"}),axisBubble:_t.prepare({props:e,axisName:"axisBubble",data:y.z,locale:s,defaultTitle:h&&h[2]||"",orient:"none"}),modelId:e.model&&e.model.lastWrite,format:d.WUZ.read(e),lastLocale:s}}}]),n}(Re);(0,V.Z)(kn,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired}),(0,V.Z)(kn,"chartType","scatter"),(0,V.Z)(kn,"options",yn),(0,V.Z)(kn,"requiredOption","expr"),(0,V.Z)(kn,"contextType",m.u6);var wn=[[{v:"Increase"},{v:"Decrease"},{v:"Total"}]],Zn={expr:d.aTG,title:d.ngi,subtitle:d.sIU,footnote:d.Ab9,footnoteLink:d.YSc,labels:d.X0T,legend:d.j3,legendVisible:d.sd1,format:d.WUZ,dir:d.aL8,visible:d.RrV,changeColors:d.UB1,totalValues:d.u5L,valueLabels:d.ADu,size:d.hkI,axisValue:{title:d.PAN,format:d.yfo,clip:d.x_l,type:d.UGP,min:d.kq3,max:d.PjO,reverse:d.t2f},axisDim:{title:d.PAN,format:d.yfo,reverse:d.t2f}},_n=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(){return(0,de.Z)(this,n),t.apply(this,arguments)}return(0,he.Z)(n,[{key:"render",value:function(){var e,t=this,n=this.props;if(!n.isEditor&&!d.RrV.read(n))return null;if(!(0,me.ud)(n.expr)||!n.model||!n.model.hasData)return this.renderError();var r=this.context,i=r.chartTheme,o=r.theme,l=this.state,s=l.dir,u=l.legendRaw,c=l.legendVisible,h=l.valueAxis,p=l.dimAxis,f=l.isLegendVisibleSet,v=l.showValues,m=l.isUsingTotals,b=l.labels,x=l.size,y=l.series,k=l.format,w=l.connectors,Z=d.ngi.read(n),_=d.sIU.read(n),j=d.UB1.read(n,{minColors:3,autoExtend:!1,default:i.changePalette}).map(o.resolveColor),S=Et.prepare({labels:u,dir:s,length:3,locale:n.locale,style:null===i||void 0===i?void 0:i.legend}),C=jt.prepare({text:d.Ab9.read(n),href:d.YSc.read(n),style:null===i||void 0===i?void 0:i.footnote}),T=$e({byPoint:d.qIO.read(n),backgroundColor:o.backgroundColor,palette:j});h.applyStyle(i.valueAxis),p.applyStyle(i.dataAxis);var M,N=this.state.width,E=Pt(N,[p,h],Z,_,void 0,o.chartFontStack),D=E.margin,R=E.width,L=E.height,W=E.title,z=E.subtitle,P=m+1;S.forEach((function(e,t){e.color=T(t),e.hidden=f&&c?t>P:0===y[t].length})),S.maxWidth=N,D.bottom+=c?(null!==(M=null===(e=i.legend)||void 0===e?void 0:e.margin)&&void 0!==M?M:0)+S.height:0,C.maxWidth=N-D.right;var A,F,B,I,O=0;C.height&&(D.bottom+=C.height+(null!==(F=null===(A=i.footnote)||void 0===A?void 0:A.margin)&&void 0!==F?F:0),O=L+D.top+D.bottom-C.height,c&&(O-=S.height+(null!==(I=null===(B=i.legend)||void 0===B?void 0:B.margin)&&void 0!==I?I:0)));p.range([0,R]),h.range([L,0]);var U,H=h.error,q=p.bandwidth(),Y=q>25?1:0;return this.wrap((0,a.jsxs)("svg",{viewBox:"0 0 ".concat(R+D.left+D.right," ").concat(L+D.top+D.bottom),style:{overflow:"visible"},"aria-label":"Waterfall Chart",role:"img",children:[W&&(0,a.jsx)("g",{transform:"translate(1,0)",fill:o.color,children:W.render()}),z&&(0,a.jsx)("g",{transform:"translate(1,".concat(null!==(U=null===W||void 0===W?void 0:W.height)&&void 0!==U?U:0,")"),fill:o.color,children:z.render()}),(0,a.jsxs)("g",{transform:"translate(".concat(D.left,",").concat(D.top,")"),children:[(0,a.jsx)(Tt,{styles:i,x:p,y:h}),H&&(0,a.jsxs)("g",{children:[(0,a.jsx)(Pe,{y:0,x:R/2,height:L,width:R-.15*R,align:"center",vAlign:"middle",color:o.color,size:14,text:"Invalid data: "+H}),(0,a.jsx)("rect",{})]}),(0,a.jsxs)(gt,{id:"clip-"+n.id,active:h.isClipped,width:R,height:L,children:[(0,a.jsx)(Kt,{visible:!H,series:y,x:p.scale,y:h.scale,fill:function(e){return T(e.series,e.category)},overlap:1,bandWidth:q,zero:h.zero,onPoint:function(e,r){t.setState({hover:{title:b?b[e.category]:String(e.category+1),dimspec:(0,V.Z)({},S[e.series].text,(0,me.Mm)(e.cell,k,n.locale)),simple:1===x[1],cursorPosition:(0,Te.Ny)(r)}})},onUnPoint:function(){return t.setState({hover:null})},showValues:this.state.width>g.HN?v:d.ADu.NONE,styles:i,label:function(e){return(0,me.Mm)(e.cell,k,n.locale)},width:R,height:L}),Y&&(0,a.jsx)("g",{className:"connectors",stroke:o.color,strokeWidth:Y,strokeOpacity:1,strokeLinecap:"round",fill:"none",children:w.map((function(e){var t=p.scale(e.category-1),n=p.scale(e.category),r=h.scale(e.start),i=h.scale(e.end),o=.49*q,l=n>t?"M".concat(t-o,",").concat(r," L").concat(t+o,",").concat(r," L").concat(n-o,",").concat(i," L").concat(n+o,",").concat(i):"M".concat(n-o,",").concat(i," L").concat(n+o,",").concat(i," L").concat(t-o,",").concat(r," L").concat(t+o,",").concat(r);return(0,a.jsx)("path",{d:l},e.category)}))})]}),(0,a.jsx)(Zt,{data:p,y:L}),(0,a.jsx)(_t,{data:h})]}),(0,a.jsx)(jt,{data:C,y:O}),(0,a.jsx)(Et,{data:c&&S||null,width:N,y:L+D.top+D.bottom-S.height})]}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n;if(e.locale===t.lastLocale&&!e.isSelected&&e.model&&e.model.lastWrite===t.modelId)return null;var i=d.aTG.readCropped(e),a=i[0].length-(i.emptyRight||0),o=i.length-(i.emptyBottom||0),l=(0,me.vl)(d.aL8.read(e));l&&"auto"!==l||(l=a<o?"col":"row");var s,u="row"===l?[a,o]:[o,a],c=e.locale,h=e.axisDim&&d.WUZ.read((0,r.Z)({model:e.model,locale:e.locale},e.axisDim)),p=d.X0T.read(e),f=rt(p,l,h,c);if((0,me.ud)(e.expr))s=(0,ye.Z)(o*a).map((function(e){var t=~~(e%u[1]),n=~~(e/u[1]),r="row"===l?i[t][n]:i[n][t];return null==r||(0,E.Z)(r,Error)?null:r}));else{var v=f?f.length:0;u=[v,1],s=(0,ye.Z)(v).map((function(){return{v:null}}))}var m=d.u5L.read(e),g=0,b=[],x=[[],[],[]],y=[];null===(n=(0,F.Z)(Vt(i,u,l),1)[0][0])||void 0===n||n.forEach((function(e,t,n){var r=!1;"both"===m?r=0===t||t===n.length-1:"first"===m?r=0===t:"last"===m&&(r=t===n.length-1),r?(e.base=0,e.series=2,b.push(e),y.push({start:g,end:e.v,category:t}),g=e.v):(e.base=g,e.series=e.v>=0?0:1,y.push({start:g,end:g,category:t}),g+=e.v,b.push({v:g})),x[e.series].push(e)})),y.shift();var k=d.j3.isSet(e),w=d.sd1.isSet(e),Z=k?d.j3.read(e):wn,_=w?d.sd1.read(e):!tt(Z);return{dir:l,legendRaw:Z,labels:f,size:u,data:s,series:x,connectors:y,isLegendVisibleSet:w,isUsingTotals:"both"===m||"first"===m||"last"===m,showValues:d.ADu.read(e),legendVisible:_,valueAxis:_t.prepare({props:e,data:b,locale:c,orient:"left",needZero:!0}),dimAxis:Zt.prepare({props:e,domain:Yt(u,s,e),length:u[0],labels:p,locale:c,orient:"bottom"}),format:d.WUZ.read(e),modelId:e.model&&e.model.lastWrite,lastLocale:c}}}]),n}(Re);(0,V.Z)(_n,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,locale:s().string}),(0,V.Z)(_n,"chartType","column"),(0,V.Z)(_n,"options",Zn),(0,V.Z)(_n,"requiredOption","expr"),(0,V.Z)(_n,"contextType",m.u6);var jn=n(51471),Sn=n(7465),Cn=n.n(Sn);function Tn(e){e.preventDefault()}function Mn(e){var t=e.checked&&!e.indeterminate,n=v()(Cn().checkmark,e.className,"radio"===e.type&&Cn().radio),r=v()(e.checked&&Cn().checked,e.disabled&&Cn().disabled,e.indeterminate&&Cn().mixed),i=t?"true":"false";e.indeterminate&&(i="mixed");var o=e.focusable&&!e.disabled,l=e.size;return(0,a.jsx)("span",{"aria-checked":i,"aria-disabled":!!e.disabled||void 0,className:n,style:l?{width:l+"px",height:l+"px"}:{},id:e.id,onClick:e.disabled?null:e.onClick,onMouseDown:e.disabled?Tn:e.onMouseDown,onKeyPress:function(t){e.disabled||!e.onClick||32!==t.charCode&&13!==t.charCode||(t.preventDefault(),e.onClick())},role:e.type,tabIndex:o?0:-1,children:"checkbox"===e.type?(0,a.jsxs)("span",{className:v()(Cn().box,r),children:[(0,a.jsx)("span",{className:Cn().fill}),(0,a.jsx)("svg",{className:Cn().mark,xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 16 16",shapeRendering:"geometricPrecision",children:t?(0,a.jsx)("path",{d:"M4.5,8.3 L7,10.8 L11.5,6.3",strokeWidth:"1.5",strokeLinecap:"round",fill:"none"}):null})]}):(0,a.jsxs)("span",{className:v()(Cn().disc,r),children:[(0,a.jsx)("span",{className:Cn().fill}),(0,a.jsx)("svg",{className:Cn().mark,xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 16 16",shapeRendering:"geometricPrecision",children:t?(0,a.jsx)("circle",{cx:"8",cy:"8",r:"4",stroke:"none"}):null})]})})}Mn.propTypes={className:s().string,onClick:s().func,onMouseDown:s().func,id:s().string,size:s().number,type:s().oneOf(["checkbox","radio"]),focusable:s().bool,checked:s().bool,disabled:s().bool,indeterminate:s().bool},Mn.defaultProps={size:20,type:"checkbox",focusable:!0,checked:!1,disabled:!1,indeterminate:!1};var Nn=n(26781),En=n(95254),Dn=n.n(En),Rn={expr:d.jFN,title:d.mn7,value:d.S3k,valueOff:d.nJN,visibility:d.RrV,disabled:d.JUm};function Ln(e){if(!e.isEditor&&!d.RrV.read(e))return null;var t=d.jFN.read(e),n=t&&t.v,o=d.S3k.read(e),l=!0===n;d.S3k.isSet(e)&&(l=(0,me.fC)(n,o));var s=!(0,me.ud)(e.expr),u=(0,me.hQ)(),c=s||d.JUm.read(e),h=s?"Target cell not selected":"";d.mn7.isSet(e)&&(h=d.mn7.read(e));var p=c?void 0:function(){try{var t;null===(t=document.getElementById(u))||void 0===t||t.focus()}catch(Oa){}if(e.track("interact",{elementType:"checkbox"}),l){var n;n=d.nJN.isSet(e)?d.nJN.readCells(e):!0!==o&&"",d.jFN.write(e,n)}else{var r=d.S3k.readCells(e);d.jFN.write(e,r)}};return(0,a.jsxs)(k.Z,(0,i.Z)((0,r.Z)({className:Dn().checkbox},e),{children:[(0,a.jsx)(Mn,{id:u,checked:l,disabled:c,onClick:p}),(0,a.jsx)("label",{htmlFor:u,onClick:p,children:(0,a.jsx)(Nn.Z,{text:h,disabled:c,inline:!0})})]}))}Ln.options=Rn,Ln.requiredOption="expr",Ln.isInput=!0,Ln.propTypes={isEditor:s().bool,expr:s().string,parentKey:s().string,error:s().string,track:s().func,model:c.Z.isRequired};var Wn=n(11960),zn=n.n(Wn);function Pn(e){var t=e.disabled,n=e.value,r=e.type,i=e.error,o=e.options,l=(0,p.Z)(e,["disabled","value","type","error","options"]),s={},u={},c=y(l.size,null,1);u.fontSize=Math.round(c.fontSize)+"px",u.lineHeight=c.height-2+"px",u.height=c.height-2+"px",u.paddingLeft=c.indent+"px",s.height=c.height+"px";var d=Math.floor(1e8*Math.random()).toString(36)+":list",h=zn().small;return"medium"===l.size?h=zn().medium:"large"===l.size&&(h=zn().large),(0,a.jsxs)("span",{className:v()(t&&zn().disabled,zn().inputWrap,h,"inputWrap"),style:s,children:["select"===r?(0,a.jsx)("select",{style:u,value:-1===n?"":n,onChange:l.onChange,onClick:l.onClick,onFocus:l.onFocus,onBlur:l.onBlur,disabled:t,children:i?(0,a.jsx)("option",{children:i}):(0,a.jsxs)(a.Fragment,{children:[-1===n&&(0,a.jsx)("option",{value:"",children:"\xa0"},"blank"),o.map((function(e){return(0,a.jsx)("option",{value:e.value,children:e.title},e.index)}))]})}):(0,a.jsx)("input",{style:u,"data-slate-editor":!0,type:"text",ref:l.inputRef,value:i||n||"",onClick:l.onClick,onKeyDown:l.onKeyDown,onFocus:l.onFocus,onBlur:l.onBlur,onChange:l.onChange,disabled:t,list:o?d:void 0}),l.children,"select"!==r&&o&&(0,a.jsx)("datalist",{id:d,children:o.map((function(e){return(0,a.jsx)("option",{value:e.value},e.index)}))})]})}Pn.propTypes={value:s().oneOfType([s().string,s().number]),type:s().oneOf(["select","text","number","boolean","datetime"]),size:s().string,error:s().string,disabled:s().bool,inputRef:s().func,onKeyDown:s().func,onClick:s().func,onChange:s().func,onFocus:s().func,onBlur:s().func,options:s().arrayOf(s().shape({index:s().number,value:s().oneOfType([s().string,s().number]),title:s().string})),title:s().string};var An=n(73935),Vn={leap1900:!1,dateSpanLarge:!0},Fn=n(23862),Bn=n.n(Fn);function In(e){var t=e.date,n=e.onClick,i=e.isSelectable,o=e.today,l=e.locale,s=e.selectedDate,u=e.currentMonth,c=i(t);return(0,a.jsx)("span",{role:"button",className:v()(Bn().button,!c&&Bn().disabled,!u&&Bn().overflow,t===Math.trunc(s)&&Bn().selected,t===o&&Bn().today),onClick:c?n:null,"data-date":t,"aria-disabled":!c,children:(0,O.WU)("d",t,(0,r.Z)({locale:l,nbsp:!0},Vn))})}function On(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("number"===typeof e)return e;if("string"===typeof e){var n=(0,O.sG)(e);if(n)return+n.v}else if((0,E.Z)(e,Date)&&isFinite(e.valueOf()))return(0,O.nz)(e);return t?(0,O.nz)(new Date):null}function Un(e,t,n){return t+n*Math.round((e-t)/n)}function Hn(e,t,n,r){var i,a,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],l=null!==(i=On(t))&&void 0!==i?i:-1/0,s=null!==(a=On(n))&&void 0!==a?a:1/0,u=isFinite(r)?1*r:null,c=On(e,o),d=Math.max(l,Math.min(c||0,s));if(u){var h,p=Un(d,t?l:0,u);return(h=p>s?p-u:p<l?p+u:p)<l||h>s?d:h}return d}In.propTypes={date:s().number.isRequired,isSelectable:s().func.isRequired,onClick:s().func,today:s().number,locale:s().string,selectedDate:s().number,currentMonth:s().bool},In.defaultProps={onClick:function(){},locale:"us-EN"};var qn=n(49520),Yn=n.n(qn),Xn=[0,1,2,3,4,5],Gn=[0,1,2,3,4,5,6];function Kn(e){var t,n,i=e.anchorDate,o=e.selectedDate,l=e.locale,s=e.firstDay,u=e.onSelect,c=e.isSelectable,d=(0,r.Z)({locale:l,nbsp:!0},Vn),h=(0,F.Z)((0,O.r3)(i),2),p=h[0],f=h[1],v=null!==(t=(0,O.nz)([p,f,1]))&&void 0!==t?t:0,m=null!==(n=(0,O.nz)([p,f+1,1]))&&void 0!==n?n:0,g=v-(6+v+7-s)%7,b=function(e){return u(+e.target.dataset.date)},x=function(){var e=new Date(Date.now());return(0,O.nz)([e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate()])}();return(0,a.jsxs)("table",{className:Yn().calendar,children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:(0,O.WU)("ddd",g+0,d)}),(0,a.jsx)("th",{children:(0,O.WU)("ddd",g+1,d)}),(0,a.jsx)("th",{children:(0,O.WU)("ddd",g+2,d)}),(0,a.jsx)("th",{children:(0,O.WU)("ddd",g+3,d)}),(0,a.jsx)("th",{children:(0,O.WU)("ddd",g+4,d)}),(0,a.jsx)("th",{children:(0,O.WU)("ddd",g+5,d)}),(0,a.jsx)("th",{children:(0,O.WU)("ddd",g+6,d)})]})}),(0,a.jsx)("tbody",{children:Xn.map((function(e){return(0,a.jsx)("tr",{children:Gn.map((function(t){return g+t+7*e})).map((function(e){return(0,a.jsx)("td",{children:(0,a.jsx)(In,{date:e,onClick:b,isSelectable:c,today:x,currentMonth:e>=v&&e<m,selectedDate:o})},e)}))},e)}))})]})}Kn.propTypes={anchorDate:s().number,selectedDate:s().number,locale:s().string,firstDay:s().number,onSelect:s().func,isSelectable:s().func},Kn.defaultProps={onSelect:function(){},locale:"us-EN",firstDay:0};var Jn=n(22604),$n=n.n(Jn),Qn=[1,2,3,4,5,6,7,8,9,10,11,12];function er(e){var t=e.anchorDate,n=e.selectedDate,i=e.locale,o=e.onChange,l=e.onView,s=e.isSelectable,u=(0,r.Z)({locale:i},Vn),c=(0,F.Z)((0,O.r3)(t),1)[0],d=(0,F.Z)((0,O.r3)(n),2),h=d[0],p=d[1],f=function(e){var n=(0,O.r3)(t);n[1]=+e.target.dataset.mon,o((0,O.nz)(n)),l(2)},m=Qn.reduce((function(e,t,n){var r=Math.trunc(n/4);return e[r]=e[r]?(0,B.Z)(e[r]).concat([t]):[t],e}),[]);return(0,a.jsx)("table",{className:$n().months,children:(0,a.jsx)("tbody",{children:m.map((function(e,t){return(0,a.jsx)("tr",{children:e.map((function(e){var t=(0,O.nz)([c,e,1]),n=!s(t,"m"),r=h===c&&p===e;return(0,a.jsx)("td",{children:(0,a.jsx)("span",{className:v()($n().button,n&&$n().disabled,r&&$n().selected),role:"button","aria-disabled":n,onClick:n?void 0:f,"data-mon":e,children:(0,O.WU)("mmm",t,u)})},e)}))},t)}))})})}er.propTypes={anchorDate:s().number.isRequired,isSelectable:s().func.isRequired,selectedDate:s().number,locale:s().string,onChange:s().func,onView:s().func},er.defaultProps={locale:"us-EN",onChange:function(){},onView:function(){}};var tr=["","M0,7L5,2L10,7Z","M0,3L5,8L10,3Z","M7,0L2,5L7,10Z","M3,0L8,5L3,10Z"];function nr(e){var t=e.dir,n=void 0===t?0:t;return n?(0,a.jsx)("svg",{viewBox:"0 0 10 10",height:"1em",children:(0,a.jsx)("path",{fill:"currentColor",d:tr[n]})}):null}nr.HIDDEN=0,nr.UP=1,nr.DOWN=2,nr.LEFT=3,nr.RIGHT=4,nr.propTypes={dir:s().oneOf([0,1,2,3,4])};var rr=n(32362),ir=n.n(rr),ar={y:0,m:1,d:2};function or(e,t,n){var r=(0,O.r3)(e);return r[ar[t]]+=n,(0,O.nz)(r)||0}function lr(e){var t=e.anchorDate,n=e.locale,r=e.view,i=e.onView,o=e.onChange,l=e.isSelectable,s={locale:n},u=function(e,n,r,i){var s=or(t,e,n*r),u=or(t,e,r>0?n*r:r),c=!l(u,e);return(0,a.jsx)("span",{role:"button","aria-disabled":c,className:v()(ir().prev,ir().button,c&&ir().disabled),onClick:c?void 0:function(){return o(s)},"aria-label":r<0?"Show previous ".concat(i):"Show next ".concat(i),children:(0,a.jsx)(nr,{dir:r<0?nr.LEFT:nr.RIGHT})})};if(4&r){var c=(0,F.Z)((0,O.r3)(t),1)[0],d=10*Math.floor(c/10);return(0,a.jsxs)("b",{className:ir().header,children:[u("y",10,-1,"decade"),(0,a.jsxs)("span",{role:"button",className:ir().button,onClick:function(){return i(8)},children:[d,"-",d+10]}),u("y",10,1,"decade")]})}return 8&r?(0,a.jsxs)("b",{className:ir().header,children:[u("y",1,-1,"year"),(0,a.jsx)("span",{role:"button",className:ir().button,onClick:function(){return i(4)},children:(0,O.WU)("yyyy",t,s)}),u("y",1,1,"year")]}):(0,a.jsxs)("b",{className:ir().header,children:[u("m",1,-1,"month"),(0,a.jsx)("span",{role:"button",className:ir().button,onClick:function(){return i(8)},children:(0,O.WU)("mmmm",t,s)}),(0,a.jsx)("span",{role:"button",className:ir().button,onClick:function(){return i(4)},children:(0,O.WU)("yyyy",t,s)}),u("m",1,1,"month")]})}lr.propTypes={anchorDate:s().number.isRequired,isSelectable:s().func.isRequired,locale:s().string,view:s().number,onView:s().func,onChange:s().func},lr.defaultProps={view:2,locale:"en-US",onView:function(){},onChange:function(){}};var sr=n(18603),ur=n.n(sr);function cr(e){var t=e.anchorDate,n=e.selectedDate,r=e.onChange,i=e.onView,o=e.isSelectable,l=(0,F.Z)((0,O.r3)(t),1)[0],s=(0,F.Z)((0,O.r3)(n),1)[0],u=10*Math.floor(l/10),c=function(e){e.preventDefault();var n=(0,O.r3)(t);n[0]=+e.target.dataset.year,r((0,O.nz)(n)),i(8)},d=(0,B.Z)(Array(12)).reduce((function(e,t,n){var r=Math.trunc(n/3);return e[r]=e[r]?(0,B.Z)(e[r]).concat([n+u]):[n+u],e}),[]);return(0,a.jsx)("table",{className:ur().years,children:(0,a.jsx)("tbody",{children:d.map((function(e,t){return(0,a.jsx)("tr",{children:e.map((function(e){var t=!o((0,O.nz)([e,1,1]),"y"),n=e===s;return(0,a.jsx)("td",{children:(0,a.jsx)("span",{role:"button",className:v()(ur().button,t&&ur().disabled,n&&ur().selected),onClick:t?void 0:c,"aria-disabled":t,"data-year":e,children:e})},e)}))},t)}))})})}cr.propTypes={anchorDate:s().number,selectedDate:s().number,onChange:s().func,onView:s().func,isSelectable:s().func},cr.defaultProps={onChange:function(){},onView:function(){}};var dr=n(72436),hr=n.n(dr);function pr(e){var t=e.min,n=e.max,r=e.step,i=e.value,l=e.locale,s=e.onSelect,u=(0,o.useRef)(null),c=(0,o.useState)(2),d=c[0],h=c[1],p=(0,o.useState)(Hn(i,t,n,r,!0)),f=p[0],v=p[1],m=On(i),g=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"d",a=(0,O.r3)(e);if("y"===i){var o=(0,O.r3)(Hn(e,t,n,1));return a[0]===o[0]}if("m"===i){var l=(0,O.r3)(Hn(e,t,n,1));return a[0]===l[0]&&a[1]===l[1]}return e===Hn(e,t,n,r)};return(0,a.jsxs)("span",{onClick:function(e){return e.preventDefault()},className:hr().date,ref:u,children:[(0,a.jsx)(lr,{view:d,locale:l,anchorDate:f,onView:function(e){return h(e)},onChange:function(e){return v(Hn(e,t,n,r,!0))},isSelectable:g}),(0,a.jsxs)("span",{className:hr().selection,children:[!!(4&d)&&(0,a.jsx)(cr,{anchorDate:f,selectedDate:m,onView:function(e){return h(e)},onChange:function(e){return v(Hn(e,t,n,r,!0))},isSelectable:g}),!!(8&d)&&(0,a.jsx)(er,{locale:l,anchorDate:f,selectedDate:m,onView:function(e){return h(e)},onChange:function(e){return v(Hn(e,t,n,r,!0))},isSelectable:g}),!!(2&d)&&(0,a.jsx)(Kn,{locale:l,firstDay:0,selectedDate:m,anchorDate:f,isSelectable:g,onSelect:s})]})]})}pr.propTypes={value:s().oneOfType([s().string,s().number,s().instanceOf(Date)]),min:s().oneOfType([s().string,s().number,s().instanceOf(Date)]),max:s().oneOfType([s().string,s().number,s().instanceOf(Date)]),step:s().number,locale:s().string,onSelect:s().func};var fr=n(39449),vr=n.n(fr);function mr(e){var t=e.value,n=e.visible,r=e.min,i=e.max,l=e.step,s=e.locale,u=e.connectedInput,c=e.onSelect,d=(0,o.useRef)(null);if((0,o.useEffect)((function(){var e=function(e){var t;(null===(t=d.current)||void 0===t?void 0:t.contains(e.target))&&(e.preventDefault(),e.stopPropagation())},t=function(){d.current&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;if(e&&t){e.style.top="unset",e.style.left="unset";var r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=new DOMRect(0,0,document.documentElement.clientWidth,document.documentElement.clientHeight),o=function(e){return!(e.left<a.left||e.right>a.right||e.top<a.top||e.bottom>a.bottom)},l=function(e){return new DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)},s=[new DOMRect(0,i.height+n,r.width,r.height),new DOMRect(i.width-r.width,i.height+n,r.width,r.height),new DOMRect(0,-r.height-n,r.width,r.height),new DOMRect(i.width-r.width,-r.height-n,r.width,r.height)],u=s.find((function(e){return o(l(e))}));u||(u=s[0]);var c=i.top-r.top,d=i.left-r.left;e.style.top=c+u.top+"px",e.style.left=d+u.left+"px",e.style.display=""}}(d.current,u)};return n&&(t(),window.addEventListener("resize",t),document.addEventListener("scroll",t,{capture:!0}),document.addEventListener("mousedown",e,{capture:!0})),function(){window.removeEventListener("resize",t),document.removeEventListener("scroll",t,{capture:!0}),document.removeEventListener("mousedown",e,{capture:!0})}}),[n,u]),!n||"undefined"===typeof document)return null;var h=document.getElementById("grid-doc-body");if(!h)return null;var p=(0,a.jsx)("div",{"data-testid":"date-picker",children:(0,a.jsx)("span",{className:vr().root,ref:d,children:(0,a.jsx)(pr,{min:r,max:i,step:l,value:t,onSelect:c,locale:s})})});return(0,An.createPortal)(p,h)}mr.propTypes={value:s().oneOfType([s().number,s().string]),visible:s().bool,locale:s().string,min:s().oneOfType([s().number,s().string]),max:s().oneOfType([s().number,s().string]),step:s().oneOfType([s().number,s().string]),connectedInput:s().object,onSelect:s().func};var gr=n(72476),br=n(44507),xr=n.n(br);function yr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"up";return(0,a.jsx)("svg",{version:"1.1",width:"10",height:"10",viewBox:"0 0 36 36",children:(0,a.jsx)("g",{transform:"down"===e?"translate(18,18) rotate(180) translate(-18,-18)":"",children:(0,a.jsx)("path",{d:"M29.52,22.52,18,10.6,6.48,22.52a1.7,1.7,0,0,0,2.45,2.36L18,15.49l9.08,9.39a1.7,1.7,0,0,0,2.45-2.36Z"})})})}var kr=(new Date).getUTCDate();var wr=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onStepperClick",(function(e){if((0,gr.t)()){var t=r.getParentInput();if(t&&t!==document.activeElement)return void t.focus()}var n=r.props.onClick,i=1*e.currentTarget.dataset.step;isFinite(i)&&n&&n({value:i})})),(0,V.Z)((0,ce.Z)(r),"onMouseDown",(function(e){e.preventDefault();var t=r.getParentInput();t&&r.props.focusInput&&t&&t.focus&&t.focus()})),(0,V.Z)((0,ce.Z)(r),"onMouseDownStepper",(function(e){e.preventDefault(),0===e.button&&(r._repeatTarget=e.currentTarget,r._repeatTimer=setTimeout(r.onRepeat,500),document.addEventListener("pointerup",r.onMouseUpStepper,{capture:!0}),document.addEventListener("touchend",r.onMouseUpStepper,{capture:!0}),document.addEventListener("touchcancel",r.onMouseUpStepper,{capture:!0}))})),(0,V.Z)((0,ce.Z)(r),"onMouseUpStepper",(function(){document.removeEventListener("pointerup",r.onMouseUpStepper,{capture:!0}),document.removeEventListener("touchend",r.onMouseUpStepper,{capture:!0}),document.removeEventListener("touchcancel",r.onMouseUpStepper,{capture:!0}),delete r._repeatTarget,clearTimeout(r._repeatTimer),delete r._repeatTimer})),(0,V.Z)((0,ce.Z)(r),"onContextMenu",(function(e){(0,gr.t)()&&e.preventDefault()})),(0,V.Z)((0,ce.Z)(r),"onRepeat",(function(){if(r._repeatTarget){var e={currentTarget:r._repeatTarget};r.onStepperClick(e),r._repeatTimer=setTimeout(r.onRepeat,50)}})),r.state={helperOpen:!1},r}return(0,he.Z)(n,[{key:"componentDidMount",value:function(){this.tagParent(!0),document.addEventListener("contextmenu",this.onContextMenu)}},{key:"componentDidUpdate",value:function(e){!e.interacting&&this.props.interacting&&this.setState({helperOpen:!0}),e.interacting&&!this.props.interacting&&this.setState({helperOpen:!1}),this.tagParent(!0)}},{key:"componentWillUnmount",value:function(){this.tagParent(!1),document.removeEventListener("contextmenu",this.onContextMenu)}},{key:"getParentInput",value:function(){return this.helper&&this.helper.parentNode?this.helper.parentNode.querySelector("input"):null}},{key:"tagParent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.helper&&this.helper.parentElement&&this.helper.parentElement.classList.toggle(xr().hasHelper,e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.onClick,r=t.type,i=t.disabled,o=t.value,l=null,s=null;return"select"===r?(s=xr().selectHelper,l=(0,a.jsx)("span",{className:v()(xr().arrow,i&&xr().disabled),children:yr("down")})):"date"===r||"datetime"===r?(s=xr().dateHelper,l=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",tabIndex:-1,className:xr().calendar,onMouseDown:this.onMouseDown,disabled:i,onClick:function(){var t;e.setState((function(){return{helperOpen:!e.state.helperOpen}})),null===(t=e.props.targetElement)||void 0===t||t.focus()},children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 15",fill:"currentColor",children:[(0,a.jsx)("path",{d:"M14.3 2.6H12.8V3.5H14.2V13.3H1.7V3.5H3.1V2.6H1.6C1.6 2.7 1.5 2.7 1.4 2.7C1.3 2.8 1.2 2.8 1.1 2.9C1 2.9 0.9 3 0.9 3.2C0.9 3.3 0.9 3.4 0.8 3.5V13.4C0.9 13.5 0.9 13.6 0.9 13.7C0.9 13.8 1 13.9 1.1 13.9C1.2 14 1.27 14.1 1.4 14.1C1.4 14.1 1.5 14.2 1.6 14.2H14.3C14.4 14.2 14.5 14.1 14.6 14.1C14.7 14.1 14.8 14.0 14.8 13.9C14.9 13.9 15.0 13.8 15.0 13.7C15.0 13.6 15.1 13.5 15.1 13.4V3.4C15.1 3.3 15.0 3.2 15.0 3.1C15.0 3.0 14.9 2.9 14.8 2.9C14.8 2.8 14.7 2.7 14.6 2.7C14.5 2.6 14.4 2.6 14.3 2.6Z"}),(0,a.jsx)("text",{fontFamily:"var(--controls-font)",fontWeight:500,fontSize:7,x:7.95,y:11,textAnchor:"middle",children:kr}),(0,a.jsx)("path",{d:"M4.4 4.4C4.5 4.4 4.6 4.3 4.7 4.3C4.8 4.2 4.8 4.1 4.8 4.0V1.3C4.8 1.2 4.8 1.1 4.7 1.0C4.6 0.9 4.5 0.8 4.4 0.8C4.3 0.8 4.2 0.9 4.1 1.0C4.0 1.1 4.0 1.2 4.0 1.3V4.0C4.0 4.1 4.0 4.2 4.1 4.3C4.2 4.3 4.3 4.4 4.4 4.4Z"}),(0,a.jsx)("path",{d:"M11.5 4.4C11.6 4.4 11.7 4.3 11.8 4.3C11.9 4.2 12 4.1 12 4.0V1.3C12 1.2 11.9 1.1 11.8 1.0C11.7 0.9 11.6 0.8 11.5 0.8C11.4 0.8 11.3 0.9 11.2 1.0C11.1 1.1 11.1 1.2 11.1 1.3V4.0C11.1 4.1 11.1 4.2 11.2 4.3C11.3 4.3 11.4 4.4 11.5 4.4Z"}),(0,a.jsx)("path",{d:"M10.2 2.6H5.7V3.5H10.2V2.6Z"})]})}),(0,a.jsx)(mr,{min:this.props.min,max:this.props.max,step:this.props.step,value:o,locale:this.props.locale,connectedInput:this.props.targetElement,visible:this.state.helperOpen,onSelect:function(t){e.setState({helperOpen:!1}),n&&n({value:t})}})]})):"number"===r?(s=xr().numberHelper,l=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",tabIndex:-1,"data-step":1,className:xr().up,onMouseDown:this.onMouseDown,onPointerDown:this.onMouseDownStepper,onClick:this.onStepperClick,disabled:i,"aria-label":"Increase value",children:[yr("up"),(0,a.jsx)("span",{})]}),(0,a.jsxs)("button",{type:"button",tabIndex:-1,"data-step":-1,className:xr().down,onMouseDown:this.onMouseDown,onPointerDown:this.onMouseDownStepper,onClick:this.onStepperClick,disabled:i,"aria-label":"Decrease value",children:[yr("down"),(0,a.jsx)("span",{})]})]})):"boolean"===r&&(s=xr().booleanHelper,l=(0,a.jsx)("button",{type:"button",className:o?xr().checked:void 0,onMouseDown:this.onMouseDown,disabled:i,onClick:function(e){e.preventDefault(),n&&n({value:!o})},children:(0,a.jsx)("svg",{version:"1.1",width:"16",height:"16",viewBox:"0 0 16 16",shapeRendering:"geometricPrecision",children:(0,a.jsx)("path",{d:"M4.5,8.3 L7,10.8 L11.5,6.3",strokeWidth:"1.5",strokeLinecap:"round",stroke:"black",fill:"none"})})})),l&&(0,a.jsx)("span",{className:v()(xr().helper,(0,gr.t)()&&xr().mobileHelper,s),ref:function(t){return e.helper=t},children:l})}}]),n}(o.PureComponent);(0,V.Z)(wr,"propTypes",{type:s().string.isRequired,min:s().number,max:s().number,step:s().number,onClick:s().func,disabled:s().bool,targetElement:s().object,value:s().oneOfType([s().number,s().bool]),focusInput:s().bool,interacting:s().bool,locale:s().string});var Zr=n(15603),_r=n.n(Zr),jr=(0,V.Z)({expr:d.jFN,title:d.mn7,options:d.YMi,labels:d.agA,format:d.WUZ,inline:d.Yp3,width:d.bf$,visible:d.RrV,disabled:d.JUm},d.Z6c.name,d.Z6c);function Sr(e){if(!e.isEditor&&!d.RrV.read(e))return null;var t=d.WUZ.read(e),n=d.YMi.read(e)||[[]],o=n[0].length,l=n.length,s=o<l?"col":"row",u=(0,ye.Z)("row"===s?o:l).map((function(e){var t="row"===s?n[0][e]:n[e][0];return null==t||(0,E.Z)(t,Error)?null:t})),c=null;if(d.agA.isSet(e)){var h=d.agA.read(e);c=rt(h,s,t,e.locale)}var p=function(t){e.track(t.type,{elementType:"dropdown"})},f=d.jFN.read(e),m=u.findIndex((function(e){return(0,me.fC)(f.v,e&&e.v)})),g=!1,b="";(0,me.ud)(e.expr)?d.YMi.isSet(e)&&u.length?d.JUm.read(e)&&(g=!0):(g=!0,b="Options not selected"):(g=!0,b="Target cell not selected");var x=d.Z6c.read(e);return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},e),{className:v()(_r().dropdown,"size_".concat(x||"small")),label:d.mn7.read(e),inlineMode:d.Yp3.read(e),inlineWidth:d.bf$.read(e),isDisabled:g,children:(0,a.jsx)(Pn,{type:"select",size:x,value:m,options:u.map((function(n,r){return{index:r,value:r,title:c?c[r]||"":(0,me.Mm)(n,t,e.locale)}})),onChange:function(t){var n=+t.target.value,r=u[n];e.track("interact",{elementType:"dropdown"}),d.jFN.write(e,r?r.v:null)},onFocus:p,onBlur:p,disabled:g,error:b,children:(0,a.jsx)(wr,{type:"select",size:x,disabled:g})})}))}Sr.options=jr,Sr.propTypes={parentKey:s().string,error:s().string,model:c.Z.isRequired,isEditor:s().bool,locale:s().string,expr:s().string,track:s().func},Sr.requiredOption="expr",Sr.isInput=!0;var Cr=n(11735),Tr=n(29116),Mr=n(16366),Nr=n.n(Mr),Er=(0,V.Z)({expr:d.jFN,title:d.mn7,options:d.YMi,format:d.WUZ,inline:d.Yp3,width:d.bf$,min:d.VV$,max:d.Fp7,step:d.Nbs,visible:d.RrV,disabled:d.JUm,disableHelper:d.fhX,inputDelay:g.fu},d.Z6c.name,d.Z6c),Dr=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"componentDidUpdate",(function(){r.input&&r.input.classList.toggle("interacting",r.state.interacting)})),(0,V.Z)((0,ce.Z)(r),"componentWillUnmount",(function(){clearTimeout(r.timeout)})),(0,V.Z)((0,ce.Z)(r),"setEditingValueAndCursorPosition",(function(e,t){if(t||(t=r.input),t){var n=r.props.locale,i=(0,Cr.lm)(e,r.state.format,n);return new Promise((function(e){r.timeout=setTimeout((function(){var a=(0,Cr.qK)(t.selectionStart,t.value,i,n);r.setState({textValue:i,interacting:!0},(function(){t.setSelectionRange(a,a),e(null)}))}),0)}))}})),(0,V.Z)((0,ce.Z)(r),"onKeyDown",(function(e){"number"!==r.state.inputType&&"datetime"!==r.state.inputType||(38===e.keyCode&&(e.preventDefault(),r.step(1)),40===e.keyCode&&(e.preventDefault(),r.step(-1)))}));var i=(0,ce.Z)(r);return(0,V.Z)((0,ce.Z)(r),"onInteractStart",function(){var e=(0,A.Z)((function(e){return(0,I.__generator)(this,(function(t){switch(t.label){case 0:return[4,i.setEditingValueAndCursorPosition(i.state.cell.v,e.target)];case 1:return t.sent(),i.props.track("focus",{elementType:"input"}),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),(0,V.Z)((0,ce.Z)(r),"onInteractEnd",(function(e){var t=r.interpretStringValue(e.target.value),n=r.state,i=n.cell,a=n.format,o=(0,me.Mm)({v:t,z:i.z},a,r.props.locale);r.setState({interacting:!1,textValue:o},(function(){r.trackChange(),r.writeValue(t,!0,!0),r.props.track("blur",{elementType:"input"})}))})),(0,V.Z)((0,ce.Z)(r),"onChange",(function(e){var t=r.interpretStringValue(e.target.value);r.setState({textValue:e.target.value}),r.trackChange(),r.writeValue(t,!1,!1)})),(0,V.Z)((0,ce.Z)(r),"trackChange",(function(){r.state.interacting?r.pendingChanges=!0:(r.pendingChanges&&r.props.track("interact",{elementType:"input"}),r.pendingChanges=!1)})),(0,V.Z)((0,ce.Z)(r),"interpretStringValue",(function(e){return(0,Cr.Oe)(e,r.state.format,r.props.locale)})),(0,V.Z)((0,ce.Z)(r),"step",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(e){var t=r.state,n=t.format,i=t.min,a=t.max,o=t.cell,l=t.step,s=t.interacting,u=(0,O.TQ)(n),c=o&&(0,me.hj)(o.v)?o.v:0,d=l;if(!(0,me.hj)(d)&&(0,O.V5)(n))d=1;else if(!(0,me.hj)(d)){var h=Math.abs(u?100*c:c),p=Math.max(1,e>0?h:h-1);d=Math.pow(10,Math.floor(1+Math.log10(p)))/100,h>=0&&h<=99&&(d=Math.max(1,d)),u&&(d*=.01)}var f=(0,Tr.Z)(c+d*Math.sign(e),i,a,l);s&&r.setEditingValueAndCursorPosition(f),r.writeValue(f,!0,!0)}})),r.state={interacting:!1,inputType:null},r}return(0,he.Z)(n,[{key:"writeValue",value:function(e,t,n){var r=this;if(clearTimeout(this._writeDelay),t&&(e||0===e)&&"number"===typeof e){var i=this.state,a=i.min,o=i.max,l=i.step;e=(0,Tr.Z)(e,a,o,l)}var s=this.state.cell;if(""!==e||null!=s._v&&"number"!==typeof s._v||(e=null),e!==s.v){var u="number"===typeof e||null==e,c="number"===typeof s.v||null==s.v;u&&c&&!n?this._writeDelay=setTimeout((function(){d.jFN.write(r.props,e)}),this.props.inputDelay):d.jFN.write(this.props,e)}}},{key:"renderArrow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"up";return(0,a.jsx)("svg",{version:"1.1",width:"10",height:"10",viewBox:"0 0 36 36",children:(0,a.jsx)("g",{transform:"down"===e?"translate(18,18) rotate(180) translate(-18,-18)":"",children:(0,a.jsx)("path",{d:"M29.52,22.52,18,10.6,6.48,22.52a1.7,1.7,0,0,0,2.45,2.36L18,15.49l9.08,9.39a1.7,1.7,0,0,0,2.45-2.36Z"})})})}},{key:"renderHelper",value:function(e){var t=this,n=this.state,o=n.inputType,l=n.disabled,s=n.disableHelper,u=n.interacting;if(s)return null;var c={size:e,locale:this.props.locale,interacting:u,disabled:l,targetElement:this.input};if(this.state.options)return(0,a.jsx)(wr,(0,r.Z)({type:"select"},c));if("number"===o)return(0,a.jsx)(wr,(0,i.Z)((0,r.Z)({type:o},c),{onClick:function(e){t.trackChange(),t.step(e.value)}}));if("boolean"===o)return(0,a.jsx)(wr,(0,i.Z)((0,r.Z)({type:o},c),{onClick:function(e){t.trackChange(),d.jFN.write(t.props,e.value)},value:this.state.cell&&!!this.state.cell.v}));if("datetime"===o){var h,p=this.state,f=p.format,v=p.min,m=p.max,g=p.step,b=p.cell,x=this.props.locale,y=o,k=(0,O.Mt)(null!==f&&void 0!==f?f:b.z);return"date"!==k.type&&"time"!==k.type&&"datetime"!==k.type||(y=k.type),(0,a.jsx)(wr,(0,i.Z)((0,r.Z)({type:y},c),{min:v,max:m,step:g,onClick:function(e){t.setState({textValue:(0,Cr.lm)(e.value,f,x)}),t.trackChange(),d.jFN.write(t.props,e.value)},value:null===(h=this.state.cell)||void 0===h?void 0:h.v}))}}},{key:"render",value:function(){var e=this,t=this.props,n=this.state,o=n.disabled,l=n.textValue,s=n.title,u=n.options;if(!t.isEditor&&!d.RrV.read(t))return null;var c=d.Z6c.read(t);return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},t),{className:v()(Nr().container,"size_".concat(c||"small")),isDisabled:o,inlineWidth:d.bf$.read(t),inlineMode:d.Yp3.read(t),label:s,children:(0,a.jsx)(Pn,{inputRef:function(t){return e.input=t},type:this.state.inputType,size:c,value:l||"",options:u,onKeyDown:this.onKeyDown,onChange:this.onChange,onFocus:this.onInteractStart,onBlur:this.onInteractEnd,disabled:o,error:this.state.error,children:this.renderHelper(c)})}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.model;if(!e.isEditor&&n&&n.lastWrite===t.modelId)return null;var r=d.Nbs.read(e),i=d.VV$.read(e),a=d.Fp7.read(e),o=(0,me.ud)(e.expr),l=o?"":"Target cell not selected",s=null;o&&(s=d.jFN.read(e));var u=d.WUZ.isSet(e)?d.WUZ.read(e):(null===s||void 0===s?void 0:s.z)||"",c="text";s&&"boolean"===typeof s.v?c="boolean":s&&"number"!==typeof s.v&&null!=s.v?"string"===typeof s.v&&s.v&&isFinite(+s.v)&&"number"===t.inputType&&(c="number"):(s&&("number"===typeof s.v||u)&&(c="number"),u&&((0,O.Gq)(u)?c="text":(0,O.V5)(u)&&(c="datetime"))),"text"!==c||null===r&&null===i&&null===a||(c="number");var h,p=[];if(d.YMi.isSet(e)){var f=d.YMi.read(e);if(f.length&&f[0].length){var v=f[0].length,m=f.length,g=v<m?"col":"row";(0,ye.Z)("row"===g?v:m).forEach((function(t){var n="row"===g?f[0][t]:f[t][0];null==n||(0,E.Z)(n,Error)||("number"!==typeof n.v&&(c="text"),p.push({key:t,value:(0,me.Mm)(n,null,e.locale)}))}))}}return h=t.interacting?t.textValue:(0,me.Mm)(s,u,e.locale),{cell:s,step:r,format:u,min:i,max:a,error:l,title:d.mn7.read(e),disableHelper:d.fhX.read(e),disabled:!o||d.JUm.read(e),inputType:c,options:p.length?p:null,modelId:n.lastWrite,textValue:h}}}]),n}(o.Component);(0,V.Z)(Dr,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,locale:s().string,isEditor:s().bool,expr:s().string,inputDelay:s().number,track:s().func}),(0,V.Z)(Dr,"defaultProps",{inputDelay:g.fu}),(0,V.Z)(Dr,"options",Er),(0,V.Z)(Dr,"requiredOption","expr"),(0,V.Z)(Dr,"isInput",!0);var Rr=n(87917),Lr=n.n(Rr),Wr={expr:d.jFN,title:d.mn7,options:d.YMi,labels:d.agA,format:d.WUZ,inline:d.Yp3,visible:d.RrV,disabled:d.JUm,width:d.NrA};function zr(e){if(!e.isEditor&&!d.RrV.read(e))return null;var t=d.WUZ.read(e),n=d.YMi.isSet(e),o=d.YMi.read(e)||[[]],l=o[0].length,s=o.length,u=l<s?"col":"row",c=(0,ye.Z)("row"===u?l:s).map((function(e){var t="row"===u?o[0][e]:o[e][0];return null==t||(0,E.Z)(t,Error)?null:t}));(0,me.ud)(e.expr)?n||(c=[{v:"Options not selected"}]):c=[{v:"Target cell not selected"}];var h=null;if(d.agA.isSet(e)){var p=d.agA.read(e);h=rt(p,u,t,e.locale)}var f=d.jFN.read(e),m=c.findIndex((function(e){return(0,me.fC)(f.v,e&&e.v)})),g=!(0,me.ud)(e.expr)||!n||!c.length||d.JUm.read(e);return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},e),{className:v()(Lr().radio),inlineMode:d.Yp3.read(e),label:d.mn7.read(e),isDisabled:g,inlineWidth:d.NrA.read(e),children:c.map((function(n,r){var i=h?h[r]||"":(0,me.Mm)(n,t,e.locale),o=(0,me.hQ)(),l=g?void 0:function(){try{var t;null===(t=document.getElementById(o))||void 0===t||t.focus()}catch(Oa){}e.track("interact",{elementType:"radio"}),d.jFN.write(e,n?n.v:null)};return(0,a.jsx)("span",{className:Lr().item,children:(0,a.jsxs)("label",{onClick:l,children:[(0,a.jsx)("span",{className:Lr().noBreak,children:(0,a.jsx)(Mn,{id:o,disabled:g,type:"radio",checked:m===r})}),(0,a.jsx)(Nn.Z,{text:i,disabled:g,className:Lr().baseFont,inline:!0})]})},r)}))}))}zr.options=Wr,zr.requiredOption="expr",zr.isInput=!0,zr.propTypes={parentKey:s().string,error:s().string,model:c.Z.isRequired,isEditor:s().bool,expr:s().string,locale:s().string,track:s().func};var Pr=function(e,t,n){var r=e<0?t:n;return(0,me.hj)(r)?Math.pow(10,Math.floor(Math.log10(Math.abs(r))-2)):null},Ar=function(e){if("general"!==e.type){var t=Math.floor(Math.log10(e.scale));return Math.pow(10,-t-e.maxDecimals)}return null};function Vr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=(0,O.Mt)(t);if("date"===i.type||"datetime"===i.type)return 1;if("time"===i.type){var a=(0,O.rk)(t);return a.seconds?1/86400:a.minutes?1/1440:1/24}var o=Math.abs(null!==e&&void 0!==e?e:0);if(o<1&&o>0)return Ar(i)||Pr(e,n,r)||Math.pow(10,(0,me.Gi)(o));if(!o||o<1e3)return Ar(i)||Pr(e,n,r)||(o%1?.1:1);if(1!==i.scale)return Ar(i)||1;var l=(0,me.kO)(o);return l===(0,me.Gi)(o)&&l--,Math.pow(10,l)}var Fr=n(8310),Br=n.n(Fr);function Ir(e){var t=e.max,n=e.min,r=e.step,i=t-n,o=[],l=i/r;if(l<21)for(var s=0;s<=l;s++){var u=s/l;o.push({value:n+u*(t-n),p:u})}else n<0&&t>0&&o.push({value:0,p:(0-n)/i});return o.length?(0,a.jsx)(a.Fragment,{children:o.map((function(e){return(0,a.jsx)("span",{className:v()(Br().tick,!e.value&&Br().tickZero,(e.value===n||e.value===t)&&Br().tickEdge),style:{left:100*e.p+"%"}},"t-"+e.value)}))}):null}function Or(e,t){var n=t.currentStyle||window.getComputedStyle(t,null),r=parseInt(n.borderLeftWidth,10),i=parseInt(n.borderTopWidth,10),a=t.getBoundingClientRect(),o=e.touches?e.touches[0]:e;return[o.clientX-r-a.left,o.clientY-i-a.top]}function Ur(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<t.length;r++)if("number"===typeof t[r])return t[r];return null}function Hr(e){var t,n=(0,o.useRef)(null),r=(0,o.useRef)(null),i=(0,o.useState)([0,0]),l=i[0],s=i[1],u=(0,o.useState)(0),c=u[0],d=u[1],h=(0,o.useState)(!1),p=h[0],f=h[1],m=Ur(e.value,e.defaultValue),g=Ur(e.max,100),x=Ur(e.min,0);x>g&&(x=(t=[g,x])[0],g=t[1]);null!=m&&null==e.min&&x>m&&(x=m),null!=m&&null==e.max&&g<m&&(g=m);var y=e.step;y||(y=Math.abs(y||1)),null==m&&(m=g<x?x:x+(g-x)/2),m=(0,Tr.Z)(m,x,g,y);var k=(0,o.useCallback)((function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,Tr.Z)(t,x,g,y);(p||n)&&e.onChange&&m!==r&&e.onChange(r)}),[e,p,m,x,g,y]),w=(0,o.useCallback)((function(e){var t,n="ArrowRight"===(t=e.key)||"ArrowUp"===t?1:"ArrowLeft"===t||"ArrowDown"===t?-1:"PageUp"===t?10:"PageDown"===t?-10:"End"===t?1/0:"Home"===t?-1/0:0;0!==n&&(e.preventDefault(),e.shiftKey&&(n*=10),k(m+n*y,!0))}),[k,m,y]),Z=(0,o.useCallback)((function(e){var t;e.preventDefault();var n,i=(0,F.Z)(Or(e,r.current),1)[0],a=null!==(n=null===(t=r.current)||void 0===t?void 0:t.getBoundingClientRect().width)&&void 0!==n?n:1;k(x+i/a*(g-x),!0)}),[x,g,k]),_=(0,o.useCallback)((function(t){var i,a;t.preventDefault(),t.target.setPointerCapture&&t.target.setPointerCapture(t.pointerId),null===(i=n.current)||void 0===i||i.focus();var o,l=t.touches?t.touches[0]:t,u=(0,F.Z)(Or(t,r.current),1)[0],c=null!==(o=null===(a=r.current)||void 0===a?void 0:a.getBoundingClientRect().width)&&void 0!==o?o:1,h=x+u/c*(g-x);s([l.pageX,l.pageY]),d(h),f(!0),document.body.classList.add("slider_active"),e.onDragStart&&e.onDragStart([l.pageX,l.pageY])}),[e,n,x,g]),j=(0,o.useCallback)((function(t){f(!1),document.body.classList.remove("slider_active"),t.target.releasePointerCapture&&t.target.releasePointerCapture(t.pointerId),e.onDragEnd&&e.onDragEnd()}),[e]),S=(0,o.useCallback)((function(e){if(p){var t,n,i=(0,F.Z)(function(e,t){var n=e.touches?e.touches[0]:e;return[t?n.pageX-t[0]:0,t?n.pageY-t[1]:0]}(e,l),1),a=i[0],o=null!==(n=null===(t=r.current)||void 0===t?void 0:t.getBoundingClientRect().width)&&void 0!==n?n:1,s=b(0,o*((c-x)/(g-x))+a,o)/o;k(x+(g-x)*s)}}),[c,l,x,g,p,k]),C=e.size,T=e.disabled,M=e.showValue,N=e.labelledby,E=e.label,D=e.showTooltip,R={"--thumb-size":"20px"};return"medium"===C&&(R["--thumb-size"]="22px"),"large"===C&&(R["--thumb-size"]="24px"),(0,a.jsx)("span",{className:v()(Br().sliderUI,T&&Br().disabled,p&&Br().active,M&&Br().labelspace),style:R,children:(0,a.jsxs)("span",{className:Br().track,"data-obid":"grid-slider-track",onPointerDown:T?void 0:_,onPointerUp:T?void 0:j,onPointerMove:T?void 0:S,onClick:T?void 0:Z,children:[(0,a.jsx)("span",{className:Br().trackFill}),(0,a.jsx)("span",{className:Br().ticks,children:(0,a.jsx)(Ir,{min:x,max:g,step:y})}),(0,a.jsx)("span",{className:Br().trackOverlay,ref:r}),M?(0,a.jsx)("span",{className:Br().label,children:E}):null,(0,a.jsx)("span",{className:Br().thumbWrap,children:(0,a.jsx)(q.Z,{hoverNode:E,cursorPosition:p&&D&&E?"static":null,showAnchor:!0,children:(0,a.jsxs)("span",{className:Br().thumb,role:"slider",tabIndex:T?void 0:0,style:{left:function(){var e=(m-x)/(g-x);return null!=m&&isFinite(m)||(e=.5),100*e+"%"}()},ref:n,"aria-valuemax":g,"aria-valuemin":x,"aria-valuenow":m,"aria-disabled":T?"true":void 0,"aria-labelledby":N,onKeyDown:T?void 0:w,children:[(0,a.jsx)("span",{className:Br().thumbStroke}),(0,a.jsx)("span",{className:Br().thumbFill})]})})})]})})}Hr.defaultProps={showValue:!1,showTooltip:!0,size:"small"};var qr=n(25088),Yr=n.n(qr),Xr=(0,V.Z)({expr:d.jFN,title:d.mn7,format:d.WUZ,valueVisible:d.IB0,inline:d.Yp3,width:d.bf$,min:d.VV$,max:d.Fp7,step:d.Nbs,visible:d.RrV,disableTooltip:d.kDJ,disabled:d.JUm},d.Z6c.name,d.Z6c),Gr=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onInteractStart",(function(){var e=r.props,t=d.jFN.read(e);r.setState({interacting:!0,value:t&&t.v||0}),r.props.track("interact",{elementType:"slider"})})),(0,V.Z)((0,ce.Z)(r),"onInteractEnd",(function(){r.setState({interacting:!1})})),(0,V.Z)((0,ce.Z)(r),"onChange",(function(e){d.jFN.write(r.props,e)})),r.state={interacting:!1},r}return(0,he.Z)(n,[{key:"getAutoValue",value:function(){var e;if(this.state.interacting)e=this.state.value;else{var t=this.state.cell;e=t&&t.v||0,(0,me.hj)(e)||(e=this.state.min||0)}this.anchorValueKey!==this.props.expr&&(this.anchorValue=null);var n=this.anchorValue;return n?e=n>0?Math.max(e,n):Math.min(e,n):(this.anchorValueKey=this.props.expr,this.anchorValue=e),e}},{key:"render",value:function(){var e=this.props;if(!e.isEditor&&!d.RrV.read(e))return null;var t=this.state.cell,n=t&&t.v||0,o=this.state.min,l=this.state.max,s=this.state.step,u=this.state.format;(0,me.hj)(n)||(n=o||0);var c=this.getAutoValue();(0,me.hj)(l)||(l=c<0?0:(0,me.bA)(c)||Math.max(1,s||0)),(0,me.hj)(o)||(o=c<0?-(0,me.bA)(-c):0),(0,me.hj)(s)||(s=Vr(this.anchorValue,u,o,l));var h=d.Z6c.read(e)||d.Z6c.defaultValue||"small",p=v()(Yr().slider,this.state.interacting&&Yr().interacting,this.state.valueVisible&&Yr().withValue,"size_".concat(h));return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},e),{className:p,label:this.state.title,inlineWidth:d.bf$.read(e),inlineMode:this.state.inline,isDisabled:this.state.disabled,children:(0,a.jsx)("span",{className:v()(Yr().inputWrap,"inputWrap"),children:(0,a.jsx)(Hr,{size:h,disabled:this.state.disabled,value:this.state.noExpr?null:n,onDragStart:this.onInteractStart,onDragEnd:this.onInteractEnd,onChange:this.onChange,min:o,max:l,step:s,showValue:this.state.valueVisible,showTooltip:this.state.tooltip,label:(0,me.Mm)(t,u,e.locale),labelledby:e.parentKey+"_lbl"})})}))}}],[{key:"getDerivedStateFromProps",value:function(e,t,n){if(n&&e.model===n.model)return null;var r=d.Yp3.read(e),i=d.jFN.read(e),a=d.WUZ.isSet(e)?d.WUZ.read(e):(null===i||void 0===i?void 0:i.z)||"",o=d.Nbs.read(e);!d.Nbs.isSet(e)&&(0,O.V5)(a)&&(o=1);var l=d.jFN.isFx(e);return{noExpr:!l,disabled:!l||d.JUm.read(e),valueVisible:d.IB0.isSet(e)?d.IB0.read(e):"text"!==r,inline:r,title:d.mn7.read(e),cell:i,min:d.VV$.read(e),max:d.Fp7.read(e),tooltip:!d.kDJ.read(e),step:o,format:a}}}]),n}(o.Component);function Kr(e){var t="left";if(e&&("number"===typeof e.v&&(t="right"),((0,E.Z)(e.v,Error)||!0===e.v||!1===e.v)&&(t="center"),e.s)){var n=e.s["horizontal-alignment"];"left"!==n&&"center"!==n&&"right"!==n||(t=n)}return t}(0,V.Z)(Gr,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,expr:s().string,isEditor:s().bool,track:s().func,locale:s().string}),(0,V.Z)(Gr,"options",Xr),(0,V.Z)(Gr,"requiredOption","expr"),(0,V.Z)(Gr,"isInput",!0);var Jr=n(64741),$r=n.n(Jr),Qr={expr:d.jFN,format:d.WUZ,min:d.VV$,max:d.Fp7,step:d.Nbs,disabled:d.JUm,visible:d.RrV,title:d.mn7,inline:d.Yp3,width:d.NrA,align:d.J7n},ei=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onInteractStart",(function(e){e.preventDefault();var t=d.jFN.read(r.props);r.setState({interacting:!0,showTooltip:!1,startX:e.clientX,value:(null===t||void 0===t?void 0:t.v)||0}),e.target.setPointerCapture(e.pointerId),r.props.track("interact",{elementType:"tangle"})})),(0,V.Z)((0,ce.Z)(r),"onInteractEnd",(function(e){r.setState({interacting:!1}),e.target.releasePointerCapture(e.pointerId)})),(0,V.Z)((0,ce.Z)(r),"onDragMovement",(function(e){if(r.state.interacting){var t=r.state,n=t.min,i=t.max,a=t.step,o=t.startX,l=t.numberFormat;!r.anchorValue&&r.state.value&&(r.anchorValue=r.state.value);var s=e.shiftKey&&!a?1:a||Vr(r.anchorValue,l,n,i),u=e.clientX-o,c=Math.pow(Math.abs(u),1.2)*Math.sign(u)*s/6;c=Math.floor(c/s)*s;var h=r.state.value+c;h=(0,Tr.Z)(h,n,i,a),r.state.cell.v!==h&&d.jFN.write(r.props,h)}})),(0,V.Z)((0,ce.Z)(r),"onPointerEnter",(function(){r.setState({showTooltip:!0})})),(0,V.Z)((0,ce.Z)(r),"onPointerLeave",(function(){r.setState({showTooltip:!1})})),(0,V.Z)((0,ce.Z)(r),"preventDefault",(function(e){r.state.isDisabled||e.preventDefault()})),r.state={interacting:!1,showTooltip:!1},r.spanRef=o.createRef(),r}return(0,he.Z)(n,[{key:"componentDidMount",value:function(){var e=this.spanRef.current;e&&(e.addEventListener("selectstart",this.preventDefault),e.addEventListener("dragstart",this.preventDefault),e.addEventListener("touchstart",this.preventDefault,{passive:!1}))}},{key:"componentWillUnmount",value:function(){var e=this.spanRef.current;e&&(e.removeEventListener("selectstart",this.preventDefault),e.removeEventListener("dragstart",this.preventDefault),e.removeEventListener("touchstart",this.preventDefault,{passive:!1}))}},{key:"render",value:function(){var e=this.props,t=this.state,n=t.isValid,o=t.isDisabled,l=t.min,s=t.max,u=t.valueNow,c=t.title,h=t.hasTarget,p=t.alignment;if(!e.isEditor&&!d.RrV.read(e))return null;var f=!n||o||!h,m=d.Yp3.read(e),g=d.NrA.read(e),b=v()($r().tangle,n?"":$r().invalid,o?$r().disabled:"");return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},e),{className:b,inlineMode:m,label:d.mn7.read(e),inlineWidth:g,isDisabled:o,children:(0,a.jsx)("span",{className:v()($r().outerValue,"text"===m&&!g&&$r().inline),style:{textAlign:p},children:(0,a.jsx)(q.Z,{cursorPosition:this.state.showTooltip?"static":null,showAnchor:!0,gap:6,hoverNode:"Click and drag!",children:(0,a.jsx)("span",{className:$r().value+" output",role:"slider","aria-valuemax":s,"aria-valuemin":l,"aria-valuenow":f?"unset":u,"aria-disabled":f?"true":void 0,onPointerDown:f?void 0:this.onInteractStart,onPointerUp:f?void 0:this.onInteractEnd,onPointerMove:f?void 0:this.onDragMovement,onPointerEnter:f?void 0:this.onPointerEnter,onPointerLeave:f?void 0:this.onPointerLeave,ref:this.spanRef,children:c||"\xa0"})})})}))}}],[{key:"getDerivedStateFromProps",value:function(e){var t,n=d.jFN.isSet(e),r=d.jFN.read(e),i=d.WUZ.read(e),a="Target cell not selected",o=!0;n?r&&"number"===typeof r.v?(t=r.v,a=(0,me.Mm)(r,i,e.locale)):r&&"f"in r&&null==r.v?a=(0,me.Mm)({v:0},i,e.locale):(0,me.ud)(e.expr)&&(a="Target cell has non-numeric value",o=!1):o=!1;var l=d.J7n.read(e)||Kr(r);return{title:a,numberFormat:i||r.z,alignment:l,cell:r,valueNow:t,min:d.VV$.read(e),max:d.Fp7.read(e),step:d.Nbs.read(e),isDisabled:d.JUm.read(e),hasTarget:n,isValid:o}}}]),n}(o.PureComponent);(0,V.Z)(ei,"options",Qr),(0,V.Z)(ei,"requiredOption","expr"),(0,V.Z)(ei,"isInput",!0),(0,V.Z)(ei,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,expr:s().string,isEditor:s().bool,locale:s().string,track:s().func});var ti=n(87594),ni=n(78237),ri=n(93454),ii={url:d.zLl,visible:d.RrV,size:d.hkI},ai=/^(?:https?:)?\/\//i;var oi=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"loadSource",(function(){r.state.src&&ai.test(r.state.src)&&fetch(r.state.src).then((function(e){if(!e.ok)throw e;return e.text()})).then((function(e){var t;r.setState({drawing:(t=e,(t||"").split(/\n(?! )/).map((function(e){return!(e=e.replace(/\n +/g,"").trimStart().replace(/[\s;]+$/,""))||/^--/.test(e)?null:e})).filter(Boolean)),loading:!1,error:null})})).catch((function(e){return r.setState({loading:!1,error:e})}))})),(0,V.Z)((0,ce.Z)(r),"updateWidth",(function(){if(r.wrapper){var e=r.wrapper.offsetWidth;e!==r.state.width&&r.setState({width:e,height:Math.floor(.62*e)})}})),r.state={src:d.zLl.read(e),loading:!0,height:1,width:1,error:null},r}return(0,he.Z)(n,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.updateWidth),this.updateWidth(),this.loadSource(),this.observer=new MutationObserver(this.updateWidth),this.observer.observe(document,{attributes:!0,subtree:!0,attributeFilter:["style","class"]})}},{key:"componentDidUpdate",value:function(e){if(this.props.url!==e.url&&this.props.model){var t=d.zLl.read(this.props);t!==this.state.src&&(this.state.src=t,this.state.loading=!0,this.loadSource())}}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateWidth)}},{key:"renderLoading",value:function(){return(0,a.jsx)("text",{x:this.state.width/2,y:this.state.height/2,textAnchor:"middle",fill:"currentColor",fillOpacity:.5,children:"Loading..."})}},{key:"renderDrawing",value:function(){var e=this.props.model;if(!e||this.state.error||!this.state.drawing)return null;var t=this.state.drawing,n={translate:[0,0],scale:[0,0],rotation:0,fontSize:12,font:"sans-serif",height:this.state.height,width:this.state.width},r=e.mode;try{return e.mode=ri.D_,function(e,t,n){var r=[];return e.forEach((function(e,i){var a=0;try{t.runFormula(e,{canvasOption:function(e,t){return void 0!==t&&(n[e]=t),n[e]},canvasElement:function(e,t,l){var s=t.transform||"",u=(0,F.Z)(n.translate,2),c=u[0],d=u[1];(c||d)&&(s+="translate(".concat(c,",").concat(d,")"));var h=(0,F.Z)(n.scale,2),p=h[0],f=h[1];(p||f)&&(s+="scale(".concat(p,",").concat(f,")")),n.rotation&&(s+="rotate(".concat(n.rotation,")")),s&&(t.transform=s),t.key="cv:"+i+":"+a++,r.push(o.createElement(e,t,l))}})}catch(Oa){}})),r}(t,e,n)}finally{e.mode=r}}},{key:"render",value:function(){var e=this,t=this.props;return t.isEditor||d.RrV.read(t)?t.url?this.state.error?(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},t),{children:(0,a.jsx)(De.Z,(0,r.Z)({title:"Failed to fetch",message:"This canvas element was unable to fetch its source"},t))})):(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({subRef:function(t){return e.wrapper=t}},t),{children:(0,a.jsx)("svg",{"data-test":!0,role:this.state.loading?"status":"img",ref:function(t){return e.svg=t},viewBox:"0 0 ".concat(this.state.width," ").concat(this.state.height),children:this.state.loading?this.renderLoading():this.renderDrawing()})})):(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},t),{children:(0,a.jsx)(De.Z,(0,r.Z)({title:"No source found",message:"Set a source URL for the canvas drawing"},t))})):null}}]),n}(o.Component);(0,V.Z)(oi,"propTypes",{error:s().string,model:c.Z.isRequired,url:s().string,isEditor:s().bool,emit:s().func,element:s().object}),(0,V.Z)(oi,"options",ii),(0,V.Z)(oi,"requiredOption","url");var li,si=n(11382),ui=n.n(si),ci=(li={},(0,V.Z)(li,d.$_Y.name,d.$_Y),(0,V.Z)(li,d.oYN.name,d.oYN),li);function di(e){var t=(0,o.useContext)(m.u6).theme,n=(0,o.useRef)(null),l=(0,o.useCallback)((function(){var e=null===n||void 0===n?void 0:n.current;if(e){e.style.left="";var t=e.getBoundingClientRect();e.style.left=-t.left+"px",e.style.width=document.body.clientWidth-20+"px"}}),[n]);(0,o.useEffect)((function(){return l(),window.addEventListener("resize",l),function(){window.removeEventListener("resize",l)}}),[l]);var s={color:t.resolveColor(d.$_Y.read(e)),top:d.oYN.read(e)+"px"};return(0,a.jsxs)(k.Z,(0,i.Z)((0,r.Z)({className:ui().debugline},e),{children:[(0,a.jsx)("i",{className:ui().line,style:s,ref:n}),e.isEditor?(0,a.jsx)("span",{style:{color:s.color},className:ui().handle}):null]}))}di.options=ci,di.propTypes={isEditor:s().bool,model:c.Z.isRequired};var hi=n(4662),pi=[{matcher:/^(?:https?:)?\/\/(?:www\.)?(?:youtube\.com\/(?:watch|shorts|v)|youtu\.be)?(?:\/|\?.*?v=)([a-zA-Z0-9_-]+)/,handler:function(e){return{type:"video",aspect:.5625,thumb:"https://i.ytimg.com/vi/".concat(e[1],"/hqdefault.jpg"),url:"https://www.youtube.com/embed/".concat(e[1],"?title=0&byline=0&portrait=0")}}},{matcher:/^(?:https?:)?\/\/(?:player\.)?vimeo\.com\/(?:(?:album|channels|groups|ondemand)\/[a-zA-Z0-9]+\/)?(?:videos?\/)?([a-zA-Z0-9]+)$/,handler:function(e){return{type:"video",aspect:.5625,url:"https://player.vimeo.com/video/".concat(e[1])}}},{matcher:/^(?:https?:)?\/\/(?:www\.)?twitch\.tv\/videos\/([a-zA-Z0-9]+)$/,handler:function(e){var t="undefined"!==typeof location?"&parent=".concat(location.hostname):"";return{type:"video",aspect:.5625,url:"https://player.twitch.tv/?video=".concat(e[1],"&autoplay=false&iframe=1&parent=grid.is").concat(t)}}},{matcher:/^(?:https?:)?\/\/(?:www\.)?ted\.com\/talks\/([^/?]+)$/,handler:function(e){return{type:"video",aspect:.5642857142857143,url:"https://embed.ted.com/talks/".concat(e[1])}}},{matcher:/^(?:https?:)?\/\/(?:www\.)?dailymotion\.com\/video\/([^/?]+)$/,handler:function(e){return{type:"video",aspect:.5625,url:"https://www.dailymotion.com/embed/video/".concat(e[1])}}},{matcher:/^(?:https?:)?\/\/(?:www\.)?loom\.com\/(?:share|embed)\/([^/?]+)(?:\?.*)?$/,handler:function(e){return{type:"video",aspect:.5625,url:"https://www.loom.com/embed/".concat(e[1])}}},{matcher:/^(?:http:\/\/<iframe .*?)?https:\/\/(?:www\.)?google\.com\/maps\/embed\?([^"?/]+)/,handler:function(e){return{type:"map",aspect:.75,url:"https://www.google.com/maps/embed?".concat(e[1])}}}],fi=/^(?:https?:)?\/\/([^/]+)\//i;function vi(e){if(e&&fi.test(e)){e=e.replace(/#.*?$/,"");var t=!0,n=!1,r=void 0;try{for(var i,a=pi[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value,l=o.handler,s=o.matcher.exec(e);if(s)return l(s)}}catch(Oa){n=!0,r=Oa}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}}return null}var mi=n(79160),gi=n.n(mi),bi={url:d.zLl,visible:d.RrV,size:d.hkI},xi=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onLoad",(function(){r.setState({loading:!1})})),r.state={loading:!0},r}return(0,he.Z)(n,[{key:"render",value:function(){var e=this,t=this.props;if(!t.isEditor&&!d.RrV.read(t))return null;if(!(0,me.ud)(t.url))return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},t),{children:(0,a.jsx)(De.Z,(0,r.Z)({title:"No source found",message:"Your video will appear here after you add the Source URL"},t))}));var n=this.state,o=n.embedParams,l=n.loading;return o?(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({className:gi().video},t),{children:(0,a.jsxs)("div",{className:gi().embedWrap,ref:function(t){return e.wrapper=t},"data-testid":"embed",style:{position:"relative",paddingBottom:100*o.aspect+"%",background:"#ddd",height:0,overflow:"hidden"},children:[(0,a.jsx)("iframe",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},onLoad:this.onLoad,ref:function(t){return e.iframe=t},src:o.url,frameBorder:"0",allowFullScreen:!0,className:gi().iframe}),l?(0,a.jsx)(hi.T,{color:"#75767d",className:gi().spinner}):null]})})):(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},t),{children:(0,a.jsx)(De.Z,(0,r.Z)({title:"Unknown source",message:"We currently support videos from YouTube, Vimeo, TED, Twitch, DailyMotion, and Loom."},t))}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(!e.isEditor&&e.model&&e.model.lastWrite===t.modelId)return null;var n=d.zLl.read(e);return{modelId:e.model.lastWrite,embedParams:vi(n)}}}]),n}(o.Component);(0,V.Z)(xi,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,locale:s().string,url:s().string,isEditor:s().bool,element:s().object}),(0,V.Z)(xi,"options",bi),(0,V.Z)(xi,"requiredOption","url");var yi=n(38174),ki=n(14727),wi=n.n(ki),Zi={url:d.zLl,visible:d.RrV,width:d.nx3,framing:d.DTU,shape:d.BWk,borderColor:d.VCH,href:d.xuP},_i={"xx-small":20,"x-small":64,small:99,medium:140,large:214,"x-large":330,full:1/0},ji=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onLoad",(function(){var e,t=null===(e=r.imageRef)||void 0===e?void 0:e.current;(null===t||void 0===t?void 0:t.naturalWidth)&&yi.Z.setMeta(r.state.src,t),r.setState({loading:!1,error:!1})})),(0,V.Z)((0,ce.Z)(r),"onError",(function(){r.setState({error:!0,loading:!1})})),(0,V.Z)((0,ce.Z)(r),"imageRef",o.createRef()),r.state={},r}return(0,he.Z)(n,[{key:"render",value:function(){var e=this.props;if(!e.isEditor&&!d.RrV.read(e))return null;var t=this.context.theme,n=this.state,o=n.src,l=n.href,s=n.borderColor,u=n.width,c=n.framing,p=n.shape,f=n.error,m=n.loading,g=n.lastSrc;if(f)return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},e),{className:wi().wd_full,children:(0,a.jsx)(De.Z,(0,r.Z)({title:"Failed to fetch",message:"You may need to replace the file"},e))}));if(!o)return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},e),{className:wi().wd_full,children:(0,a.jsx)(De.Z,(0,r.Z)({title:"No source found",message:"Please select an image URL"},e))}));var b={},x={},y=yi.Z.getMeta(o);m&&g&&(y=yi.Z.getMeta(g));var w=y?y[1]/y[0]:1,Z=w>=1,_=!1,j=!1,S=0;if(s&&(S=4,"circle"===p||"ellipse"===p?x.background=t.resolveColor(s):b.border="2px solid "+t.resolveColor(s)),u){var C,T=(null!==(C=_i[u])&&void 0!==C?C:20)-S;if(isFinite(T)){var M=20;M="cover"===c?Z?T:T/w:Z?T/w:T,b.width=M,"circle"===p&&(b.height=M)}else _=!0}else if(j=!0,y&&(b.width=y[0]-S,"circle"===p)){var N,E=(N=Math).min.apply(N,(0,B.Z)(y))-S;b.width="".concat(E,"px"),b.height=b.width}var D=v()(wi().image,wi().inline,s&&wi().withBorder,_&&wi().fullWidth,j&&wi().native,"rrect"===p&&wi().roundedRect,"circle"===p&&wi().circle,"ellipse"===p&&wi().ellipse),R=l&&!e.isEditor,L=R?"a":"span",W=R?(0,h.L)(l,e.isAuthenticated).props:{};return R&&(W.onClick=function(){return e.track("interact",{elementType:"link",targetUrl:l})}),(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},e),{className:D,children:(0,a.jsxs)(L,(0,i.Z)((0,r.Z)({className:wi().imgWrap},W),{style:x,children:[(0,a.jsx)("img",{style:b,ref:this.imageRef,src:o,onLoad:this.onLoad,onError:this.onError}),l&&!R?(0,a.jsx)("a",(0,i.Z)((0,r.Z)({className:wi().linkIndicator},W),{children:(0,a.jsxs)("svg",{width:"17",height:"11",viewBox:"0 0 17 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{id:"foo",d:"M6,5.4L11,5.4M9.1,2.95L11,2.95Q14,2.95 14,5.5T11,8.05L9.1,8.05M7.9,2.95L6,2.95Q3,2.95 3,5.5T6,8.05L7.9,8.05"}),(0,a.jsx)("use",{href:"#foo",fill:"none",stroke:"white",strokeWidth:"4.5",strokeOpacity:"0.6",strokeLinecap:"square"}),(0,a.jsx)("use",{href:"#foo",fill:"none",stroke:"black",strokeWidth:"1.4"})]})})):null]}))}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r,i,a=null!==(r=t.error)&&void 0!==r?r:null,o=null===(i=t.loading)||void 0===i||i,l=d.zLl.read(e);l&&l!==t.src&&(a=null,o=!0);var s={src:l,lastSrc:t.src,visible:d.RrV.read(e),width:d.nx3.read(e),framing:d.DTU.read(e),shape:d.BWk.read(e),modelId:null===(n=e.model)||void 0===n?void 0:n.lastWrite,borderColor:d.VCH.read(e),href:d.xuP.read(e),error:a,loading:o},u=!0,c=!1,h=void 0;try{for(var p,f=Object.keys(s)[Symbol.iterator]();!(u=(p=f.next()).done);u=!0){var v=p.value;if(s[v]!==t[v])return s}}catch(Oa){c=!0,h=Oa}finally{try{u||null==f.return||f.return()}finally{if(c)throw h}}return null}}]),n}(o.Component);(0,V.Z)(ji,"propTypes",{error:s().string,model:c.Z.isRequired,isEditor:s().bool,isAuthenticated:s().bool,element:s().object,track:s().func}),(0,V.Z)(ji,"options",Zi),(0,V.Z)(ji,"requiredOption","url"),(0,V.Z)(ji,"contextType",m.u6);var Si=n(2127),Ci=n.n(Si),Ti={expr:d.IHR,exprPrev:d.hYE,changeCalcType:d.qL9,title:d.mn7,format:d.WUZ,formatChange:d.X6T,inline:d.Vjv,changeColors:d.UB1,visible:d.RrV,showMovementIcon:d.S0},Mi="#VALUE!",Ni=[{name:"decrease",glyph:"\u2193"},{name:"neutral",glyph:"\u25c6"},{name:"increase",glyph:"\u2191"}];function Ei(e){var t=e.sign,n=void 0===t?0:t;return(0,a.jsx)("svg",{width:n?14:10,height:n?12:10,role:"img",children:(0,a.jsxs)("g",{fill:"currentColor",children:[n>0?(0,a.jsx)("path",{d:"M5.904.502a1.005 1.005 0 0 1 1.74 0l5.768 9.99a1.005 1.005 0 0 1-.87 1.508H1.006a1.005 1.005 0 0 1-.87-1.507L5.904.503Z"}):null,n<0?(0,a.jsx)("path",{d:"M7.644 11.498c-.386.67-1.353.67-1.74 0L.136 1.508A1.005 1.005 0 0 1 1.006 0h11.536c.774 0 1.257.837.87 1.507l-5.768 9.99Z"}):null,n?null:(0,a.jsx)("path",{d:"M4.293.707a1 1 0 0 1 1.414 0l3.586 3.586a1 1 0 0 1 0 1.414L5.707 9.293a1 1 0 0 1-1.414 0L.707 5.707a1 1 0 0 1 0-1.414L4.293.707Z"})]})})}function Di(e){var t=(0,o.useContext)(m.u6).theme;if(!e.isEditor&&!d.RrV.read(e))return null;if(!d.IHR.isSet(e))return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({className:Ci().text},e),{children:(0,a.jsx)("span",{children:"Data reference missing"})}));var n=d.UB1.read(e,{minColors:3,autoExtend:!1,default:["#208428","#DD3314","#969696"]}).map(t.resolveColor),l=d.IHR.readCell(e),s=d.mn7.read(e),u=d.WUZ.read(e),c=d.Vjv.read(e),h=d.S0.read(e),p=isFinite(l.v)&&"number"===typeof l.v,f=p?l.v:0,g=d.hYE.isSet(e),b=0,x=n[2],y=null,w=0;if(g){var Z=d.hYE.readCell(e),_=Z.v,j=isFinite(_)&&null!=_,S=d.qL9.read(e);if("percent"===S){b=p&&j?(f-_)/_:Mi;var C=u||(null===Z||void 0===Z?void 0:Z.z)||"";y=(0,O.TQ)(C)?C:"0.0#%"}else"delta"===S?(b=p&&j?f-_:Mi,y=u||l.z):(b=_,y=u||(null===Z||void 0===Z?void 0:Z.z)||"");d.X6T.isSet(e)&&(y=d.X6T.read(e)),"number"===typeof b&&(w=Math.sign(b),b>0?x=n[0]:b<0&&(x=n[1]))}var T="number"!==typeof b||isNaN(b)?Ni[2]:Ni[1+Math.sign(b)],M=p?(0,me.Mm)(l,u,e.locale):Mi,N=g?(0,O.WU)(y||"",b,{locale:e.locale,nbsp:!0}):null;return(0,a.jsxs)(k.Z,(0,i.Z)((0,r.Z)({className:v()(Ci().kpi,c&&Ci().inlineflow,c?Ci().kpiFlow:Ci().kpiBlock)},e),{children:[(0,a.jsx)(Nn.Z,{text:s,inline:c}),(0,a.jsxs)("span",{className:Ci().kpiWrap,style:{color:x},children:[(0,a.jsx)("span",{className:Ci().value,children:M}),g&&(0,a.jsxs)("span",{className:Ci().changeWrap,children:[" ",h&&(0,a.jsxs)("span",{className:Ci().icon,children:[(0,a.jsx)("span",{className:Ci().glyph,children:T.glyph})," ",(0,a.jsx)(Ei,{sign:w})]}),(0,a.jsx)("span",{className:Ci().change,children:N})]})]})]}))}Di.options=Ti,Di.requiredOption="expr",Di.propTypes={fontSize:s().string,isEditor:s().bool,parentKey:s().string,error:s().string,model:c.Z.isRequired,locale:s().string};var Ri,Li=(0,o.lazy)((function(){return Promise.all([n.e(1265),n.e(1851),n.e(9755)]).then(n.bind(n,19755))})),Wi=function(e){return(0,a.jsx)(o.Suspense,{fallback:(0,a.jsx)("span",{children:d.hTC.read(e)}),children:(0,a.jsx)(Li,(0,r.Z)({},e))})};Wi.requiredOption=d.hTC.name,Wi.options=(Ri={},(0,V.Z)(Ri,d.$_Y.name,d.$_Y),(0,V.Z)(Ri,d.RrV.name,d.RrV),(0,V.Z)(Ri,d.hTC.name,d.hTC),(0,V.Z)(Ri,d.JBY.name,d.JBY),(0,V.Z)(Ri,d.Vjv.name,d.Vjv),Ri);var zi=Wi,Pi=n(35035),Ai=n(42219),Vi=n.n(Ai),Fi={expr:d.rxy,label:d.mn7,visible:d.RrV},Bi=function(e){e.preventDefault()};function Ii(e){if(!e.isEditor&&!d.RrV.read(e))return null;var t,n;if(d.rxy.isSet(e)){var o=d.rxy.parse(e.expr);o&&(n=e.model.getWorkbook(o.workbookName))}else n=e.model.getWorkbook();if(n){var l=String(n.type).toLowerCase();"native"!==l&&"grid"!==l||(n=null,t="Invalid workbook")}else t="No workbook connected";var s=!n,u="#",c="";if(!s){var h;c=n.filename;var p=null===(h=n.cloud_connection)||void 0===h?void 0:h.cloud_drive_provider;u="google"===p||"url"===p?n.cloud_connection.href:"/download/".concat(e.documentId,"/").concat(n.id)}return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({className:Vi().source},e),{children:(0,a.jsxs)("a",{href:u,rel:"noopener,noreferrer",className:s?Vi().disabled:void 0,"aria-disabled":!!s||void 0,target:"_blank",onMouseDown:s?Bi:void 0,onClick:function(t){(s||e.isEditor)&&Bi(t),e.track("interact",{elementType:"sourcelink"})},tabIndex:s?-1:void 0,children:[(0,a.jsx)("span",{className:Vi().icon,children:(0,a.jsxs)("svg",{width:24,height:24,viewBox:"0 0 40 40",fill:"none",children:[(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.1852 5.30719C23.9967 5.11093 23.7362 5 23.4641 5H9.83023C8.79976 5.02907 7.98344 5.93718 8.00026 7.03575V32.8076C7.98344 33.9062 8.79976 34.8143 9.83023 34.8434H30.17C31.2005 34.8143 32.0168 33.9062 32 32.8076V13.8439C32 13.5857 31.9001 13.3374 31.7211 13.1511L24.1852 5.30719ZM23.5902 7.65376L29.5901 13.9422H23.5902V7.65376ZM10.0001 7.13159V32.7116H29.9999V15.6583H22V7.13159H10.0001Z"}),(0,a.jsx)("rect",{x:"15",y:"19",width:"10.1111",height:"7",stroke:"currentColor"}),(0,a.jsx)("line",{x1:"15",y1:"22.5",x2:"25.1111",y2:"22.5",stroke:"currentColor"}),(0,a.jsx)("line",{x1:"20.1665",y1:"19",x2:"20.1665",y2:"26",stroke:"currentColor"})]})}),(0,a.jsx)("span",{children:t||d.mn7.read(e)||c})]})}))}Ii.options=Fi,Ii.requiredOption="expr",Ii.propTypes={isEditor:s().bool,parentKey:s().string,error:s().string,documentId:s().string,expr:s().string,track:s().func,model:c.Z};var Oi=n(65188),Ui=n(5899);function Hi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=t.getWorkbook(e.workbookName),a=e;if(!i)return a;var o=i.getSheet(e.sheetName);if(!o)return a;if(0!==a.length){var l,s=e.top,u=e.left,c=e.right;if(n||(a=qi(a,s,o.row_heights)),!r)a=Yi(a,u,c,null!==(l=o.columns)&&void 0!==l?l:[]);a.workbookName=e.workbookName,a.sheetName=e.sheetName}return a}function qi(e,t,n){return e.filter((function(e,r){var i;return(null!==(i=n[t+r+1])&&void 0!==i?i:1)>0}))}function Yi(e,t,n,r){for(var i=function(e){var n=r.find((function(t){return t.begin<=e&&e<=t.end}));0===(null===n||void 0===n?void 0:n.width)&&a.push(e-t-1)},a=[],o=t+1;o<=n+1;o++)i(o);return 0!==a.length?e.map((function(e){return e.filter((function(e,t){return-1===a.indexOf(t)}))})):e}var Xi=n(77948),Gi=n.n(Xi),Ki=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onInput",(function(){var e=r.props,t=e.cell,n=e.onInput,i=e.track;i&&i("interact",{elementType:"table.checkbox"}),n&&t&&n(t.id,r.state.writeValue)})),r.state={isChecked:!1,writeValue:!0},r}return(0,he.Z)(n,[{key:"render",value:function(){return(0,a.jsx)("span",{className:Gi().checkbox,children:(0,a.jsx)(Mn,{checked:this.state.isChecked,size:14,onClick:this.onInput})})}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.cell,n=e.value,r=e.valueOff,i=t&&t.v,a=!0===i;null!=n&&(a=(0,me.fC)(i,n));var o=null===n||void 0===n||n;return a&&(o=null!=r?null!==r&&void 0!==r&&r:!0!==o&&""),{isChecked:a,writeValue:o}}}]),n}(o.PureComponent);(0,V.Z)(Ki,"propTypes",{cell:s().object,value:s().any,valueOff:s().any,onInput:s().func,track:s().func});var Ji=n(25106),$i=n.n(Ji),Qi=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onFocusBlur",(function(e){r.props.track&&r.props.track(e.type,{elementType:"table.dropdown"})})),(0,V.Z)((0,ce.Z)(r),"onChange",(function(e){var t=+e.target.value,n=r.state.optionList[t];r.props.track&&r.props.track("interact",{elementType:"table.dropdown"}),r.props.onInput(r.props.cell.id,n.value)}));return r.state={optionList:[]},r}return(0,he.Z)(n,[{key:"render",value:function(){var e,t=this.props,n=t.cell,r=t.options,i=this.state.optionList,o=!r||!i.length,l=i.findIndex((function(e){return(0,me.fC)(n.v,e&&e.value)})),s=null;i.forEach((function(e){(null===s||e.label.length>s.length)&&(s=e.label)}));var u=o?"No options":null===(e=i[l])||void 0===e?void 0:e.label;return(0,a.jsxs)("label",{className:v()($i().dropdownWrap,o&&$i().disabled),children:[(0,a.jsxs)("span",{className:$i().widget,"aria-hidden":"true",children:[(0,a.jsxs)("span",{className:$i().value,children:[(0,a.jsx)("span",{className:$i().currentLabel,children:u||"\xa0"}),(0,a.jsx)("span",{className:$i().spacer,children:s||"\xa0"})]}),(0,a.jsx)("svg",{version:"1.1",width:"10",height:"10",viewBox:"0 0 36 36",children:(0,a.jsx)("g",{transform:"translate(18,18) rotate(180) translate(-18,-18)",children:(0,a.jsx)("path",{d:"M29.52,22.52,18,10.6,6.48,22.52a1.7,1.7,0,0,0,2.45,2.36L18,15.49l9.08,9.39a1.7,1.7,0,0,0,2.45-2.36Z"})})})]}),(0,a.jsxs)("select",{className:$i().dropdown,value:-1===l?"":l,onChange:this.onChange,onFocus:this.onFocusBlur,onBlur:this.onFocusBlur,disabled:o,children:[-1===l&&(0,a.jsx)("option",{value:"",children:"\xa0"},"blank"),this.state.optionList.map((function(e,t){return(0,a.jsx)("option",{value:t,children:e.label},t)}))]})]})}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.options,n=e.labels,r=e.format,i=e.locale,a=t||[[]],o=a[0].length,l=a.length,s=o<l?"col":"row",u=n&&rt(n,s,r,i),c=[];return o*l&&(c=(0,ye.Z)("row"===s?o:l).map((function(e){var t="row"===s?a[0][e]:a[e][0],n=null==t||(0,E.Z)(t,Error)?null:t;return{index:e,value:n?n.v:null,label:u&&u.length>=e+1?u[e]||"":(0,me.Mm)(n,r,i)}}))),{optionList:c}}}]),n}(o.PureComponent);(0,V.Z)(Qi,"propTypes",{cell:s().object,format:s().string,locale:s().string,options:s().array,labels:s().array,onInput:s().func,track:s().func});var ea=n(24657),ta=n.n(ea);function na(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(3===e.nodeType)t.push(e);else for(var n=0;n<e.childNodes.length;++n)na(e.childNodes[n],t);return t}var ra=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onInput",(function(e){r.setState({editValue:e.target.value});var t=(0,Cr.Oe)(e.target.value,r.props.format,r.props.locale);r.writeValue(t,!1,!1)})),(0,V.Z)((0,ce.Z)(r),"onMouseDown",(function(e){var t=document.createRange();t.selectNode(e.target);var n={i:1,dist:1/0};if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),a={x:e.clientX-i.x,y:e.clientY-i.y};na(e.target).forEach((function(e){for(var r=0;r<e.length+1;r++){t.setStart(e,r),t.setEnd(e,r);var o=t.getBoundingClientRect(),l=o.x-i.x,s=o.y+o.height/2-i.y,u=Math.hypot(l-a.x,s-a.y);n.dist>u&&(n={i:r,dist:u})}}))}r.setState({startEditOffset:n.i})})),(0,V.Z)((0,ce.Z)(r),"onFocus",(function(){clearTimeout(r._transTimer);var e=r.props,t=e.cell,n=e.format,i=e.locale;r.props.track&&r.props.track("focus",{elementType:"table.input"}),r.setState({savedValue:(0,Cr.lm)(t.v,n||t.z,i),lockValue:(0,me.Mm)(t,n,i),exiting:!1,interacting:!0})})),(0,V.Z)((0,ce.Z)(r),"onEndEdit",(function(){r.setState({exiting:!1,interacting:!1})})),(0,V.Z)((0,ce.Z)(r),"onBlur",(function(e){var t=(0,Cr.Oe)(e.target.value,r.props.format,r.props.locale);r.props.track&&r.state.savedValue!==e.target.value&&r.props.track("interact",{elementType:"table.input"}),r.writeValue(t,!0,!0),clearTimeout(r._startTimer),clearTimeout(r._transTimer),r.props.boxed?r.setState({editValue:null,startEditOffset:1/0,exiting:!1,interacting:!1},(function(){r.props.track&&r.props.track("blur",{elementType:"table.input"})})):(r.props.track&&r.props.track("blur",{elementType:"table.input"}),r.setState({exiting:!0,editValue:null,startEditOffset:1/0}),r._transTimer=setTimeout(r.onEndEdit,parseInt(ta().transitionSpeed,10)))})),(0,V.Z)((0,ce.Z)(r),"onKeyDown",(function(e){var t;("Escape"===e.key&&r.onBlur({target:{value:r.state.savedValue}}),"Enter"===e.key)&&(null===(t=r.input)||void 0===t||t.blur())})),r.state={interacting:!1,editValue:null,startEditOffset:1/0,savedValue:null,lockValue:null},r}return(0,he.Z)(n,[{key:"componentDidUpdate",value:function(e,t){var n=this;this.state.interacting&&!t.interacting&&this.input&&(this.input.focus(),this.props.boxed||(clearTimeout(this._startTimer),this._startTimer=setTimeout((function(){var e,t=n.state.startEditOffset;null===(e=n.input)||void 0===e||e.setSelectionRange(t,t)}),1)))}},{key:"componentWillUnmount",value:function(){clearTimeout(this._startTimer),clearTimeout(this._transTimer)}},{key:"writeValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.props,i=r.cell,a=r.onInput,o=r.min,l=r.max,s=r.step;if(clearTimeout(this._writeDelay),t&&(e||0===e)&&"number"===typeof e&&(e=(0,Tr.Z)(e,o,l,s)),""!==e||null!=i._v&&"number"!==typeof i._v||(e=null),e!==i.v){var u="number"===typeof e||null==e,c="number"===typeof i.v||null==i.v;u&&c&&!n?this._writeDelay=setTimeout((function(){a(i.id,e)}),this.props.inputDelay):a(i.id,e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.cell,r=t.format,i=t.locale,o=t.boxed,l=this.state,s=l.interacting,u=l.exiting,c=l.editValue,d=l.lockValue,h=o?ta().boxed:v()(ta().unboxed,ta().inputLabel,s&&ta().interacting,u&&ta().exiting),p="";return p=o?s?null!==c&&void 0!==c?c:(0,Cr.lm)(n.v,r||n.z,i):(0,me.Mm)(n,r,i):null!==c&&void 0!==c?c:(0,Cr.lm)(n.v,r||n.z,i),(0,a.jsxs)("label",{className:h,onMouseDown:this.onMouseDown,onFocus:s?void 0:this.onFocus,role:s||o?void 0:"textbox",tabIndex:s||o?-1:0,ref:function(t){return e.label=t},children:[(0,a.jsx)("span",{className:ta().value,children:!s||u?(0,me.Mm)(n,r,i)||"\xa0\xa0":d||"\xa0\xa0"}),(s||o)&&(0,a.jsx)("input",{type:"text",onKeyDown:this.onKeyDown,ref:function(t){return e.input=t},className:v()(ta().input,u&&ta().exitingInput),value:p,onInput:this.onInput,onBlur:this.onBlur})]})}}]),n}(o.PureComponent);(0,V.Z)(ra,"defaultProps",{inputDelay:g.fu});var ia=n(81782),aa=n.n(ia);function oa(e){var t=e.track,n=e.cell,r=e.onInput,i=e.min,l=e.max,s=e.step,u=e.format,c=(0,o.useRef)(null),d=(0,o.useState)(void 0),h=d[0],p=d[1],f=(0,o.useCallback)((function(){t&&t("interact",{elementType:"table.slider"}),p(void 0)}),[t]),v=(0,o.useCallback)((function(e){if(r&&n){var t=e.target.valueAsNumber;isFinite(t)&&r(n.id,(0,Tr.Z)(t,i,l,s))}}),[i,l,s,n,r]);(0,o.useEffect)((function(){var e=c.current;return null===e||void 0===e||e.addEventListener("change",f),function(){null===e||void 0===e||e.removeEventListener("change",f)}}));var m=isFinite(n.v)&&n.v||0,g=l,b=i;(0,me.hj)(l)||(g=m<0?0:(0,me.bA)(m)||Math.max(1,s||0)),(0,me.hj)(i)||(b=m<0?-(0,me.bA)(-m):0),(0,me.hj)(s)||(s=(0,O.V5)(null!==u&&void 0!==u?u:n.z)?1:Vr(m,u,i,l));var x=h?h[0]:b,y=h?h[1]:g;return(0,a.jsx)("span",{className:aa().sliderWrap,children:(0,a.jsx)(q.Z,{cursorPosition:h?"static":null,showAnchor:!0,hoverNode:(0,O.WU)(u,m),sliderShift:(m-x)/(y-x),sliderWidthAdjust:-16,gap:12,children:(0,a.jsx)("input",{ref:c,type:"range",className:aa().slider,disabled:!isFinite(m),value:m,step:s,min:x,max:y,onInput:v,onMouseDown:function(){p([b,g])},onMouseUp:function(){p(void 0)}})})})}oa.propTypes={cell:s().object,min:s().number,max:s().number,step:s().number,format:s().string,onInput:s().func,track:s().func};var la=n(42272),sa=n.n(la),ua=function(e){return e.preventDefault()},ca=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onInteractStart",(function(e){var t=r.props.cell;r.setState({interacting:!0,startX:e.clientX,value:(null===t||void 0===t?void 0:t.v)||0}),e.target.setPointerCapture(e.pointerId),r.props.track&&r.props.track("interact",{elementType:"table.tangle"})})),(0,V.Z)((0,ce.Z)(r),"onInteractEnd",(function(e){r.setState({interacting:!1}),e.target.releasePointerCapture(e.pointerId)})),(0,V.Z)((0,ce.Z)(r),"onDragMovement",(function(e){if(r.state.interacting){var t=r.props,n=t.min,i=t.max,a=t.step,o=t.cell,l=r.state.startX,s=r.props.format||o.z;!r.anchorValue&&r.state.value&&(r.anchorValue=r.state.value);var u=e.shiftKey&&!a?1:a||Vr(r.anchorValue,s,n,i),c=e.clientX-l,d=Math.pow(Math.abs(c),1.2)*Math.sign(c)*u/6;d=Math.floor(d/u)*u;var h=r.state.value+d;h=(0,Tr.Z)(h,n,i,a),o.v!==h&&r.onInput(h)}})),(0,V.Z)((0,ce.Z)(r),"onInput",(function(e){var t=r.props,n=t.cell,i=t.onInput;i&&n&&i(n.id,e)})),r.state={interacting:!1},r.spanRef=o.createRef(),r}return(0,he.Z)(n,[{key:"componentDidMount",value:function(){var e=this.spanRef.current;e&&(e.addEventListener("selectstart",ua),e.addEventListener("dragstart",ua),e.addEventListener("touchstart",ua,{passive:!1}))}},{key:"componentWillUnmount",value:function(){var e=this.spanRef.current;e&&(e.removeEventListener("selectstart",ua),e.removeEventListener("dragstart",ua),e.removeEventListener("touchstart",ua,{passive:!1}))}},{key:"render",value:function(){var e,t=this.props,n=t.cell,r=t.format,i=t.locale,o=t.min,l=t.max,s={throws:!1,locale:i},u="",c=!1;if(n&&"number"===typeof n.v)e=n.v,u=(0,O.WU)(r||n.z,n.v,s),c=!0;else if(n&&"f"in n&&null==n.v)u=(0,O.WU)(r||n.z,0,s),c=!0;else{var d;u=(0,O.WU)(r||n.z,null!==(d=n.v)&&void 0!==d?d:"",s)}var h=!c;return(0,a.jsx)("span",{className:v()(sa().tangle,!c&&sa().invalid),role:"slider","aria-valuemax":l,"aria-valuemin":o,"aria-valuenow":h?"unset":e,"aria-disabled":h?"true":void 0,onPointerDown:h?void 0:this.onInteractStart,onPointerUp:h?void 0:this.onInteractEnd,onPointerMove:h?void 0:this.onDragMovement,ref:this.spanRef,children:u||"\xa0"})}}]),n}(o.PureComponent);(0,V.Z)(ca,"propTypes",{cell:s().object,min:s().number,max:s().number,step:s().number,format:s().string,locale:s().string,onInput:s().func,track:s().func});var da=n(24234),ha=new RegExp("^(?:[a-z\\d-]{1,63}\\.)+(".concat(["com","net","org","edu","gov","biz","int","mil","info","name","museum","app","ly","es","uk","us","ru","de","au","fr","jp","cn","tk","nl","pl","ca","in","eu"].join("|"),"|[a-z]{2,63}\\/[^\\s]*)$"),"i");function pa(e){var t=e.cell,n=e.format,o=e.locale,l=e.isAuthenticated,s=e.color,u=e.testId,c=void 0===u?null:u,d=(0,da.Z)(t,n,o),p=null;if(t&&(t.href||"string"===typeof t.v&&d.length>=5)){var f=t.href||d;/^(?:(?:https?:)?\/\/|mailto:(?=.*@))[^\s]+$/.test(f)?p=f:ha.test(f)?p="//"+f:/^(?!\.)[a-z\d_+-]+@(?:[a-z\d-]{1,63}\.)+[a-z]{2,63}$/i.test(f)&&(p="mailto:"+f)}if(p){var v=(0,h.L)(p,l);return(0,a.jsx)("a",(0,i.Z)((0,r.Z)({"data-testid":c},v.props),{style:{color:s},children:d}))}return(0,a.jsx)("span",{"data-testid":c,style:{color:s},children:d})}pa.propTypes={cell:s().object,format:s().string,color:s().string,locale:s().string,testId:s().string,isAuthenticated:s().bool};var fa,va=n(51229),ma=n.n(va),ga={ascending:1,asc:1,descending:-1,desc:-1},ba=new Oi.Q({name:"expr",label:"Dummy"}),xa={slider:{handler:oa,textAlign:"center",verticalAlign:"top"},input:{handler:ra},inputbox:{handler:function(e){return(0,a.jsx)(ra,(0,r.Z)({boxed:!0},e))}},tangle:{handler:ca},checkbox:{handler:Ki,textAlign:"center",verticalAlign:"top"},dropdown:{handler:Qi,textAlign:"center",verticalAlign:"top"}},ya=(fa={expr:d.aTG,title:d.fyi,subtitle:d.RXJ,labels:d.q65,legend:d.wJr},(0,V.Z)(fa,d.mKO.name,d.mKO),(0,V.Z)(fa,d.X86.name,d.X86),(0,V.Z)(fa,d.QWD.name,d.QWD),(0,V.Z)(fa,d.vb$.name,d.vb$),(0,V.Z)(fa,d.d1w.name,d.d1w),(0,V.Z)(fa,"size",d.hkI),(0,V.Z)(fa,"format",d.WUZ),(0,V.Z)(fa,"sortable",d.pIk),(0,V.Z)(fa,"searchable",d.zw0),(0,V.Z)(fa,"striped",d.xps),(0,V.Z)(fa,"sortBy",d.MRu),(0,V.Z)(fa,"sortOrder",d.aND),(0,V.Z)(fa,"series",d.MbO),(0,V.Z)(fa,"tableLayout",d.GJu),(0,V.Z)(fa,"tableHeight",d.NCw),(0,V.Z)(fa,"tableDensity",d.hq1),(0,V.Z)(fa,"visible",d.RrV),(0,V.Z)(fa,"useCellStyles",d.iX0),(0,V.Z)(fa,"showHiddenCells",d.wAI),fa);function ka(e,t){var n;return e&&e>1&&(n=Math.min(e,t))<2&&(n=void 0),n}function wa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.allowFonts,r=void 0===n||n,i=t.allowAlignment,a=void 0===i||i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=Object.assign({},o);if(!e)return l;var s=e.v,u=e.s;if(l.textAlign||("number"===typeof s&&(l.textAlign="right"),((0,E.Z)(s,Error)||!0===s||!1===s)&&(l.textAlign="center")),u&&a){var c=u["horizontal-alignment"];!c||"left"!==c&&"center"!==c&&"right"!==c||(l.textAlign=c);var d=u["vertical-alignment"];!d||"top"!==d&&"center"!==d&&"bottom"!==d||(l.verticalAlign=d)}return u&&r&&(u.italic&&(l.fontStyle="italic"),u.bold&&(l.fontWeight="bold"),u.underline&&(l.textDecoration="underline"),u["font-color"]&&(l.color=u["font-color"])),l}function Za(e,t){var n,r,i=1+t,a=e.columns.find((function(e){return e.begin>=i&&e.end<=i}));return null!==(r=a&&a.width)&&void 0!==r?r:(null===e||void 0===e||null===(n=e.defaults)||void 0===n?void 0:n.col_width)||12}function _a(e,t,n,r){var i=null,a=null,o=!1,l=function(e,t){if(t&&t.M){var n=null===e||void 0===e?void 0:e.getSheetByIndex(t.sheetIndex);if(n)return n.merges[t.M]}return null}(e,t);if(l)if(t.M===t.id)a=l[0],i=l[1];else{var s=ri.s3.parse(t.M),u=ri.s3.parse(t.id),c=0,d=0;s&&s.range&&u&&u.range&&(c=s.range.left-u.range.left,d=s.range.top-u.range.top),n+c>=0&&r+d>=0?o=!0:t={v:null}}return{cell:t,rowSpan:i,colSpan:a,skipRender:o}}function ja(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(!e||!Array.isArray(e[0]))return null;var n=e;return n.length>n[0].length?(isFinite(t)&&(n=n.slice(0,t)),n=(0,me.p4)(n)):isFinite(t)&&(n=n.map((function(e){return e.slice(0,t)}))),n&&(n.sheetName=e.sheetName,n.workbookName=e.workbookName),n}function Sa(e,t){var n=Array(t).fill(null);return e.forEach((function(e){var r=e.index-1;r>-1&&r<t&&(n[r]=e)})),n}var Ca=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onPanelRezize",(function(){r.updateHeadSize()})),(0,V.Z)((0,ce.Z)(r),"onInputWrite",(function(e,t){var n=r.state.dataPos;if(e&&n.writeable){var i={expr:"="+ri.s3.from(e,{sheetName:n.sheetName,workbookName:n.workbookName}),model:r.props.model};""===t?t=null:"string"===typeof t&&isFinite(+t)&&(t=+t),ba.write(i,t)}})),r.state={sortBy:null,sortOrder:null,filter:""},r.onSort=r.onSort.bind((0,ce.Z)(r)),r.onFilter=r.onFilter.bind((0,ce.Z)(r)),r}return(0,he.Z)(n,[{key:"componentDidMount",value:function(){this.updateHeadSize()}},{key:"componentDidUpdate",value:function(){this.updateHeadSize()}},{key:"onSort",value:function(e){var t=+e.currentTarget.dataset.col,n=this.state,r=n.sortOrder,i=n.sortBy===t;i&&-1===r?this.setState({sortBy:null,sortOrder:null}):this.setState({sortBy:t,sortOrder:i?-1:1})}},{key:"onFilter",value:function(e){this.setState({filter:e.currentTarget.value})}},{key:"updateHeadSize",value:function(){var e,t,n,r,i=null!==(n=null===(e=this.tableHead)||void 0===e?void 0:e.getBoundingClientRect().height)&&void 0!==n?n:0,a=null!==(r=null===(t=this.tableFoot)||void 0===t?void 0:t.getBoundingClientRect().height)&&void 0!==r?r:0;!this.tableHead||i===this.state.theadSize&&a===this.state.tfootSize||this.setState({theadSize:i,tfootSize:a})}},{key:"renderLabelRow",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this,i=this.state,o=i.labels,l=i.useCellStyles,s=i.colWidths,u=o?o[0].length:0;if(!u)return null;var c=o&&o[e];if(!c)return(0,a.jsx)("th",{scope:"row",colSpan:u});var d=this.state.size[0],h=c.length,p=this.props.model.getWorkbook(o.workbookName);return c.map((function(i,o){var u={cell:i};if(n&&(u=_a(p,i,o,e)).skipRender)return null;var c=wa(i,{allowFonts:!1,allowAlignment:l},{textAlign:"left"});return s.length&&(c.width=100*s[o]+"%"),(0,a.jsx)("th",{style:c,scope:"row",colSpan:ka(u.colSpan,h-o),rowSpan:ka(u.rowSpan,d-e),children:(0,me.Mm)(u.cell,void 0,r.props.locale)},t+"h"+o)}))}},{key:"renderHeader",value:function(e,t,n,r){var i=this,o=this.state,l=o.legend,s=o.useCellStyles,u=o.headerTitle,c=l?l.length:0,d=e?e[0].length:0;if(!(c<=0)){var h=this.state.size[1],p=l.length,f={textAlign:"center"},m=this.props.model.getWorkbook(l.workbookName);return(0,a.jsx)("thead",{className:v()(r&&ma().sortable),ref:function(e){return i.tableHead=e},children:l.map((function(e,o){var l=null;if(d>0){var g=o>=c-1;l=(0,a.jsx)("th",{className:v()(ma().corner,g&&ma().bottomRow),colSpan:d,rowSpan:1,style:wa(u,{allowFonts:!1,allowAlignment:s},{textAlign:"left"}),children:g?(0,me.Mm)(u,void 0,i.props.locale):null})}return(0,a.jsxs)("tr",{children:[l,(0,ye.Z)(h).map((function(l){var u=_a(m,e[l],l,o),d=u.cell,v=u.skipRender,g=u.colSpan,b=u.rowSpan;if(v)return null;var x,y,k,w=o>=c-1||o+b>=c,Z=(0,me.Mm)(d,void 0,i.props.locale).replace(/([/])/g,"$1".concat("\u200b")),_=Z;if(r&&o===c-1){var j=0,S=Z.match(/(?:[\s;\xAD%?\u2026]|,(?!\d))/);S&&(j=S[0].length+(S.index||0)),_=(0,a.jsxs)(a.Fragment,{children:[Z.slice(0,j),(0,a.jsxs)("span",{className:ma().wordJoin,children:[Z.slice(j),(x=l+1,y=t,k=n,(0,a.jsxs)("svg",{viewBox:"0 0 20 25",width:"12",height:"12",style:{display:"inline-block"},children:[(0,a.jsx)("path",{className:x===y&&-1===k?ma().active:"",d:"M0,10 L10,0 L20,10 L0,10"}),(0,a.jsx)("path",{className:x===y&&1===k?ma().active:"",d:"M0,15 L10,25 L20,15 L0,15"})]}))]})]})}return(0,a.jsx)("th",{"data-col":l+1,scope:"col",colSpan:ka(g,h-l),rowSpan:ka(b,p-o),onClick:r?i.onSort:void 0,className:w?ma().bottomRow:void 0,style:wa(d,{allowFonts:!1,allowAlignment:s},f),children:(0,a.jsx)("span",{className:ma().th,children:_})},"h"+(l+1))}))]},"rh"+o)}))})}}},{key:"renderFooter",value:function(e){var t=this,n=this.state,r=n.footer,i=n.useCellStyles,o=n.footerTitle,l=r?r.length:0,s=e?e[0].length:0;if(!(l<=0)){var u=this.state.size[1],c=r.length,d=this.props.model.getWorkbook(r.workbookName);return(0,a.jsx)("tfoot",{ref:function(e){return t.tableFoot=e},children:r.map((function(e,n){var r=null;if(s>0){var l=0===n;r=(0,a.jsx)("th",{className:v()(ma().corner,l&&ma().topRow),colSpan:s,rowSpan:1,style:wa(o,{allowFonts:!1,allowAlignment:i}),children:l&&(0,me.Mm)(o,void 0,t.props.locale)})}return(0,a.jsxs)("tr",{children:[r,(0,ye.Z)(u).map((function(r){var o=_a(d,e[r],r,n),l=o.cell,s=o.skipRender,h=o.colSpan,p=o.rowSpan;if(s)return null;var f=(0,me.Mm)(l,void 0,t.props.locale).replace(/([/])/g,"$1".concat("\u200b"));return(0,a.jsx)("th",{"data-col":r+1,scope:"col",colSpan:ka(h,u-r),rowSpan:ka(p,c-n),className:0===n?ma().topRow:void 0,style:wa(l,{allowFonts:!1,allowAlignment:i}),children:f},"h"+(r+1))}))]},"rf"+n)}))})}}},{key:"renderCellContent",value:function(e,t,n,i){var o,l=this.state,s=l.series,u=l.dataPos,c=s&&s[n],d=c&&c.type,h=null===(o=xa[d])||void 0===o?void 0:o.handler;if(h&&u.writeable){var p=e||{v:null};return p.id||(p.id=(0,ri.wN)(u.left+n)+(u.top+i+1)),(0,a.jsx)(h,(0,r.Z)({cacheKey:this.props.model.lastWrite,color:t.color,id:p.id,value:p.v,format:c.format||this.state.formatStr,locale:this.props.locale,cell:p,onInput:this.onInputWrite,track:this.props.track},c))}return(0,a.jsx)(pa,{cell:e,color:t.color,format:this.state.formatStr,locale:this.props.locale,isAuthenticated:this.props.isAuthenticated},this.props.model.lastWrite)}},{key:"render",value:function(){var e=this,t=this.props;if(!t.isEditor&&!d.RrV.read(t))return null;var n=this.state,o=(0,me.ud)(t.expr)&&n.data;if(!o)return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({className:ma().table},t),{children:(0,a.jsx)(De.Z,(0,r.Z)({},t))}));var l=n.data,s=(l.bottom-l.top)*(l.right-l.left);if(s>g.e7)return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({className:ma().table},t),{children:(0,a.jsx)(De.Z,(0,r.Z)({title:"Too many cells",message:"The number of cells (".concat(s,") exceeds the maximum of ").concat(g.e7)},t))}));var u=(0,F.Z)(this.state.size,2),c=u[0],h=u[1],p=this.state.labels,f=d.fyi.read(t),m=d.RXJ.read(t),x=o&&d.pIk.read(t),y=d.aND.isSet(t),w=this.state.sortOrder||ga[(0,me.vl)(d.aND.read(t))],Z=this.state.sortBy||d.MRu.read(t),_=(0,ye.Z)(c);if(w)if(!Z||!isFinite(Z)||Z<0||Z>h||Z%1)Z=1;else{var j=Math.max(1,Z)-1;_=(0,me.XV)(_,w,(function(e){var t=l[e][j];return t?t.v:null}))}var S=o&&d.zw0.read(t),C=(this.state.filter||"").trim().toLowerCase(),T={};S&&C&&l.forEach((function(e,t){for(var n=p?(0,B.Z)(p[t]||[]).concat((0,B.Z)(e)):e,r=0;r<n.length;r++){var i=n[r]?String(n[r].v).toLowerCase():null;if(i&&i.includes(C))return}T[t]=!0}));var M="",N=32;"compact"===n.density&&(M=ma().compact,N=24.7),"comfortable"===n.density&&(M=ma().comfortable,N=41.5);var E=(t.parentKey||t.id)+":",D=this.props.model.getWorkbook(l.workbookName),R=this.state,L=R.useCellStyles,W=R.series,z={allowFonts:L,allowAlignment:L},P=this.context.theme,A=function(e,t,n){if(d.vb$.isSet(e)){var r=d.vb$.read(e)[0],i=[{type:r.minType,value:r.minValue,backgroundColor:n.resolveColor(r.minBackgroundColor||d.HaP.defaultValue)},{type:r.midType,value:r.midValue,backgroundColor:n.resolveColor(r.midBackgroundColor||d.i$9.defaultValue)},{type:r.maxType,value:r.maxValue,backgroundColor:n.resolveColor(r.maxBackgroundColor||d.T2U.defaultValue)}].filter((function(e){return""!==e.type&&"none"!==e.type}));if(i.length>=2){var a=i.every((function(e){return"num"===e.type})),o=[];a||(o=t.flat().filter((function(e){return e&&"number"===typeof e.v})).map((function(e){return e.v})).sort((function(e,t){return e-t})));var l=!0;i.forEach((function(e){if("min"===e.type)e.value=o.at(0);else if("max"===e.type)e.value=o.at(-1);else if("percent"===e.type){var t=b(0,e.value,1),n=o.at(-1)-o.at(0);e.value=o.at(0)+n*t}else if("percentile"===e.type){var r=(o.length-1)*b(0,e.value,1),i=Math.floor(r),a=Math.ceil(r);e.value=i===a?o.at(r):o.at(i)*(a-r)+o.at(a)*(r-i)}"number"===typeof e.value&&isFinite(e.value)||(l=!1)}));var s=null;if(l){var u=(0,He.Z)(i.map((function(e){return e.value})),i.map((function(e){return(0,Ke.ZP)(e.backgroundColor)}))),c=i.at(0),h=i.at(-1);s=function(e){return e<c.value?c.backgroundColor:e>=h.value?h.backgroundColor:u(e)}}return{stops:i,scale:s}}}return{stops:[],scale:null}}(t,n.data,P).scale,V=!this.state.zebra&&!x&&!S,I=this.state.footer&&this.state.footer.length;return(0,a.jsxs)(k.Z,(0,i.Z)((0,r.Z)({className:v()(ma().table,M)},t),{children:[(0,a.jsxs)("div",{className:ma().head,children:[S&&(0,a.jsx)("div",{className:ma().filter,"data-slate-editor":!0,children:(0,a.jsx)("span",{className:ma().inputWrap,children:(0,a.jsx)("input",{type:"search",value:this.state.filter,onChange:this.onFilter,placeholder:"Search this table"})})}),f||m?(0,a.jsxs)("div",{className:ma().caption,children:[f&&(0,a.jsx)("div",{role:"heading","aria-level":3,className:ma().title,children:f}),m&&(0,a.jsx)("div",{role:"heading","aria-level":4,className:ma().subtitle,children:m})]}):null]}),(0,a.jsx)(Ui.Z,{className:ma().tableContainer,maxHeight:this.state.height?this.state.height*N+15:null,offsetTop:this.state.theadSize||0,offsetBottom:this.state.tfootSize||0,onResize:this.onPanelRezize,ref:function(t){return e.scrollPane=t},children:(0,a.jsxs)("table",{className:n.useCellStyles?ma().cellStyles:void 0,children:[this.renderHeader(p,Z,w,x),(0,a.jsx)("tbody",{className:this.state.zebra?ma().zebra:void 0,children:(0,ye.Z)(c).map((function(t){var r=_[t];if(T[r])return null;var i=E+"r"+(r+1),o=l[r];return(0,a.jsxs)("tr",{className:I?ma().withFooter:void 0,children:[e.renderLabelRow(r,i,V),o.map((function(r,o){var l,s={cell:r};if(!S&&!x&&!y&&(s=_a(D,r,o,t)).skipRender)return null;var u=null===W||void 0===W||null===(l=W[o])||void 0===l?void 0:l.type,d=u&&xa[u],p=d?wa(s.cell,z,d):wa(s.cell,z);if(!t&&n.colWidths.length&&(p.width=100*n.colWidths[o+n.colWidthsDataStart]+"%"),A&&!d&&r){var f=A(r.v);f&&(p.backgroundColor=f,p.color=P.textColorFor(f),p.borderColor=(0,Ke.ZP)(f).darker(.25))}return(0,a.jsx)("td",{colSpan:ka(s.colSpan,h-o),rowSpan:ka(s.rowSpan,c-t),style:p,className:u?ma().inputCell:void 0,children:e.renderCellContent(r,p,o,t)},i+"c"+(o+1))}))]},i)}))}),this.renderFooter(p)]})})]}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n;if(!e.isSelected&&e.model&&e.model.lastWrite===t.modelId)return null;var r=d.MbO.read(e),i=(n=Math).max.apply(n,(0,B.Z)(r.map((function(e){return e.index||1})))),a=d.d1w.read(e)?d.aTG.readFilled(e):d.aTG.readCropped(e),o=a.right||0;if(a[0].length<i&&o>(a.dataRight||0)){var l=o-(a.left||0)+1;i<l&&(l=i);var s=!0,u=!1,c=void 0;try{for(var h,p=a[Symbol.iterator]();!(s=(h=p.next()).done);s=!0)for(var f=h.value;f.length<l;)f.push({v:null})}catch(Oa){u=!0,c=Oa}finally{try{s||null==p.return||p.return()}finally{if(u)throw c}}}var v=d.wAI.read(e),m=Hi(a,e.model,v,v);0!==m.length&&0!==m[0].length||(m=[[{v:ri.gs.detailed("All cells are hidden")}]]);var g=[m.length,m[0].length],b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(!e||!Array.isArray(e[0]))return null;var n=e;return e.length<e[0].length&&(n=(0,me.p4)(e)),isFinite(t)&&(n=n.slice(0,t)),n.sheetName=e.sheetName,n.workbookName=e.workbookName,n}(Hi(d.q65.readCropped(e),e.model,v,v),g[0]),x=ja(Hi(d.wJr.readCropped(e),e.model,v,v),g[1]),y=d.QWD.readCell(e),k=d.X86.readCell(e),w=ja(Hi(d.mKO.readCropped(e),e.model,v,v),g[1]),Z=d.GJu.read(e),_=[],j=0,S=b&&b[0]?b[0].length:0;if("sheet"===Z){var C;if(S){var T,M=null===(T=e.model.getWorkbook(b.workbookName))||void 0===T?void 0:T.getSheet(b.sheetName);M&&(b[0].forEach((function(e){_.push(Za(M,(0,ri.Z9)(e.id)[1]))})),j=_.length)}var N=null===(C=e.model.getWorkbook(a.workbookName))||void 0===C?void 0:C.getSheet(a.sheetName);if(N)for(var E=a.left||0,D=Math.max(i,a.dataRight||g[1]),R=E;R<=D;R++)_.push(Za(N,R))}else if("even"===Z){j=S;var L=a.left||0,W=Math.max(i,a.dataRight||g[1]);_.length=1+j+W-L,_.fill(1)}var z=_.reduce((function(e,t){return e+t}),0);return{size:g,legend:x,footer:w,labels:b,headerTitle:y,footerTitle:k,data:m,dataPos:{writeable:!(!a.workbookName||!a.sheetName),workbookName:a.workbookName,sheetName:a.sheetName,top:a.top,left:a.left},series:Sa(r,g[1]),density:d.hq1.read(e),colWidths:_.map((function(e){return e/z})),colWidthsDataStart:j,height:d.NCw.read(e),formatStr:d.WUZ.read(e),zebra:d.xps.read(e),useCellStyles:d.iX0.read(e),showHiddenCells:v,modelId:e.model&&e.model.lastWrite}}}]),n}(o.Component);(0,V.Z)(Ca,"propTypes",{parentKey:s().string,error:s().string,model:c.Z.isRequired,locale:s().string,isEditor:s().bool,expr:s().string,id:s().string,isSelected:s().bool,isAuthenticated:s().bool,emit:s().func,element:s().object,track:s().func}),(0,V.Z)(Ca,"chartType","table"),(0,V.Z)(Ca,"options",ya),(0,V.Z)(Ca,"requiredOption","expr"),(0,V.Z)(Ca,"contextType",m.u6);var Ta=n(39367),Ma=n.n(Ta),Na={expr:d.aTG,format:d.WUZ,visible:d.RrV,bold:d._8f,italic:d.Nir,title:d.mn7,code:d.huf,fontSize:d.JBY,color:d.$_Y,width:d.NrA,inline:d.QUW,align:d.J7n},Ea={col:1,row:1.2,text:"19px"};function Da(e){var t=(0,o.useContext)(m.u6).theme;if(!e.isEditor&&!d.RrV.read(e))return null;var n=v()(Ma().text,e.isEditor&&Ma().outlined),l=d.QUW.read(e),s=d.J7n.read(e),u="Data reference missing";if(d.aTG.isSet(e)){var c,h=d.aTG.read(e),p=d.WUZ.read(e),f=","===(null===(c=(0,O.Kd)(e.locale))||void 0===c?void 0:c.decimal)?"; ":", ";h&&!h.reduce?u=String(h):(s=s||Kr(h&&h[0]&&h[0][0]),u=(h||[]).reduce((function(e,t){return e.concat(t)}),[]).map((function(t){return(0,me.Mm)(t,p,e.locale)})).join(f))}var g=d.JBY.isSet(e)&&d.JBY.read(e),b=u.trimEnd();d._8f.read(e)&&(b=(0,a.jsx)("strong",{children:b})),d.huf.read(e)&&(b=(0,a.jsx)("code",{children:b})),d.Nir.read(e)&&(b=(0,a.jsx)("em",{children:b}));var x=d.NrA.read(e),y={fontSize:g?g+"px":void 0,lineHeight:g?Ea[l]||1:void 0,color:t.resolveColor(d.$_Y.read(e)),textAlign:s};return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},e),{className:n,label:d.mn7.read(e),inlineMode:l,inlineWidth:x,children:(0,a.jsx)("span",{"data-testid":e.testId,className:v()(Ma().value,!u&&Ma().emptyText,"output","text"===l&&!x&&Ma().inline),style:y,children:b})}))}Da.options=Na,Da.requiredOption="expr",Da.propTypes={fontSize:s().string,testId:s().string,isEditor:s().bool,parentKey:s().string,error:s().string,model:c.Z.isRequired,locale:s().string};var Ra=n(62011);function La(e){if("string"!==typeof e||e.length<2)return!1;try{return new RegExp("^(\\p{Emoji}\\uFE0F|\\p{Emoji_Presentation}|\\u200D|\\p{Emoji_Modifier})+$","u").test(e)}catch(t){return!1}}var Wa=n(17039),za=n.n(Wa),Pa={visible:d.RrV,tooltip:d.MdO,title:d.AYq,fill:d.khm},Aa=function(e){var t=0,n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){a.value;if(++t>3)break}}catch(Oa){r=!0,i=Oa}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return 0===t?za().len0:1===t?za().len1:2===t?za().len2:za().len3},Va=function(e){(0,pe.Z)(n,e);var t=(0,fe.Z)(n);function n(e){var r;return(0,de.Z)(this,n),r=t.call(this,e),(0,V.Z)((0,ce.Z)(r),"onMouseEnter",(function(){r.showTooltip()})),(0,V.Z)((0,ce.Z)(r),"onMouseLeave",(function(){setTimeout((function(){return r.hideTooltip()}),300)})),(0,V.Z)((0,ce.Z)(r),"onBlur",(function(e){e.target.getAttribute("data-tooltip")||r.hideTooltip()})),(0,V.Z)((0,ce.Z)(r),"showTooltip",(function(){r.setState({showTooltip:!0})})),(0,V.Z)((0,ce.Z)(r),"hideTooltip",(function(){r.setState({showTooltip:!1})})),r.state={showTooltip:!1},r}return(0,he.Z)(n,[{key:"render",value:function(){var e=this,t=this.props,n=this.state.showTooltip,l=this.context.theme;if(!t.isEditor&&!d.RrV.read(t))return null;var s,u=d.MdO.read(t),c=(d.AYq.read(t)||"?").trim(),h=l.resolveColor(d.khm.read(t)),p=t.isEditor?"Please provide a tooltip text":"";return(0,a.jsx)(k.Z,(0,i.Z)((0,r.Z)({},t),{className:za().tooltipContainer,children:(0,a.jsx)("span",{onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onFocus:this.onMouseEnter,onBlur:this.onBlur,tabIndex:0,"data-tooltip":!0,children:(0,a.jsx)(q.Z,{hoverNode:d.MdO.isSet(t)?(s=u,s.split(" ").map((function(e,t){if((0,Ra.HH)(e)){var n=" ",r=e,i=r.slice(-1);return["!",".",","].includes(i)&&(r=r.slice(0,-1),n=i+n),(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:r.trim(),children:r.trim()}),n]},r+"-"+t)}return e+" "}))):p,cursorPosition:n?"static":null,showAnchor:!0,children:(0,a.jsx)("sup",{ref:function(t){return e.tooltip=t},"data-testid":t.testId,className:v()(za().tooltipHelper,h&&za().filled,Aa(c),La(c)&&za().emoji),children:(0,a.jsx)("span",{children:c})})})})}))}}]),n}(o.Component);(0,V.Z)(Va,"propTypes",{element:s().object,isEditor:s().bool,testId:s().string}),(0,V.Z)(Va,"options",Pa),(0,V.Z)(Va,"contextType",m.u6);var Fa=n(6624),Ba=n(98583),Ia={text:Da,input:Dr,resetbutton:P,recalcbutton:W,slider:Gr,checkbox:Ln,debugline:di,button:N,latex:zi,kpi:Di,actionbutton:T,submitbutton:ue,submitbutton2:ie,goalseekbutton:R,dropdown:Sr,radio:zr,timer:xe,canvas:oi,sheet:Pi.Z,table:Ca,area:Ot,bar:Gt,column:$t,combo:an,line:cn,scatter:kn,pie:gn,waterfall:_n,image:ji,embed:xi,source:Ii,row:ni.Z,col:ti.Z,hr:Ba.Z,link:Fa.Z,error:jn.Z,tangle:ei,tooltip:Va}},87594:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r,i=n(14924),a=n(26042),o=n(69396),l=n(85893),s=(n(67294),n(94184)),u=n.n(s),c=n(45697),d=n.n(c),h=n(57096),p=n(31409),f=n(78237),v=n(86462),m=n.n(v);function g(e){var t=h.Czw.read(e),n=(0,p.t9)(t),r=n.theme,i=n.chartTheme,s=n.themeStyles,c=h.RrV.read(e),d=h.Loy.read(e),v=null;h.UFm.isSet(e)&&(v=h.UFm.readAsPercentOfMax(e,18));var g=h.nXU.read(e),b=h.VCH.isSet(e),x=h.rBf.read(e),y=h.cY3.read(e),k=b?"".concat(f.Y,"px solid ").concat(h.VCH.read(e)):"",w=u()(m().col,g&&m().shadow,e.size?m()["col-".concat(e.size)]:m()["col-1-1"],"middle"===d&&m().alignMiddle,"bottom"===d&&m().alignBottom,!e.isEditor&&!c&&m().hidden,e.isEditor&&!c&&m().invisible,e.isBeingDragged&&m().colBeingDragged,!!b&&m().hasBorder,!!s&&m().filled);return(0,l.jsx)("div",(0,o.Z)((0,a.Z)({id:e.id,className:w},e.slateAttr),{contentEditable:!(!e.isEditor&&!c)&&null,style:(0,o.Z)((0,a.Z)({},s),{border:k,"--border-width":f.Y+"px","--inner-radius":null==v?void 0:Math.max(0,v)+"px"}),"data-testid":e.testId,"data-type":"col","data-grid-col-size":e.size,children:(0,l.jsx)(p.C2,{theme:r,chartTheme:i,children:(0,l.jsx)("div",{className:u()("column",m().colInner),style:{padding:x||y?"".concat(x,"px ").concat(y,"px"):void 0},children:c||e.isEditor?e.children:null})})}))}g.options=(r={},(0,i.Z)(r,h.Czw.name,h.Czw),(0,i.Z)(r,h.RrV.name,h.RrV),(0,i.Z)(r,h.VCH.name,h.VCH),(0,i.Z)(r,h.nXU.name,h.nXU),(0,i.Z)(r,h.UFm.name,h.UFm),(0,i.Z)(r,h.Loy.name,h.Loy),(0,i.Z)(r,h.cY3.name,h.cY3),(0,i.Z)(r,h.rBf.name,h.rBf),r),g.propTypes={id:d().string.isRequired,size:d().string,isEditor:d().bool,isBeingDragged:d().bool,testId:d().string,theme:d().object,slateAttr:d().object,model:d().object,children:d().node}},78237:function(e,t,n){"use strict";n.d(t,{Y:function(){return b},Z:function(){return x}});var r,i=n(14924),a=n(26042),o=n(69396),l=n(85893),s=(n(67294),n(94184)),u=n.n(s),c=n(45697),d=n.n(c),h=n(2214),p=n(57096),f=n(31409),v=n(66775),m=n(86462),g=n.n(m),b=2;function x(e){var t,n=p.Czw.read(e),r=(0,f.t9)(n),i=r.theme,s=r.chartTheme,c=r.themeStyles,d=null===(t=e.element)||void 0===t?void 0:t.children,m={model:e.model},x=p.RrV.read(e),y=x&&d?d.some((function(e){return p.RrV.read((0,a.Z)({},m,e.data))})):x;if(!y&&!e.isEditor)return null;if(!e.isEditor&&e.element&&!p.hkI.isSet(e)){var k=e.element.children;if(1===k.length)if(!k[0].children.some((function(e){return"slidebreak"!==e.type&&"p:hidden"!==e.type&&"pagebreak"!==e.type})))return null}var w=p.hkI.read(e),Z=p.UFm.readAsPercentOfMax(e,18),_=p.nXU.read(e),j=p.VCH.isSet(e),S=j?"".concat(b,"px solid ").concat(p.VCH.read(e)):"",C=u()(g().row,!y&&g().invisible,!!c&&g().filled,_&&g().shadow,e.className,j&&g().hasBorder,!!n&&g().hasBackground,"grid-layout",e.pageBreakAfter&&"pageBreakAfter",(0,v.a)("row",w),(0,h.h)("row"));return(0,l.jsx)("div",(0,o.Z)((0,a.Z)({},e.slateAttr),{id:e.id,className:C,style:(0,o.Z)((0,a.Z)({},c),{border:S,borderRadius:Z,"--border-width":b+"px","--inner-radius":null==Z?void 0:Math.max(0,Z-(j?b:0))+"px"}),"data-testid":e.testId,"data-grid-row":e.id,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-type":"row",children:(0,l.jsx)("div",{className:g().rowInner,children:(0,l.jsx)(f.C2,{theme:i,chartTheme:s,children:e.children})})}))}x.options=(r={},(0,i.Z)(r,p.RrV.name,p.RrV),(0,i.Z)(r,p.Czw.name,p.Czw),(0,i.Z)(r,p.hkI.name,p.hkI),(0,i.Z)(r,p.VCH.name,p.VCH),(0,i.Z)(r,p.nXU.name,p.nXU),(0,i.Z)(r,p.UFm.name,p.UFm),r),x.propTypes={id:d().string.isRequired,isEditor:d().bool,testId:d().string,model:d().object,slateAttr:d().object,element:d().object,onMouseEnter:d().func,onMouseLeave:d().func,className:d().string,children:d().node,pageBreakAfter:d().bool}},82788:function(e,t,n){"use strict";var r=n(45697),i=n.n(r),a=i().shape({readValue:i().func,readCells:i().func,readCell:i().func});t.Z=a},35035:function(e,t,n){"use strict";n.d(t,{Z:function(){return ve}});var r=n(14924),i=n(82670),a=n(26042),o=n(69396),l=n(85893),s=n(67294),u=n(93454),c=n(46151),d=n(57096),h=n(15017),p=n(20615),f=n(10253);var v=n(51438),m=n(52951),g=n(28668),b=n(29815),x=n(71418),y=n(97582),k=1048575;function w(e,t){return 1*(16383&e)+65536*(t&k)}var Z={style:"none",color:"none"},_={style:"hair",color:"#d8d9e5"},j=function(){function e(){(0,v.Z)(this,e),this._=new Map}return(0,m.Z)(e,[{key:"clear",value:function(){this._.clear()}},{key:"set",value:function(t,n,i){var a=(0,f.Z)(t,2),o=a[0],l=a[1];if(n===e.BOTTOM)this.set([o,l+1],e.TOP,i);else if(n===e.RIGHT)this.set([o+1,l],e.LEFT,i);else if(n===e.LEFT||n===e.TOP){var s,u=w(t[0],t[1]),c=this._.get(u);if(!c)s={},(0,r.Z)(s,e.TOP,Z),(0,r.Z)(s,e.LEFT,Z),c=s,this._.set(u,c);null==i||"none"===i.style?c[n]=Z:c[n]=i}}},{key:"get",value:function(t,n){if(n===e.BOTTOM)return this.get([t[0],t[1]+1],e.TOP);if(n===e.RIGHT)return this.get([t[0]+1,t[1]],e.LEFT);if(n===e.LEFT||n===e.TOP){var r=w(t[0],t[1]),i=this._.get(r);if(i&&i[n])return i[n]}return Z}},{key:"isSet",value:function(e,t){var n=this.get(e,t).style;return"none"!==n&&"hair"!==n}},{key:"getJoin",value:function(t,n){var r=0;return this.isSet([t,n],e.TOP)&&(r|=8),this.isSet([t,n],e.LEFT)&&(r|=4),this.isSet([t-1,n],e.TOP)&&(r|=2),this.isSet([t,n-1],e.LEFT)&&(r|=1),r}},{key:"forEach",value:function(t){var n,r=!0,i=!1,a=void 0;try{for(var o,l=this._.entries()[Symbol.iterator]();!(r=(o=l.next()).done);r=!0){var s=(0,f.Z)(o.value,2),u=s[0],c=s[1],d=[(n=u)/1&16383,n/65536&k],h=c[e.TOP];h&&"none"!==h.color&&"none"!==h.style&&t(d,e.TOP,h);var p=c[e.LEFT];p&&"none"!==p.color&&"none"!==p.style&&t(d,e.LEFT,p)}}catch(v){i=!0,a=v}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}}},{key:"fillGridLines",value:function(t){for(var n=(0,f.Z)(t[0],2),r=n[0],i=n[1],a=(0,f.Z)(t[1],2),o=a[0],l=a[1],s=r;s<=o;s++)for(var u=i;u<=l;u++)this.set([s,u],e.TOP,_),this.set([s,u],e.LEFT,_)}}]),e}();(0,r.Z)(j,"TOP","T"),(0,r.Z)(j,"LEFT","L"),(0,r.Z)(j,"BOTTOM","B"),(0,r.Z)(j,"RIGHT","R");var S=function(){function e(t,n,r,i){(0,v.Z)(this,e),this.x=t,this.y=n,this.width=r,this.height=i}return(0,m.Z)(e,[{key:"top",get:function(){return this.y}},{key:"left",get:function(){return this.x}},{key:"bottom",get:function(){return this.y+this.height}},{key:"right",get:function(){return this.x+this.width}},{key:"size",get:function(){return[this.width,this.height]}},{key:"resize",value:function(t,n){return new e(this.x,this.y,t,n)}},{key:"translate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new e(this.x+t,this.y+n,this.width,this.height)}},{key:"getBorders",value:function(){var e=this.x,t=this.y,n=e+this.width,r=t+this.height;return[[[e,t],[n,t]],[[e,r],[n,r]],[[e,t],[e,r]],[[n,t],[n,r]]]}}]),e}(),C=function(){function e(t){var n,r;(0,v.Z)(this,e),this._sheet=t,this._defaultWidth=null!==(r=null===t||void 0===t||null===(n=t.defaults)||void 0===n?void 0:n.col_width)&&void 0!==r?r:10}return(0,m.Z)(e,[{key:"get",value:function(e){if(!this._sheet)return this.getDefault();var t,n=0;if(this._sheet.columns)n=null!==(t=this._getFromColumnList(e))&&void 0!==t?t:this._defaultWidth;else if(this._sheet.col_widths){var r;n=null!==(r=this._getFromColWidthDict(e))&&void 0!==r?r:this._defaultWidth}return this._scale(n)}},{key:"getDefault",value:function(){return this._scale(this._defaultWidth)}},{key:"_getFromColumnList",value:function(e){var t,n,r=e+1,i=null===(t=this._sheet)||void 0===t||null===(n=t.columns)||void 0===n?void 0:n.find((function(e){return e.begin<=r&&r<=e.end}));return null===i||void 0===i?void 0:i.width}},{key:"_getFromColWidthDict",value:function(e){var t,n,r=(0,u.wN)(e);return null===(t=this._sheet)||void 0===t||null===(n=t.col_widths)||void 0===n?void 0:n[r]}},{key:"_scale",value:function(e){return e&&(e*=6.5*1.17),e}}]),e}(),T=function(){function e(t){var n,r;(0,v.Z)(this,e),this._sheet=t,this._defaultHeight=null!==(r=null===t||void 0===t||null===(n=t.defaults)||void 0===n?void 0:n.row_height)&&void 0!==r?r:16}return(0,m.Z)(e,[{key:"get",value:function(e){var t,n,r,i=e+1,a=null!==(r=null===(t=this._sheet)||void 0===t||null===(n=t.row_heights)||void 0===n?void 0:n[i])&&void 0!==r?r:this._defaultHeight;return this._scale(a)}},{key:"getDefault",value:function(){return this._scale(this._defaultHeight)}},{key:"_scale",value:function(e){return e&&(e*=1.3),e}}]),e}();function M(e,t){for(var n=[],r=0,i=0;i<t;i++){var a=e.get(i);n[i]={index:i,start:r,size:a,end:r+a},r+=a}return n}var N=function(){function e(t){var n=t.top,i=t.left,a=t.bottom,o=t.right;(0,v.Z)(this,e),(0,r.Z)(this,"defaultCellHeight",21),(0,r.Z)(this,"defaultCellWidth",76.05),(0,r.Z)(this,"tilt",[0,0]),(0,r.Z)(this,"viewBox",new u.e6({top:0,left:0,bottom:u.e6.MAX_ROW,right:u.e6.MAX_COL})),this.viewBox=new u.e6({top:n,left:i,bottom:a,right:o}),this.col=[],this.width=0,this.row=[],this.height=0}return(0,m.Z)(e,[{key:"viewWidth",get:function(){var e=this.getCellRect(this.viewBox.left,this.viewBox.top);return this.getCellRect(this.viewBox.right,this.viewBox.bottom).right-e.left}},{key:"viewHeight",get:function(){var e=this.getCellRect(this.viewBox.left,this.viewBox.top);return this.getCellRect(this.viewBox.right,this.viewBox.bottom).bottom-e.top}},{key:"viewLeft",get:function(){return this.getCol(this.viewBox.left).start}},{key:"viewTop",get:function(){return this.getCol(this.viewBox.left).start}},{key:"rows",get:function(){return this.row.length}},{key:"columns",get:function(){return this.col.length}},{key:"_offsetDims",value:function(e,t,n){for(var r=new Array(e),i=e-1;i>=0;i--){var a=t[i]||n;r[i]=i===e-1?a:a+r[i+1]}return r}},{key:"toMeasure",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;if(e<0&&(e=0),e<=n){var i=t.find((function(t){return e>=t.start&&e<=t.end}));if(i)return i}var a=t[t.length-1]||{end:0,index:0},o=e-a.end,l=Math.ceil(o/r)+a.index;return{index:l,start:l*r-r,size:r,end:l*r}}},{key:"getCol",value:function(e){var t=this.columns;if(e<t)return this.col[e];var n=0;t&&(n=this.col[t-1].end);var r=n+(e-t)*this.defaultCellWidth;return{index:e,size:this.defaultCellWidth,start:r,end:r+this.defaultCellWidth}}},{key:"toCol",value:function(e){return this.toMeasure(e,this.col,this.width,this.defaultCellWidth)}},{key:"getRow",value:function(e){var t=this.rows;if(e<t)return this.row[e];var n=0;t&&(n=this.row[t-1].end);var r=n+(e-t)*this.defaultCellHeight;return{index:e,size:this.defaultCellHeight,start:r,end:r+this.defaultCellHeight}}},{key:"toRow",value:function(e){return this.toMeasure(e,this.row,this.height,this.defaultCellHeight)}},{key:"dims",value:function(e,t){var n=this.getCol(e),r=this.getRow(t);return{index:[e,t],size:[n.size,r.size],start:[n.start,r.start],end:[n.end,r.end]}}},{key:"getCellRect",value:function(e,t){var n=this.getCol(e),r=this.getRow(t),i=this.getCol(this.viewBox.left),a=this.getRow(this.viewBox.top);return new S(n.start-i.start,r.start-a.start,n.size,r.size)}},{key:"getColSize",value:function(e){var t=this.getCol(e),n=this.getCol(this.viewBox.left);return{index:t.index,size:t.size,start:t.start-n.start,end:t.end-n.end}}},{key:"getRowSize",value:function(e){var t=this.getRow(e),n=this.getRow(this.viewBox.top);return{index:t.index,size:t.size,start:t.start-n.start,end:t.end-n.end}}},{key:"rangeToRect",value:function(e){var t=this.getCol(e.left),n=e.right===e.left?t:this.getCol(e.right),r=this.getRow(e.top),i=e.top===e.bottom?r:this.getRow(e.bottom),a=this.getCol(this.viewBox.left),o=this.getRow(this.viewBox.top);return new S(t.start-a.start,r.start-o.start,n.end-t.start,i.end-r.start)}},{key:"rectToRange",value:function(e){var t=this.toRow(e.top).index,n=this.toCol(e.left).index,r=Math.max(0,this.toRow(e.bottom).index),i=Math.max(0,this.toCol(e.right).index);return new u.e6({top:t,left:n,bottom:r,right:i})}},{key:"setView",value:function(e,t,n,r){var i=new S(e,t,n,r);this.viewBox=this.rectToRange(i),this.tilt=[this.getCol(this.viewBox.left).start-e,this.getRow(this.viewBox.top).start-t]}},{key:"addHeights",value:function(e,t){var n;this.row=M(e,t),this.defaultCellHeight=e.getDefault(),this.height=(null===(n=this.row.at(-1))||void 0===n?void 0:n.end)||0}},{key:"addWidths",value:function(e,t){var n;this.col=M(e,t),this.defaultCellWidth=e.getDefault(),this.width=(null===(n=this.col.at(-1))||void 0===n?void 0:n.end)||0}}]),e}();N.from=function(e,t){var n=new N(e.range),r=t.getSheet(e.sheetName);if(r){var i=new C(r),a=new T(r),o=(0,f.Z)(r.getSize(),2),l=o[0],s=o[1];n.addHeights(a,s),n.addWidths(i,l)}return n};var E=n(82222),D=n(22530),R=n.n(D),L=n(24739),W=n(91295),z={dashDot:{lineWidth:.5,lineDash:[7,3,3,3]},dashDotDot:{lineWidth:.5,lineDash:[7,3,3,3,3,3]},dashed:{lineWidth:.5,lineDash:[3,3,3,3]},dotted:{lineWidth:.5,lineDash:[3,3,3,3]},double:{lineWidth:.8,lineDash:null,gap:1,slant:0},hair:{lineWidth:.5,lineDash:null},medium:{lineWidth:1.5,lineDash:null},mediumDashDot:{lineWidth:2,lineDash:[7,3,3,3]},mediumDashDotDot:{lineWidth:1.5,lineDash:[7,3,3,3,3,3]},mediumDashed:{lineWidth:1.5,lineDash:[7,3]},slantDashDot:{lineWidth:1,lineDash:[7,1,3,1],gap:0,slant:.5},thick:{lineWidth:3,lineDash:null},thin:{lineWidth:.5,lineDash:null},none:{lineWidth:0,lineDash:null},default:{lineWidth:1,lineDash:null}},P="#282b3e",A="#282b3e",V="#d8d9e5",F=null,B={"font-name":"Calibri","font-size":11};function I(e){F=e}function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e&&e[t]?e[t]:n}function U(e){return Math.round(1.2*O(e,"font-size",11))}function H(e){var t="";!0===O(e,"italic",!1)&&(t+="italic "),!0===O(e,"bold",!1)&&(t+="bold ");var n=U(e);t+=n+"px/"+Math.round(1.4*n)+"px ";var r=O(e,"font-name","Calibri");return t+=(0,W.A)(r)}function q(e){var t=e&&"object"===typeof e?e.v:e;return null==t||""===t?"left":"boolean"===typeof t||(0,i.Z)(t,Error)?"center":"number"===typeof t?"right":"left"}function Y(e,t){var n=e&&"object"===typeof e?e.v:e,r="",a="undefined"===typeof n?"undefined":(0,E.Z)(n);if(null==n||""===n)r="";else if("boolean"===a||(0,i.Z)(n,Error))r=String(n).toUpperCase();else try{r=(0,L.WU)((e?e.z:"")||"General",n,{locale:t})}catch(o){r="#########"}return r}function X(e,t){F.restore();var n=Y(e,t),r=e&&e.s||B;return F.font=H(r),F.measureText(n).width}function G(e){var t=U(e);return Math.round(.31*t)}function K(e,t,n,r){var i=O(r,"underline","none");if("none"!==i){var a=O(r,"font-color",P),o=(0,f.Z)(e,2),l=o[0],s=o[1];F.beginPath(),F.strokeStyle=a,F.lineWidth=.7,"single"===i?(F.translate(0,.5),F.moveTo(l,s+1),F.lineTo(l+t,s+1)):"singleAccounting"===i?(F.translate(0,.5),F.moveTo(8,s+1),F.lineTo(8+n-16,s+1)):"double"===i?(F.moveTo(l,s+2),F.lineTo(l+t,s+2),F.moveTo(l,s+.5),F.lineTo(l+t,s+.5)):"doubleAccounting"===i&&(F.moveTo(8,s+2),F.lineTo(8+n-16,s+2),F.moveTo(8,s+.5),F.lineTo(8+n-16,s+.5)),F.stroke(),F.closePath()}}function J(e,t){var n=t.cellRect,r=t.clipRect||n,i=t.locale||"en-US";F.save();var a=e.s||B,o=Y(e,i),l=q(e);if(o){var s=O(a,"horizontal-alignment",l),u=O(a,"vertical-alignment","bottom");if(F.font=H(a),F.fillStyle=O(a,"font-color",P),O(a,"wrap-text",!1))F.translate(n.x,n.y),function(e,t,n,r,i){var a=t.width-8;F.beginPath(),F.rect(.5,.5,t.width,t.height),F.clip();var o=U(n),l=Math.round(1.4*o),s=H(n||B),u=new(R())({width:a,font:s,align:r,valign:i}).linebreak(e),c=4,d=0;"right"===r?c=t.width-u.width-4:"center"===r&&(c=(t.width-u.width)/2),"bottom"===i?d=t.height-u.height:"center"===i&&(d=(t.height-u.height)/2),u.forEach((function(e,i){var a=d+i*l+.5*l,s=0;"right"===r?s+=u.width-e.width:"center"===r&&(s+=u.width/2-e.width/2);var h=a+Math.floor(.35*o)+.5;K([c+s,h],e.width,t.width,n),F.textBaseline="middle",e.reduce((function(e,t){F.font=t.font;var n=t.font,r=n.baseline?o*-n.baseline+.15*o:0;return F.fillText(t.value,e+s,a+r),e+t.width}),c)}))}(o,n,a,s,u);else{F.translate(r.x,r.y),F.save(),F.beginPath(),F.rect(.5,.5,r.width,r.height),F.clip(),F.closePath(),F.textBaseline="middle";var c=F.measureText(o).width,d=U(a),h=1.4*d,p=.5*h;"bottom"===u?p=n.height-.5*h:"center"===u&&(p=n.height/2);var f=4;"center"===s?f=n.x-r.x+n.width/2-c/2:"right"===s&&(f=r.width-c-4),F.fillText(o,f,p),F.closePath(),K([f,p+Math.floor(.35*d)+.5],c,n.width,a),F.restore()}}F.restore()}function $(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];F.save(),F.beginPath(),F.strokeStyle=n||V,F.lineWidth=r,F.setLineDash(i),F.moveTo(e[0],e[1]),F.lineTo(t[0],t[1]),F.stroke(),F.setLineDash([]),F.closePath(),F.restore()}function Q(e,t,n,r,i){var a=n+.5*r,o=i?1:2,l=i?4:8,s=n,u=n,c=-n,d=-n;return e&o&&!(e&l)?u=-a:e&l&&!(e&o)?s=-a:e&o||e&l||(s=0,u=0),t&o&&!(t&l)?d=a:t&l&&!(t&o)?c=a:t&o||t&l||(c=0,d=0),[s,u,c,d]}function ee(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=z[n]||z.thin,l=o.lineDash||[],s=o.lineWidth,u=o.slant||0,c=o.gap||(u?.5*s:0),d=r||A;if(c||u){var h=(0,f.Z)(e,2),p=h[0],v=h[1],m=(0,f.Z)(t,2),g=m[0],b=m[1];if(v===b){var x=(0,f.Z)(u?[0,0,0,0]:Q(i,a,s,c,!0),4),y=x[0],k=x[1],w=x[2],Z=x[3];$([p+u+y,v-c],[g+u+w,b-c],d,s,l),$([p-u+k,v+c],[g-u+Z,b+c],d,s,l)}else{var _=(0,f.Z)(u?[0,0,0,0]:Q(i,a,s,c,!1),4),j=_[0],S=_[1],C=_[2],T=_[3];$([p-c,v+u+j],[g-c,b+u+C],d,s,l),$([p+c,v-u+S],[g+c,b-u+T],d,s,l)}}else $(e,t,d,s,l)}function te(e,t){F.save(),F.translate(e.x,e.y),t&&(F.fillStyle=t,F.fillRect(-.2,-.2,e.width+.4,e.height+.4)),F.restore()}function ne(e,t){if(F.restore(),F.save(),F.translate(t.x,t.y),F.fillStyle="#f5f5f5",F.fillRect(0,0,t.width,t.height),e){F.font=H(B),F.fillStyle=P;var n=F.measureText(e).width,r=(0,f.Z)(function(e,t,n,r){var i=G(arguments.length>4&&void 0!==arguments[4]?arguments[4]:B),a=0,o=0;return"center"===e?(a=t/2-r/2,o=n-i):"right"===e?(a=t-r-4,o=n-i):(a=4,o=n-i),[a,o]}("center",t.width,t.height,n),2),i=r[0],a=r[1];F.fillText(e,i,a)}F.lineWidth=1,F.strokeStyle="#d8d9e5",F.strokeRect(0,.5,t.width,t.height),F.restore()}var re=n(5899),ie=function(){},ae=function(e){(0,g.Z)(n,e);var t=(0,x.Z)(n);function n(e){var r;return(0,v.Z)(this,n),(r=t.call(this,e)).scrollPane=s.createRef(),r}return(0,m.Z)(n,[{key:"componentDidMount",value:function(){this.updateDims()}},{key:"componentDidUpdate",value:function(){this.updateDims()}},{key:"updateDims",value:function(){if(!this.props.height&&this.root){var e=this.root.clientWidth||754;this.root.style.height=Math.ceil(Math.max(40,.618*e))+"px"}}},{key:"scrollTo",value:function(e,t){this.scrollPane.current&&this.scrollPane.current.scrollTo(e,t)}},{key:"scrollIntoView",value:function(e){if(this.scrollPane.current&&this.root){var t=this.props,n=t.top,r=t.left,i=t.innerWidth,a=t.innerHeight,o=this.root.clientWidth||754,l=this.root.clientHeight||.618*o;if(o!==Math.ceil(i+r)||l!==Math.ceil(a+n)){var s=e.width<o?e.left-(o-e.width)/2:e.left,u=e.height<l?e.top-(l-e.height)/2:e.top;this.scrollPane.current.scrollTo(s,u)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.onScroll,i=t.onResize,a=t.top,o=t.left,s=t.height,u=t.width,c=t.innerWidth,d=t.innerHeight;return(0,l.jsxs)("div",{ref:function(t){return e.root=t},style:{position:"relative",width:"100%",maxWidth:u?"calc(min(".concat(u+o,"px, 100%))"):"100%",height:s?s+a:null,display:"flex"},children:[n,(0,l.jsx)(re.Z,{ref:this.scrollPane,onResize:i,onScroll:r,style:{height:"calc(100% - ".concat(a,"px)"),width:"calc(100% - ".concat(o,"px)"),top:a+"px",left:o+"px",position:"absolute"},children:(0,l.jsx)("div",{style:{height:d+"px",width:c+"px"}})})]})}}]),n}(s.Component);(0,r.Z)(ae,"defaultProps",{onScroll:ie,onResize:ie,onDoubleClick:ie,top:0,left:0,scrolling:!0});function oe(e){var t,n;return(0,y.__generator)(this,(function(r){switch(r.label){case 0:t=e.left,r.label=1;case 1:if(!(t<=e.right))return[3,6];n=e.top,r.label=2;case 2:return n<=e.bottom?[4,[t,n]]:[3,5];case 3:r.sent(),r.label=4;case 4:return n++,[3,2];case 5:return t++,[3,1];case 6:return[2]}}))}var le=function(e){(0,g.Z)(n,e);var t=(0,x.Z)(n);function n(e){var r;return(0,v.Z)(this,n),(r=t.call(this,e)).skipCells=new Map,r.borders=new j,r.state={height:null,width:null,flowMode:!1,sheetSize:[0,0],scrollPos:[0,0],scale:new N({top:0,left:0,bottom:0,right:0})},r}return(0,m.Z)(n,[{key:"componentDidMount",value:function(){if(this.resizeGrid(),this.renderGrid(),this.sheetWindow){var e=this.props,t=e.highlight,n=e.range,r=this.hasHighlight()?t:n,i=this.state.scale.rangeToRect(r.range);this.sheetWindow.scrollIntoView(i)}}},{key:"componentDidUpdate",value:function(e){var t=this.props.sheetName!==e.sheetName,n=this.props.range!==e.range,r=this.props.headers!==e.headers;(t||n||r)&&this.resizeGrid(),this.renderGrid()}},{key:"getHeadersSize",value:function(){var e=this.props.headers;return{height:e?18:0,width:e?25:0}}},{key:"getCurrentSheet",value:function(){var e;return null===(e=this.props.workbook)||void 0===e?void 0:e.getSheet(this.props.range.sheetName)}},{key:"getColumnStyle",value:function(e){var t=this.getCurrentSheet();if(t&&t.columns){var n=e+1,r=t.columns.find((function(e){return e.begin<=n&&n<=e.end}));if(null!=(null===r||void 0===r?void 0:r.si))return this.props.workbook.styles[r.si]}return null}},{key:"getStyles",value:function(e,t){var n=this.getCurrentSheet(),r=n&&n.getCellByCoords(t,e)||null;return r&&r.s||this.getColumnStyle(e)}},{key:"getMergeRange",value:function(e){if(e&&e.M){var t,n=this.getCurrentSheet(),r=null===(t=u.s3.parse(e.M))||void 0===t?void 0:t.range,i=n&&n.merges[e.M];if(r&&i)return new u.e6({top:r.top,left:r.left,bottom:r.top+i[1]-1,right:r.left+i[0]-1})}return null}},{key:"hasHighlight",value:function(){var e=this.props,t=e.highlight,n=e.range;return t&&t.range&&(!t.workbookName||t.workbookName===n.workbookName)&&(!t.sheetName||t.sheetName===n.sheetName)}},{key:"resizeGrid",value:function(){var e,t=window.devicePixelRatio,n=this.canvas,r=this.ctx;if(n){var i=(null===(e=n.parentElement)||void 0===e?void 0:e.getBoundingClientRect())||{width:100,height:100},a=i.width,o=i.height;if(!this.state.flowMode){var l=this.getHeadersSize();a=Math.min(this.state.scrollWidth+l.width+1,i.width),o=Math.min(this.state.scrollHeight+l.height+1,12600)}r&&n&&(o!==n.height||a!==n.width)&&(n.style.height=o+"px",n.style.width=a+"px",n.height=o*t,n.width=a*t,r.scale(t,t))}}},{key:"cellGetter",value:function(){var e=this.getCurrentSheet();return function(t,n){return e&&e.getCellByCoords(n,t)||null}}},{key:"shouldRenderGridLines",value:function(){var e=this.getCurrentSheet();return!e||!1!==e.show_grid_lines}},{key:"detectBorders",value:function(){var e=this.shouldRenderGridLines(),t=this.state.scale.viewBox,n=t.left,r=t.top,i=t.right,a=t.bottom,o=[["top",j.TOP],["left",j.LEFT],["bottom",j.BOTTOM],["right",j.RIGHT]];if(e){for(var l=n;l<=i+1;l++)for(var s=r;s<=a+1;s++){var c=[l,s];this.borders.set(c,j.TOP,_),this.borders.set(c,j.LEFT,_)}for(var d=n;d<=i+1;d++)for(var h=r;h<=a+1;h++){var p=this.getStyles(d,h);if(p&&p["fill-color"]){var v=[d,h];this.borders.set(v,j.TOP,null),this.borders.set(v,j.LEFT,null),this.borders.set(v,j.BOTTOM,null),this.borders.set(v,j.RIGHT,null)}}var m=this.getCurrentSheet(),g=m&&m.merged_cells||[],b=!0,x=!1,y=void 0;try{for(var k,w=g[Symbol.iterator]();!(b=(k=w.next()).done);b=!0){var Z,S=k.value,C=null===(Z=u.s3.parse(S))||void 0===Z?void 0:Z.range;if(C)for(var T=C.left;T<=C.right;T++)for(var M=C.top;M<=C.bottom;M++){var N=[T,M];M>C.top&&this.borders.set(N,j.TOP,null),T>C.left&&this.borders.set(N,j.LEFT,null)}}}catch(U){x=!0,y=U}finally{try{b||null==w.return||w.return()}finally{if(x)throw y}}}for(var E=n;E<=i;E++)for(var D=r;D<=a;D++){var R=this.getStyles(E,D);if(R){var L=!0,W=!1,z=void 0;try{for(var P,A=o[Symbol.iterator]();!(L=(P=A.next()).done);L=!0){var V=(0,f.Z)(P.value,2),F=V[0],B=V[1],I=R["border-".concat(F,"-style")],O=R["border-".concat(F,"-color")]||"#000";I&&"none"!==I&&this.borders.set([E,D],B,{style:I,color:O})}}catch(U){W=!0,z=U}finally{try{L||null==A.return||A.return()}finally{if(W)throw z}}}}}},{key:"canOverflow",value:function(e){var t,n;return e&&"string"===typeof e.v&&e.v?e.M||(null===(t=e.s)||void 0===t?void 0:t["wrap-text"])?0:"left"===((null===(n=e.s)||void 0===n?void 0:n["horizontal-alignment"])||q(e))?1:-1:0}},{key:"renderCellText",value:function(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this.state.scale,o=this.cellGetter(),l=this.getCurrentSheet();if(l){var s=this.getStyles(e,t)||{},c=this,d=c.skipCells,h=c.borders,p=o(e,t);if(p&&null!=p.v&&""!==p.v){var f=a.getCol(e),v=X(p,this.props.locale)+8,m=s["horizontal-alignment"]||q(p),g="left"===m?1:-1,x=(v>f.size?g:0)&&this.canOverflow(p);if(!i||x){var y=a.viewBox.left,k=a.viewBox.right;if(x||(y=e,k=e),x&&("left"===m||"center"===m)){var Z=l.nextValueCellByCoords(t,e,"right");Z&&(k=(0,u.Z9)(Z.id)[1]-1)}if(x&&("right"===m||"center"===m)){var _=l.nextValueCellByCoords(t,e,"left");_&&(y=(0,u.Z9)(_.id)[1]+1)}var C=f.start,T=f.end;if(x)if("left"===m&&k>e){var M=a.toCol(f.start+v).index,N=Math.min(k,null!==M&&void 0!==M?M:u.e6.MAX_COL);T=a.getCol(N).end;for(var E=e+1;E<=N;E++)h.set([E,t],j.LEFT,null),d.set(w(E,t),1)}else if("right"===m&&y<e){var D=a.toCol(f.end-v).index,R=Math.max(y,D||0);C=a.getCol(R).start;for(var L=e;L>=R;L--)h.set([L,t],j.LEFT,null),d.set(w(L,t),1)}else if("center"===m){var W=f.start+f.size/2,z=a.toCol(W+v/2).index,P=Math.min(k,null!==z&&void 0!==z?z:u.e6.MAX_COL);T=a.getCol(P).end;for(var A=e+1;A<=P;A++)h.set([A,t],j.LEFT,null),d.set(w(A,t),1);var V=a.toCol(W-v/2).index,F=Math.max(y,V||0);C=a.getCol(F).start;for(var B=e+1;B>=F+1;B--)h.set([B,t],j.LEFT,null),d.set(w(B,t),1)}var I=this.getHeadersSize(),O=a.getCellRect(e,t).translate(I.width,I.height),U=new S(I.width+C-a.viewLeft,O.y,T-C,O.height);J(p,{cellRect:(n=O).translate.apply(n,(0,b.Z)(a.tilt)),clipRect:(r=U).translate.apply(r,(0,b.Z)(a.tilt)),locale:this.props.locale})}}}}},{key:"renderBackgrounds",value:function(){var e=this.state.scale,t=this.cellGetter(),n=this.getHeadersSize();I(this.ctx);var r=!0,i=!1,a=void 0;try{for(var o,l=oe(e.viewBox)[Symbol.iterator]();!(r=(o=l.next()).done);r=!0){var s,u=o.value,c=(0,f.Z)(u,2),d=c[0],h=c[1],p=this.getMergeRange(t(d,h)),v=p?this.getStyles(p.left,p.top):this.getStyles(d,h);te((s=e.getCellRect(d,h).translate(n.width,n.height)).translate.apply(s,(0,b.Z)(e.tilt)),v?v["fill-color"]:null)}}catch(m){i=!0,a=m}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}}},{key:"renderContent",value:function(){var e=this.cellGetter(),t=this.state.scale,n=this.getCurrentSheet();if(n){var r=this.getHeadersSize();I(this.ctx);for(var i=t.viewBox,a=i.top;a<=i.bottom;a++){if(i.left>0){var o=n.nextValueCellByCoords(a,i.left,"left");if(o&&this.canOverflow(o)){var l,s=null===(l=u.s3.parse(o.id))||void 0===l?void 0:l.range;s&&this.renderCellText(s.left,a,!0)}}if(i.right<u.e6.MAX_COL){var c=n.nextValueCellByCoords(a,i.right,"right");if(c&&this.canOverflow(c)){var d,h=null===(d=u.s3.parse(c.id))||void 0===d?void 0:d.range;h&&this.renderCellText(h.left,a,!0)}}for(var p=i.left;p<=i.right;p++)if(!this.skipCells.has(w(p,a))){var v=e(p,a),m=this.getMergeRange(v);if(m&&(null===v||void 0===v?void 0:v.M)!==(null===v||void 0===v?void 0:v.id)&&(v=e(m.left,m.top)),v&&null!=v.v&&""!==v.v)if(m){var g,x=(g=t.rangeToRect(m).translate(r.width,r.height)).translate.apply(g,(0,b.Z)(t.tilt)),y=!0,k=!1,Z=void 0;try{for(var _,j=oe(m)[Symbol.iterator]();!(y=(_=j.next()).done);y=!0){var S=(0,f.Z)(_.value,2),C=S[0],T=S[1];this.skipCells.set(w(C,T),1)}}catch(N){k=!0,Z=N}finally{try{y||null==j.return||j.return()}finally{if(k)throw Z}}J(v,{cellRect:x,locale:this.props.locale})}else{var M=t.getCellRect(p,a).translate(r.width,r.height);M.width>0&&M.height>0&&this.renderCellText(p,a)}}}}}},{key:"renderBorders",value:function(){var e=this.state.scale,t=this.borders,n=(0,f.Z)(e.tilt,2),r=n[0],i=n[1],a=this.getHeadersSize();I(this.ctx),t.forEach((function(n,o,l){var s=e.getCellRect(n[0],n[1]).translate(a.width,a.height);o===j.TOP?ee([s.x+r,s.y+i],[s.right+r,s.y+i],l.style||"none",l.color,t.getJoin(n[0],n[1]),t.getJoin(n[0]+1,n[1])):o===j.LEFT&&ee([s.x+r,s.y+i],[s.x+r,s.bottom+i],l.style||"none",l.color,t.getJoin(n[0],n[1]),t.getJoin(n[0],n[1]+1))}))}},{key:"renderGrid",value:function(){var e;if(this.ctx&&this.canvas){var t=this.state,n=t.scale,r=t.flowMode,i=this.getHeadersSize(),a=(null===(e=this.canvas.parentElement)||void 0===e?void 0:e.getBoundingClientRect())||{width:100,height:100},o=(0,f.Z)(this.state.scrollPos,2),l=o[0],s=o[1];if(!r){n.setView(0,0,a.width,a.height);var u=n.rangeToRect(this.props.range.range);l+=u.left,s+=u.top}n.setView(l,s,a.width,a.height),this.ctx.fillStyle="#fff",this.ctx.fillRect(0,0,this.canvas.clientWidth,this.canvas.clientHeight),I(this.ctx),this.skipCells.clear(),this.borders.clear(),this.detectBorders(),this.renderBackgrounds(),this.renderContent(),this.renderBorders(),this.renderHighlight(),this.ctx.save(),this.ctx.translate(i.width,i.height),this.renderHeaders(),this.ctx.restore(),this.borders.clear(),this.skipCells.clear()}}},{key:"renderHighlight",value:function(){if(this.hasHighlight()){var e,t=this.props.highlight,n=this.state.scale,r=this.props.highlightColor||"#39c6d9",i=this.getHeadersSize();(e=n.rangeToRect(t.range).translate(i.width,i.height)).translate.apply(e,(0,b.Z)(n.tilt)).getBorders().forEach((function(e){var t=(0,f.Z)(e,2);ee(t[0],t[1],"medium",r)}))}}},{key:"renderHeaders",value:function(){if(this.props.headers){for(var e=this.state.scale,t=e.viewBox,n=this.getHeadersSize(),r=(0,f.Z)(e.tilt,2),i=r[0],a=r[1],o=t.top;o<=t.bottom;o++){var l=e.getRowSize(o);l.size&&ne(String(o+1),new S(0,n.height+l.start-1+a,n.width,l.size))}for(var s=t.left;s<=t.right;s++){var c=e.getColSize(s);c.size&&ne((0,u.wN)(s),new S(n.width+c.start+i,0,c.size,n.height))}ne("",new S(0,0,n.width,n.height))}}},{key:"render",value:function(){var e=this,t=this.getHeadersSize(),n=this.state,r=n.height,i=n.width,a=n.scrollWidth,o=n.scrollHeight;return(0,l.jsx)(ae,{ref:function(t){return e.sheetWindow=t},top:t.height,left:t.width,width:i,height:r,innerWidth:a,innerHeight:o,onScroll:function(t){e.setState({scrollPos:[t.left,t.top]}),e.renderGrid()},onResize:function(){e.resizeGrid(),e.renderGrid()},children:(0,l.jsx)("canvas",{ref:function(t){e.canvas=t,e.ctx=t&&t.getContext("2d",{alpha:!1})}})})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.workbook,r=e.range,i=String(r),a=i!==t.currRef||(null===n||void 0===n?void 0:n.instanceId)!==t.instanceId||e.hasTabs!==t.hasTabs,o={currRef:i,newSelectionPos:!1,headers:e.headers};if(r.sheetName&&n){var l=n.getSheetSize(r.sheetName),s=t.sheetSize;l[0]===s[0]&&l[1]===s[1]||(o.sheetSize=l,a=!0)}a&&(o.instanceId=null===n||void 0===n?void 0:n.instanceId),t.scale&&!a||(o.scale=N.from(r,n));var u=o.scale||t.scale;if(o.flowMode=!!(e.maxWidth||e.maxHeight||e.hasTabs),o.flowMode)o.width=e.maxWidth||"100%",o.height=e.maxHeight||(e.maxWidth?.45*e.maxWidth:null)||null,o.scrollWidth=u.width+1,o.scrollHeight=u.height+1;else{var c=u.rangeToRect(r);o.scrollHeight=c.height,o.scrollWidth=c.width+1,o.scrollHeight=c.height+1,o.width=c.width+1,o.height=c.height+1}return o}}]),n}(s.Component);(0,r.Z)(le,"defaultProps",{headers:!0});var se,ue=n(84519),ce=n.n(ue),de=1048576,he=(se={},(0,r.Z)(se,d.NZW.name,d.NZW),(0,r.Z)(se,d.xH2.name,d.xH2),(0,r.Z)(se,d.RrV.name,d.RrV),(0,r.Z)(se,d.hkI.name,d.hkI),se);function pe(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=null,o=i.left-r.left,l=r.left+(null===e||void 0===e?void 0:e.clientWidth)-i.right;o<0?a=e.scrollLeft+o-25:l<0&&(a=e.scrollLeft-l+25),null!=a&&(null===e||void 0===e||e.scrollTo({left:a,behavior:"smooth"})),n&&t.focus()}function fe(e){var t=e.visible,n=e.items,r=e.current,i=e.onChange,a=(0,s.useRef)(null);return t&&n.length?(null==r&&(r=n[0]),(0,l.jsx)("div",{role:"tablist",className:ce().tabs,ref:a,children:n.map((function(e,t){return(0,l.jsx)("button",{className:ce().tab+(r===e?" "+ce().current:" "),type:"button",role:"tab","aria-selected":r===e,tabIndex:r===e?0:-1,onClick:function(t){i(e),a.current&&pe(a.current,t.target)},onKeyDown:function(e){var r=-1;if("ArrowLeft"===e.key&&n[t-1]&&(r=t-1),"ArrowRight"===e.key&&n[t+1]&&(r=t+1),r>=0&&(e.preventDefault(),i(n[r]),a.current)){var o=a.current.getElementsByTagName("button")[r];pe(a.current,o,!0)}},children:e},e)}))})):null}function ve(e){var t=e.model,n=d.NZW.read(e),r=(0,i.Z)(n,u.s3),v=r?t.resolveSheet(n.sheetName,n.workbookName):null,m=(0,s.useState)((null===v||void 0===v?void 0:v.name)||""),g=m[0],b=m[1],x=d.Krk.read(e),y=v?v.name:"";if((0,s.useEffect)((function(){x||y===g||b(y)}),[x,y,g]),!e.isEditor&&!d.RrV.read(e))return null;var k=null;(0,h.ud)(e.expr)||(k={}),r||(k={title:"Invalid reference",message:"Data is not a valid reference"});var w=n&&t.getWorkbook(n.workbookName);if(w)if(w.getSheet(n.sheetName)){if(n.height>de||n.width>16384){var Z=n.height>de?de:16384,_=Z===de?"high":"wide";k={title:"Too many cells",message:"The Sheet element may be at most ".concat(Z," cells ").concat(_,". Use the Table element for more.")}}}else k={title:"Invalid reference",message:"The referenced sheet does not exist"};else k={title:"Invalid reference",message:"Referenced workbook does not exist"};if(!w||k)return(0,l.jsx)(p.Z,(0,o.Z)((0,a.Z)({className:ce().table},e),{children:(0,l.jsx)(c.Z,(0,a.Z)({title:null===k||void 0===k?void 0:k.title,message:null===k||void 0===k?void 0:k.message},e))}));var j=function(e){var t=e.model,n=t.defaultWorkbookName,r="",i=0,a=0,o=0,l=0,s=!1;if(e.reference){var c=u.s3.from(e.reference);c&&(n=c.workbookName,r=c.sheetName,c.range&&(i=c.top,a=c.bottom,o=c.left,l=c.right,s=!0))}e.sheetName&&(r=e.sheetName);var d=t.getWorkbook(n);if(d){var h,p=d.getSheetSize(r);s?p[0]*p[1]===0?(l=0,a=0):(l=Math.min(l,p[0]-1),a=Math.min(a,p[1]-1)):(l=(h=(0,f.Z)(d.getSheetSize(r),2))[0],a=h[1])}l<o&&(o=l),a<i&&(i=a);var v=new u.e6({top:i,left:o,bottom:a,right:l});return new u.s3(v,{sheetName:r,workbookName:n})}({model:t,reference:n,sheetName:g});return(0,l.jsxs)(p.Z,(0,o.Z)((0,a.Z)({className:ce().sheet,type:"sheet"},e),{children:[(0,l.jsx)(le,{locale:e.locale,headers:d.xH2.read(e),range:j,workbook:t.getWorkbook(j.workbookName),highlight:d.ikE.read(e),highlightColor:d.dKF.read(e),maxWidth:d.AOc.read(e),maxHeight:d.Zkp.read(e),hasTabs:x}),(0,l.jsx)(fe,{visible:x,current:g,items:w.getSheets().filter((function(e){return!e.hidden})).map((function(e){return e.name})),onChange:b})]}))}ve.options=he,ve.requiredOption="expr"},20275:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(51438),i=n(52951),a=n(14924),o=n(28668),l=n(26042),s=n(69396),u=n(71418),c=n(67294),d=n(45697),h=n.n(d),p=n(63985),f=n(2214),v=n(82788),m=n(57096),g=n(31409),b=n(8031),x=n(65597),y=n.n(x);function k(e){var t=0,n=!0,r=!1,i=void 0;try{for(var a,o=e.children[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var l=a.value,s=l.type,u=l.data;if(!s&&"text"in l){if(l.text&&/\S/.test(l.text))return!1}else{if(!s||!s.startsWith("grid:"))return!1;if(!u.visible||/^=?true$/i.test(u.visible))return!1;t++}}}catch(c){r=!0,i=c}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return!!t}function w(e){e&&e.classList.toggle("collapsed",!e.children.length)}var Z=function(e){(0,o.Z)(n,e);var t=(0,u.Z)(n);function n(e){var i;return(0,r.Z)(this,n),(i=t.call(this,e)).state={isEmpty:!1,isCollapsible:!1,modelId:null},i}return(0,i.Z)(n,[{key:"componentDidMount",value:function(){w(this.elm)}},{key:"componentDidUpdate",value:function(){w(this.elm)}},{key:"render",value:function(){var e,t,n=this,r=this.props,i=r.children,a=r.attributes,o=r.isFocusTarget,u=r.isEditor,d=r.disableElementClasses,h=r.pageBreakAfter,p=this.context.theme,v=!1;if(!m.RrV.read(this.props)){if(!u)return null;v=!0}var g=this.state,b=g.tagName,x=g.type,k=g.align,w=g.fontSize,Z=g.textColor,_=g.indent,j=g.isEmpty,S=g.isCollapsible,C=u||!!a,T={},M=[];if(h&&M.push("pageBreakAfter"),d||M.push((0,f.h)(x,_)),v&&M.push(x,y().invisibleTextBlock),k&&"left"!==k&&M.push("align-"+k),w){var N=Math.min(150,Math.max(w,8));T.fontSize=N+"px",T.lineHeight=Math.max(1.1,1.5-(N>18?(N-18)/55:0))}Z&&(T.color=p.resolveColor(Z)),j&&M.push("empty"),o&&M.push("focusTarget");var E={id:this.props.id,className:M.length?M.join(" "):null,ref:S?function(e){return n.elm=e}:null,"data-testid":null===(e=this.props.element)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.testId,"data-type":x,onMouseDown:this.props.onMouseDown};return"code"===x?c.createElement("div",E,c.createElement(b,(0,l.Z)({style:T},C?{"data-editblock":!0}:null,a),i)):c.createElement(b,(0,l.Z)((0,s.Z)((0,l.Z)({},E),{style:T}),C?{"data-editblock":!0}:null,a),i)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r=e.model;if(!e.isEditor&&r&&r.lastWrite===t.modelId)return null;var i=(null===e||void 0===e||null===(n=e.element)||void 0===n?void 0:n.type)||"p",a=function(e){var t,n=(null===e||void 0===e||null===(t=e.children)||void 0===t?void 0:t.length)||0,r=n&&e.children[0];return n<2&&(!n||""===r.text)}(e.element),o={type:i,isEmpty:a,isCollapsible:(0,b.QG)(i,"collapse")&&!e.isEditor&&!a&&k(e.element),modelId:r.lastWrite,align:null,fontSize:null,textColor:null,indent:null};if("quote"===i?o.tagName="blockquote":"code"===i?o.tagName="pre":"ul"===i||"ol"===i?o.tagName="div":/^h[1-6]$/.test(i)?o.tagName=i:o.tagName="p",(0,b.QG)(i,"align")&&m.ydu.isSet(e)&&(o.align=m.ydu.read(e)),(0,b.QG)(i,"fontSize")&&m.JBY.isSet(e)){var l=m.JBY.read(e);l=l?Math.min(p.uK,Math.max(l,p.CP)):null,o.fontSize=l}return(0,b.QG)(i,"color")&&m.$_Y.isSet(e)&&(o.textColor=m.$_Y.read(e)),(0,b.QG)(i,"indent")&&isFinite(e.indent)&&(o.indent=e.indent),o}}]),n}(c.PureComponent);(0,a.Z)(Z,"propTypes",{model:v.Z.isRequired,id:h().string.isRequired,indent:h().number,isEditor:h().bool,isFocusTarget:h().bool,disableElementClasses:h().bool,children:h().node,element:h().object,attributes:h().object,onMouseDown:h().func,pageBreakAfter:h().bool}),(0,a.Z)(Z,"contextType",g.u6)},6624:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(14924),i=n(26042),a=n(69396),o=n(85893),l=n(67294),s=n(45697),u=n.n(s),c=n(57096),d=n(92220);function h(e){var t=e.title,n=e.href,r=e.documentId,s=e.attributes,u=e.children,h=e.model,p=e.testId,f=e.isAuthenticated,v=c.xuP.read({href:n,model:h}),m=(0,l.useMemo)((function(){return(0,d.L)(v,f)}),[v,f]);return(0,o.jsx)("a",(0,a.Z)((0,i.Z)((0,a.Z)((0,i.Z)({},m.props),{title:t,id:e.id,onClick:function(t){r&&m.docId===r&&(t.preventDefault(),(0,d.O)(h,m.url)),e.track("interact",{elementType:"link",targetUrl:m.url})},"data-testid":p}),s),{children:u}))}h.options=(0,r.Z)({},c.xuP.name,c.xuP),h.propTypes={model:u().object,documentId:u().string,track:u().func,title:u().string,id:u().string.isRequired,href:u().string.isRequired,attributes:u().object,target:u().string,testId:u().string,isAuthenticated:u().bool,children:u().node}},15692:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(26042),i=n(69396),a=n(85893),o=n(67294),l=n(94184),s=n.n(l),u=n(45697),c=n.n(u),d=n(52916),h=n(92220),p=n(28313),f=n.n(p),v=function(e){return e.replace(/([?#].*)/g,"").split(/[ /-]/g).filter(Boolean)};function m(e){var t=e.isEditor,n=e.isSelected,l=e.id,u=e.attributes,c=e.value,p=e.children,m=e.isAuthenticated,g=(0,o.useState)(null),b=g[0],x=g[1],y=(0,o.useState)(!1),k=y[0],w=y[1],Z=e.type||"user",_=e.getMetadata||d.sd,j="document"===Z,S="document"!==Z,C="";(0,o.useEffect)((function(){j&&null==b&&!k&&(w(!0),_(v(c).pop()).then((function(e){x(e.title),w(!1)})).catch((function(){x("Unable to access document"),w(!1)})))}),[j,k,c,b,_]),C=j?b||v(c).slice(1,-1).join(" "):c||"@";var T=c;S&&(T="/"+c);var M=(0,r.Z)({},(0,o.useMemo)((function(){return(0,h.L)(T,m)}),[T,m]).props);return t&&(M.href=void 0),M.onClick=function(){return e.track("interact",{elementType:"mention",targetUrl:T})},(0,o.createElement)("a",(0,i.Z)((0,r.Z)((0,i.Z)((0,r.Z)({className:s()(f().mention,j&&f().document,S&&f().user,n&&f().selected)},M),{contentEditable:!t&&null,title:t?"You mentioned ".concat(c):null,id:l,key:l,"data-testid":"mention"}),u),{children:[j&&(0,a.jsxs)("svg",{viewBox:"0 0 36 36",height:"16px",children:[(0,a.jsx)("path",{fill:"currentColor",d:"M31.432 13.9697C30.9201 17.9943 25.8456 17.9081 23.4546 17.4418C18.2072 16.4207 14.7769 13.5033 9.18164 10.4732C2.50941 6.86623 1.55876 20.6288 15.7852 25.5177C17.8384 26.1966 19.9965 26.5049 22.1583 26.4283C26.9203 26.2802 32.1589 21.9439 31.432 13.9697Z"}),(0,a.jsx)("path",{fill:"currentColor",d:"M21.609 27.6064C17.2125 27.6374 15.2026 27.5026 13.7844 28.6253C12.7384 29.4541 11.7412 30.8863 11.7412 33.9673C15.7499 33.9673 19.5548 31.8765 21.609 27.6064Z"}),(0,a.jsx)("path",{fill:"currentColor",d:"M31.098 12.1373C30.092 8.05735 27.4505 4.75539 25.5337 3.26796C23.8584 1.96618 21.7665 1.04013 20.6075 2.50988C19.6768 3.68568 20.0735 6.37101 21.0064 8.49938C21.8197 10.3493 22.89 13.1738 23.3088 16.1266C25.3675 16.5421 30.7124 16.8449 31.098 12.1373Z"}),(0,a.jsx)("path",{fill:"currentColor",d:"M31.4321 13.9695C30.9202 17.9942 25.8455 17.908 23.4545 17.4416C23.4722 17.7157 23.5032 23.188 22.167 26.4281C26.9203 26.28 32.1589 21.9437 31.4321 13.9695Z"})]}),k?(0,a.jsxs)("span",{className:f().loading,children:[(0,a.jsx)("span",{className:f().spacer,children:C}),(0,a.jsx)("span",{className:f().indicator,children:"..."})]}):C,t?p:null]}))}m.propTypes={id:c().string,type:c().string,value:c().string,attributes:c().object,isEditor:c().bool,isSelected:c().bool,isFocused:c().bool,isAuthenticated:c().bool,track:c().func,model:c().object,element:c().object,children:c().node,getMetadata:c().func}},98583:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(85893),i=n(67294),a=n(94184),o=n.n(a),l=n(45697),s=n.n(l),u=n(82788),c=n(57096),d=n(31409),h=n(36093),p=n.n(h),f={rulerStyle:c.UJ_,rulerWeight:c.lMQ,rulerFullWidth:c.tE$,rulerColor:c.cIf,visible:c.RrV,align:c.ElA};function v(e){var t=(0,i.useContext)(d.u6).theme,n=e.id,a=e.testId,l=e.isEditor,s=e.pageBreakAfter,u=c.RrV.read(e);if(!l&&!u)return null;var h=c.UJ_.read(e),f="heavy"===c.lMQ.read(e),v=c.tE$.read(e),m=c.ElA.read(e),g=c.cIf.isSet(e)?{"--ruler-color":t.resolveColor(c.cIf.read(e))}:null;return(0,r.jsx)("div",{id:n,"data-testid":a,className:o()("hr",p().ruler,p()[h],f&&p().heavy,!v&&p().partial,s&&"pageBreakAfter",p()[m],l&&!u&&p().invisible),style:g,role:"separator",children:(0,r.jsx)("div",{})})}v.options=f,v.propTypes={id:s().string,model:u.Z,testId:s().string,isEditor:s().bool,pageBreakAfter:s().bool}},8031:function(e,t,n){"use strict";n.d(t,{QG:function(){return o}});var r=16,i={h1:21,h2:21,h3:21,h4:21,h5:21,h6:21,ol:28,ul:28,quote:23,code:0,p:23,"p:hidden":23},a={align:1,alignment:1,size:2,fontsize:2,color:4,indent:8,collapse:r};function o(e,t){var n="string"===typeof t?a[t.toLowerCase()]:t;return!!((i[e]||0)&n)}},11735:function(e,t,n){"use strict";n.d(t,{Oe:function(){return u},lm:function(){return c},qK:function(){return d}});var r=n(82670),i=n(24739),a=n(93454),o="HH:MM:SS";function l(e){return"en-US"===e||"en"===e}function s(e,t){if("number"===typeof t&&t>=0&&t<1)return o;var n=l(e)?"MM/DD/YYYY":"DD/MM/YYYY";return"number"===typeof t&&Math.abs(t%1)>=5787037037037037e-21&&(n+=" HH:MM:SS"),n}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US";if("string"!==typeof e||!e)return e;if("'"===e[0])return e.slice(1);if((0,i.Gq)(t)||e&&""===e.trim())return e;if(/^(true|false)$/i.test(e))return"true"===e.toLowerCase();var o=(0,i.TQ)(t),s=(e||"").trim();/%\s*$/.test(s)&&(o=!0,s=s.replace(/\s*%\s*$/,""));var u=(0,i.Kd)(n),c=u.group,d=u.decimal,h=s.replace(new RegExp("\\".concat(c,"(\\d{3})(?!\\d)"),"g"),"$1"),p=new RegExp("\\".concat(c,"|\\").concat(d,".*\\").concat(d)).test(h)?"nope":h.replace(new RegExp("\\"+d,"g"),".");if(isFinite(p))return+p*(o?.01:1);var f=(0,a.wG)(e.replace(/\s/g," "),!l(n),!1);return(0,r.Z)(f,Error)?e:f}function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",r="";if(!0===e?r="TRUE":!1===e?r="FALSE":"string"===typeof e?"number"!==typeof u(r=e,t,n)&&"boolean"!==typeof u(r,t,n)||(r="'"+r):e&&!isFinite(e)&&(r=String(e)),"number"===typeof e&&t&&e>=0&&(0,i.V5)(t)){if(null!=e&&isFinite(e)){var a=s(n,e);"#VALUE!"===(r=(0,i.WU)(a,e))&&"number"===typeof e&&(r=String(e))}}else{var o=(0,i.TQ)(t),l=(0,i.Kd)(n),c=l.decimal;null==e||""===e?r="":"number"===typeof e&&(r=(r=o?+(100*e).toFixed(13)+"%":String(e)).replace(".",c))}return r}function d(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"en-US";if(/^(\d\d\/\d\d\/\d{4,}|\d\d\/\d\d\/\d{4,}\s\d\d:\d\d:\d\d|\d\d:\d\d:\d\d)$/.test(n)){var a=n.length;if(e>=t.length)return a;var o=e<a&&n.slice(0,e)===t.slice(0,e);return o?e:a}if(n.startsWith("'"))return e+(n==="'"+t?1:0);var l=n.length;/%$/.test(n)&&l--;var s=(0,i.Kd)(r).group,u=t.replace(new RegExp("\\"+s,"g"),""),c=0;if(e>=t.length||/%\s*$/.test(t)&&e>=t.lastIndexOf("%"))return l;for(;c<l&&c<u.length&&c<e;c+=1)if(t[c]===s){if(c===(e-=1))break}else if(n[c]!==u[c])return l;return c}},66775:function(e,t,n){"use strict";function r(e,t){if("grid:block"===e||"row"===e){if("wide"===t)return"lw_wide";if("full"===t)return"lw_full"}return""}n.d(t,{a:function(){return r}})},92220:function(e,t,n){"use strict";n.d(t,{L:function(){return c},O:function(){return d}});var r=n(10253),i=n(97197),a=n(38067),o=n(91930),l=/^\/@[a-z\d_.]+\/[A-z\d\-:]+/i,s=/^\/embed\/[A-z\d\-:]+/i;function u(){return"undefined"===typeof location?{toString:function(){return"https://grid.is"},hostname:"grid.is"}:location}function c(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=u(),o=new URL(n),c=new URLSearchParams(o.search),d=o.pathname;try{e.startsWith("?")?(o=new URL(n)).search=e:o=new URL(e,n)}catch(A){}var h="localhost"===o.hostname&&"localhost"===n.hostname,p=h||/^((?:in)?grid\.is|calculatorstudio\.co(?:\/|$))/.test(o.hostname);if(p&&!t){var f=new URLSearchParams(o.search),v=new URLSearchParams,m=!0,g=!1,b=void 0;try{for(var x,y=f[Symbol.iterator]();!(m=(x=y.next()).done);m=!0){var k=(0,r.Z)(x.value,2),w=k[0],Z=k[1];w.startsWith("utm_")||v.set(w,Z)}}catch(V){g=!0,b=V}finally{try{m||null==y.return||y.return()}finally{if(g)throw b}}var _=!0,j=!1,S=void 0;try{for(var C,T=c[Symbol.iterator]();!(_=(C=T.next()).done);_=!0){var M=(0,r.Z)(C.value,2),N=M[0],E=M[1];N.startsWith("utm_")&&"utm_seq"!==N&&"utm_firstpage"!==N&&v.set(N,E)}}catch(V){j=!0,S=V}finally{try{_||null==T.return||T.return()}finally{if(j)throw S}}var D=parseInt(c.get("utm_seq")||"0",10);v.set("utm_seq",D+1),v.set("utm_firstpage",c.get("utm_firstpage")||d),o.search=String(v)}var R=p&&l.test(o.pathname),L=p&&s.test(o.pathname),W="";if(R||L)try{var z=o.pathname.split("/")[2].split("-").pop();W=(0,a._3)((0,i.F)(z,":_",""))}catch(F){}var P=String(o);return{isGrid:p,isDoc:p&&l.test(o.pathname),isEmbed:p&&s.test(o.pathname),docId:W,url:P,props:{href:P,target:p?"_self":"_blank",rel:"noopener noreferrer nofollow"}}}function d(e,t){var n=new URL(t),r=n.searchParams.has("s")?(0,o.vc)({s:n.searchParams.get("s")}):(0,o.vc)(n.search);r?e.writeMultiple(r,{forceRecalc:!0,reset:!0}):e.reset()}},35208:function(e,t,n){"use strict";var r;function i(e){try{return window.getComputedStyle(e)}catch(t){return{}}}function a(e,t){return i(e)[t]}function o(){return r||(r=document.getElementById("__next")),a(r,"overflow")?r:document.scrollingElement||document.documentElement}function l(){if("undefined"===typeof document)return null;var e=document.getElementById("editor");return e||(document.scrollingElement||document.documentElement)}function s(e){var t=e.offsetParent||e.parentNode;for(e.ownerSVGElement&&(t=e.ownerSVGElement.parentNode);t&&t.tagName&&t!==document.documentElement&&"static"===a(t,"position");)t=t.offsetParent;return t||(t=l()),t}function u(e){return"changedTouches"in e&&(e=e.changedTouches[0]),{clientX:e.clientX,clientY:e.clientY}}function c(e,t){if("undefined"===typeof DOMMatrix)return{};var n=function(e){for(var t=[],n=e;n&&1===n.nodeType;)t.push(n),"ownerSVGElement"in n&&n.ownerSVGElement&&(n=n.ownerSVGElement),n=n.parentNode;var r=[1,0,0,1,0,0];if(n&&9===n.nodeType){var a=i(n.body);r[4]=parseFloat(a.marginLeft),r[5]=parseFloat(a.marginTop)}for(var o=new DOMMatrix(r),l=t.length-1;l>=0;l--){var s=t[l];if("ownerSVGElement"in s&&s.ownerSVGElement){var u;o=o.multiply(null!==(u=s.getCTM())&&void 0!==u?u:void 0)}else{var c=i(s),d=c.transform,h=c["transform-origin"],p=s.scrollLeft||0,f=s.scrollTop||0,v=s.getBoundingClientRect(),m=new DOMPoint(v.x,v.y).matrixTransform(o.inverse()),g=m.x-p,b=m.y-f;if(d&&"none"!==d){var x=0,y=0;if("none"!==h){var k=h.split(" ");x=parseFloat(k[0]),y=parseFloat(k[1])}o=(o=(o=o.multiply(new DOMMatrix([1,0,0,1,x+g,y+b]))).multiply(new DOMMatrix(d))).multiply(new DOMMatrix([1,0,0,1,-x,-y]))}else(m.x||m.y)&&(p||f||"relative"===c.position)&&(o=o.multiply(new DOMMatrix([1,0,0,1,g,b])))}}return o}(t),r=new DOMPoint(e.clientX,e.clientY).matrixTransform(n.inverse());return{left:r.x,top:r.y}}function d(e){var t=s(e),n=e.getBoundingClientRect(),r=t?t.getBoundingClientRect():{};return{left:(t.scrollLeft||0)+(n.left-r.left),top:(t.scrollTop||0)+(n.top-r.top)}}n.d(t,{Am:function(){return l},Ny:function(){return u},Ro:function(){return c},Vd:function(){return s},Y2:function(){return o},bt:function(){return d}})},7465:function(e){e.exports={checkmark:"Checkmark_checkmark__KNmkh",box:"Checkmark_box__fBHf_",disc:"Checkmark_disc__4SLcH",fill:"Checkmark_fill__54WZt",stroke:"Checkmark_stroke__H3uj_",checked:"Checkmark_checked__YQw0_",disabled:"Checkmark_disabled__S56kL"}},77014:function(e){e.exports={dataerror:"DataError_dataerror__1lD7u",title:"DataError_title__eRy0s",twrap:"DataError_twrap__iBHWH",message:"DataError_message__2Au6d",errorInner:"DataError_errorInner__5QiJC",canEdit:"DataError_canEdit__KV6U9",small:"DataError_small__wuPJt",xsmall:"DataError_xsmall__sAi2s",tiny:"DataError_tiny__tpeTz",readOnly:"DataError_readOnly__UyHyB"}},49520:function(e){e.exports={calendar:"Calendar_calendar__x9ydp"}},23862:function(e){e.exports={button:"CalendarButton_button__tWogv",disabled:"CalendarButton_disabled__ODHpt",today:"CalendarButton_today__TDbEj",selected:"CalendarButton_selected__iTcxg",overflow:"CalendarButton_overflow__k5qXK"}},39449:function(e){e.exports={root:"DatePicker_root__zf8rj"}},72436:function(e){e.exports={date:"DatePickerControl_date__6E5P8"}},22604:function(e){e.exports={months:"MonthList_months___pfW_",button:"MonthList_button__xGDkh",selected:"MonthList_selected__QOOfV",disabled:"MonthList_disabled__3SYxM"}},32362:function(e){e.exports={header:"PickerHeader_header__QR2_D",button:"PickerHeader_button__aKYxq",disabled:"PickerHeader_disabled__GaCo_",prev:"PickerHeader_prev__hxsZ6",next:"PickerHeader_next__nOAan"}},18603:function(e){e.exports={years:"YearList_years__cy_mt",button:"YearList_button__U0etq",selected:"YearList_selected__cESpc",disabled:"YearList_disabled__AgF8F"}},75368:function(e){e.exports={label:"Label_label__NErSS",innerlabel:"Label_innerlabel__0syG7",disabled:"Label_disabled__QBC7W"}},39626:function(e){e.exports={scrollAreaWrap:"ScrollPane_scrollAreaWrap__QaiPd",scrollArea:"ScrollPane_scrollArea__80shn",scrollBarTrack:"ScrollPane_scrollBarTrack__3vTGx",scrollBarThumb:"ScrollPane_scrollBarThumb__TvuUE",vertical:"ScrollPane_vertical__FM1Ip",horizontal:"ScrollPane_horizontal__2GBJZ"}},10765:function(e){e.exports={tooltip:"Tooltip_tooltip__GU096",anchor:"Tooltip_anchor__pbJcC",hide:"Tooltip_hide__gsCuD"}},61144:function(e){e.exports={grid:"Wrapper_grid__riFRb",text:"Wrapper_text__RJrMY",block:"Wrapper_block__6xlO_",invisible:"Wrapper_invisible__Ek_IV",baseFont:"Wrapper_baseFont__2mXat",empty:"Wrapper_empty__suD2R",clicktrap:"Wrapper_clicktrap__KcJ_t",title:"Wrapper_title__XERqJ",editor:"Wrapper_editor__gu624",useAfter:"Wrapper_useAfter__FJjmm",label:"Wrapper_label__lbWAx",innerlabel:"Wrapper_innerlabel__5yBJ5"}},87175:function(e){e.exports={button:"BaseButton_button___QerV",buttonElm:"BaseButton_buttonElm__AweyZ",label:"BaseButton_label__iQdZN",disabled:"BaseButton_disabled__EukPM",stroke:"BaseButton_stroke__pN1yd"}},75966:function(e){e.exports={helper:"ButtonStateIcon_helper__FzQvi"}},60841:function(e){e.exports={gridPurple:"#5900ff",lupine:"#7a33ff",lavender:"#f8f5ff",sweetRocket:"#efe5ff",aster:"#0025ff",gentian:"#3350ff",scabiosa:"#99a8ff",bluebell:"#f0f1ff",lily:"#fafbff",squidInk:"#282b3e",ash:"#75767d",fossil:"#909199",nobel:"#b2b2b2",concrete:"#d8d9e5",wiseOwl:"#eaeaef",cloud:"#f5f5f5",mist:"#fafafa",pillarBox:"#cc0019",candyApple:"#ff001f",morningSkies:"#ffccd2",dustyPink:"#ffe5e9",fieldsOfBarley:"#ffc200",warmSand:"#fff3cc",lemonMeringue:"#fff9e5",neonLights:"#eb00ff",pinkElephant:"#ff0f91",sunflower:"#ff9729",coolEmber:"#ff6658",white:"#fff",transparent:"rgba(255,255,255,0)",sheetDragzone:"rgba(153,168,255,.35)",layerUnderneath:"-1",layerControlMenu:"8",layerBottom:"0",layerBase:"1",layerDropArea:"2000",layerPanel:"13",layerTooltip:"1001",layerModal:"1000",layerModalOverlay:"999",layerDrawer:"30",layerSpreadsheetPanel:"12",layerHeader:"14",layerToast:"1002",easeOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",designsMobile:"498px",designsTablet:"770px",designsDesktop:"962px",rangeLightBlue:"#39c6d9",rangePink:"#d662d2",rangeGreen:"#3ccda4",rangeBlue:"#1f8eb4",rangeRose:"#ed87b9",rangePurple:"#927fe6",rangeFallbackColor:"#818dac",formulaBoolean:"#3fa2ff",formulaNumber:"#3fa2ff",formulaString:"#21a365",simpleHoverInfo:"HoverInfo_simpleHoverInfo__QAq0J",title:"HoverInfo_title__uTc12",titleSolo:"HoverInfo_titleSolo__FbH4r",subtitle:"HoverInfo_subtitle__vrucK",val:"HoverInfo_val__fHCSk",valOnly:"HoverInfo_valOnly__qlANH",children:"HoverInfo_children__DHshI",hoverInfo:"HoverInfo_hoverInfo__p0YNu",titles:"HoverInfo_titles__tniQ_",titlesSpaced:"HoverInfo_titlesSpaced__4gr1b",swatch:"HoverInfo_swatch__BRsEx",subtitleSwatch:"HoverInfo_subtitleSwatch__dQG60",dims:"HoverInfo_dims__oTfv6",key:"HoverInfo_key__bT_CM"}},51120:function(e){e.exports={error:"error_error____HC_"}},10435:function(e){e.exports={document:"gridDocument_document__vl7pL",useFullWidth:"gridDocument_useFullWidth__pJ4nX"}},95254:function(e){e.exports={checkbox:"checkbox_checkbox__CqwyS"}},11960:function(e){e.exports={inputWrap:"BaseInput_inputWrap__WUTy0",disabled:"BaseInput_disabled__0e88O",small:"BaseInput_small__q3gNH",medium:"BaseInput_medium__sx_Rx",large:"BaseInput_large__qCcDy"}},44507:function(e){e.exports={hasHelper:"InputHelper_hasHelper__uPMM3",helper:"InputHelper_helper__7kV2V",calendar:"InputHelper_calendar__49mUG",arrow:"InputHelper_arrow__R7g_o",dateHelper:"InputHelper_dateHelper__mhDo6",selectHelper:"InputHelper_selectHelper__bzqaN",disabled:"InputHelper_disabled__OM3Ig",numberHelper:"InputHelper_numberHelper__VFX_F",up:"InputHelper_up__bQgoP",down:"InputHelper_down__m4sUl",mobileHelper:"InputHelper_mobileHelper__QKMi3",booleanHelper:"InputHelper_booleanHelper__fkpDX",checked:"InputHelper_checked__mVeDO"}},8310:function(e){e.exports={sliderUI:"Slider_sliderUI__hn_9L",labelspace:"Slider_labelspace__alMF6",track:"Slider_track__NQj5u",trackFill:"Slider_trackFill__2uWHA",trackOverlay:"Slider_trackOverlay__BdCN5",thumbWrap:"Slider_thumbWrap__WCMag",thumb:"Slider_thumb__3OP2v",active:"Slider_active__wuYM_",thumbStroke:"Slider_thumbStroke__3OAqT",thumbFill:"Slider_thumbFill__qHV_h",label:"Slider_label__LWxT2",disabled:"Slider_disabled__nqUz1",ticks:"Slider_ticks__VS5UE",tick:"Slider_tick__LVwno",tickZero:"Slider_tickZero__OtLeH"}},15603:function(e){e.exports={dropdown:"dropdown_dropdown__j_Fp9"}},16366:function(e){e.exports={container:"input_container__SVUF_"}},87917:function(e){e.exports={radio:"radio_radio__OJAqG",item:"radio_item__pZ0on",baseFont:"radio_baseFont__qalNf",noBreak:"radio_noBreak__5Brrk"}},25088:function(e){e.exports={slider:"slider_slider__HaM4_",inputWrap:"slider_inputWrap__HMCUo"}},64741:function(e){e.exports={tangle:"tangle_tangle__Ay4G7",outerValue:"tangle_outerValue__Yua8X",inline:"tangle_inline__UyOhr",value:"tangle_value__rqc48",disabled:"tangle_disabled__ui3Ud",invalid:"tangle_invalid__qcGF8"}},86462:function(e){e.exports={row:"layout_row__XXlCQ",shadow:"layout_shadow__tkfxe",rowInner:"layout_rowInner__1Xr09",hasBorder:"layout_hasBorder__SMhte",invisible:"layout_invisible__VJXf_",col:"layout_col__1tPfJ",filled:"layout_filled__5SFel",hasBackground:"layout_hasBackground__M0Jne",alignMiddle:"layout_alignMiddle__I_SlV",alignBottom:"layout_alignBottom__9D_Bg",hidden:"layout_hidden__Op2Av",colInner:"layout_colInner__MgMW3",colBeingDragged:"layout_colBeingDragged__0Erd_","row-middle":"layout_row-middle__cwHn1","row-full":"layout_row-full__edp_5","col-1/1":"layout_col-1__1__UHLuL","col-1/2":"layout_col-1__2__QHIBx","col-2/4":"layout_col-2__4__1V7Go","col-1/4":"layout_col-1__4__UbE_Z","col-3/4":"layout_col-3__4__V3v3v","col-1/3":"layout_col-1__3__Rq8W7","col-2/3":"layout_col-2__3__INXSk","col-1/5":"layout_col-1__5__HOjaW","col-1/6":"layout_col-1__6__awMeT","col-outlined":"layout_col-outlined__z0Z0m",layoutControl:"layout_layoutControl__npnJe"}},11382:function(e){e.exports={debugline:"debugline_debugline__FpSzp",handle:"debugline_handle__yq3Oi",line:"debugline_line__0pUWP"}},79160:function(e){e.exports={video:"embed_video__TX4gO",iframe:"embed_iframe__awWvm",spinner:"embed_spinner___FoKA"}},14727:function(e){e.exports={image:"image_image__gSf8W",linkIndicator:"image_linkIndicator__uEX_z",roundedRect:"image_roundedRect__giUMb",circle:"image_circle__Hm29g",ellipse:"image_ellipse__fOzPE",withBorder:"image_withBorder__5ajwj",imgWrap:"image_imgWrap__QzgBW",fullWidth:"image_fullWidth__SIfsq",editor:"image_editor__U4Ake",border:"image_border__MOnyr"}},2127:function(e){e.exports={kpi:"kpi_kpi__cFbP3",icon:"kpi_icon__3w5Sr",glyph:"kpi_glyph__fiuzp",kpiWrap:"kpi_kpiWrap__HQBI7",kpiBlock:"kpi_kpiBlock__dLq9m",value:"kpi_value__D1Bnu",changeWrap:"kpi_changeWrap__a4Qpo",kpiFlow:"kpi_kpiFlow__3Uh5U"}},84519:function(e){e.exports={sheet:"sheet_sheet__m9SXG",tabs:"sheet_tabs__oFCSb",tab:"sheet_tab__O5S85",current:"sheet_current__WG0q7"}},42219:function(e){e.exports={source:"source_source__cnLe0",disabled:"source_disabled__veYw0",icon:"source_icon__FY8K0"}},51229:function(e){e.exports={table:"table_table__sY4jQ",head:"table_head__cdQ9c",caption:"table_caption__lUcgr",title:"table_title__Vb_bA",subtitle:"table_subtitle__KsRn4",filter:"table_filter__FYscv",inputWrap:"table_inputWrap__YTUAs",disabled:"table_disabled__c3Lrs",th:"table_th__F1TqC",bottomRow:"table_bottomRow__JafJE",zebra:"table_zebra__tkFas",corner:"table_corner__z9f5W",withFooter:"table_withFooter__5jNkn",topRow:"table_topRow__lkv8M",cellStyles:"table_cellStyles__DA8jm",compact:"table_compact__DGoLr",comfortable:"table_comfortable__Zpyal",sortable:"table_sortable___S4w4",wordJoin:"table_wordJoin__gkiEL",active:"table_active__fpsc7",tableContainer:"table_tableContainer__yrgYI"}},77948:function(e){e.exports={checkbox:"TableCheckbox_checkbox__T8NW7"}},25106:function(e){e.exports={dropdownWrap:"TableDropdown_dropdownWrap__PXNPq",widget:"TableDropdown_widget__mU_xy",value:"TableDropdown_value__lShf_",currentLabel:"TableDropdown_currentLabel__oKWBN",spacer:"TableDropdown_spacer__hS_Ai",disabled:"TableDropdown_disabled__7gjas"}},24657:function(e){e.exports={transitionSpeed:"200ms",input:"TableInput_input__j8cLX",value:"TableInput_value__7ID51",boxed:"TableInput_boxed__foCub",inputLabel:"TableInput_inputLabel__IIoiD",interacting:"TableInput_interacting__0cTY8",slidein:"TableInput_slidein__fOU2F",fadeout:"TableInput_fadeout__AnQ6m",exiting:"TableInput_exiting__cfuD5",slideout:"TableInput_slideout___jpfN",fadein:"TableInput_fadein__E9OZi"}},81782:function(e){e.exports={slider:"TableSlider_slider__83QJS",sliderWrap:"TableSlider_sliderWrap__cGzGF"}},42272:function(e){e.exports={tangle:"TableTangle_tangle__Y2bTP",invalid:"TableTangle_invalid__yhoR8"}},39367:function(e){e.exports={text:"text_text__bPaUo",outlined:"text_outlined__mdI_6",emptyText:"text_emptyText__ztcH_",value:"text_value__zzXkD",inline:"text_inline__k2GVf"}},17039:function(e){e.exports={tooltipContainer:"tooltip_tooltipContainer__tCFKr",tooltipHelper:"tooltip_tooltipHelper__c3KWh",len2:"tooltip_len2__ufbzF",len3:"tooltip_len3__JmxJJ",filled:"tooltip_filled__8SpZF",emoji:"tooltip_emoji__Kk8up"}},65597:function(e){e.exports={invisibleTextBlock:"TextBlock_invisibleTextBlock__j2Q3d",invisible:"TextBlock_invisible__dylqz",timer:"TextBlock_timer__wk_cu",text:"TextBlock_text__4Fs8x",grid:"TextBlock_grid__4aKqr",border:"TextBlock_border__gjEXf"}},28313:function(e){e.exports={mention:"mention_mention__5y32U",loading:"mention_loading__nPCnC",spacer:"mention_spacer__P5dLI",indicator:"mention_indicator__8lnFb",document:"mention_document__arevs",selected:"mention_selected__KsLKB"}},36093:function(e){e.exports={ruler:"ruler_ruler__xNX0O",invisible:"ruler_invisible__WiAuu",left:"ruler_left__9OTCT",right:"ruler_right__SRlYu",solid:"ruler_solid__qmwUn",heavy:"ruler_heavy__is6l7",partial:"ruler_partial__8KHub",dashed:"ruler_dashed__jL0tK",circles:"ruler_circles__0dOux",squiggle:"ruler_squiggle__GbNsk"}}}]);
//# sourceMappingURL=1259-773c662a49a3d827.js.map