@aarhus-university/au-lib-react-components 12.6.1 → 12.6.3

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.
Files changed (109) hide show
  1. package/.eslintrc.js +35 -35
  2. package/.storybook/main.js +34 -34
  3. package/.storybook/preview.js +17 -17
  4. package/README.md +19 -19
  5. package/__tests__/jest/AUButtonComponent.test.tsx +165 -165
  6. package/__tests__/jest/AUDynamicContentComponent.test.tsx +386 -386
  7. package/__tests__/jest/AUErrorComponent.test.tsx +142 -142
  8. package/__tests__/jest/AUModalComponent.test.tsx +186 -186
  9. package/__tests__/jest/AUNotificationComponent.test.tsx +115 -115
  10. package/__tests__/jest/AUSpinnerComponent.test.tsx +57 -57
  11. package/__tests__/jest/AUToolbarComponent.test.tsx +46 -46
  12. package/__tests__/jest/context.test.ts +25 -25
  13. package/__tests__/jest/helpers.test.ts +15 -15
  14. package/__tests__/jest/setupTests.ts +2 -2
  15. package/babel.config.js +8 -8
  16. package/build/umd/all.css +2 -2
  17. package/build/umd/all.js +1 -1
  18. package/build/umd/alphabox.js +1 -1
  19. package/build/umd/databox.js +1 -1
  20. package/build/umd/diagramme.js +1 -1
  21. package/build/umd/flowbox.js +1 -1
  22. package/build/umd/flowbox.js.map +1 -1
  23. package/build/umd/universe.js +1 -1
  24. package/build-storybook.log +386 -386
  25. package/esbuild.mjs +22 -22
  26. package/package.json +107 -107
  27. package/src/components/AUAlertComponent.tsx +128 -128
  28. package/src/components/AUAutoSuggestComponent.js +148 -148
  29. package/src/components/AUButtonComponent.tsx +99 -99
  30. package/src/components/AUCalendarComponent.tsx +497 -497
  31. package/src/components/AUCharacterCountComponent.tsx +56 -56
  32. package/src/components/AUComboBoxComponent.tsx +195 -195
  33. package/src/components/AUContentToggleComponent.tsx +50 -50
  34. package/src/components/AUDatepickerComponent.tsx +124 -124
  35. package/src/components/AUDialogModalComponent.tsx +124 -124
  36. package/src/components/AUDynamicContentComponent.tsx +137 -137
  37. package/src/components/AUEditorComponent.tsx +126 -126
  38. package/src/components/AUErrorComponent.tsx +73 -73
  39. package/src/components/AUMobilePrefixComponent.tsx +20 -20
  40. package/src/components/AUModalComponent.tsx +72 -72
  41. package/src/components/AUNotificationComponent.tsx +44 -44
  42. package/src/components/AUReceiptComponent.tsx +34 -34
  43. package/src/components/AUSpinnerComponent.tsx +40 -40
  44. package/src/components/AUStepComponent.tsx +75 -75
  45. package/src/components/AUSubNavComponent.tsx +57 -57
  46. package/src/components/AUSubmitButtonContainerComponent.tsx +38 -38
  47. package/src/components/AUTabbedContentComponent.tsx +154 -154
  48. package/src/components/AUTableComponent.tsx +29 -29
  49. package/src/components/AUToastComponent.tsx +104 -104
  50. package/src/components/AUToolbarComponent.tsx +108 -108
  51. package/src/components/AUTruncatorComponent.tsx +141 -141
  52. package/src/components/wrapping/AUEmbedComponent.js +47 -47
  53. package/src/layout-2016/components/alphabox/AlphaBoxComponent.js +142 -142
  54. package/src/layout-2016/components/alphabox/AlphaBoxContentComponent.js +136 -136
  55. package/src/layout-2016/components/common/AUCollapsibleComponent.js +152 -152
  56. package/src/layout-2016/components/common/AUSpinnerComponent.js +103 -103
  57. package/src/layout-2016/components/databox/DataBoxAlphabetComponent.js +144 -144
  58. package/src/layout-2016/components/databox/DataBoxAssociationComponent.js +122 -122
  59. package/src/layout-2016/components/databox/DataBoxButtonComponent.js +157 -157
  60. package/src/layout-2016/components/databox/DataBoxComponent.js +297 -297
  61. package/src/layout-2016/components/databox/DataBoxGroupingComponent.js +64 -64
  62. package/src/layout-2016/components/databox/DataBoxSearchResultComponent.js +36 -36
  63. package/src/layout-2016/components/databox/DataBoxStackedAssociationComponent.js +54 -54
  64. package/src/layout-2016/components/databox/DataBoxSuggestionComponent.js +39 -39
  65. package/src/layout-2016/components/diagramme/AUDiagrammeComponent.js +309 -309
  66. package/src/layout-2016/components/flowbox/FlowBoxComponent.js +126 -126
  67. package/src/layout-2016/components/flowbox/FlowBoxPhoneComponent.js +104 -104
  68. package/src/layout-2016/lib/all.js +3 -3
  69. package/src/layout-2016/lib/au-alphabox.js +99 -99
  70. package/src/layout-2016/lib/au-databox.js +399 -399
  71. package/src/layout-2016/lib/au-diagramme.js +85 -85
  72. package/src/layout-2016/lib/au-flowbox.js +116 -119
  73. package/src/lib/context.tsx +59 -59
  74. package/src/lib/dates.ts +52 -52
  75. package/src/lib/helpers.ts +208 -208
  76. package/src/lib/hooks.ts +157 -157
  77. package/src/lib/i18n.ts +600 -600
  78. package/src/lib/portals.tsx +150 -150
  79. package/src/lib/tinymce.ts +84 -84
  80. package/src/lib/wrapping.ts +21 -21
  81. package/src/styles/_settings.scss +10 -10
  82. package/src/styles/alphabox.scss +222 -222
  83. package/src/styles/app.scss +7 -7
  84. package/src/styles/autosuggest.scss +57 -57
  85. package/src/styles/databox.scss +563 -563
  86. package/src/styles/diagramme.scss +119 -119
  87. package/src/styles/flowbox.scss +72 -72
  88. package/src/styles/maps.scss +395 -395
  89. package/stories/AUAlertComponent.stories.tsx +133 -133
  90. package/stories/AUAutoSuggestComponent.stories.tsx +95 -95
  91. package/stories/AUButtonComponent.stories.tsx +139 -139
  92. package/stories/AUCharacterCountComponent.stories.tsx +121 -121
  93. package/stories/AUComboBoxComponent.stories.tsx +101 -101
  94. package/stories/AUContentToggleComponent.stories.tsx +87 -87
  95. package/stories/AUDialogModalComponent.stories.tsx +75 -75
  96. package/stories/AUDynamicContentComponent.stories.tsx +119 -119
  97. package/stories/AUEditorComponent.stories.tsx +66 -66
  98. package/stories/AUErrorComponent.stories.tsx +132 -132
  99. package/stories/AUModalComponent.stories.tsx +160 -160
  100. package/stories/AUNotificationComponent.stories.tsx +151 -151
  101. package/stories/AUSpinnerComponent.stories.tsx +44 -44
  102. package/stories/AUStepComponent.stories.tsx +91 -91
  103. package/stories/AUToolbarComponent.stories.tsx +389 -389
  104. package/stories/AUTruncatorComponent.stories.tsx +123 -123
  105. package/stories/lib/helpers.tsx +146 -146
  106. package/tsconfig.json +46 -46
  107. package/webpack.config.js +88 -88
  108. package/.claude/settings.local.json +0 -12
  109. package/.vscode/settings.json +0 -22
@@ -1,2 +1,2 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","react-dom"],t);else{var n="object"==typeof exports?t(require("react"),require("react-dom")):t(e.React,e.ReactDOM);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(e,t)=>(()=>{var n={119(t){"use strict";t.exports=e},181(e,t,n){var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt,a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,l=a||c||Function("return this")(),f=Object.prototype.toString,p=Math.max,d=Math.min,g=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||u.test(e)?s(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,u,s,a,c=0,l=!1,f=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,i=o;return r=o=void 0,c=t,u=e.apply(i,n)}function v(e){var n=e-a;return void 0===a||n>=t||n<0||f&&e-c>=i}function S(){var e=g();if(v(e))return O(e);s=setTimeout(S,function(e){var n=t-(e-a);return f?d(n,i-(e-c)):n}(e))}function O(e){return s=void 0,m&&r?b(e):(r=o=void 0,u)}function w(){var e=g(),n=v(e);if(r=arguments,o=this,a=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(S,t),l?b(e):u}(a);if(f)return s=setTimeout(S,t),b(a)}return void 0===s&&(s=setTimeout(S,t)),u}return t=y(t)||0,h(n)&&(l=!!n.leading,i=(f="maxWait"in n)?p(y(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),w.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=a=o=s=void 0},w.flush=function(){return void 0===s?u:O(g())},w}},243(e,t,n){"use strict";e.exports=n(424).default},321(e){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},424(e,t,n){"use strict";t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=a(n(556)),i=a(n(321)),u=a(n(486)),s=n(462);function a(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(){return!0},v="suggestions-revealed",S="input-focused",O="input-changed",w="escape-pressed",j=function(e){!function(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&&y(e,t)}(c,e);var t,n,o,a=(o=c,function(){var e,t=h(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?g(e):t}(this,e)});function c(e){var t,n=e.alwaysRenderSuggestions;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),m(g(t=a.call(this)),"onDocumentMouseDown",function(e){t.justClickedOnSuggestionsContainer=!1;for(var n=e.detail&&e.detail.target||e.target;null!==n&&n!==document;){if(n.getAttribute&&null!==n.getAttribute("data-suggestion-index"))return;if(n===t.suggestionsContainer)return void(t.justClickedOnSuggestionsContainer=!0);n=n.parentNode}}),m(g(t),"storeAutowhateverRef",function(e){null!==e&&(t.autowhatever=e)}),m(g(t),"onSuggestionMouseEnter",function(e,n){var r=n.sectionIndex,o=n.itemIndex;t.updateHighlightedSuggestion(r,o),e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!0),t.justMouseEntered=!0,setTimeout(function(){t.justMouseEntered=!1})}),m(g(t),"highlightFirstSuggestion",function(){t.updateHighlightedSuggestion(t.props.multiSection?0:null,0)}),m(g(t),"onDocumentMouseUp",function(){t.pressedSuggestion&&!t.justSelectedSuggestion&&t.input.focus(),t.pressedSuggestion=null}),m(g(t),"onSuggestionMouseDown",function(e){t.justSelectedSuggestion||(t.justSelectedSuggestion=!0,t.pressedSuggestion=e.target)}),m(g(t),"onSuggestionsClearRequested",function(){var e=t.props.onSuggestionsClearRequested;e&&e()}),m(g(t),"onSuggestionSelected",function(e,n){var r=t.props,o=r.alwaysRenderSuggestions,i=r.onSuggestionSelected,u=r.onSuggestionsFetchRequested;i&&i(e,n);var s=t.props.shouldKeepSuggestionsOnSelect(n.suggestion);o||s?u({value:n.suggestionValue,reason:"suggestion-selected"}):t.onSuggestionsClearRequested(),t.resetHighlightedSuggestion()}),m(g(t),"onSuggestionClick",function(e){var n=t.props,r=n.alwaysRenderSuggestions,o=n.focusInputOnSuggestionClick,i=t.getSuggestionIndices(t.findSuggestionElement(e.target)),u=i.sectionIndex,s=i.suggestionIndex,a=t.getSuggestion(u,s),c=t.props.getSuggestionValue(a);t.maybeCallOnChange(e,c,"click"),t.onSuggestionSelected(e,{suggestion:a,suggestionValue:c,suggestionIndex:s,sectionIndex:u,method:"click"});var l=t.props.shouldKeepSuggestionsOnSelect(a);r||l||t.closeSuggestions(),!0===o?t.input.focus():t.onBlur(),setTimeout(function(){t.justSelectedSuggestion=!1})}),m(g(t),"onBlur",function(){var e=t.props,n=e.inputProps,r=e.shouldRenderSuggestions,o=n.value,i=n.onBlur,u=t.getHighlightedSuggestion(),s=r(o,"input-blurred");t.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),i&&i(t.blurEvent,{highlightedSuggestion:u})}),m(g(t),"onSuggestionMouseLeave",function(e){t.resetHighlightedSuggestion(!1),t.justSelectedSuggestion&&e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!1)}),m(g(t),"onSuggestionTouchStart",function(){t.justSelectedSuggestion=!0}),m(g(t),"onSuggestionTouchMove",function(){t.justSelectedSuggestion=!1,t.pressedSuggestion=null,t.input.focus()}),m(g(t),"itemProps",function(e){return{"data-section-index":e.sectionIndex,"data-suggestion-index":e.itemIndex,onMouseEnter:t.onSuggestionMouseEnter,onMouseLeave:t.onSuggestionMouseLeave,onMouseDown:t.onSuggestionMouseDown,onTouchStart:t.onSuggestionTouchStart,onTouchMove:t.onSuggestionTouchMove,onClick:t.onSuggestionClick}}),m(g(t),"renderSuggestionsContainer",function(e){var n=e.containerProps,r=e.children;return(0,t.props.renderSuggestionsContainer)({containerProps:n,children:r,query:t.getQuery()})}),t.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},t.justPressedUpDown=!1,t.justMouseEntered=!1,t.pressedSuggestion=null,t}return t=c,n=[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=0===this.state.highlightedSuggestionIndex&&this.props.highlightFirstSuggestion&&!e.highlightFirstSuggestion;(0,i.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered?this.highlightFirstSuggestion():t&&this.resetHighlightedSuggestion():this.willRenderSuggestions(e,"suggestions-updated")?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),t&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,o=n.onSuggestionHighlighted,u=n.highlightFirstSuggestion;if(!(0,i.default)(r,e.suggestions)&&r.length>0&&u)this.highlightFirstSuggestion();else if(o){var s=this.getHighlightedSuggestion();s!=t.highlightedSuggestion&&o({suggestion:s})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState(function(o){var i=o.valueBeforeUpDown;return null===t?i=null:null===i&&void 0!==n&&(i=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:i}})}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState(function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}})}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,o=n.multiSection,i=n.getSectionSuggestions;return o?i(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(t.getAttribute&&null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,o=r.value,i=r.onChange;t!==o&&i(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e,t){var n=e.suggestions,r=e.inputProps,o=e.shouldRenderSuggestions,i=r.value;return n.length>0&&o(i,t)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,o=t.renderInputComponent,i=t.onSuggestionsFetchRequested,a=t.renderSuggestion,c=t.inputProps,l=t.multiSection,f=t.renderSectionTitle,d=t.id,g=t.getSectionSuggestions,h=t.theme,y=t.getSuggestionValue,m=t.alwaysRenderSuggestions,j=t.highlightFirstSuggestion,P=t.containerProps,x=this.state,I=x.isFocused,k=x.isCollapsed,_=x.highlightedSectionIndex,R=x.highlightedSuggestionIndex,E=x.valueBeforeUpDown,C=m?b:this.props.shouldRenderSuggestions,D=c.value,q=c.onFocus,T=c.onKeyDown,M=this.willRenderSuggestions(this.props,"render"),F=m||I&&!k&&M,A=F?n:[],L=p({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=C(D,S);e.setState({isFocused:!0,isCollapsed:!n}),q&&q(t),n&&i({value:D,reason:S})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,r=C(n,O);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(p({},j?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!r})),r?i({value:n,reason:O}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var o=t.keyCode;switch(o){case 40:case 38:if(k)C(D,v)&&(i({value:D,reason:v}),e.revealSuggestions(),t.preventDefault());else if(n.length>0){var u,s=r.newHighlightedSectionIndex,a=r.newHighlightedItemIndex;u=null===a?null===E?D:E:e.getSuggestionValueByIndex(s,a),e.updateHighlightedSuggestion(s,a,D),e.maybeCallOnChange(t,u,40===o?"down":"up"),t.preventDefault()}e.justPressedUpDown=!0,setTimeout(function(){e.justPressedUpDown=!1});break;case 13:if(229===t.keyCode)break;var c=e.getHighlightedSuggestion();if(F&&!m&&e.closeSuggestions(),null!=c){t.preventDefault();var l=y(c);e.maybeCallOnChange(t,l,"enter"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:l,suggestionIndex:R,sectionIndex:_,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout(function(){e.justSelectedSuggestion=!1})}break;case 27:F&&t.preventDefault();var f=F&&!m;null===E?f||(e.maybeCallOnChange(t,"","escape"),C("",w)?i({value:"",reason:w}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,E,"escape"),f?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}T&&T(t)}}),N={query:this.getQuery()};return r.default.createElement(u.default,{multiSection:l,items:A,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:a,renderItemData:N,renderSectionTitle:f,getSectionItems:g,highlightedSectionIndex:_,highlightedItemIndex:R,containerProps:P,inputProps:L,itemProps:this.itemProps,theme:(0,s.mapToAutowhateverTheme)(h),id:d,ref:this.storeAutowhateverRef})}}],n&&d(t.prototype,n),c}(r.Component);t.default=j,m(j,"propTypes",{suggestions:o.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){if("function"!=typeof e[t])throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},shouldKeepSuggestionsOnSelect:o.default.func,onSuggestionSelected:o.default.func,onSuggestionHighlighted:o.default.func,renderInputComponent:o.default.func,renderSuggestionsContainer:o.default.func,getSuggestionValue:o.default.func.isRequired,renderSuggestion:o.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n)throw new Error("'inputProps' must be passed.");if(!Object.prototype.hasOwnProperty.call(n,"value"))throw new Error("'inputProps' must have 'value'.");if(!Object.prototype.hasOwnProperty.call(n,"onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:o.default.func,alwaysRenderSuggestions:o.default.bool,multiSection:o.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:o.default.bool,highlightFirstSuggestion:o.default.bool,theme:o.default.object,id:o.default.string,containerProps:o.default.object}),m(j,"defaultProps",{renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,shouldKeepSuggestionsOnSelect:function(){return!1},focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:s.defaultTheme,id:"1",containerProps:{}})},438(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!0;var u,s,a={};for(u=0,s=r.length;u<s;u++)a[r[u]]=!0;for(u=0,s=o.length;u<s;u++){var c=o[u],l=e[c],f=t[c];if(l!==f){if(!a[c]||null===l||null===f||"object"!==n(l)||"object"!==n(f))return!0;var p=Object.keys(l),d=Object.keys(f);if(p.length!==d.length)return!0;for(var g=0,h=p.length;g<h;g++){var y=p[g];if(l[y]!==f[y])return!0}}}return!1}},444(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=u(n(556)),i=u(n(438));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}var p,d,g,h=function(e){!function(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&&f(e,t)}(s,e);var t,n,o,u=(o=s,function(){var e,t=l(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),u.apply(this,arguments)}return t=s,(n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,o=e.theme,i=e.sectionKeyPrefix,u=n(t);return u?r.default.createElement("div",o("".concat(i,"title"),"sectionTitle"),u):null}}])&&c(t.prototype,n),s}(r.Component);t.default=h,p=h,d="propTypes",g={section:o.default.any.isRequired,renderSectionTitle:o.default.func.isRequired,theme:o.default.func.isRequired,sectionKeyPrefix:o.default.string.isRequired},d in p?Object.defineProperty(p,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[d]=g},462(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToAutowhateverTheme=t.defaultTheme=void 0,t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},486(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==g(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=c(n(556)),i=c(n(578)),u=c(n(525)),s=c(n(444)),a=c(n(932));function c(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S={},O=function(e){!function(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&&b(e,t)}(l,e);var t,n,o,c=(o=l,function(){var e,t=m(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?y(e):t}(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),v(y(t=c.call(this,e)),"storeInputReference",function(e){null!==e&&(t.input=e);var n=t.props.inputProps.ref;n&&("function"==typeof n?n(e):"object"===g(n)&&Object.prototype.hasOwnProperty.call(n,"current")&&(n.current=e))}),v(y(t),"storeItemsContainerReference",function(e){null!==e&&(t.itemsContainer=e)}),v(y(t),"onHighlightedItemChange",function(e){t.highlightedItem=e}),v(y(t),"getItemId",function(e,n){if(null===n)return null;var r=t.props.id,o=null===e?"":"section-".concat(e);return"react-autowhatever-".concat(r,"-").concat(o,"-item-").concat(n)}),v(y(t),"onFocus",function(e){var n=t.props.inputProps;t.setState({isInputFocused:!0}),n.onFocus&&n.onFocus(e)}),v(y(t),"onBlur",function(e){var n=t.props.inputProps;t.setState({isInputFocused:!1}),n.onBlur&&n.onBlur(e)}),v(y(t),"onKeyDown",function(e){var n,r,o=t.props,i=o.inputProps,u=o.highlightedSectionIndex,s=o.highlightedItemIndex,a=e.keyCode;switch(a){case 40:case 38:var c=40===a?"next":"prev",l=(n=t.sectionIterator[c]([u,s]),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=l[0],p=l[1];i.onKeyDown(e,{newHighlightedSectionIndex:f,newHighlightedItemIndex:p});break;default:i.onKeyDown(e,{highlightedSectionIndex:u,highlightedItemIndex:s})}}),t.highlightedItem=null,t.state={isInputFocused:!1},t.setSectionsItems(e),t.setSectionIterator(e),t.setTheme(e),t}return t=l,(n=[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map(function(t){return e.getSectionItems(t)}),this.sectionsLengths=this.sectionsItems.map(function(e){return e.length}),this.allSectionsAreEmpty=this.sectionsLengths.every(function(e){return 0===e}))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,i.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,u.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,o=n.id,i=n.items,u=n.renderItem,c=n.renderItemData,l=n.renderSectionTitle,f=n.highlightedSectionIndex,p=n.highlightedItemIndex,d=n.itemProps;return i.map(function(n,i){var g="react-autowhatever-".concat(o,"-"),h="".concat(g,"section-").concat(i,"-"),y=0===i;return r.default.createElement("div",t("".concat(h,"container"),"sectionContainer",y&&"sectionContainerFirst"),r.default.createElement(s.default,{section:n,renderSectionTitle:l,theme:t,sectionKeyPrefix:h}),r.default.createElement(a.default,{items:e.sectionsItems[i],itemProps:d,renderItem:u,renderItemData:c,sectionIndex:i,highlightedItemIndex:f===i?p:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:g,ref:e.storeItemsListReference}))})}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,o=n.id,i=n.renderItem,u=n.renderItemData,s=n.highlightedSectionIndex,c=n.highlightedItemIndex,l=n.itemProps;return r.default.createElement(a.default,{items:e,itemProps:l,renderItem:i,renderItemData:u,highlightedItemIndex:null===s?c:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-".concat(o,"-")})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,o=t.multiSection,i=t.renderInputComponent,u=t.renderItemsContainer,s=t.highlightedSectionIndex,a=t.highlightedItemIndex,c=this.state.isInputFocused,l=o?this.renderSections():this.renderItems(),f=null!==l,d=this.getItemId(s,a),g="react-autowhatever-".concat(n),h=p({role:"combobox","aria-haspopup":"listbox","aria-owns":g,"aria-expanded":f},e("react-autowhatever-".concat(n,"-container"),"container",f&&"containerOpen"),{},this.props.containerProps),y=i(p({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":g,"aria-activedescendant":d},e("react-autowhatever-".concat(n,"-input"),"input",f&&"inputOpen",c&&"inputFocused"),{},this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),m=u({containerProps:p({id:g,role:"listbox"},e("react-autowhatever-".concat(n,"-items-container"),"itemsContainer",f&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:l});return r.default.createElement("div",h,y,m)}}])&&h(t.prototype,n),l}(r.Component);t.default=O,v(O,"propTypes",{id:o.default.string,multiSection:o.default.bool,renderInputComponent:o.default.func,renderItemsContainer:o.default.func,items:o.default.array.isRequired,renderItem:o.default.func,renderItemData:o.default.object,renderSectionTitle:o.default.func,getSectionItems:o.default.func,containerProps:o.default.object,inputProps:o.default.object,itemProps:o.default.oneOfType([o.default.object,o.default.func]),highlightedSectionIndex:o.default.number,highlightedItemIndex:o.default.number,theme:o.default.oneOfType([o.default.object,o.default.array])}),v(O,"defaultProps",{id:"1",multiSection:!1,renderInputComponent:function(e){return r.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:S,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:S,inputProps:S,itemProps:S,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}})},525(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o,i=(o=n(675))&&o.__esModule?o:{default:o},u=function(e){return e};t.default=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(Array.isArray(e)&&2===e.length?e:[e,null],2),n=t[0],o=t[1];return function(e){for(var t=arguments.length,s=Array(t>1?t-1:0),a=1;a<t;a++)s[a-1]=arguments[a];var c=s.map(function(e){return n[e]}).filter(u);return"string"==typeof c[0]||"function"==typeof o?{key:e,className:o?o.apply(void 0,r(c)):c.join(" ")}:{key:e,style:i.default.apply(void 0,[{}].concat(r(c)))}}},e.exports=t.default},545(e){"use strict";e.exports=t},556(e,t,n){e.exports=n(694)()},572(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=u(n(556)),i=u(n(438));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(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&&g(e,t)}(s,e);var t,n,o,u=(o=s,function(){var e,t=d(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?p(e):t}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(p(e=u.call.apply(u,[this].concat(n))),"storeItemReference",function(t){null!==t&&(e.item=t)}),h(p(e),"onMouseEnter",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseEnter(t,{sectionIndex:r,itemIndex:o})}),h(p(e),"onMouseLeave",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseLeave(t,{sectionIndex:r,itemIndex:o})}),h(p(e),"onMouseDown",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseDown(t,{sectionIndex:r,itemIndex:o})}),h(p(e),"onClick",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onClick(t,{sectionIndex:r,itemIndex:o})}),e}return t=s,n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,o=e.renderItem,i=e.renderItemData,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete u.sectionIndex,delete u.itemIndex,"function"==typeof u.onMouseEnter&&(u.onMouseEnter=this.onMouseEnter),"function"==typeof u.onMouseLeave&&(u.onMouseLeave=this.onMouseLeave),"function"==typeof u.onMouseDown&&(u.onMouseDown=this.onMouseDown),"function"==typeof u.onClick&&(u.onClick=this.onClick),r.default.createElement("li",c({role:"option"},u,{ref:this.storeItemReference}),o(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({isHighlighted:t},i)))}}],n&&f(t.prototype,n),s}(r.Component);t.default=y,h(y,"propTypes",{sectionIndex:o.default.number,isHighlighted:o.default.bool.isRequired,itemIndex:o.default.number.isRequired,item:o.default.any.isRequired,renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,onMouseEnter:o.default.func,onMouseLeave:o.default.func,onMouseDown:o.default.func,onClick:o.default.func})},578(e){"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,r=e.multiSection;function o(e){var o=t(e,2),i=o[0],u=o[1];return r?null===u||u===n[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(i))?[null,null]:[i,0]:[i,u+1]:0===n||u===n-1?[null,null]:null===u?[null,0]:[null,u+1]}return{next:o,prev:function(e){var o=t(e,2),i=o[0],u=o[1];return r?null===u||0===u?null===(i=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,n[i]-1]:[i,u-1]:0===n||0===u?[null,null]:null===u?[null,n-1]:[null,u-1]},isLast:function(e){return null===o(e)[1]}}}},675(e){"use strict";var t=Object.prototype.propertyIsEnumerable;function n(e){var n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e))),n.filter(function(n){return t.call(e,n)})}e.exports=Object.assign||function(e,t){for(var r,o,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){r=arguments[u],o=n(Object(r));for(var s=0;s<o.length;s++)i[o[s]]=r[o[s]]}return i}},694(e,t,n){"use strict";var r=n(925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,u){if(u!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},932(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=s(n(556)),i=s(n(572)),u=s(n(438));function s(e){return e&&e.__esModule?e:{default:e}}function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(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&&h(e,t)}(a,e);var t,n,o,s=(o=a,function(){var e,t=g(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?d(e):t}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(d(e=s.call.apply(s,[this].concat(n))),"storeHighlightedItemReference",function(t){e.props.onHighlightedItemChange(null===t?null:t.item)}),e}return t=a,n=[{key:"shouldComponentUpdate",value:function(e){return(0,u.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,o=t.itemProps,u=t.renderItem,s=t.renderItemData,a=t.sectionIndex,c=t.highlightedItemIndex,p=t.getItemId,d=t.theme,g=t.keyPrefix,h=null===a?g:"".concat(g,"section-").concat(a,"-"),m="function"==typeof o;return r.default.createElement("ul",l({role:"listbox"},d("".concat(h,"items-list"),"itemsList")),n.map(function(t,n){var g=0===n,b=n===c,v="".concat(h,"item-").concat(n),S=m?o({sectionIndex:a,itemIndex:n}):o,O=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({id:p(a,n),"aria-selected":b},d(v,"item",g&&"itemFirst",b&&"itemHighlighted"),{},S);return b&&(O.ref=e.storeHighlightedItemReference),r.default.createElement(i.default,l({},O,{sectionIndex:a,isHighlighted:b,itemIndex:n,item:t,renderItem:u,renderItemData:s}))}))}}],n&&p(t.prototype,n),a}(r.Component);t.default=m,y(m,"propTypes",{items:o.default.array.isRequired,itemProps:o.default.oneOfType([o.default.object,o.default.func]),renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,sectionIndex:o.default.number,highlightedItemIndex:o.default.number,onHighlightedItemChange:o.default.func.isRequired,getItemId:o.default.func.isRequired,theme:o.default.func.isRequired,keyPrefix:o.default.string.isRequired}),y(m,"defaultProps",{sectionIndex:null})}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}return o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};o.r(e),o.d(e,{exclude:()=>E,extract:()=>P,parse:()=>x,parseUrl:()=>k,pick:()=>R,stringify:()=>I,stringifyUrl:()=>_});var t=o(119),n=o.n(t),r=o(545),i=o.n(r),u=o(556),s=o.n(u);const a="%[a-f0-9]{2}",c=new RegExp("("+a+")|([^%]+?)","gi"),l=new RegExp("("+a+")+","gi");function f(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],f(n),f(r))}function p(e){try{return decodeURIComponent(e)}catch{let t=e.match(c)||[];for(let n=1;n<t.length;n++)t=(e=f(t,n).join("")).match(c)||[];return e}}function d(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}function g(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);t?.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const o=Object.getOwnPropertyDescriptor(e,r);o.enumerable&&t(r,e[r],e)&&Object.defineProperty(n,r,o)}return n}const h=e=>null==e,y=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),m=Symbol("encodeFragmentIdentifier");function b(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function v(e,t){return t.encode?t.strict?y(e):encodeURIComponent(e):e}function S(e,t){return t.decode?function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return function(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=l.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{const e=p(n[0]);e!==n[0]&&(t[n[0]]=e)}n=l.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const n of r)e=e.replace(new RegExp(n,"g"),t[n]);return e}(e)}}(e):e}function O(e){return Array.isArray(e)?e.sort():"object"==typeof e?O(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function w(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function j(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function P(e){const t=(e=w(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function x(e,t){b((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t}).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const o="string"==typeof n&&n.includes(e.arrayFormatSeparator),i="string"==typeof n&&!o&&S(n,e).includes(e.arrayFormatSeparator);n=i?S(n,e):n;const u=o||i?n.split(e.arrayFormatSeparator).map(t=>S(t,e)):null===n?n:S(n,e);r[t]=u};case"bracket-separator":return(t,n,r)=>{const o=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!o)return void(r[t]=n?S(n,e):n);const i=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>S(t,e));void 0!==r[t]?r[t]=[...r[t],...i]:r[t]=i};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const o of e.split("&")){if(""===o)continue;const e=t.decode?o.replace(/\+/g," "):o;let[i,u]=d(e,"=");void 0===i&&(i=e),u=void 0===u?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?u:S(u,t),n(S(i,t),u,r)}for(const[e,n]of Object.entries(r))if("object"==typeof n&&null!==n)for(const[e,r]of Object.entries(n))n[e]=j(r,t);else r[e]=j(n,t);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=O(n):e[t]=n,e},Object.create(null))}function I(e,t){if(!e)return"";b((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);const n=n=>t.skipNull&&h(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const o=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[v(t,e),"[",o,"]"].join("")]:[...n,[v(t,e),"[",v(o,e),"]=",v(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[v(t,e),"[]"].join("")]:[...n,[v(t,e),"[]=",v(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[v(t,e),":list="].join("")]:[...n,[v(t,e),":list=",v(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[v(n,e),t,v(o,e)].join("")]:[[r,v(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,v(t,e)]:[...n,[v(t,e),"=",v(r,e)].join("")]}}(t),o={};for(const[t,r]of Object.entries(e))n(t)||(o[t]=r);const i=Object.keys(o);return!1!==t.sort&&i.sort(t.sort),i.map(n=>{const o=e[n];return void 0===o?"":null===o?v(n,t):Array.isArray(o)?0===o.length&&"bracket-separator"===t.arrayFormat?v(n,t)+"[]":o.reduce(r(n),[]).join("&"):v(n,t)+"="+v(o,t)}).filter(e=>e.length>0).join("&")}function k(e,t){t={decode:!0,...t};let[n,r]=d(e,"#");return void 0===n&&(n=e),{url:n?.split("?")?.[0]??"",query:x(P(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:S(r,t)}:{}}}function _(e,t){t={encode:!0,strict:!0,[m]:!0,...t};const n=w(e.url).split("?")[0]||"";let r=I({...x(P(e.url),{sort:!1}),...e.query},t);r&&(r=`?${r}`);let o=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if(e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,o=t[m]?r.hash:`#${e.fragmentIdentifier}`}return`${n}${r}${o}`}function R(e,t,n){n={parseFragmentIdentifier:!0,[m]:!1,...n};const{url:r,query:o,fragmentIdentifier:i}=k(e,n);return _({url:r,query:g(o,t),fragmentIdentifier:i},n)}function E(e,t,n){return R(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}const C=e;var D=o(243),q=o.n(D),T=o(181),M=o.n(T);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,L(r.key),r)}}function L(e){var t=function(e){if("object"!=F(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=F(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==F(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var B=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=H(t),function(e,t){if(t&&("object"==F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}(this,t,[e])).state={value:"",suggestions:[],noSuggestions:!1},n.onChange=n.onChange.bind(n),n.onSuggestionsFetchRequested=M()(n.onSuggestionsFetchRequested.bind(n),400),n.onSuggestionsClearRequested=n.onSuggestionsClearRequested.bind(n),n.onSuggestionSelected=n.onSuggestionSelected.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(t,e),r=t,(o=[{key:"onChange",value:function(e,t){var n=t.newValue,r=this.props.setQuery;this.setState({value:n},function(){r(n)})}},{key:"onSuggestionsFetchRequested",value:function(e){var t=this,n=e.value,r=this.props,o=r.getSuggestions,i=r.collection;o(n,i,function(e){t.setState({suggestions:e,noSuggestions:0===e.length&&""!==n.trim()&&n.trim().length>1})})}},{key:"onSuggestionsClearRequested",value:function(){this.setState({suggestions:[]})}},{key:"onSuggestionSelected",value:function(e,t){var n=t.suggestion,r=this.props,o=r.setResults,i=r.clearInput;o([n]),i&&this.setState({value:""})}},{key:"render",value:function(){var e=this.state,t=e.value,r=e.suggestions,o=e.noSuggestions,i=this.props,u=i.placeholder,s=i.getSuggestionValue,a=i.renderSuggestion,c=i.id,l=i.theme,f=i.type,p=i.initialValue,d=i.disabled,g=i.noResultsText,h={placeholder:u,value:p||t,id:c,type:f,disabled:d,"aria-label":u,onChange:this.onChange};return n().createElement(n().Fragment,null,n().createElement(q(),{suggestions:r,onSuggestionsFetchRequested:this.onSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested,onSuggestionSelected:this.onSuggestionSelected,getSuggestionValue:s,renderSuggestion:a,inputProps:h,theme:l}),o&&g&&n().createElement("p",{className:"no-results"},n().createElement("em",null,g)))}}])&&A(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);B.displayName="AUAutoSuggestComponent",B.defaultProps={id:"autosuggest1",theme:{container:"autosuggest",containerOpen:"autosuggest--open",input:"autosuggest__input",inputOpen:"autosuggest__input--open",inputFocused:"autosuggest__input--focused",suggestionsContainer:"autosuggest__suggestions",suggestionsContainerOpen:"autosuggest__suggestions--open",suggestionsList:"autosuggest__suggestions__list",suggestion:"autosuggest__suggestions__list__item",suggestionFirst:"autosuggest__suggestions__list--first",suggestionHighlighted:"autosuggest__suggestions__list--highlighted",sectionContainer:"autosuggest__section",sectionContainerFirst:"autosuggest__section--first",sectionTitle:"autosuggest__section__title"},clearInput:!1,type:"text",initialValue:"",disabled:!1,setQuery:function(){},noResultsText:""},B.propTypes={setQuery:s().func,getSuggestions:s().func.isRequired,getSuggestionValue:s().func.isRequired,renderSuggestion:s().func.isRequired,setResults:s().func.isRequired,collection:s().arrayOf(s().shape({})).isRequired,placeholder:s().string.isRequired,id:s().string,theme:s().shape({}),clearInput:s().bool,type:s().string,initialValue:s().string,disabled:s().bool,noResultsText:s().string};const V=B;function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,z(r.key),r)}}function z(e){var t=function(e){if("object"!=W(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==W(t)?t:t+""}function Q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Q=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}var Y=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Q()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])).state={item:e.item},n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),r=t,i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.item.id!==t.item.id?{item:e.item}:null}}],(o=[{key:"render",value:function(){var e=this.state.item;return n().createElement("span",null,e.name)}}])&&K(r.prototype,o),i&&K(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,i}(n().Component);Y.propTypes={item:s().shape({id:s().number.isRequired}).isRequired},Y.displayName="DataBoxSuggestionComponent";const J=Y;function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,te(r.key),r)}}function te(e){var t=function(e){if("object"!=Z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ne=function(){return!!e})()}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}var ie=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=re(t),function(e,t){if(t&&("object"==Z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ne()?Reflect.construct(t,n||[],re(e).constructor):t.apply(e,n))}(this,t,[e])).handleClick=n.handleClick.bind(n),n.handleChange=n.handleChange.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oe(e,t)}(t,e),r=t,o=[{key:"handleClick",value:function(){var e=this.props,t=e.setActive,n=e.active,r=e.index;t(n?0:r+1)}},{key:"handleChange",value:function(e){var t=e.target.value,n=this.props.setSearchValue,r="".concat([window.location.protocol,"//",window.location.host,window.location.pathname].join(""),"?initval=").concat(t);window.history.replaceState({initVal:t},document.title,r),n(t)}},{key:"render",value:function(){var e=this.props,t=e.button,r=e.index,o=e.box,i=e.active,u=e.getSuggestions,s=e.searchValue,a=r+1,c=o.background,l="db-button button-".concat(a),f=o.search.index===a;return c.overlay&&(l+=" overlay"),f&&(l+=" db-search"),i&&!f&&(l+=" active"),f?o.search.autocomplete?n().createElement("div",{className:l,key:a},n().createElement("span",{dangerouslySetInnerHTML:{__html:t.text}}),n().createElement(V,{placeholder:o.search.placeHolder,setQuery:function(){},setResults:function(e){1===e.length&&e[0].url&&(window.location.href=e[0].url)},collection:[],getSuggestions:u,getSuggestionValue:function(e){return e.name},renderSuggestion:function(e){return n().createElement(J,{item:e})}})):n().createElement("div",{className:l,key:a},n().createElement("span",null,t.text),n().createElement("input",{type:"text",value:s,placeholder:o.search.placeHolder,onChange:this.handleChange})):""!==t.link?n().createElement("div",{key:a,role:"button",tabIndex:"0",onClick:this.handleClick,onKeyUp:function(){},className:l},n().createElement("span",null,n().createElement("a",{href:t.link},t.text))):n().createElement("div",{key:a,role:"button",tabIndex:"0",onClick:this.handleClick,onKeyUp:function(){},className:l},n().createElement("span",null,t.text))}}],o&&ee(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);ie.defaultProps={searchValue:""},ie.propTypes={active:s().bool.isRequired,index:s().number.isRequired,searchValue:s().string,setActive:s().func.isRequired,setSearchValue:s().func.isRequired,button:s().shape({text:s().string.isRequired,link:s().string.isRequired}).isRequired,box:s().shape({background:s().shape({color:s().string.isRequired,linkColor:s().string.isRequired,src:s().string.isRequired,height:s().number.isRequired,text:s().string.isRequired,overlay:s().bool.isRequired}).isRequired,search:s().shape({index:s().number.isRequired,autocomplete:s().bool.isRequired,placeHolder:s().string.isRequired}).isRequired}).isRequired,getSuggestions:s().func.isRequired},ie.displayName="DataBoxButtonComponent";const ue=ie;var se=function(e,t){return void 0!==e.name&&void 0!==t.name?e.name.toLowerCase().localeCompare(t.name.toLowerCase(),"da",{ignorePunctuation:!0}):0},ae=function(e){var t=e.assoc.items.sort(se).map(function(e){if(e.children.length>0){var t=e.children.sort(se).map(function(e){return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name),n().createElement("ul",null,t))}return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("div",null,n().createElement("ul",null,t))};ae.propTypes={assoc:s().shape({items:s().arrayOf(s().shape({})).isRequired}).isRequired},ae.displayName="DataBoxStackedAssociationComponent";const ce=ae;function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pe(r.key),r)}}function pe(e){var t=function(e){if("object"!=le(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=le(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==le(t)?t:t+""}function de(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(de=function(){return!!e})()}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ge(e)}function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},he(e,t)}var ye=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=ge(t),function(e,t){if(t&&("object"==le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,de()?Reflect.construct(t,n||[],ge(e).constructor):t.apply(e,n))}(this,t,[e])).state={collapsed:e.collapsed},n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&he(e,t)}(t,e),r=t,(o=[{key:"componentDidMount",value:function(){var e=this;this.props.attributes.forEach(function(t){if(t.selector){var n=e.node.querySelector(t.selector);n&&n.setAttribute(t.attr,t.value)}else e.node.setAttribute(t.attr,t.value)})}},{key:"render",value:function(){var e=this,t=this.props,r=t.header,o=t.level,i=t.content,u=t.classNames,s=t.onClick,a=t.children,c=t.dataID,l=t.headerElement,f="csc-frame au_collapsible";return this.state.collapsed&&(f+=" au_collapsed"),u&&(f+=" ".concat(u)),n().createElement("div",{"data-id":c,ref:function(t){e.node=t},className:f},o>-1?n().createElement("div",{className:"csc-header",onClick:function(){e.setState(function(e){return{collapsed:!e.collapsed}},function(){var t=e.state.collapsed;s(t,e.node)})},onKeyUp:function(){},role:"button",tabIndex:0},function(){switch(o){case 0:return l;case 1:return n().createElement("h1",null,r);case 2:return n().createElement("h2",null,r);case 3:return n().createElement("h3",null,r);case 4:return n().createElement("h4",null,r);case 5:return n().createElement("h5",null,r);default:return n().createElement("h6",null,r)}}()):null,a||i)}}])&&fe(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);ye.defaultProps={dataID:null,children:null,content:null,header:"",headerElement:null,level:1,classNames:"",onClick:function(){},attributes:[]},ye.propTypes={dataID:s().string,children:s().element,collapsed:s().bool.isRequired,header:s().string,headerElement:s().element,level:s().number,content:s().element,classNames:s().string,onClick:s().func,attributes:s().arrayOf(s().shape({attr:s().string,value:s().string,selector:s().string}))},ye.displayName="AUCollapsibleComponent";const me=ye;function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Se(r.key),r)}}function Se(e){var t=function(e){if("object"!=be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==be(t)?t:t+""}function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oe=function(){return!!e})()}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}var Pe=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=we(t),function(e,t){if(t&&("object"==be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oe()?Reflect.construct(t,n||[],we(e).constructor):t.apply(e,n))}(this,t,[e])).state={open:e.open},n.handleClick=n.handleClick.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}(t,e),r=t,(o=[{key:"handleClick",value:function(){var e=this.props,t=e.rememberState,n=e.boxID,r=e.grouping,o=e.index,i=this.state.open;t&&(i?sessionStorage.removeItem("box-".concat(n,"-group-").concat(r,"-index-").concat(o)):sessionStorage.setItem("box-".concat(n,"-group-").concat(r,"-index-").concat(o),!0)),this.setState(function(e){return{open:!e.open}})}},{key:"render",value:function(){var e=this.state.open,t=this.props.assoc,r=t.items.sort(se).map(function(e){if(e.children.length>0){var t=e.children.sort(se).map(function(e){return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("li",{key:e.id},e.url?n().createElement("a",{href:e.url},e.name):n().createElement("span",null,e.name),n().createElement("ul",null,t))}return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))}),o=n().createElement("ul",null,r);return n().createElement(me,{key:e,collapsed:!e,level:3,header:t.name,content:o,onClick:this.handleClick})}}])&&ve(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);Pe.defaultProps={},Pe.propTypes={boxID:s().number.isRequired,grouping:s().number.isRequired,assoc:s().shape({name:s().string.isRequired,items:s().arrayOf(s().shape({})).isRequired}).isRequired,index:s().number.isRequired,open:s().bool.isRequired,rememberState:s().bool.isRequired},Pe.displayName="DataBoxAssociationComponent";const xe=Pe;var Ie=function(e){var t,r=e.stacked,o=e.grouping,i=e.expand,u=e.rememberState,s=e.boxID;return t=r&&1===o.associations.length?e.grouping.associations.map(function(e){return n().createElement(ce,{key:e.id,assoc:e})}):e.grouping.associations.map(function(e,t){var r=i||1===o.associations.length||u&&sessionStorage.getItem("box-".concat(s,"-group-").concat(o.id,"-index-").concat(t));return n().createElement(xe,{key:e.id,open:r,boxID:s,rememberState:u,grouping:o.id,index:t,assoc:e})}),n().createElement("div",{id:"box-".concat(s,"-grouping-").concat(o.id)},t)};Ie.defaultProps={},Ie.propTypes={boxID:s().number.isRequired,stacked:s().bool.isRequired,expand:s().bool.isRequired,rememberState:s().bool.isRequired,grouping:s().shape({id:s().number.isRequired,associations:s().arrayOf(s().shape({})).isRequired}).isRequired},Ie.displayName="DataBoxGroupingComponent";const ke=Ie;var _e=function(e){var t=e.items,r=e.searchValue,o=t.sort(se).filter(function(e){return e.name.toLowerCase().indexOf(r.toLowerCase())>-1}).map(function(e){return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("div",null,n().createElement("ul",null,o))};_e.propTypes={items:s().arrayOf(s().shape({id:s().number.isRequired,url:s().string.isRequired,name:s().string.isRequired})).isRequired,searchValue:s().string.isRequired},_e.displayName="DataBoxSearchResultComponent";const Re=_e;function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,De(r.key),r)}}function De(e){var t=function(e){if("object"!=Ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(t)?t:t+""}function qe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qe=function(){return!!e})()}function Te(e){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Te(e)}function Me(e,t){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Me(e,t)}var Fe=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Te(t),function(e,t){if(t&&("object"==Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qe()?Reflect.construct(t,n||[],Te(e).constructor):t.apply(e,n))}(this,t,[e])).letters=["...","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","æ","ø","å"],n.state={letterIndex:n.letters.indexOf(e.initLetter.toLowerCase())},n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Me(e,t)}(t,e),r=t,(o=[{key:"render",value:function(){var e=this,t=this.state.letterIndex,r=this.props,o=r.linkColor,i=r.rememberState,u=r.boxID,s=this.letters.map(function(r,s){var a=e.props.items,c=0===s||a.filter(function(e){return 0===e.name.toLowerCase().indexOf(r)}).length>0,l="";c&&(l+="available"),s===t&&(l+=" active");var f={};return c&&(f=t===s?{backgroundColor:"#fff",color:o}:{backgroundColor:o}),n().createElement("li",{key:r,className:l},n().createElement("button",{type:"button",style:f,onClick:function(){c&&(e.setState({letterIndex:s}),i&&sessionStorage.setItem("box-alphabet-".concat(u),e.letters[s]))}},r))}),a=this.props.items;0!==t&&(a=a.filter(function(n){return 0===n.name.toLowerCase().indexOf(e.letters[t])}));var c=a.sort(se).map(function(e){var t=e.children.map(function(e){return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return e.children.length>0?n().createElement("li",{key:e.id},e.url?n().createElement("a",{href:e.url},e.name):n().createElement("span",null,e.name),n().createElement("ul",null,t)):e.parent?null:n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("div",null,n().createElement("ul",{className:"letters"},s),n().createElement("ul",null,c))}}])&&Ce(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);Fe.defaultProps={},Fe.propTypes={initLetter:s().string.isRequired,items:s().arrayOf(s().shape({})).isRequired,linkColor:s().string.isRequired,rememberState:s().bool.isRequired,boxID:s().number.isRequired},Fe.displayName="DataBoxAlphabetComponent";const Ae=Fe;function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,He(r.key),r)}}function He(e){var t=function(e){if("object"!=Le(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Le(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Le(t)?t:t+""}function Ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ue=function(){return!!e})()}function Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Be(e)}function $e(e,t){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$e(e,t)}var Ve=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Be(t),function(e,t){if(t&&("object"==Le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ue()?Reflect.construct(t,n||[],Be(e).constructor):t.apply(e,n))}(this,t,[e])).state={loading:!0,visible:e.visible},n.lazyLoad=n.lazyLoad.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$e(e,t)}(t,e),r=t,i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.visible!==t.visible?{visible:e.visible}:null}}],(o=[{key:"componentDidMount",value:function(){var e=this;this.lazyLoad(),window.addEventListener("scroll",function(){e.lazyLoad()})}},{key:"componentDidUpdate",value:function(){this.lazyLoad()}},{key:"lazyLoad",value:function(){var e=this.props,t=e.loadingCondition,n=e.loaded,r=e.domID,o=e.onLoad,i=this.state,u=i.loading,s=i.visible,a=document.getElementById(r);!n&&u&&t&&(s||function(e){if(null===e)return!1;var t=e.getBoundingClientRect();return t.bottom>0&&t.right>0&&t.left<(window.innerWidth||document.documentElement.clientWidth)&&t.top<(window.innerHeight||document.documentElement.clientHeight)}(a))&&this.setState({loading:!1},function(){o()})}},{key:"render",value:function(){var e=this.props,t=e.columns,r=e.content,o=e.loaded,i=e.domID,u=e.children;return o?u||r:n().createElement("div",{id:i,className:"cell column ".concat(t)},n().createElement("p",{className:"spinner"}))}}])&&Ne(r.prototype,o),i&&Ne(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,i}(n().Component);Ve.defaultProps={domID:"au-spinner-component",visible:!1,columns:"large-12 medium-12 small-12",content:null,children:null,onLoad:function(){}},Ve.propTypes={domID:s().string,visible:s().bool,columns:s().string,content:s().element,children:s().element,loaded:s().bool.isRequired,loadingCondition:s().bool.isRequired,onLoad:s().func},Ve.displayName="AUSpinnerComponent";const We=Ve;function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qe(r.key),r)}}function Qe(e){var t=function(e){if("object"!=Ke(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ke(t)?t:t+""}function Ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ge=function(){return!!e})()}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}var Je=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t,n){return t=Xe(t),function(e,t){if(t&&("object"==Ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ge()?Reflect.construct(t,n||[],Xe(e).constructor):t.apply(e,n))}(this,t,[e]);var r=C(window.location.search),o=e.box.config,i=o.stacked,u=o.rememberState&&sessionStorage.getItem("box-header-".concat(e.box.id))?parseInt(sessionStorage.getItem("box-header-".concat(e.box.id)),10):e.box.config.trigger;return n.state={active:u,rawData:null,items:[],groupings:[],stacked:i,searchValue:void 0===r.initval?"":decodeURIComponent(r.initval)},n.setActive=n.setActive.bind(n),n.setSearchValue=n.setSearchValue.bind(n),n.getSuggestions=n.getSuggestions.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}(t,e),r=t,o=[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.parse,r=t.box,o=this.state.searchValue;n(r.data.source,function(t){var n=t.items,r=t.groupings,o=t.rawData;e.setState({items:n,groupings:r||[],rawData:o})}),""!==o&&this.setSearchValue(o)}},{key:"componentDidUpdate",value:function(){var e=this.props.box,t=this.state,n=t.rawData,r=t.items,o=t.groupings,i=e.data;"function"==typeof i.callback&&i.callback(n||{items:r,groupings:o})}},{key:"setActive",value:function(e){var t=this.props.box;this.setState({active:e}),t.config.rememberState&&sessionStorage.setItem("box-header-".concat(t.id),e)}},{key:"setSearchValue",value:function(e){var t=this.props.box;t.search.autocomplete||this.setState({searchValue:e,active:""===e?0:t.search.index})}},{key:"getSuggestions",value:function(e,t,n){var r=this.state.items,o=e.trim().toLowerCase();n(o.length<2?[]:r.filter(function(e){return e.name.toLowerCase().indexOf(o)>-1}).sort(se))}},{key:"render",value:function(){var e=this,t=this.props.box,r=this.state,o=r.active,i=r.items,u=r.searchValue,s=r.groupings,a=r.stacked,c=t.config,l=t.background,f=n().createElement("div",{className:"content"},function(){var e=t.search.index,r=t.config.alphabet,c=t.config.rememberState&&sessionStorage.getItem("box-alphabet-".concat(t.id))?sessionStorage.getItem("box-alphabet-".concat(t.id)):t.config.initLetter;if(o===r)return n().createElement(Ae,{boxID:t.id,rememberState:t.config.rememberState,initLetter:c,color:t.background.color,linkColor:t.background.linkColor,items:i});if(""!==u&&!t.search.autocomplete)return n().createElement(Re,{items:i,searchValue:u});var l=0;e>0&&(l=e>o?0:1);var f=0;r>0&&(f=r>o?0:1);var p=s[o-l-f-1];return p?n().createElement(ke,{boxID:t.id,rememberState:t.config.rememberState,stacked:a,grouping:p,expand:t.config.expand}):n().createElement("div",{className:"box-".concat(t.id,"-empty")})}()),p=c.buttons.map(function(r,i){var s=i;return a?n().createElement("div",{key:s},n().createElement(ue,{box:t,button:r,index:i,active:i+1===o,setActive:e.setActive,setSearchValue:e.setSearchValue,getSuggestions:e.getSuggestions}),o>0&&i+1===o?f:null):n().createElement(ue,{key:s,box:t,button:r,index:i,active:i+1===o,searchValue:u,setActive:e.setActive,setSearchValue:e.setSearchValue,getSuggestions:e.getSuggestions})}),d="au_databox collapse buttons-".concat(c.buttons.length);c.firstline&&(d+=" first-line-full"),a&&(d+=" stacked");var g={backgroundColor:l.color};""!==l.src&&(g.backgroundImage="url('".concat(l.src,"')")),l.height>0&&(g.height=l.height);var h=n().createElement("div",{className:d},n().createElement("div",{className:"button-wrapper",style:g},""!==l.text?n().createElement("div",{className:"au_focus",dangerouslySetInnerHTML:{__html:l.text}}):null,n().createElement("div",null,p)),o>0&&!a?f:null);return n().createElement(We,{domID:"spinner-".concat(t.config.container),loadingCondition:0===i.length,loaded:i.length>0,onLoad:function(){t.loaded=!0}},h)}}],o&&ze(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);Je.defaultProps={},Je.propTypes={box:s().shape({id:s().number.isRequired,data:s().shape({source:s().string.isRequired,mode:s().string.isRequired,callback:s().func.isRequired}),config:s().shape({expand:s().bool.isRequired,initLetter:s().string.isRequired,alphabet:s().number.isRequired,rememberState:s().bool.isRequired,trigger:s().number.isRequired,stacked:s().bool.isRequired,buttons:s().arrayOf(s().shape({})).isRequired,firstline:s().bool.isRequired,container:s().string.isRequired}).isRequired,background:s().shape({color:s().string.isRequired,linkColor:s().string.isRequired,src:s().string.isRequired,height:s().string.isRequired,text:s().string.isRequired}).isRequired,search:s().shape({autocomplete:s().bool.isRequired,index:s().number.isRequired}).isRequired,loaded:s().bool.isRequired}).isRequired,parse:s().func.isRequired},Je.displayName="DataBoxComponent";const Ze=Je;function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ot(r.key),r)}}function rt(e,t,n){return t&&nt(e.prototype,t),n&&nt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ot(e){var t=function(e){if("object"!=et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==et(t)?t:t+""}var it={config:{container:".au_databox",firstline:!0,alphabet:2,initLetter:"a",trigger:0,buttons:[{text:"Dummy knap 1",link:""},{text:"Dummy knap 2",link:""}],stacked:!1,rememberState:!1,expand:!1},background:{color:"#003d73",linkColor:"#003d73",src:"",height:0,text:"",overlay:!0},search:{autocomplete:!0,index:1,minLength:1,placeHolder:""},data:{mode:"json",source:"",callback:null}},ut=function(){return rt(function e(){tt(this,e)},null,[{key:"json",value:function(e,t){if(e){var n=[];Array.isArray(e)?n=e:n.push(e);var r=[];n.forEach(function(e){r.push(new Promise(function(t){fetch(e).then(function(e){return e.json()}).then(function(e){t(e)})}))}),Promise.all(r).then(function(e){t({items:e.map(function(e){return e.items})[0],groupings:e.map(function(e){return e.groupings})[0]||[]})})}}},{key:"xml",value:function(e,t){AU.helpers.getXML(e,function(e){!function(e){var n=[],r=[],o=[],i=[],u=1;do{i=$(e).find("associations".concat(u," > item"));for(var s=[],a=0;a<i.length;a+=1)s.push({id:$(i[a]).attr("id"),name:$(i[a]).attr("name"),items:[]});s.length>0&&o.push(s),u+=1}while(i.length>0);var c=$(e).find("items > item");$.each(c,function(){var e=this,t=$(this).find("extra"),i=[];$.each(t.find("param"),function(){i.push({param:$(e).text()})});for(var u={id:$(this).attr("id"),name:$(this).attr("name"),url:$(this).attr("url"),parent:$(this).attr("parent"),extra:i,children:[],associations:[]},s=0;s<o.length;s+=1){var a=$(this).find("association".concat(parseInt(s+1,10)));u.associations.push([]);for(var c=0;c<a.length;c+=1){var l=parseInt($(a[c]).attr("id"),10)-1;u.associations[s].push({id:o[s][l].id,name:o[s][l].name}),o[s][l].items.push(u)}}n.push(u),void 0!==u.parent&&""!==u.parent&&r.push(u)});for(var l=0;l<r.length;l+=1)for(var f=r[l].parent,p=0;p<n.length;p+=1)if(n[p].id===f){n[p].children.push(r[l]);break}for(var d=[],g=0;g<o.length;g+=1)d.push({id:g,associations:o[g]});t({rawData:e,items:n,groupings:d})}(e)})}},{key:"table",value:function(e,t){var n=$("".concat(e," > table")),r=$("".concat(e," > ul")),o=[],i=[],u=[];$("li",r).each(function(){var e=[];$("> ul > li",this).each(function(t){e.push({id:t,name:$(this).text(),items:[]})}),e.length>0&&u.push(e)}),$("tr",n).each(function(e){if(e>0){for(var t=$("td",this),n=parseInt(t.eq(0).text(),10),r=parseInt(t.eq(1).text(),10),s=t.eq(2).text(),a={id:n,name:s=s.trim(),url:$("a",t.eq(2)).attr("href"),parent:r,extra:[],children:[],associations:[]},c=0;c<u.length;c+=1){var l=t.eq(c+3).text().split(",");a.associations.push([]);for(var f=0;f<l.length;f+=1){var p=parseInt(l[f],10)-1;void 0!==u[c][p]&&(a.associations[c].push({id:u[c][p].id,name:u[c][p].name}),u[c][p].items.push(a))}}0===a.parent||""===a.parent?o.push(a):i.push(a)}});for(var s=0;s<i.length;s+=1)for(var a=i[s].parent,c=0;c<o.length;c+=1)if(o[c].id===a){o[c].children.push(i[s]);break}for(var l=[],f=0;f<u.length;f+=1)l.push({id:f,associations:u[f]});t({items:o,groupings:l})}},{key:"list",value:function(e,t){var n=$(e),r=[];$("li",n).each(function(e){r.push({id:e,label:$(this).text(),value:$(this).text(),name:$(this).text(),url:$("a",this).attr("href"),children:[],associations:[]})}),t({items:r,groupings:[]})}}])}(),st=function(){function e(t){tt(this,e),this.boxes=t}return rt(e,[{key:"init",value:function(){for(var t={json:ut.json,xml:ut.xml,table:ut.table,list:ut.list},r=0;r<this.boxes.length;r+=1){var o=this.boxes[r];if(!o.loaded){(o=e.mergeOptions(o)).id=r,e.legacyCleanUp(o);var u=document.querySelector(o.config.container),s=u&&"hidden"!==getComputedStyle(u).visibility;if(!o.config.stacked&&AU.responsive.state&&"PHONE"===AU.responsive.state.NAME&&(o.config.stacked=!0),s&&(i().render(n().createElement(Ze,{box:o,parse:t[o.data.mode]}),u),o.loaded=!0),"table"===o.data.mode||"list"===o.data.mode){var a=document.querySelector(o.data.source);a&&a.parentNode.removeChild(a)}}}}}],[{key:"mergeOptions",value:function(e){var t=e;for(var n in t.hasOwnProperty("config")||(t.config={}),it.config)t.config.hasOwnProperty(n)||(t.config[n]=it.config[n]);for(var r in t.hasOwnProperty("background")||(t.background={}),it.background)t.background.hasOwnProperty(r)||(t.background[r]=it.background[r]);for(var o in t.hasOwnProperty("search")||(t.search={}),it.search)t.search.hasOwnProperty(o)||(t.search[o]=it.search[o]);for(var i in t.hasOwnProperty("data")||(t.data={}),it.data)t.data.hasOwnProperty(i)||(t.data[i]=it.data[i]);return t}},{key:"legacyCleanUp",value:function(e){var t=e,n=$(t.config.container);if(null!==n){var r=$("> *:not(.no-header)",n);r.length>0&&(t.config.buttons=[],r.each(function(){t.config.buttons.push({text:$(this).text(),link:""})}))}}}])}();window.AUDatabox=st})(),{}})());
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","react-dom"],t);else{var n="object"==typeof exports?t(require("react"),require("react-dom")):t(e.React,e.ReactDOM);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(e,t)=>(()=>{var n={119(t){"use strict";t.exports=e},181(e,t,n){var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt,a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,l=a||c||Function("return this")(),f=Object.prototype.toString,p=Math.max,d=Math.min,g=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||u.test(e)?s(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,u,s,a,c=0,l=!1,f=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,i=o;return r=o=void 0,c=t,u=e.apply(i,n)}function v(e){var n=e-a;return void 0===a||n>=t||n<0||f&&e-c>=i}function S(){var e=g();if(v(e))return O(e);s=setTimeout(S,function(e){var n=t-(e-a);return f?d(n,i-(e-c)):n}(e))}function O(e){return s=void 0,m&&r?b(e):(r=o=void 0,u)}function w(){var e=g(),n=v(e);if(r=arguments,o=this,a=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(S,t),l?b(e):u}(a);if(f)return s=setTimeout(S,t),b(a)}return void 0===s&&(s=setTimeout(S,t)),u}return t=y(t)||0,h(n)&&(l=!!n.leading,i=(f="maxWait"in n)?p(y(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),w.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=a=o=s=void 0},w.flush=function(){return void 0===s?u:O(g())},w}},243(e,t,n){"use strict";e.exports=n(424).default},321(e){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},424(e,t,n){"use strict";t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=a(n(556)),i=a(n(321)),u=a(n(486)),s=n(462);function a(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(){return!0},v="suggestions-revealed",S="input-focused",O="input-changed",w="escape-pressed",j=function(e){!function(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&&y(e,t)}(c,e);var t,n,o,a=(o=c,function(){var e,t=h(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?g(e):t}(this,e)});function c(e){var t,n=e.alwaysRenderSuggestions;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),m(g(t=a.call(this)),"onDocumentMouseDown",function(e){t.justClickedOnSuggestionsContainer=!1;for(var n=e.detail&&e.detail.target||e.target;null!==n&&n!==document;){if(n.getAttribute&&null!==n.getAttribute("data-suggestion-index"))return;if(n===t.suggestionsContainer)return void(t.justClickedOnSuggestionsContainer=!0);n=n.parentNode}}),m(g(t),"storeAutowhateverRef",function(e){null!==e&&(t.autowhatever=e)}),m(g(t),"onSuggestionMouseEnter",function(e,n){var r=n.sectionIndex,o=n.itemIndex;t.updateHighlightedSuggestion(r,o),e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!0),t.justMouseEntered=!0,setTimeout(function(){t.justMouseEntered=!1})}),m(g(t),"highlightFirstSuggestion",function(){t.updateHighlightedSuggestion(t.props.multiSection?0:null,0)}),m(g(t),"onDocumentMouseUp",function(){t.pressedSuggestion&&!t.justSelectedSuggestion&&t.input.focus(),t.pressedSuggestion=null}),m(g(t),"onSuggestionMouseDown",function(e){t.justSelectedSuggestion||(t.justSelectedSuggestion=!0,t.pressedSuggestion=e.target)}),m(g(t),"onSuggestionsClearRequested",function(){var e=t.props.onSuggestionsClearRequested;e&&e()}),m(g(t),"onSuggestionSelected",function(e,n){var r=t.props,o=r.alwaysRenderSuggestions,i=r.onSuggestionSelected,u=r.onSuggestionsFetchRequested;i&&i(e,n);var s=t.props.shouldKeepSuggestionsOnSelect(n.suggestion);o||s?u({value:n.suggestionValue,reason:"suggestion-selected"}):t.onSuggestionsClearRequested(),t.resetHighlightedSuggestion()}),m(g(t),"onSuggestionClick",function(e){var n=t.props,r=n.alwaysRenderSuggestions,o=n.focusInputOnSuggestionClick,i=t.getSuggestionIndices(t.findSuggestionElement(e.target)),u=i.sectionIndex,s=i.suggestionIndex,a=t.getSuggestion(u,s),c=t.props.getSuggestionValue(a);t.maybeCallOnChange(e,c,"click"),t.onSuggestionSelected(e,{suggestion:a,suggestionValue:c,suggestionIndex:s,sectionIndex:u,method:"click"});var l=t.props.shouldKeepSuggestionsOnSelect(a);r||l||t.closeSuggestions(),!0===o?t.input.focus():t.onBlur(),setTimeout(function(){t.justSelectedSuggestion=!1})}),m(g(t),"onBlur",function(){var e=t.props,n=e.inputProps,r=e.shouldRenderSuggestions,o=n.value,i=n.onBlur,u=t.getHighlightedSuggestion(),s=r(o,"input-blurred");t.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),i&&i(t.blurEvent,{highlightedSuggestion:u})}),m(g(t),"onSuggestionMouseLeave",function(e){t.resetHighlightedSuggestion(!1),t.justSelectedSuggestion&&e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!1)}),m(g(t),"onSuggestionTouchStart",function(){t.justSelectedSuggestion=!0}),m(g(t),"onSuggestionTouchMove",function(){t.justSelectedSuggestion=!1,t.pressedSuggestion=null,t.input.focus()}),m(g(t),"itemProps",function(e){return{"data-section-index":e.sectionIndex,"data-suggestion-index":e.itemIndex,onMouseEnter:t.onSuggestionMouseEnter,onMouseLeave:t.onSuggestionMouseLeave,onMouseDown:t.onSuggestionMouseDown,onTouchStart:t.onSuggestionTouchStart,onTouchMove:t.onSuggestionTouchMove,onClick:t.onSuggestionClick}}),m(g(t),"renderSuggestionsContainer",function(e){var n=e.containerProps,r=e.children;return(0,t.props.renderSuggestionsContainer)({containerProps:n,children:r,query:t.getQuery()})}),t.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},t.justPressedUpDown=!1,t.justMouseEntered=!1,t.pressedSuggestion=null,t}return t=c,n=[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=0===this.state.highlightedSuggestionIndex&&this.props.highlightFirstSuggestion&&!e.highlightFirstSuggestion;(0,i.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered?this.highlightFirstSuggestion():t&&this.resetHighlightedSuggestion():this.willRenderSuggestions(e,"suggestions-updated")?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),t&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,o=n.onSuggestionHighlighted,u=n.highlightFirstSuggestion;if(!(0,i.default)(r,e.suggestions)&&r.length>0&&u)this.highlightFirstSuggestion();else if(o){var s=this.getHighlightedSuggestion();s!=t.highlightedSuggestion&&o({suggestion:s})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState(function(o){var i=o.valueBeforeUpDown;return null===t?i=null:null===i&&void 0!==n&&(i=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:i}})}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState(function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}})}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,o=n.multiSection,i=n.getSectionSuggestions;return o?i(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(t.getAttribute&&null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,o=r.value,i=r.onChange;t!==o&&i(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e,t){var n=e.suggestions,r=e.inputProps,o=e.shouldRenderSuggestions,i=r.value;return n.length>0&&o(i,t)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,o=t.renderInputComponent,i=t.onSuggestionsFetchRequested,a=t.renderSuggestion,c=t.inputProps,l=t.multiSection,f=t.renderSectionTitle,d=t.id,g=t.getSectionSuggestions,h=t.theme,y=t.getSuggestionValue,m=t.alwaysRenderSuggestions,j=t.highlightFirstSuggestion,P=t.containerProps,x=this.state,I=x.isFocused,k=x.isCollapsed,_=x.highlightedSectionIndex,R=x.highlightedSuggestionIndex,E=x.valueBeforeUpDown,C=m?b:this.props.shouldRenderSuggestions,D=c.value,q=c.onFocus,T=c.onKeyDown,M=this.willRenderSuggestions(this.props,"render"),F=m||I&&!k&&M,A=F?n:[],L=p({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=C(D,S);e.setState({isFocused:!0,isCollapsed:!n}),q&&q(t),n&&i({value:D,reason:S})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,r=C(n,O);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(p({},j?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!r})),r?i({value:n,reason:O}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var o=t.keyCode;switch(o){case 40:case 38:if(k)C(D,v)&&(i({value:D,reason:v}),e.revealSuggestions(),t.preventDefault());else if(n.length>0){var u,s=r.newHighlightedSectionIndex,a=r.newHighlightedItemIndex;u=null===a?null===E?D:E:e.getSuggestionValueByIndex(s,a),e.updateHighlightedSuggestion(s,a,D),e.maybeCallOnChange(t,u,40===o?"down":"up"),t.preventDefault()}e.justPressedUpDown=!0,setTimeout(function(){e.justPressedUpDown=!1});break;case 13:if(229===t.keyCode)break;var c=e.getHighlightedSuggestion();if(F&&!m&&e.closeSuggestions(),null!=c){t.preventDefault();var l=y(c);e.maybeCallOnChange(t,l,"enter"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:l,suggestionIndex:R,sectionIndex:_,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout(function(){e.justSelectedSuggestion=!1})}break;case 27:F&&t.preventDefault();var f=F&&!m;null===E?f||(e.maybeCallOnChange(t,"","escape"),C("",w)?i({value:"",reason:w}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,E,"escape"),f?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}T&&T(t)}}),N={query:this.getQuery()};return r.default.createElement(u.default,{multiSection:l,items:A,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:a,renderItemData:N,renderSectionTitle:f,getSectionItems:g,highlightedSectionIndex:_,highlightedItemIndex:R,containerProps:P,inputProps:L,itemProps:this.itemProps,theme:(0,s.mapToAutowhateverTheme)(h),id:d,ref:this.storeAutowhateverRef})}}],n&&d(t.prototype,n),c}(r.Component);t.default=j,m(j,"propTypes",{suggestions:o.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){if("function"!=typeof e[t])throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},shouldKeepSuggestionsOnSelect:o.default.func,onSuggestionSelected:o.default.func,onSuggestionHighlighted:o.default.func,renderInputComponent:o.default.func,renderSuggestionsContainer:o.default.func,getSuggestionValue:o.default.func.isRequired,renderSuggestion:o.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n)throw new Error("'inputProps' must be passed.");if(!Object.prototype.hasOwnProperty.call(n,"value"))throw new Error("'inputProps' must have 'value'.");if(!Object.prototype.hasOwnProperty.call(n,"onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:o.default.func,alwaysRenderSuggestions:o.default.bool,multiSection:o.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:o.default.bool,highlightFirstSuggestion:o.default.bool,theme:o.default.object,id:o.default.string,containerProps:o.default.object}),m(j,"defaultProps",{renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,shouldKeepSuggestionsOnSelect:function(){return!1},focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:s.defaultTheme,id:"1",containerProps:{}})},438(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!0;var u,s,a={};for(u=0,s=r.length;u<s;u++)a[r[u]]=!0;for(u=0,s=o.length;u<s;u++){var c=o[u],l=e[c],f=t[c];if(l!==f){if(!a[c]||null===l||null===f||"object"!==n(l)||"object"!==n(f))return!0;var p=Object.keys(l),d=Object.keys(f);if(p.length!==d.length)return!0;for(var g=0,h=p.length;g<h;g++){var y=p[g];if(l[y]!==f[y])return!0}}}return!1}},444(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=u(n(556)),i=u(n(438));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}var p,d,g,h=function(e){!function(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&&f(e,t)}(s,e);var t,n,o,u=(o=s,function(){var e,t=l(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),u.apply(this,arguments)}return t=s,(n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,o=e.theme,i=e.sectionKeyPrefix,u=n(t);return u?r.default.createElement("div",o("".concat(i,"title"),"sectionTitle"),u):null}}])&&c(t.prototype,n),s}(r.Component);t.default=h,p=h,d="propTypes",g={section:o.default.any.isRequired,renderSectionTitle:o.default.func.isRequired,theme:o.default.func.isRequired,sectionKeyPrefix:o.default.string.isRequired},d in p?Object.defineProperty(p,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[d]=g},462(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToAutowhateverTheme=t.defaultTheme=void 0,t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},486(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==g(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=c(n(556)),i=c(n(578)),u=c(n(525)),s=c(n(444)),a=c(n(932));function c(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S={},O=function(e){!function(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&&b(e,t)}(l,e);var t,n,o,c=(o=l,function(){var e,t=m(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?y(e):t}(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),v(y(t=c.call(this,e)),"storeInputReference",function(e){null!==e&&(t.input=e);var n=t.props.inputProps.ref;n&&("function"==typeof n?n(e):"object"===g(n)&&Object.prototype.hasOwnProperty.call(n,"current")&&(n.current=e))}),v(y(t),"storeItemsContainerReference",function(e){null!==e&&(t.itemsContainer=e)}),v(y(t),"onHighlightedItemChange",function(e){t.highlightedItem=e}),v(y(t),"getItemId",function(e,n){if(null===n)return null;var r=t.props.id,o=null===e?"":"section-".concat(e);return"react-autowhatever-".concat(r,"-").concat(o,"-item-").concat(n)}),v(y(t),"onFocus",function(e){var n=t.props.inputProps;t.setState({isInputFocused:!0}),n.onFocus&&n.onFocus(e)}),v(y(t),"onBlur",function(e){var n=t.props.inputProps;t.setState({isInputFocused:!1}),n.onBlur&&n.onBlur(e)}),v(y(t),"onKeyDown",function(e){var n,r,o=t.props,i=o.inputProps,u=o.highlightedSectionIndex,s=o.highlightedItemIndex,a=e.keyCode;switch(a){case 40:case 38:var c=40===a?"next":"prev",l=(n=t.sectionIterator[c]([u,s]),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=l[0],p=l[1];i.onKeyDown(e,{newHighlightedSectionIndex:f,newHighlightedItemIndex:p});break;default:i.onKeyDown(e,{highlightedSectionIndex:u,highlightedItemIndex:s})}}),t.highlightedItem=null,t.state={isInputFocused:!1},t.setSectionsItems(e),t.setSectionIterator(e),t.setTheme(e),t}return t=l,(n=[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map(function(t){return e.getSectionItems(t)}),this.sectionsLengths=this.sectionsItems.map(function(e){return e.length}),this.allSectionsAreEmpty=this.sectionsLengths.every(function(e){return 0===e}))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,i.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,u.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,o=n.id,i=n.items,u=n.renderItem,c=n.renderItemData,l=n.renderSectionTitle,f=n.highlightedSectionIndex,p=n.highlightedItemIndex,d=n.itemProps;return i.map(function(n,i){var g="react-autowhatever-".concat(o,"-"),h="".concat(g,"section-").concat(i,"-"),y=0===i;return r.default.createElement("div",t("".concat(h,"container"),"sectionContainer",y&&"sectionContainerFirst"),r.default.createElement(s.default,{section:n,renderSectionTitle:l,theme:t,sectionKeyPrefix:h}),r.default.createElement(a.default,{items:e.sectionsItems[i],itemProps:d,renderItem:u,renderItemData:c,sectionIndex:i,highlightedItemIndex:f===i?p:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:g,ref:e.storeItemsListReference}))})}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,o=n.id,i=n.renderItem,u=n.renderItemData,s=n.highlightedSectionIndex,c=n.highlightedItemIndex,l=n.itemProps;return r.default.createElement(a.default,{items:e,itemProps:l,renderItem:i,renderItemData:u,highlightedItemIndex:null===s?c:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-".concat(o,"-")})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,o=t.multiSection,i=t.renderInputComponent,u=t.renderItemsContainer,s=t.highlightedSectionIndex,a=t.highlightedItemIndex,c=this.state.isInputFocused,l=o?this.renderSections():this.renderItems(),f=null!==l,d=this.getItemId(s,a),g="react-autowhatever-".concat(n),h=p({role:"combobox","aria-haspopup":"listbox","aria-owns":g,"aria-expanded":f},e("react-autowhatever-".concat(n,"-container"),"container",f&&"containerOpen"),{},this.props.containerProps),y=i(p({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":g,"aria-activedescendant":d},e("react-autowhatever-".concat(n,"-input"),"input",f&&"inputOpen",c&&"inputFocused"),{},this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),m=u({containerProps:p({id:g,role:"listbox"},e("react-autowhatever-".concat(n,"-items-container"),"itemsContainer",f&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:l});return r.default.createElement("div",h,y,m)}}])&&h(t.prototype,n),l}(r.Component);t.default=O,v(O,"propTypes",{id:o.default.string,multiSection:o.default.bool,renderInputComponent:o.default.func,renderItemsContainer:o.default.func,items:o.default.array.isRequired,renderItem:o.default.func,renderItemData:o.default.object,renderSectionTitle:o.default.func,getSectionItems:o.default.func,containerProps:o.default.object,inputProps:o.default.object,itemProps:o.default.oneOfType([o.default.object,o.default.func]),highlightedSectionIndex:o.default.number,highlightedItemIndex:o.default.number,theme:o.default.oneOfType([o.default.object,o.default.array])}),v(O,"defaultProps",{id:"1",multiSection:!1,renderInputComponent:function(e){return r.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:S,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:S,inputProps:S,itemProps:S,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}})},525(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o,i=(o=n(675))&&o.__esModule?o:{default:o},u=function(e){return e};t.default=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(Array.isArray(e)&&2===e.length?e:[e,null],2),n=t[0],o=t[1];return function(e){for(var t=arguments.length,s=Array(t>1?t-1:0),a=1;a<t;a++)s[a-1]=arguments[a];var c=s.map(function(e){return n[e]}).filter(u);return"string"==typeof c[0]||"function"==typeof o?{key:e,className:o?o.apply(void 0,r(c)):c.join(" ")}:{key:e,style:i.default.apply(void 0,[{}].concat(r(c)))}}},e.exports=t.default},545(e){"use strict";e.exports=t},556(e,t,n){e.exports=n(694)()},572(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=u(n(556)),i=u(n(438));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(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&&g(e,t)}(s,e);var t,n,o,u=(o=s,function(){var e,t=d(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?p(e):t}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(p(e=u.call.apply(u,[this].concat(n))),"storeItemReference",function(t){null!==t&&(e.item=t)}),h(p(e),"onMouseEnter",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseEnter(t,{sectionIndex:r,itemIndex:o})}),h(p(e),"onMouseLeave",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseLeave(t,{sectionIndex:r,itemIndex:o})}),h(p(e),"onMouseDown",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseDown(t,{sectionIndex:r,itemIndex:o})}),h(p(e),"onClick",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onClick(t,{sectionIndex:r,itemIndex:o})}),e}return t=s,n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,o=e.renderItem,i=e.renderItemData,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete u.sectionIndex,delete u.itemIndex,"function"==typeof u.onMouseEnter&&(u.onMouseEnter=this.onMouseEnter),"function"==typeof u.onMouseLeave&&(u.onMouseLeave=this.onMouseLeave),"function"==typeof u.onMouseDown&&(u.onMouseDown=this.onMouseDown),"function"==typeof u.onClick&&(u.onClick=this.onClick),r.default.createElement("li",c({role:"option"},u,{ref:this.storeItemReference}),o(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({isHighlighted:t},i)))}}],n&&f(t.prototype,n),s}(r.Component);t.default=y,h(y,"propTypes",{sectionIndex:o.default.number,isHighlighted:o.default.bool.isRequired,itemIndex:o.default.number.isRequired,item:o.default.any.isRequired,renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,onMouseEnter:o.default.func,onMouseLeave:o.default.func,onMouseDown:o.default.func,onClick:o.default.func})},578(e){"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,r=e.multiSection;function o(e){var o=t(e,2),i=o[0],u=o[1];return r?null===u||u===n[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(i))?[null,null]:[i,0]:[i,u+1]:0===n||u===n-1?[null,null]:null===u?[null,0]:[null,u+1]}return{next:o,prev:function(e){var o=t(e,2),i=o[0],u=o[1];return r?null===u||0===u?null===(i=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,n[i]-1]:[i,u-1]:0===n||0===u?[null,null]:null===u?[null,n-1]:[null,u-1]},isLast:function(e){return null===o(e)[1]}}}},675(e){"use strict";var t=Object.prototype.propertyIsEnumerable;function n(e){var n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e))),n.filter(function(n){return t.call(e,n)})}e.exports=Object.assign||function(e,t){for(var r,o,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){r=arguments[u],o=n(Object(r));for(var s=0;s<o.length;s++)i[o[s]]=r[o[s]]}return i}},694(e,t,n){"use strict";var r=n(925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,u){if(u!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},932(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(119)),o=s(n(556)),i=s(n(572)),u=s(n(438));function s(e){return e&&e.__esModule?e:{default:e}}function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(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&&h(e,t)}(a,e);var t,n,o,s=(o=a,function(){var e,t=g(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?d(e):t}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(d(e=s.call.apply(s,[this].concat(n))),"storeHighlightedItemReference",function(t){e.props.onHighlightedItemChange(null===t?null:t.item)}),e}return t=a,n=[{key:"shouldComponentUpdate",value:function(e){return(0,u.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,o=t.itemProps,u=t.renderItem,s=t.renderItemData,a=t.sectionIndex,c=t.highlightedItemIndex,p=t.getItemId,d=t.theme,g=t.keyPrefix,h=null===a?g:"".concat(g,"section-").concat(a,"-"),m="function"==typeof o;return r.default.createElement("ul",l({role:"listbox"},d("".concat(h,"items-list"),"itemsList")),n.map(function(t,n){var g=0===n,b=n===c,v="".concat(h,"item-").concat(n),S=m?o({sectionIndex:a,itemIndex:n}):o,O=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({id:p(a,n),"aria-selected":b},d(v,"item",g&&"itemFirst",b&&"itemHighlighted"),{},S);return b&&(O.ref=e.storeHighlightedItemReference),r.default.createElement(i.default,l({},O,{sectionIndex:a,isHighlighted:b,itemIndex:n,item:t,renderItem:u,renderItemData:s}))}))}}],n&&p(t.prototype,n),a}(r.Component);t.default=m,y(m,"propTypes",{items:o.default.array.isRequired,itemProps:o.default.oneOfType([o.default.object,o.default.func]),renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,sectionIndex:o.default.number,highlightedItemIndex:o.default.number,onHighlightedItemChange:o.default.func.isRequired,getItemId:o.default.func.isRequired,theme:o.default.func.isRequired,keyPrefix:o.default.string.isRequired}),y(m,"defaultProps",{sectionIndex:null})}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}return o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};o.r(e),o.d(e,{exclude:()=>E,extract:()=>P,parse:()=>x,parseUrl:()=>k,pick:()=>R,stringify:()=>I,stringifyUrl:()=>_});var t=o(119),n=o.n(t),r=o(545),i=o.n(r),u=o(556),s=o.n(u);const a="%[a-f0-9]{2}",c=new RegExp("("+a+")|([^%]+?)","gi"),l=new RegExp("("+a+")+","gi");function f(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],f(n),f(r))}function p(e){try{return decodeURIComponent(e)}catch{let t=e.match(c)||[];for(let n=1;n<t.length;n++)t=(e=f(t,n).join("")).match(c)||[];return e}}function d(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}function g(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);t?.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const o=Object.getOwnPropertyDescriptor(e,r);o.enumerable&&t(r,e[r],e)&&Object.defineProperty(n,r,o)}return n}const h=e=>null==e,y=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),m=Symbol("encodeFragmentIdentifier");function b(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function v(e,t){return t.encode?t.strict?y(e):encodeURIComponent(e):e}function S(e,t){return t.decode?function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return function(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=l.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{const e=p(n[0]);e!==n[0]&&(t[n[0]]=e)}n=l.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const n of r)e=e.replace(new RegExp(n,"g"),t[n]);return e}(e)}}(e):e}function O(e){return Array.isArray(e)?e.sort():"object"==typeof e?O(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function w(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function j(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function P(e){const t=(e=w(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function x(e,t){b((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t}).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const o="string"==typeof n&&n.includes(e.arrayFormatSeparator),i="string"==typeof n&&!o&&S(n,e).includes(e.arrayFormatSeparator);n=i?S(n,e):n;const u=o||i?n.split(e.arrayFormatSeparator).map(t=>S(t,e)):null===n?n:S(n,e);r[t]=u};case"bracket-separator":return(t,n,r)=>{const o=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!o)return void(r[t]=n?S(n,e):n);const i=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>S(t,e));void 0!==r[t]?r[t]=[...r[t],...i]:r[t]=i};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const o of e.split("&")){if(""===o)continue;const e=t.decode?o.replace(/\+/g," "):o;let[i,u]=d(e,"=");void 0===i&&(i=e),u=void 0===u?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?u:S(u,t),n(S(i,t),u,r)}for(const[e,n]of Object.entries(r))if("object"==typeof n&&null!==n)for(const[e,r]of Object.entries(n))n[e]=j(r,t);else r[e]=j(n,t);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=O(n):e[t]=n,e},Object.create(null))}function I(e,t){if(!e)return"";b((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);const n=n=>t.skipNull&&h(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const o=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[v(t,e),"[",o,"]"].join("")]:[...n,[v(t,e),"[",v(o,e),"]=",v(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[v(t,e),"[]"].join("")]:[...n,[v(t,e),"[]=",v(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[v(t,e),":list="].join("")]:[...n,[v(t,e),":list=",v(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[v(n,e),t,v(o,e)].join("")]:[[r,v(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,v(t,e)]:[...n,[v(t,e),"=",v(r,e)].join("")]}}(t),o={};for(const[t,r]of Object.entries(e))n(t)||(o[t]=r);const i=Object.keys(o);return!1!==t.sort&&i.sort(t.sort),i.map(n=>{const o=e[n];return void 0===o?"":null===o?v(n,t):Array.isArray(o)?0===o.length&&"bracket-separator"===t.arrayFormat?v(n,t)+"[]":o.reduce(r(n),[]).join("&"):v(n,t)+"="+v(o,t)}).filter(e=>e.length>0).join("&")}function k(e,t){t={decode:!0,...t};let[n,r]=d(e,"#");return void 0===n&&(n=e),{url:n?.split("?")?.[0]??"",query:x(P(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:S(r,t)}:{}}}function _(e,t){t={encode:!0,strict:!0,[m]:!0,...t};const n=w(e.url).split("?")[0]||"";let r=I({...x(P(e.url),{sort:!1}),...e.query},t);r&&(r=`?${r}`);let o=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if(e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,o=t[m]?r.hash:`#${e.fragmentIdentifier}`}return`${n}${r}${o}`}function R(e,t,n){n={parseFragmentIdentifier:!0,[m]:!1,...n};const{url:r,query:o,fragmentIdentifier:i}=k(e,n);return _({url:r,query:g(o,t),fragmentIdentifier:i},n)}function E(e,t,n){return R(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}const C=e;var D=o(243),q=o.n(D),T=o(181),M=o.n(T);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,L(r.key),r)}}function L(e){var t=function(e){if("object"!=F(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=F(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==F(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var B=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=H(t),function(e,t){if(t&&("object"==F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}(this,t,[e])).state={value:"",suggestions:[],noSuggestions:!1},n.onChange=n.onChange.bind(n),n.onSuggestionsFetchRequested=M()(n.onSuggestionsFetchRequested.bind(n),400),n.onSuggestionsClearRequested=n.onSuggestionsClearRequested.bind(n),n.onSuggestionSelected=n.onSuggestionSelected.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(t,e),r=t,(o=[{key:"onChange",value:function(e,t){var n=t.newValue,r=this.props.setQuery;this.setState({value:n},function(){r(n)})}},{key:"onSuggestionsFetchRequested",value:function(e){var t=this,n=e.value,r=this.props,o=r.getSuggestions,i=r.collection;o(n,i,function(e){t.setState({suggestions:e,noSuggestions:0===e.length&&""!==n.trim()&&n.trim().length>1})})}},{key:"onSuggestionsClearRequested",value:function(){this.setState({suggestions:[]})}},{key:"onSuggestionSelected",value:function(e,t){var n=t.suggestion,r=this.props,o=r.setResults,i=r.clearInput;o([n]),i&&this.setState({value:""})}},{key:"render",value:function(){var e=this.state,t=e.value,r=e.suggestions,o=e.noSuggestions,i=this.props,u=i.placeholder,s=i.getSuggestionValue,a=i.renderSuggestion,c=i.id,l=i.theme,f=i.type,p=i.initialValue,d=i.disabled,g=i.noResultsText,h={placeholder:u,value:p||t,id:c,type:f,disabled:d,"aria-label":u,onChange:this.onChange};return n().createElement(n().Fragment,null,n().createElement(q(),{suggestions:r,onSuggestionsFetchRequested:this.onSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested,onSuggestionSelected:this.onSuggestionSelected,getSuggestionValue:s,renderSuggestion:a,inputProps:h,theme:l}),o&&g&&n().createElement("p",{className:"no-results"},n().createElement("em",null,g)))}}])&&A(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);B.displayName="AUAutoSuggestComponent",B.defaultProps={id:"autosuggest1",theme:{container:"autosuggest",containerOpen:"autosuggest--open",input:"autosuggest__input",inputOpen:"autosuggest__input--open",inputFocused:"autosuggest__input--focused",suggestionsContainer:"autosuggest__suggestions",suggestionsContainerOpen:"autosuggest__suggestions--open",suggestionsList:"autosuggest__suggestions__list",suggestion:"autosuggest__suggestions__list__item",suggestionFirst:"autosuggest__suggestions__list--first",suggestionHighlighted:"autosuggest__suggestions__list--highlighted",sectionContainer:"autosuggest__section",sectionContainerFirst:"autosuggest__section--first",sectionTitle:"autosuggest__section__title"},clearInput:!1,type:"text",initialValue:"",disabled:!1,setQuery:function(){},noResultsText:""},B.propTypes={setQuery:s().func,getSuggestions:s().func.isRequired,getSuggestionValue:s().func.isRequired,renderSuggestion:s().func.isRequired,setResults:s().func.isRequired,collection:s().arrayOf(s().shape({})).isRequired,placeholder:s().string.isRequired,id:s().string,theme:s().shape({}),clearInput:s().bool,type:s().string,initialValue:s().string,disabled:s().bool,noResultsText:s().string};const V=B;function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,z(r.key),r)}}function z(e){var t=function(e){if("object"!=W(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==W(t)?t:t+""}function Q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Q=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}var Y=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Q()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])).state={item:e.item},n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),r=t,i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.item.id!==t.item.id?{item:e.item}:null}}],(o=[{key:"render",value:function(){var e=this.state.item;return n().createElement("span",null,e.name)}}])&&K(r.prototype,o),i&&K(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,i}(n().Component);Y.propTypes={item:s().shape({id:s().number.isRequired}).isRequired},Y.displayName="DataBoxSuggestionComponent";const J=Y;function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,te(r.key),r)}}function te(e){var t=function(e){if("object"!=Z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ne=function(){return!!e})()}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}var ie=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=re(t),function(e,t){if(t&&("object"==Z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ne()?Reflect.construct(t,n||[],re(e).constructor):t.apply(e,n))}(this,t,[e])).handleClick=n.handleClick.bind(n),n.handleChange=n.handleChange.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oe(e,t)}(t,e),r=t,o=[{key:"handleClick",value:function(){var e=this.props,t=e.setActive,n=e.active,r=e.index;t(n?0:r+1)}},{key:"handleChange",value:function(e){var t=e.target.value,n=this.props.setSearchValue,r="".concat([window.location.protocol,"//",window.location.host,window.location.pathname].join(""),"?initval=").concat(t);window.history.replaceState({initVal:t},document.title,r),n(t)}},{key:"render",value:function(){var e=this.props,t=e.button,r=e.index,o=e.box,i=e.active,u=e.getSuggestions,s=e.searchValue,a=r+1,c=o.background,l="db-button button-".concat(a),f=o.search.index===a;return c.overlay&&(l+=" overlay"),f&&(l+=" db-search"),i&&!f&&(l+=" active"),f?o.search.autocomplete?n().createElement("div",{className:l,key:a},n().createElement("span",{dangerouslySetInnerHTML:{__html:t.text}}),n().createElement(V,{placeholder:o.search.placeHolder,setQuery:function(){},setResults:function(e){1===e.length&&e[0].url&&(window.location.href=e[0].url)},collection:[],getSuggestions:u,getSuggestionValue:function(e){return e.name},renderSuggestion:function(e){return n().createElement(J,{item:e})}})):n().createElement("div",{className:l,key:a},n().createElement("span",null,t.text),n().createElement("input",{type:"text",value:s,placeholder:o.search.placeHolder,onChange:this.handleChange})):""!==t.link?n().createElement("div",{key:a,role:"button",tabIndex:"0",onClick:this.handleClick,onKeyUp:function(){},className:l},n().createElement("span",null,n().createElement("a",{href:t.link},t.text))):n().createElement("div",{key:a,role:"button",tabIndex:"0",onClick:this.handleClick,onKeyUp:function(){},className:l},n().createElement("span",null,t.text))}}],o&&ee(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);ie.defaultProps={searchValue:""},ie.propTypes={active:s().bool.isRequired,index:s().number.isRequired,searchValue:s().string,setActive:s().func.isRequired,setSearchValue:s().func.isRequired,button:s().shape({text:s().string.isRequired,link:s().string.isRequired}).isRequired,box:s().shape({background:s().shape({color:s().string.isRequired,linkColor:s().string.isRequired,src:s().string.isRequired,height:s().number.isRequired,text:s().string.isRequired,overlay:s().bool.isRequired}).isRequired,search:s().shape({index:s().number.isRequired,autocomplete:s().bool.isRequired,placeHolder:s().string.isRequired}).isRequired}).isRequired,getSuggestions:s().func.isRequired},ie.displayName="DataBoxButtonComponent";const ue=ie;var se=function(e,t){return void 0!==e.name&&void 0!==t.name?e.name.toLowerCase().localeCompare(t.name.toLowerCase(),"da",{ignorePunctuation:!0}):0},ae=function(e){var t=e.assoc.items.sort(se).map(function(e){if(e.children.length>0){var t=e.children.sort(se).map(function(e){return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name),n().createElement("ul",null,t))}return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("div",null,n().createElement("ul",null,t))};ae.propTypes={assoc:s().shape({items:s().arrayOf(s().shape({})).isRequired}).isRequired},ae.displayName="DataBoxStackedAssociationComponent";const ce=ae;function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pe(r.key),r)}}function pe(e){var t=function(e){if("object"!=le(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=le(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==le(t)?t:t+""}function de(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(de=function(){return!!e})()}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ge(e)}function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},he(e,t)}var ye=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=ge(t),function(e,t){if(t&&("object"==le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,de()?Reflect.construct(t,n||[],ge(e).constructor):t.apply(e,n))}(this,t,[e])).state={collapsed:e.collapsed},n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&he(e,t)}(t,e),r=t,(o=[{key:"componentDidMount",value:function(){var e=this;this.props.attributes.forEach(function(t){if(t.selector){var n=e.node.querySelector(t.selector);n&&n.setAttribute(t.attr,t.value)}else e.node.setAttribute(t.attr,t.value)})}},{key:"render",value:function(){var e=this,t=this.props,r=t.header,o=t.level,i=t.content,u=t.classNames,s=t.onClick,a=t.children,c=t.dataID,l=t.headerElement,f="csc-frame au_collapsible";return this.state.collapsed&&(f+=" au_collapsed"),u&&(f+=" ".concat(u)),n().createElement("div",{"data-id":c,ref:function(t){e.node=t},className:f},o>-1?n().createElement("div",{className:"csc-header",onClick:function(){e.setState(function(e){return{collapsed:!e.collapsed}},function(){var t=e.state.collapsed;s(t,e.node)})},onKeyUp:function(){},role:"button",tabIndex:0},function(){switch(o){case 0:return l;case 1:return n().createElement("h1",null,r);case 2:return n().createElement("h2",null,r);case 3:return n().createElement("h3",null,r);case 4:return n().createElement("h4",null,r);case 5:return n().createElement("h5",null,r);default:return n().createElement("h6",null,r)}}()):null,a||i)}}])&&fe(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);ye.defaultProps={dataID:null,children:null,content:null,header:"",headerElement:null,level:1,classNames:"",onClick:function(){},attributes:[]},ye.propTypes={dataID:s().string,children:s().element,collapsed:s().bool.isRequired,header:s().string,headerElement:s().element,level:s().number,content:s().element,classNames:s().string,onClick:s().func,attributes:s().arrayOf(s().shape({attr:s().string,value:s().string,selector:s().string}))},ye.displayName="AUCollapsibleComponent";const me=ye;function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Se(r.key),r)}}function Se(e){var t=function(e){if("object"!=be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==be(t)?t:t+""}function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oe=function(){return!!e})()}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}var Pe=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=we(t),function(e,t){if(t&&("object"==be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oe()?Reflect.construct(t,n||[],we(e).constructor):t.apply(e,n))}(this,t,[e])).state={open:e.open},n.handleClick=n.handleClick.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}(t,e),r=t,(o=[{key:"handleClick",value:function(){var e=this.props,t=e.rememberState,n=e.boxID,r=e.grouping,o=e.index,i=this.state.open;t&&(i?sessionStorage.removeItem("box-".concat(n,"-group-").concat(r,"-index-").concat(o)):sessionStorage.setItem("box-".concat(n,"-group-").concat(r,"-index-").concat(o),!0)),this.setState(function(e){return{open:!e.open}})}},{key:"render",value:function(){var e=this.state.open,t=this.props.assoc,r=t.items.sort(se).map(function(e){if(e.children.length>0){var t=e.children.sort(se).map(function(e){return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("li",{key:e.id},e.url?n().createElement("a",{href:e.url},e.name):n().createElement("span",null,e.name),n().createElement("ul",null,t))}return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))}),o=n().createElement("ul",null,r);return n().createElement(me,{key:e,collapsed:!e,level:3,header:t.name,content:o,onClick:this.handleClick})}}])&&ve(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);Pe.defaultProps={},Pe.propTypes={boxID:s().number.isRequired,grouping:s().number.isRequired,assoc:s().shape({name:s().string.isRequired,items:s().arrayOf(s().shape({})).isRequired}).isRequired,index:s().number.isRequired,open:s().bool.isRequired,rememberState:s().bool.isRequired},Pe.displayName="DataBoxAssociationComponent";const xe=Pe;var Ie=function(e){var t,r=e.stacked,o=e.grouping,i=e.expand,u=e.rememberState,s=e.boxID;return t=r&&1===o.associations.length?e.grouping.associations.map(function(e){return n().createElement(ce,{key:e.id,assoc:e})}):e.grouping.associations.map(function(e,t){var r=i||1===o.associations.length||u&&sessionStorage.getItem("box-".concat(s,"-group-").concat(o.id,"-index-").concat(t));return n().createElement(xe,{key:e.id,open:r,boxID:s,rememberState:u,grouping:o.id,index:t,assoc:e})}),n().createElement("div",{id:"box-".concat(s,"-grouping-").concat(o.id)},t)};Ie.defaultProps={},Ie.propTypes={boxID:s().number.isRequired,stacked:s().bool.isRequired,expand:s().bool.isRequired,rememberState:s().bool.isRequired,grouping:s().shape({id:s().number.isRequired,associations:s().arrayOf(s().shape({})).isRequired}).isRequired},Ie.displayName="DataBoxGroupingComponent";const ke=Ie;var _e=function(e){var t=e.items,r=e.searchValue,o=t.sort(se).filter(function(e){return e.name.toLowerCase().indexOf(r.toLowerCase())>-1}).map(function(e){return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("div",null,n().createElement("ul",null,o))};_e.propTypes={items:s().arrayOf(s().shape({id:s().number.isRequired,url:s().string.isRequired,name:s().string.isRequired})).isRequired,searchValue:s().string.isRequired},_e.displayName="DataBoxSearchResultComponent";const Re=_e;function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,De(r.key),r)}}function De(e){var t=function(e){if("object"!=Ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(t)?t:t+""}function qe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qe=function(){return!!e})()}function Te(e){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Te(e)}function Me(e,t){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Me(e,t)}var Fe=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Te(t),function(e,t){if(t&&("object"==Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qe()?Reflect.construct(t,n||[],Te(e).constructor):t.apply(e,n))}(this,t,[e])).letters=["...","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","æ","ø","å"],n.state={letterIndex:n.letters.indexOf(e.initLetter.toLowerCase())},n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Me(e,t)}(t,e),r=t,(o=[{key:"render",value:function(){var e=this,t=this.state.letterIndex,r=this.props,o=r.linkColor,i=r.rememberState,u=r.boxID,s=this.letters.map(function(r,s){var a=e.props.items,c=0===s||a.filter(function(e){return 0===e.name.toLowerCase().indexOf(r)}).length>0,l="";c&&(l+="available"),s===t&&(l+=" active");var f={};return c&&(f=t===s?{backgroundColor:"#fff",color:o}:{backgroundColor:o}),n().createElement("li",{key:r,className:l},n().createElement("button",{type:"button",style:f,onClick:function(){c&&(e.setState({letterIndex:s}),i&&sessionStorage.setItem("box-alphabet-".concat(u),e.letters[s]))}},r))}),a=this.props.items;0!==t&&(a=a.filter(function(n){return 0===n.name.toLowerCase().indexOf(e.letters[t])}));var c=a.sort(se).map(function(e){var t=e.children.map(function(e){return n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return e.children.length>0?n().createElement("li",{key:e.id},e.url?n().createElement("a",{href:e.url},e.name):n().createElement("span",null,e.name),n().createElement("ul",null,t)):e.parent?null:n().createElement("li",{key:e.id},n().createElement("a",{href:e.url},e.name))});return n().createElement("div",null,n().createElement("ul",{className:"letters"},s),n().createElement("ul",null,c))}}])&&Ce(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);Fe.defaultProps={},Fe.propTypes={initLetter:s().string.isRequired,items:s().arrayOf(s().shape({})).isRequired,linkColor:s().string.isRequired,rememberState:s().bool.isRequired,boxID:s().number.isRequired},Fe.displayName="DataBoxAlphabetComponent";const Ae=Fe;function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,He(r.key),r)}}function He(e){var t=function(e){if("object"!=Le(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Le(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Le(t)?t:t+""}function Ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ue=function(){return!!e})()}function Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Be(e)}function $e(e,t){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$e(e,t)}var Ve=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Be(t),function(e,t){if(t&&("object"==Le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ue()?Reflect.construct(t,n||[],Be(e).constructor):t.apply(e,n))}(this,t,[e])).state={loading:!0,visible:e.visible},n.lazyLoad=n.lazyLoad.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$e(e,t)}(t,e),r=t,i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.visible!==t.visible?{visible:e.visible}:null}}],(o=[{key:"componentDidMount",value:function(){var e=this;this.lazyLoad(),window.addEventListener("scroll",function(){e.lazyLoad()})}},{key:"componentDidUpdate",value:function(){this.lazyLoad()}},{key:"lazyLoad",value:function(){var e=this.props,t=e.loadingCondition,n=e.loaded,r=e.domID,o=e.onLoad,i=this.state,u=i.loading,s=i.visible,a=document.getElementById(r);!n&&u&&t&&(s||function(e){if(null===e)return!1;var t=e.getBoundingClientRect();return t.bottom>0&&t.right>0&&t.left<(window.innerWidth||document.documentElement.clientWidth)&&t.top<(window.innerHeight||document.documentElement.clientHeight)}(a))&&this.setState({loading:!1},function(){o()})}},{key:"render",value:function(){var e=this.props,t=e.columns,r=e.content,o=e.loaded,i=e.domID,u=e.children;return o?u||r:n().createElement("div",{id:i,className:"cell column ".concat(t)},n().createElement("p",{className:"spinner"}))}}])&&Ne(r.prototype,o),i&&Ne(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,i}(n().Component);Ve.defaultProps={domID:"au-spinner-component",visible:!1,columns:"large-12 medium-12 small-12",content:null,children:null,onLoad:function(){}},Ve.propTypes={domID:s().string,visible:s().bool,columns:s().string,content:s().element,children:s().element,loaded:s().bool.isRequired,loadingCondition:s().bool.isRequired,onLoad:s().func},Ve.displayName="AUSpinnerComponent";const We=Ve;function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qe(r.key),r)}}function Qe(e){var t=function(e){if("object"!=Ke(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ke(t)?t:t+""}function Ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ge=function(){return!!e})()}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}var Je=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t,n){return t=Xe(t),function(e,t){if(t&&("object"==Ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ge()?Reflect.construct(t,n||[],Xe(e).constructor):t.apply(e,n))}(this,t,[e]);var r=C(window.location.search),o=e.box.config,i=o.stacked,u=o.rememberState&&sessionStorage.getItem("box-header-".concat(e.box.id))?parseInt(sessionStorage.getItem("box-header-".concat(e.box.id)),10):e.box.config.trigger;return n.state={active:u,rawData:null,items:[],groupings:[],stacked:i,searchValue:void 0===r.initval?"":decodeURIComponent(r.initval)},n.setActive=n.setActive.bind(n),n.setSearchValue=n.setSearchValue.bind(n),n.getSuggestions=n.getSuggestions.bind(n),n}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}(t,e),r=t,o=[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.parse,r=t.box,o=this.state.searchValue;n(r.data.source,function(t){var n=t.items,r=t.groupings,o=t.rawData;e.setState({items:n,groupings:r||[],rawData:o})}),""!==o&&this.setSearchValue(o)}},{key:"componentDidUpdate",value:function(){var e=this.props.box,t=this.state,n=t.rawData,r=t.items,o=t.groupings,i=e.data;"function"==typeof i.callback&&i.callback(n||{items:r,groupings:o})}},{key:"setActive",value:function(e){var t=this.props.box;this.setState({active:e}),t.config.rememberState&&sessionStorage.setItem("box-header-".concat(t.id),e)}},{key:"setSearchValue",value:function(e){var t=this.props.box;t.search.autocomplete||this.setState({searchValue:e,active:""===e?0:t.search.index})}},{key:"getSuggestions",value:function(e,t,n){var r=this.state.items,o=e.trim().toLowerCase();n(o.length<2?[]:r.filter(function(e){return e.name.toLowerCase().indexOf(o)>-1}).sort(se))}},{key:"render",value:function(){var e=this,t=this.props.box,r=this.state,o=r.active,i=r.items,u=r.searchValue,s=r.groupings,a=r.stacked,c=t.config,l=t.background,f=n().createElement("div",{className:"content"},function(){var e=t.search.index,r=t.config.alphabet,c=t.config.rememberState&&sessionStorage.getItem("box-alphabet-".concat(t.id))?sessionStorage.getItem("box-alphabet-".concat(t.id)):t.config.initLetter;if(o===r)return n().createElement(Ae,{boxID:t.id,rememberState:t.config.rememberState,initLetter:c,color:t.background.color,linkColor:t.background.linkColor,items:i});if(""!==u&&!t.search.autocomplete)return n().createElement(Re,{items:i,searchValue:u});var l=0;e>0&&(l=e>o?0:1);var f=0;r>0&&(f=r>o?0:1);var p=s[o-l-f-1];return p?n().createElement(ke,{boxID:t.id,rememberState:t.config.rememberState,stacked:a,grouping:p,expand:t.config.expand}):n().createElement("div",{className:"box-".concat(t.id,"-empty")})}()),p=c.buttons.map(function(r,i){var s=i;return a?n().createElement("div",{key:s},n().createElement(ue,{box:t,button:r,index:i,active:i+1===o,setActive:e.setActive,setSearchValue:e.setSearchValue,getSuggestions:e.getSuggestions}),o>0&&i+1===o?f:null):n().createElement(ue,{key:s,box:t,button:r,index:i,active:i+1===o,searchValue:u,setActive:e.setActive,setSearchValue:e.setSearchValue,getSuggestions:e.getSuggestions})}),d="au_databox collapse buttons-".concat(c.buttons.length);c.firstline&&(d+=" first-line-full"),a&&(d+=" stacked");var g={backgroundColor:l.color};""!==l.src&&(g.backgroundImage="url('".concat(l.src,"')")),l.height>0&&(g.height=l.height);var h=n().createElement("div",{className:d},n().createElement("div",{className:"button-wrapper",style:g},""!==l.text?n().createElement("div",{className:"au_focus",dangerouslySetInnerHTML:{__html:l.text}}):null,n().createElement("div",null,p)),o>0&&!a?f:null);return n().createElement(We,{domID:"spinner-".concat(t.config.container),loadingCondition:0===i.length,loaded:i.length>0,onLoad:function(){t.loaded=!0}},h)}}],o&&ze(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n().Component);Je.defaultProps={},Je.propTypes={box:s().shape({id:s().number.isRequired,data:s().shape({source:s().string.isRequired,mode:s().string.isRequired,callback:s().func.isRequired}),config:s().shape({expand:s().bool.isRequired,initLetter:s().string.isRequired,alphabet:s().number.isRequired,rememberState:s().bool.isRequired,trigger:s().number.isRequired,stacked:s().bool.isRequired,buttons:s().arrayOf(s().shape({})).isRequired,firstline:s().bool.isRequired,container:s().string.isRequired}).isRequired,background:s().shape({color:s().string.isRequired,linkColor:s().string.isRequired,src:s().string.isRequired,height:s().string.isRequired,text:s().string.isRequired}).isRequired,search:s().shape({autocomplete:s().bool.isRequired,index:s().number.isRequired}).isRequired,loaded:s().bool.isRequired}).isRequired,parse:s().func.isRequired},Je.displayName="DataBoxComponent";const Ze=Je;function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ot(r.key),r)}}function rt(e,t,n){return t&&nt(e.prototype,t),n&&nt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ot(e){var t=function(e){if("object"!=et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==et(t)?t:t+""}var it={config:{container:".au_databox",firstline:!0,alphabet:2,initLetter:"a",trigger:0,buttons:[{text:"Dummy knap 1",link:""},{text:"Dummy knap 2",link:""}],stacked:!1,rememberState:!1,expand:!1},background:{color:"#003d73",linkColor:"#003d73",src:"",height:0,text:"",overlay:!0},search:{autocomplete:!0,index:1,minLength:1,placeHolder:""},data:{mode:"json",source:"",callback:null}},ut=function(){return rt(function e(){tt(this,e)},null,[{key:"json",value:function(e,t){if(e){var n=[];Array.isArray(e)?n=e:n.push(e);var r=[];n.forEach(function(e){r.push(new Promise(function(t){fetch(e).then(function(e){return e.json()}).then(function(e){t(e)})}))}),Promise.all(r).then(function(e){t({items:e.map(function(e){return e.items})[0],groupings:e.map(function(e){return e.groupings})[0]||[]})})}}},{key:"xml",value:function(e,t){AU.helpers.getXML(e,function(e){!function(e){var n=[],r=[],o=[],i=[],u=1;do{i=$(e).find("associations".concat(u," > item"));for(var s=[],a=0;a<i.length;a+=1)s.push({id:$(i[a]).attr("id"),name:$(i[a]).attr("name"),items:[]});s.length>0&&o.push(s),u+=1}while(i.length>0);var c=$(e).find("items > item");$.each(c,function(){var e=this,t=$(this).find("extra"),i=[];$.each(t.find("param"),function(){i.push({param:$(e).text()})});for(var u={id:$(this).attr("id"),name:$(this).attr("name"),url:$(this).attr("url"),parent:$(this).attr("parent"),extra:i,children:[],associations:[]},s=0;s<o.length;s+=1){var a=$(this).find("association".concat(parseInt(s+1,10)));u.associations.push([]);for(var c=0;c<a.length;c+=1){var l=parseInt($(a[c]).attr("id"),10)-1;u.associations[s].push({id:o[s][l].id,name:o[s][l].name}),o[s][l].items.push(u)}}n.push(u),void 0!==u.parent&&""!==u.parent&&r.push(u)});for(var l=0;l<r.length;l+=1)for(var f=r[l].parent,p=0;p<n.length;p+=1)if(n[p].id===f){n[p].children.push(r[l]);break}for(var d=[],g=0;g<o.length;g+=1)d.push({id:g,associations:o[g]});t({rawData:e,items:n,groupings:d})}(e)})}},{key:"table",value:function(e,t){var n=$("".concat(e," > table")),r=$("".concat(e," > ul")),o=[],i=[],u=[];$("li",r).each(function(){var e=[];$("> ul > li",this).each(function(t){e.push({id:t,name:$(this).text(),items:[]})}),e.length>0&&u.push(e)}),$("tr",n).each(function(e){if(e>0){for(var t=$("td",this),n=parseInt(t.eq(0).text(),10),r=parseInt(t.eq(1).text(),10),s=t.eq(2).text(),a={id:n,name:s=s.trim(),url:$("a",t.eq(2)).attr("href"),parent:r,extra:[],children:[],associations:[]},c=0;c<u.length;c+=1){var l=t.eq(c+3).text().split(",");a.associations.push([]);for(var f=0;f<l.length;f+=1){var p=parseInt(l[f],10)-1;void 0!==u[c][p]&&(a.associations[c].push({id:u[c][p].id,name:u[c][p].name}),u[c][p].items.push(a))}}0===a.parent||""===a.parent?o.push(a):i.push(a)}});for(var s=0;s<i.length;s+=1)for(var a=i[s].parent,c=0;c<o.length;c+=1)if(o[c].id===a){o[c].children.push(i[s]);break}for(var l=[],f=0;f<u.length;f+=1)l.push({id:f,associations:u[f]});t({items:o,groupings:l})}},{key:"list",value:function(e,t){var n=$(e),r=[];$("li",n).each(function(e){r.push({id:e,label:$(this).text(),value:$(this).text(),name:$(this).text(),url:$("a",this).attr("href"),children:[],associations:[]})}),t({items:r,groupings:[]})}}])}(),st=function(){function e(t){tt(this,e),this.boxes=t}return rt(e,[{key:"init",value:function(){for(var t={json:ut.json,xml:ut.xml,table:ut.table,list:ut.list},r=0;r<this.boxes.length;r+=1){var o=this.boxes[r];if(!o.loaded){(o=e.mergeOptions(o)).id=r,e.legacyCleanUp(o);var u=document.querySelector(o.config.container),s=u&&"hidden"!==getComputedStyle(u).visibility;if(!o.config.stacked&&AU.responsive.state&&"PHONE"===AU.responsive.state.NAME&&(o.config.stacked=!0),s&&(i().render(n().createElement(Ze,{box:o,parse:t[o.data.mode]}),u),o.loaded=!0),"table"===o.data.mode||"list"===o.data.mode){var a=document.querySelector(o.data.source);a&&a.parentNode.removeChild(a)}}}}}],[{key:"mergeOptions",value:function(e){var t=e;for(var n in t.hasOwnProperty("config")||(t.config={}),it.config)t.config.hasOwnProperty(n)||(t.config[n]=it.config[n]);for(var r in t.hasOwnProperty("background")||(t.background={}),it.background)t.background.hasOwnProperty(r)||(t.background[r]=it.background[r]);for(var o in t.hasOwnProperty("search")||(t.search={}),it.search)t.search.hasOwnProperty(o)||(t.search[o]=it.search[o]);for(var i in t.hasOwnProperty("data")||(t.data={}),it.data)t.data.hasOwnProperty(i)||(t.data[i]=it.data[i]);return t}},{key:"legacyCleanUp",value:function(e){var t=e,n=$(t.config.container);if(null!==n){var r=$("> *:not(.no-header)",n);r.length>0&&(t.config.buttons=[],r.each(function(){t.config.buttons.push({text:$(this).text(),link:""})}))}}}])}();window.AUDatabox=st})(),{}})());
2
2
  //# sourceMappingURL=databox.js.map
@@ -1,2 +1,2 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","react-dom"],t);else{var r="object"==typeof exports?t(require("react"),require("react-dom")):t(e.React,e.ReactDOM);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(e,t)=>(()=>{var r={119(t){"use strict";t.exports=e},545(e){"use strict";e.exports=t},556(e,t,r){e.exports=r(694)()},694(e,t,r){"use strict";var n=r(925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,o,i){if(i!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return r.PropTypes=r,r}},925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,a),o.exports}return a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=a(119),t=a.n(e),r=a(545),n=a.n(r),o=a(556),i=a.n(o);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var f={da:{diagramme:{semestre:"semester",kvarterer:"quarter",regulation:"Academic regulations",courseTypes:["Obligatorisk","Valgfag","Tilvalg","Støttefag"],none:"Der er ikke oprettet et studiediagram for",select:"Vælg linje"}},en:{diagramme:{semestre:"semester",kvarterer:"kvarter",regulation:"Studieordning",courseTypes:["Compulsory","Elective","Supplementary subject","Auxiliary subject"],none:"No study diagramme has been created for",select:"Choose track"}}},d=function(e){function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(t=function(e,t,r){return t=p(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}(this,r,[e])).state={nodes:[],active:e.track},t}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(r,e),n=r,a=[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.print,a=t.response,o=t.lang,i=new Array(a.lines.length),c=[];a.lines.forEach(function(e,t){c.push(new Promise(function(n){var a="https://eddiprod.au.dk/EDDI/webservices/StudieoversigtService2.cfc?method=GetStudiediagramData&lang=en&allowOrigin=true&linjeid=".concat(e.id);fetch(a).then(function(e){return e.json()}).then(function(a){var c=a.DiagramMetaData.DATA[0]?a.DiagramMetaData.DATA[0][3]:"",l={name:"da"===o?e.name:e.nameEnglish,periodType:c,table:r.diagrammeParse(a,o),list:r.diagrammeParse(a,o,"list")};i[t]=l,n(a)})}))}),Promise.all(c).then(function(){e.setState({nodes:i},function(){n&&window.print()})})}},{key:"changeActive",value:function(e){this.setState({active:e.target.value})}},{key:"render",value:function(){var e=this.state,r=e.nodes,n=e.active,a=this.props,o=a.course,i=a.lang;if(0===r.length)return t().createElement("div",null);var c=this.props.print,l="http://kursuskatalog.au.dk/".concat(i,"/linkedexams/"),u="http://kursuskatalog.au.dk/".concat(i,"/electivegroups/"),s="http://tilvalg.au.dk",p=r[n],m=p.table,d=p.list,y=p.name,g=m.map(function(e,a){var o=a,c=e.map(function(e,r){var n=r;if(e.name){var a=l+e.courseId;return"tlv"===e.type?a=s:"val"!==e.type&&"ogr"!==e.type||(a=u+e.code),t().createElement("td",{key:n,className:e.type,colSpan:e.colspan,rowSpan:e.rowspan},t().createElement("a",{target:"_blank",rel:"noreferrer noopener",href:a},e.name,t().createElement("br",null),"(".concat(e.ects," ECTS)")))}return null});return t().createElement("tr",{key:o},t().createElement("th",null,"".concat(a+1,". "),f[i].diagramme[r[n].periodType]),c)}),v=d.map(function(e,a){var o=a,c=e.map(function(e,r){var n=r;if(e.name){var a=l+e.courseId;return"tlv"===e.type?a=s:"val"!==e.type&&"ogr"!==e.type||(a=u+e.code),t().createElement("p",{key:n,className:e.type},t().createElement("span",null,t().createElement("a",{target:"_blank",rel:"noreferrer noopener",href:a},e.name)),e.ects>0?t().createElement("span",null,t().createElement("strong",null,e.ects)," ECTS"):t().createElement("span",null,t().createElement("strong",null,"…")))}return null});return t().createElement("li",{key:o},t().createElement("h3",null,"".concat(a+1,". "),f[i].diagramme[r[n].periodType]),c)}),h=r.map(function(e,r){return t().createElement("option",{key:e.name,value:r},e.name)});return t().createElement("div",null,t().createElement("h2",null,r[n].name),r.length>1&&!c?[t().createElement("p",{key:0},"".concat(f[i].diagramme.select,":")),t().createElement("select",{key:1,onChange:this.changeActive.bind(this),value:n},h)]:null,function(){if(!c){var e="".concat(window.location.href,"?coursesprint=").concat(o,"|").concat(n);return t().createElement("a",{className:"print",href:e,onClick:function(t){t.preventDefault(),window.open(e,"","width=1025,height=600")}},"Print")}return null}(),t().createElement("div",{className:"study-diagramme hide-for-small-only"},m.length<1||d.length<1?t().createElement("div",null,"".concat(f[i].diagramme.none," ").concat(y)):t().createElement("table",null,t().createElement("tbody",null,g))),t().createElement("div",{className:"study-diagramme list show-for-small-only"},m.length<1||d.length<1?t().createElement("div",null,"".concat(f[i].diagramme.none," ").concat(y)):t().createElement("ul",{className:"resetlist"},v)),t().createElement("dl",{className:"au_edutable_legend"},t().createElement("dt",{className:"au_edutable_mandatory"},f[i].diagramme.courseTypes[0]),t().createElement("dd",null),t().createElement("dt",{className:"au_edutable_optional"},f[i].diagramme.courseTypes[1]),t().createElement("dd",null),t().createElement("dt",{className:"au_edutable_supplementary"},f[i].diagramme.courseTypes[2]),t().createElement("dd",null),t().createElement("dt",{className:"au_edutable_support"},f[i].diagramme.courseTypes[3]),t().createElement("dd",null)))}}],o=[{key:"diagrammeParse",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"table",n=[];if(e.DiagramMetaData.DATA.length>0){for(var a=0;a<e.DiagramMetaData.DATA[0][1];a+=1)n[a]||n.push([]);e.DiagramStruktur.DATA.forEach(function(a){for(var o=a[0],i=a[1],c=0;c<i;c+=1)n[o][c]||n[o].push([]);for(var l="table"===r?1:a[2],u=e.DiagramMetaData.DATA[0][0],s=0;s<l;s+=1)n[o+s][i]={courseId:a[3],name:"da"===t?a[6]:a[7],type:a[4].toLowerCase(),colspan:a[5],rowspan:a[2],ects:s>0?0:u/(u/5/a[5])*a[2],code:a[8]}})}return n}}],a&&l(n.prototype,a),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,o}(t().PureComponent);d.propTypes={lang:i().string.isRequired,response:i().shape({lines:i().arrayOf(i().shape({name:i().string.isRequired,nameEnglish:i().string.isRequired})).isRequired}).isRequired,course:i().string.isRequired,track:i().string.isRequired,print:i().bool.isRequired},d.displayName="AUDiagrammeComponent";const y=d;function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}var b={config:{container:".au_edutable_eddi_container",courseID:0,track:0}},E=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tables=r,this.lang=t}return r=e,o=[{key:"mergeOptions",value:function(e){var t=e;for(var r in t.hasOwnProperty("config")||(t.config={}),b.config)t.config.hasOwnProperty(r)||(t.config[r]=b.config[r])}}],(a=[{key:"init",value:function(){var r=this,a=AU.helpers.getQuerystring("coursesprint");if(""!==a)for(var o=a.split(","),i=0;i<o.length;i+=1){var c=o[i].split("|");c.length>1?this.tables.push({config:{container:"#print_course_".concat(i),courseID:parseInt(c[0],10),track:parseInt(c[1],10)}}):this.tables.push({config:{container:"#print_course_".concat(i),courseID:parseInt(c[0],10)}}),n().render(t().createElement("div",{id:"print_course_".concat(i)}),document.querySelector("body"))}for(var l=function(){var o=r.tables[u];o.id=u,e.mergeOptions(o);var i="https://eddiprod.au.dk/EDDI/webservices/StudieoversigtService2.cfc?method=getLinjeListByDokordningId&tjekForVisningIstudieDiagram=true&allowOrigin=true&dokordningId=".concat(o.config.courseID);fetch(i).then(function(e){return e.json()}).then(function(e){var i=document.querySelector(o.config.container);i&&n().render(t().createElement(y,{lang:r.lang,response:e,course:o.config.courseID,track:o.config.track,print:""!==a}),i)})},u=0;u<this.tables.length;u+=1)l()}}])&&v(r.prototype,a),o&&v(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,o}();window.AUDiagramme=E})(),{}})());
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","react-dom"],t);else{var r="object"==typeof exports?t(require("react"),require("react-dom")):t(e.React,e.ReactDOM);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(e,t)=>(()=>{var r={119(t){"use strict";t.exports=e},545(e){"use strict";e.exports=t},556(e,t,r){e.exports=r(694)()},694(e,t,r){"use strict";var n=r(925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,o,i){if(i!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return r.PropTypes=r,r}},925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,a),o.exports}return a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=a(119),t=a.n(e),r=a(545),n=a.n(r),o=a(556),i=a.n(o);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var f={da:{diagramme:{semestre:"semester",kvarterer:"quarter",regulation:"Academic regulations",courseTypes:["Obligatorisk","Valgfag","Tilvalg","Støttefag"],none:"Der er ikke oprettet et studiediagram for",select:"Vælg linje"}},en:{diagramme:{semestre:"semester",kvarterer:"kvarter",regulation:"Studieordning",courseTypes:["Compulsory","Elective","Supplementary subject","Auxiliary subject"],none:"No study diagramme has been created for",select:"Choose track"}}},d=function(e){function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(t=function(e,t,r){return t=p(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}(this,r,[e])).state={nodes:[],active:e.track},t}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(r,e),n=r,a=[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.print,a=t.response,o=t.lang,i=new Array(a.lines.length),c=[];a.lines.forEach(function(e,t){c.push(new Promise(function(n){var a="https://eddiprod.au.dk/EDDI/webservices/StudieoversigtService2.cfc?method=GetStudiediagramData&lang=en&allowOrigin=true&linjeid=".concat(e.id);fetch(a).then(function(e){return e.json()}).then(function(a){var c=a.DiagramMetaData.DATA[0]?a.DiagramMetaData.DATA[0][3]:"",l={name:"da"===o?e.name:e.nameEnglish,periodType:c,table:r.diagrammeParse(a,o),list:r.diagrammeParse(a,o,"list")};i[t]=l,n(a)})}))}),Promise.all(c).then(function(){e.setState({nodes:i},function(){n&&window.print()})})}},{key:"changeActive",value:function(e){this.setState({active:e.target.value})}},{key:"render",value:function(){var e=this.state,r=e.nodes,n=e.active,a=this.props,o=a.course,i=a.lang;if(0===r.length)return t().createElement("div",null);var c=this.props.print,l="http://kursuskatalog.au.dk/".concat(i,"/linkedexams/"),u="http://kursuskatalog.au.dk/".concat(i,"/electivegroups/"),s="http://tilvalg.au.dk",p=r[n],m=p.table,d=p.list,y=p.name,g=m.map(function(e,a){var o=a,c=e.map(function(e,r){var n=r;if(e.name){var a=l+e.courseId;return"tlv"===e.type?a=s:"val"!==e.type&&"ogr"!==e.type||(a=u+e.code),t().createElement("td",{key:n,className:e.type,colSpan:e.colspan,rowSpan:e.rowspan},t().createElement("a",{target:"_blank",rel:"noreferrer noopener",href:a},e.name,t().createElement("br",null),"(".concat(e.ects," ECTS)")))}return null});return t().createElement("tr",{key:o},t().createElement("th",null,"".concat(a+1,". "),f[i].diagramme[r[n].periodType]),c)}),v=d.map(function(e,a){var o=a,c=e.map(function(e,r){var n=r;if(e.name){var a=l+e.courseId;return"tlv"===e.type?a=s:"val"!==e.type&&"ogr"!==e.type||(a=u+e.code),t().createElement("p",{key:n,className:e.type},t().createElement("span",null,t().createElement("a",{target:"_blank",rel:"noreferrer noopener",href:a},e.name)),e.ects>0?t().createElement("span",null,t().createElement("strong",null,e.ects)," ECTS"):t().createElement("span",null,t().createElement("strong",null,"…")))}return null});return t().createElement("li",{key:o},t().createElement("h3",null,"".concat(a+1,". "),f[i].diagramme[r[n].periodType]),c)}),h=r.map(function(e,r){return t().createElement("option",{key:e.name,value:r},e.name)});return t().createElement("div",null,t().createElement("h2",null,r[n].name),r.length>1&&!c?[t().createElement("p",{key:0},"".concat(f[i].diagramme.select,":")),t().createElement("select",{key:1,onChange:this.changeActive.bind(this),value:n},h)]:null,function(){if(!c){var e="".concat(window.location.href,"?coursesprint=").concat(o,"|").concat(n);return t().createElement("a",{className:"print",href:e,onClick:function(t){t.preventDefault(),window.open(e,"","width=1025,height=600")}},"Print")}return null}(),t().createElement("div",{className:"study-diagramme hide-for-small-only"},m.length<1||d.length<1?t().createElement("div",null,"".concat(f[i].diagramme.none," ").concat(y)):t().createElement("table",null,t().createElement("tbody",null,g))),t().createElement("div",{className:"study-diagramme list show-for-small-only"},m.length<1||d.length<1?t().createElement("div",null,"".concat(f[i].diagramme.none," ").concat(y)):t().createElement("ul",{className:"resetlist"},v)),t().createElement("dl",{className:"au_edutable_legend"},t().createElement("dt",{className:"au_edutable_mandatory"},f[i].diagramme.courseTypes[0]),t().createElement("dd",null),t().createElement("dt",{className:"au_edutable_optional"},f[i].diagramme.courseTypes[1]),t().createElement("dd",null),t().createElement("dt",{className:"au_edutable_supplementary"},f[i].diagramme.courseTypes[2]),t().createElement("dd",null),t().createElement("dt",{className:"au_edutable_support"},f[i].diagramme.courseTypes[3]),t().createElement("dd",null)))}}],o=[{key:"diagrammeParse",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"table",n=[];if(e.DiagramMetaData.DATA.length>0){for(var a=0;a<e.DiagramMetaData.DATA[0][1];a+=1)n[a]||n.push([]);e.DiagramStruktur.DATA.forEach(function(a){for(var o=a[0],i=a[1],c=0;c<i;c+=1)n[o][c]||n[o].push([]);for(var l="table"===r?1:a[2],u=e.DiagramMetaData.DATA[0][0],s=0;s<l;s+=1)n[o+s][i]={courseId:a[3],name:"da"===t?a[6]:a[7],type:a[4].toLowerCase(),colspan:a[5],rowspan:a[2],ects:s>0?0:u/(u/5/a[5])*a[2],code:a[8]}})}return n}}],a&&l(n.prototype,a),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,o}(t().PureComponent);d.propTypes={lang:i().string.isRequired,response:i().shape({lines:i().arrayOf(i().shape({name:i().string.isRequired,nameEnglish:i().string.isRequired})).isRequired}).isRequired,course:i().string.isRequired,track:i().string.isRequired,print:i().bool.isRequired},d.displayName="AUDiagrammeComponent";const y=d;function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}var b={config:{container:".au_edutable_eddi_container",courseID:0,track:0}},E=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tables=r,this.lang=t}return r=e,o=[{key:"mergeOptions",value:function(e){var t=e;for(var r in t.hasOwnProperty("config")||(t.config={}),b.config)t.config.hasOwnProperty(r)||(t.config[r]=b.config[r])}}],(a=[{key:"init",value:function(){var r=this,a=AU.helpers.getQuerystring("coursesprint");if(""!==a)for(var o=a.split(","),i=0;i<o.length;i+=1){var c=o[i].split("|");c.length>1?this.tables.push({config:{container:"#print_course_".concat(i),courseID:parseInt(c[0],10),track:parseInt(c[1],10)}}):this.tables.push({config:{container:"#print_course_".concat(i),courseID:parseInt(c[0],10)}}),n().render(t().createElement("div",{id:"print_course_".concat(i)}),document.querySelector("body"))}for(var l=function(){var o=r.tables[u];o.id=u,e.mergeOptions(o);var i="https://eddiprod.au.dk/EDDI/webservices/StudieoversigtService2.cfc?method=getLinjeListByDokordningId&tjekForVisningIstudieDiagram=true&allowOrigin=true&dokordningId=".concat(o.config.courseID);fetch(i).then(function(e){return e.json()}).then(function(e){var i=document.querySelector(o.config.container);i&&n().render(t().createElement(y,{lang:r.lang,response:e,course:o.config.courseID,track:o.config.track,print:""!==a}),i)})},u=0;u<this.tables.length;u+=1)l()}}])&&v(r.prototype,a),o&&v(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,o}();window.AUDiagramme=E})(),{}})());
2
2
  //# sourceMappingURL=diagramme.js.map