@crystaldesign/diva-web-planner-react 26.5.0-beta.30 → 26.5.0-beta.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 5343.diva-web-planner-react.umd.min.js.LICENSE.txt */
2
- (self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[5343,304,2743],{59698:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(96177),r=n(47514);const i=(0,o.Z)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block")},45167:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(96177),r=n(47514);const i=(0,o.Z)((0,r.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning")},96177:(e,t,n)=>{"use strict";n.d(t,{Z:()=>createSvgIcon});var o=n(87363),r=n(87726),i=n(39916),a=n(22791),s=n(97843),l=n(80518),c=n(19596),u=n(14685),p=n(65734);function getSvgIconUtilityClass(e){return(0,p.ZP)("MuiSvgIcon",e)}(0,u.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var d=n(47514);const f=(0,s.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,a.Z)(n.color)}`],t[`fontSize${(0,a.Z)(n.fontSize)}`]]}})((0,l.Z)((({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter((([,e])=>e&&e.main)).map((([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}}))),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]})))),h=o.forwardRef((function SvgIcon(e,t){const n=(0,c.i)({props:e,name:"MuiSvgIcon"}),{children:s,className:l,color:u="inherit",component:p="svg",fontSize:h="medium",htmlColor:v,inheritViewBox:y=!1,titleAccess:m,viewBox:b="0 0 24 24",...g}=n,_=o.isValidElement(s)&&"svg"===s.type,O={...n,color:u,component:p,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:y,viewBox:b,hasSvgAsChild:_},w={};y||(w.viewBox=b);const S=(e=>{const{color:t,fontSize:n,classes:o}=e,r={root:["root","inherit"!==t&&`color${(0,a.Z)(t)}`,`fontSize${(0,a.Z)(n)}`]};return(0,i.Z)(r,getSvgIconUtilityClass,o)})(O);return(0,d.jsxs)(f,{as:p,className:(0,r.Z)(S.root,l),focusable:"false",color:v,"aria-hidden":!m||void 0,role:m?"img":void 0,ref:t,...w,...g,..._&&s.props,ownerState:O,children:[_?s.props.children:s,m?(0,d.jsx)("title",{children:m}):null]})}));h.muiName="SvgIcon";const v=h;function createSvgIcon(e,t){function Component(n,o){return(0,d.jsx)(v,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return Component.muiName=v.muiName,o.memo(o.forwardRef(Component))}},10304:(e,t,n)=>{"use strict";t.Z=void 0;var o=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(87363)),r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(this,arguments)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}var i="Select...",a=function(e){function Dropdown(e){var t;return function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(t=function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}(this,_getPrototypeOf(Dropdown).call(this,e))).state={selected:t.parseValue(e.value,e.options)||{label:void 0===e.placeholder?i:e.placeholder,value:""},isOpen:!1},t.dropdownRef=(0,o.createRef)(),t.mounted=!0,t.handleDocumentClick=t.handleDocumentClick.bind(_assertThisInitialized(t)),t.fireChangeEvent=t.fireChangeEvent.bind(_assertThisInitialized(t)),t}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}(Dropdown,e),function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(e){if(this.props.value!==e.value)if(this.props.value){var t=this.parseValue(this.props.value,this.props.options);t!==this.state.selected&&this.setState({selected:t})}else this.setState({selected:{label:void 0===this.props.placeholder?i:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(e){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(e,t){var n;if("string"==typeof e)for(var o=0,r=t.length;o<r;o++)if("group"===t[o].type){var i=t[o].items.filter((function(t){return t.value===e}));i.length&&(n=i[0])}else void 0!==t[o].value&&t[o].value===e&&(n=t[o]);return n||e}},{key:"setValue",value:function setValue(e,t){var n={selected:{value:e,label:t},isOpen:!1};this.fireChangeEvent(n),this.setState(n)}},{key:"fireChangeEvent",value:function fireChangeEvent(e){e.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(e.selected)}},{key:"renderOption",value:function renderOption(e){var t,n=e.value;void 0===n&&(n=e.label||e);var i=e.label||e.value||e,a=n===this.state.selected.value||n===this.state.selected,s=(_defineProperty(t={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(t,e.className,!!e.className),_defineProperty(t,"is-selected",a),t),l=(0,r.default)(s),c=Object.keys(e.data||{}).reduce((function(t,n){return function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(n,!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,_defineProperty({},"data-".concat(n),e.data[n]))}),{});return o.default.createElement("div",_extends({key:n,className:l,onMouseDown:this.setValue.bind(this,n,i),onClick:this.setValue.bind(this,n,i),role:"option","aria-selected":a?"true":"false"},c),i)}},{key:"buildMenu",value:function buildMenu(){var e=this,t=this.props,n=t.options,r=t.baseClassName,i=n.map((function(t){if("group"===t.type){var n=o.default.createElement("div",{className:"".concat(r,"-title")},t.name),i=t.items.map((function(t){return e.renderOption(t)}));return o.default.createElement("div",{className:"".concat(r,"-group"),key:t.name,role:"listbox",tabIndex:"-1"},n,i)}return e.renderOption(t)}));return i.length?i:o.default.createElement("div",{className:"".concat(r,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(e){this.mounted&&(this.dropdownRef.current.contains(e.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var e,t,n,i,a,s=this.props,l=s.baseClassName,c=s.controlClassName,u=s.placeholderClassName,p=s.menuClassName,d=s.arrowClassName,f=s.arrowClosed,h=s.arrowOpen,v=s.className,y=this.props.disabled?"Dropdown-disabled":"",m="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,b=(0,r.default)((_defineProperty(e={},"".concat(l,"-root"),!0),_defineProperty(e,v,!!v),_defineProperty(e,"is-open",this.state.isOpen),e)),g=(0,r.default)((_defineProperty(t={},"".concat(l,"-control"),!0),_defineProperty(t,c,!!c),_defineProperty(t,y,!!y),t)),_=(0,r.default)((_defineProperty(n={},"".concat(l,"-placeholder"),!0),_defineProperty(n,u,!!u),_defineProperty(n,"is-selected",this.isValueSelected()),n)),O=(0,r.default)((_defineProperty(i={},"".concat(l,"-menu"),!0),_defineProperty(i,p,!!p),i)),w=(0,r.default)((_defineProperty(a={},"".concat(l,"-arrow"),!0),_defineProperty(a,d,!!d),a)),S=o.default.createElement("div",{className:_},m),P=this.state.isOpen?o.default.createElement("div",{className:O,"aria-expanded":"true"},this.buildMenu()):null;return o.default.createElement("div",{ref:this.dropdownRef,className:b},o.default.createElement("div",{className:g,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},S,o.default.createElement("div",{className:"".concat(l,"-arrow-wrapper")},h&&f?this.state.isOpen?h:f:o.default.createElement("span",{className:w}))),P)}}]),Dropdown}(o.Component);a.defaultProps={baseClassName:"Dropdown"};var s=a;t.Z=s},86526:function(e,t,n){e.exports=function(e,t){"use strict";var __assign=function(){return __assign=Object.assign||function __assign(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},__assign.apply(this,arguments)};function useInView(e){var n=e.ref,o=e.rootMargin,r=void 0===o?"10px":o,i=e.threshold,a=void 0===i?.4:i,s=e.repeat,l=void 0!==s&&s,c=t.useState(!1),u=c[0],p=c[1];return t.useEffect((function(){var e=null,t=new IntersectionObserver((function(e){var n=e[0];p(n.isIntersecting),!l&&n.intersectionRatio>0&&t.unobserve(n.target)}),{rootMargin:r,threshold:a});return n.current&&(t.observe(n.current),e=n.current),function(){e&&t.unobserve(e)}}),[n,p,r,a,l]),u}"function"==typeof SuppressedError&&SuppressedError;var n={position:"relative",width:"100%",overflow:"hidden"},marqueeItemsStyles=function(e,t,n,o){return __assign({display:"inline-block",whiteSpace:"nowrap",transform:"translate3d(-".concat(e,"px, 0, 0)"),animationName:"marqueeScroll",animationDuration:"".concat(t,"s"),animationTimingFunction:"linear",animationIterationCount:"infinite",animationPlayState:"var(--marquee-play)",animationDirection:"right"===n?"reverse":void 0},o&&{willChange:"transform"})},marqueeItemStyles=function(e){return{position:"relative",display:"inline-block",marginRight:e}},getClonedItems=function(e,t){return void 0===t&&(t=1),Array(t).fill(e).flat()};return function(o){var r,i=o.className,a=void 0===i?"marquee":i,s=o.duration,l=void 0===s?50:s,c=o.direction,u=void 0===c?"left":c,p=o.pauseOnHover,d=void 0!==p&&p,f=o.playOnlyInView,h=void 0===f||f,v=o.textSpacing,y=void 0===v?"0.15em":v,m=o.treshold,b=void 0===m?.1:m,g=o.children,_=t.useRef(null),O=t.useRef(null),w=t.useState(0),S=w[0],P=w[1],C=t.useState(t.Children.toArray(g)),k=C[0],D=C[1],j=t.useState(l),x=j[0],E=j[1],M=t.useState(!0),N=M[0],z=M[1],R=useInView({ref:_,rootMargin:"10px",threshold:[b],repeat:!0});t.useEffect((function(){var e=Math.floor(_.current.offsetWidth),n=Math.floor(O.current.scrollWidth),o=Math.max(2,Math.ceil(2*e/n)),r=n*Math.floor(o/2),i=l*parseFloat((r/e).toFixed(2));D(getClonedItems(t.Children.toArray(g),o)),P(r),E(i)}),[g,l]),t.useEffect((function(){h&&z(!!R)}),[R,h]);var handleMouseEnter=function(){d&&z(!1)},handleMouseLeave=function(){d&&z(!0)};return e.jsx("div",{ref:_,className:"".concat(a),style:__assign(__assign({},n),(r={},r["--marquee-play"]=N?"running":"paused",r)),onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,children:e.jsx("div",{className:"".concat(a,"__items"),style:marqueeItemsStyles(S,x,u),ref:O,children:k.map((function(t,n){return e.jsx("div",{className:"".concat(a,"__item"),style:marqueeItemStyles(y),children:t},n)}))})})}}(n(47514),n(87363))}}]);
2
+ (self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[5343,304,2743],{59698:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(96177),r=n(47514);const i=(0,o.Z)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block")},45167:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(96177),r=n(47514);const i=(0,o.Z)((0,r.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning")},96177:(e,t,n)=>{"use strict";n.d(t,{Z:()=>createSvgIcon});var o=n(87363),r=n(87726),i=n(39916),a=n(22791),s=n(97843),l=n(80518),c=n(19596),u=n(14685),p=n(65734);function getSvgIconUtilityClass(e){return(0,p.ZP)("MuiSvgIcon",e)}(0,u.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var d=n(47514);const f=(0,s.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,a.Z)(n.color)}`],t[`fontSize${(0,a.Z)(n.fontSize)}`]]}})((0,l.Z)((({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter((([,e])=>e&&e.main)).map((([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}}))),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]})))),h=o.forwardRef((function SvgIcon(e,t){const n=(0,c.i)({props:e,name:"MuiSvgIcon"}),{children:s,className:l,color:u="inherit",component:p="svg",fontSize:h="medium",htmlColor:v,inheritViewBox:m=!1,titleAccess:y,viewBox:b="0 0 24 24",...g}=n,_=o.isValidElement(s)&&"svg"===s.type,S={...n,color:u,component:p,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:m,viewBox:b,hasSvgAsChild:_},O={};m||(O.viewBox=b);const w=(e=>{const{color:t,fontSize:n,classes:o}=e,r={root:["root","inherit"!==t&&`color${(0,a.Z)(t)}`,`fontSize${(0,a.Z)(n)}`]};return(0,i.Z)(r,getSvgIconUtilityClass,o)})(S);return(0,d.jsxs)(f,{as:p,className:(0,r.Z)(w.root,l),focusable:"false",color:v,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:t,...O,...g,..._&&s.props,ownerState:S,children:[_?s.props.children:s,y?(0,d.jsx)("title",{children:y}):null]})}));h.muiName="SvgIcon";const v=h;function createSvgIcon(e,t){function Component(n,o){return(0,d.jsx)(v,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return Component.muiName=v.muiName,o.memo(o.forwardRef(Component))}},10304:(e,t,n)=>{"use strict";t.Z=void 0;var o=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(87363)),r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(this,arguments)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}var i="Select...",a=function(e){function Dropdown(e){var t;return function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(t=function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}(this,_getPrototypeOf(Dropdown).call(this,e))).state={selected:t.parseValue(e.value,e.options)||{label:void 0===e.placeholder?i:e.placeholder,value:""},isOpen:!1},t.dropdownRef=(0,o.createRef)(),t.mounted=!0,t.handleDocumentClick=t.handleDocumentClick.bind(_assertThisInitialized(t)),t.fireChangeEvent=t.fireChangeEvent.bind(_assertThisInitialized(t)),t}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}(Dropdown,e),function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(e){if(this.props.value!==e.value)if(this.props.value){var t=this.parseValue(this.props.value,this.props.options);t!==this.state.selected&&this.setState({selected:t})}else this.setState({selected:{label:void 0===this.props.placeholder?i:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(e){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(e,t){var n;if("string"==typeof e)for(var o=0,r=t.length;o<r;o++)if("group"===t[o].type){var i=t[o].items.filter((function(t){return t.value===e}));i.length&&(n=i[0])}else void 0!==t[o].value&&t[o].value===e&&(n=t[o]);return n||e}},{key:"setValue",value:function setValue(e,t){var n={selected:{value:e,label:t},isOpen:!1};this.fireChangeEvent(n),this.setState(n)}},{key:"fireChangeEvent",value:function fireChangeEvent(e){e.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(e.selected)}},{key:"renderOption",value:function renderOption(e){var t,n=e.value;void 0===n&&(n=e.label||e);var i=e.label||e.value||e,a=n===this.state.selected.value||n===this.state.selected,s=(_defineProperty(t={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(t,e.className,!!e.className),_defineProperty(t,"is-selected",a),t),l=(0,r.default)(s),c=Object.keys(e.data||{}).reduce((function(t,n){return function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(n,!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,_defineProperty({},"data-".concat(n),e.data[n]))}),{});return o.default.createElement("div",_extends({key:n,className:l,onMouseDown:this.setValue.bind(this,n,i),onClick:this.setValue.bind(this,n,i),role:"option","aria-selected":a?"true":"false"},c),i)}},{key:"buildMenu",value:function buildMenu(){var e=this,t=this.props,n=t.options,r=t.baseClassName,i=n.map((function(t){if("group"===t.type){var n=o.default.createElement("div",{className:"".concat(r,"-title")},t.name),i=t.items.map((function(t){return e.renderOption(t)}));return o.default.createElement("div",{className:"".concat(r,"-group"),key:t.name,role:"listbox",tabIndex:"-1"},n,i)}return e.renderOption(t)}));return i.length?i:o.default.createElement("div",{className:"".concat(r,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(e){this.mounted&&(this.dropdownRef.current.contains(e.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var e,t,n,i,a,s=this.props,l=s.baseClassName,c=s.controlClassName,u=s.placeholderClassName,p=s.menuClassName,d=s.arrowClassName,f=s.arrowClosed,h=s.arrowOpen,v=s.className,m=this.props.disabled?"Dropdown-disabled":"",y="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,b=(0,r.default)((_defineProperty(e={},"".concat(l,"-root"),!0),_defineProperty(e,v,!!v),_defineProperty(e,"is-open",this.state.isOpen),e)),g=(0,r.default)((_defineProperty(t={},"".concat(l,"-control"),!0),_defineProperty(t,c,!!c),_defineProperty(t,m,!!m),t)),_=(0,r.default)((_defineProperty(n={},"".concat(l,"-placeholder"),!0),_defineProperty(n,u,!!u),_defineProperty(n,"is-selected",this.isValueSelected()),n)),S=(0,r.default)((_defineProperty(i={},"".concat(l,"-menu"),!0),_defineProperty(i,p,!!p),i)),O=(0,r.default)((_defineProperty(a={},"".concat(l,"-arrow"),!0),_defineProperty(a,d,!!d),a)),w=o.default.createElement("div",{className:_},y),P=this.state.isOpen?o.default.createElement("div",{className:S,"aria-expanded":"true"},this.buildMenu()):null;return o.default.createElement("div",{ref:this.dropdownRef,className:b},o.default.createElement("div",{className:g,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},w,o.default.createElement("div",{className:"".concat(l,"-arrow-wrapper")},h&&f?this.state.isOpen?h:f:o.default.createElement("span",{className:O}))),P)}}]),Dropdown}(o.Component);a.defaultProps={baseClassName:"Dropdown"};var s=a;t.Z=s},86526:function(e,t,n){e.exports=function(e,t){"use strict";var __assign=function(){return __assign=Object.assign||function __assign(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},__assign.apply(this,arguments)};function useInView(e){var n=e.ref,o=e.rootMargin,r=void 0===o?"10px":o,i=e.threshold,a=void 0===i?.4:i,s=e.repeat,l=void 0!==s&&s,c=t.useState(!1),u=c[0],p=c[1];return t.useEffect((function(){var e=null,t=new IntersectionObserver((function(e){var n=e[0];p(n.isIntersecting),!l&&n.intersectionRatio>0&&t.unobserve(n.target)}),{rootMargin:r,threshold:a});return n.current&&(t.observe(n.current),e=n.current),function(){e&&t.unobserve(e)}}),[n,p,r,a,l]),u}"function"==typeof SuppressedError&&SuppressedError;var n="\n@keyframes marqueeScroll {\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n";function injectMarqueeStyles(){if("undefined"!=typeof document&&!document.getElementById("react-marquee-text-styles")){var e=document.createElement("style");e.id="react-marquee-text-styles",e.textContent=n,document.head.appendChild(e)}}var o={position:"relative",width:"100%",overflow:"hidden"},marqueeItemsStyles=function(e,t,n,o){return __assign({display:"inline-block",whiteSpace:"nowrap",transform:"translate3d(-".concat(e,"px, 0, 0)"),animationName:"marqueeScroll",animationDuration:"".concat(t,"s"),animationTimingFunction:"linear",animationIterationCount:"infinite",animationPlayState:"var(--marquee-play)",animationDirection:"right"===n?"reverse":void 0},o&&{willChange:"transform"})},marqueeItemStyles=function(e){return{position:"relative",display:"inline-block",marginRight:e}},getClonedItems=function(e,t){return void 0===t&&(t=1),Array(t).fill(e).flat()};return function(n){var r,i=n.className,a=void 0===i?"marquee":i,s=n.duration,l=void 0===s?50:s,c=n.direction,u=void 0===c?"left":c,p=n.pauseOnHover,d=void 0!==p&&p,f=n.playOnlyInView,h=void 0===f||f,v=n.textSpacing,m=void 0===v?"0.15em":v,y=n.treshold,b=void 0===y?.1:y,g=n.children,_=t.useRef(null),S=t.useRef(null),O=t.useState(0),w=O[0],P=O[1],C=t.useState(t.Children.toArray(g)),k=C[0],j=C[1],D=t.useState(l),x=D[0],E=D[1],M=t.useState(!0),N=M[0],z=M[1],R=useInView({ref:_,rootMargin:"10px",threshold:[b],repeat:!0});t.useEffect((function(){injectMarqueeStyles()}),[]),t.useEffect((function(){var e=Math.floor(_.current.offsetWidth),n=Math.floor(S.current.scrollWidth),o=Math.max(2,Math.ceil(2*e/n)),r=n*Math.floor(o/2),i=l*parseFloat((r/e).toFixed(2));j(getClonedItems(t.Children.toArray(g),o)),P(r),E(i)}),[g,l]),t.useEffect((function(){h&&z(!!R)}),[R,h]);var handleMouseEnter=function(){d&&z(!1)},handleMouseLeave=function(){d&&z(!0)};return e.jsx("div",{ref:_,className:"".concat(a),style:__assign(__assign({},o),(r={},r["--marquee-play"]=N?"running":"paused",r)),onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,children:e.jsx("div",{className:"".concat(a,"__items"),style:marqueeItemsStyles(w,x,u),ref:S,children:k.map((function(t,n){return e.jsx("div",{className:"".concat(a,"__item"),style:marqueeItemStyles(m),children:t},n)}))})})}}(n(47514),n(87363))}}]);